Fixing function for alias structures.
Function:
(defun alias-fix$inline (x) (declare (xargs :guard (alias-p x))) (let ((acl2::__function__ 'alias-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((name (sv::svar-fix (cdr (std::da-nth 0 x)))) (val (svex-fix (cdr (std::da-nth 1 x))))) (list (cons 'name name) (cons 'val val))) :exec x)))
Theorem:
(defthm alias-p-of-alias-fix (b* ((new-x (alias-fix$inline x))) (alias-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm alias-fix-when-alias-p (implies (alias-p x) (equal (alias-fix x) x)))
Function:
(defun alias-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (alias-p acl2::x) (alias-p acl2::y)))) (equal (alias-fix acl2::x) (alias-fix acl2::y)))
Theorem:
(defthm alias-equiv-is-an-equivalence (and (booleanp (alias-equiv x y)) (alias-equiv x x) (implies (alias-equiv x y) (alias-equiv y x)) (implies (and (alias-equiv x y) (alias-equiv y z)) (alias-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm alias-equiv-implies-equal-alias-fix-1 (implies (alias-equiv acl2::x x-equiv) (equal (alias-fix acl2::x) (alias-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm alias-fix-under-alias-equiv (alias-equiv (alias-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-alias-fix-1-forward-to-alias-equiv (implies (equal (alias-fix acl2::x) acl2::y) (alias-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-alias-fix-2-forward-to-alias-equiv (implies (equal acl2::x (alias-fix acl2::y)) (alias-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm alias-equiv-of-alias-fix-1-forward (implies (alias-equiv (alias-fix acl2::x) acl2::y) (alias-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm alias-equiv-of-alias-fix-2-forward (implies (alias-equiv acl2::x (alias-fix acl2::y)) (alias-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)