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