Fixing function for vl-bind structures.
Function:
(defun vl-bind-fix$inline (x) (declare (xargs :guard (vl-bind-p x))) (let ((__function__ 'vl-bind-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((scope (maybe-string-fix (std::prod-car (std::prod-car (cdr x))))) (addto (vl-exprlist-fix (std::prod-cdr (std::prod-car (cdr x))))) (modinsts (vl-modinstlist-fix (std::prod-car (std::prod-cdr (cdr x))))) (loc (vl-location-fix (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x)))))) (atts (vl-atts-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (cons :vl-bind (std::prod-cons (std::prod-cons scope addto) (std::prod-cons modinsts (std::prod-cons loc atts))))) :exec x)))
Theorem:
(defthm vl-bind-p-of-vl-bind-fix (b* ((new-x (vl-bind-fix$inline x))) (vl-bind-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-bind-fix-when-vl-bind-p (implies (vl-bind-p x) (equal (vl-bind-fix x) x)))
Function:
(defun vl-bind-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-bind-p acl2::x) (vl-bind-p acl2::y)))) (equal (vl-bind-fix acl2::x) (vl-bind-fix acl2::y)))
Theorem:
(defthm vl-bind-equiv-is-an-equivalence (and (booleanp (vl-bind-equiv x y)) (vl-bind-equiv x x) (implies (vl-bind-equiv x y) (vl-bind-equiv y x)) (implies (and (vl-bind-equiv x y) (vl-bind-equiv y z)) (vl-bind-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-bind-equiv-implies-equal-vl-bind-fix-1 (implies (vl-bind-equiv acl2::x x-equiv) (equal (vl-bind-fix acl2::x) (vl-bind-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-bind-fix-under-vl-bind-equiv (vl-bind-equiv (vl-bind-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-bind-fix-1-forward-to-vl-bind-equiv (implies (equal (vl-bind-fix acl2::x) acl2::y) (vl-bind-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-bind-fix-2-forward-to-vl-bind-equiv (implies (equal acl2::x (vl-bind-fix acl2::y)) (vl-bind-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-bind-equiv-of-vl-bind-fix-1-forward (implies (vl-bind-equiv (vl-bind-fix acl2::x) acl2::y) (vl-bind-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-bind-equiv-of-vl-bind-fix-2-forward (implies (vl-bind-equiv acl2::x (vl-bind-fix acl2::y)) (vl-bind-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)