(alias-alist-fix x) is an ACL2::fty alist fixing function that follows the fix-keys strategy.
(alias-alist-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun alias-alist-fix$inline (x) (declare (xargs :guard (alias-alist-p x))) (let ((acl2::__function__ 'alias-alist-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (if (atom x) nil (if (consp (car x)) (cons (cons (sv::svar-fix (caar x)) (svex-fix (cdar x))) (alias-alist-fix (cdr x))) (alias-alist-fix (cdr x)))) :exec x)))
Theorem:
(defthm alias-alist-p-of-alias-alist-fix (b* ((fty::newx (alias-alist-fix$inline x))) (alias-alist-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm alias-alist-fix-when-alias-alist-p (implies (alias-alist-p x) (equal (alias-alist-fix x) x)))
Function:
(defun alias-alist-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (alias-alist-p acl2::x) (alias-alist-p acl2::y)))) (equal (alias-alist-fix acl2::x) (alias-alist-fix acl2::y)))
Theorem:
(defthm alias-alist-equiv-is-an-equivalence (and (booleanp (alias-alist-equiv x y)) (alias-alist-equiv x x) (implies (alias-alist-equiv x y) (alias-alist-equiv y x)) (implies (and (alias-alist-equiv x y) (alias-alist-equiv y z)) (alias-alist-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm alias-alist-equiv-implies-equal-alias-alist-fix-1 (implies (alias-alist-equiv acl2::x x-equiv) (equal (alias-alist-fix acl2::x) (alias-alist-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm alias-alist-fix-under-alias-alist-equiv (alias-alist-equiv (alias-alist-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-alias-alist-fix-1-forward-to-alias-alist-equiv (implies (equal (alias-alist-fix acl2::x) acl2::y) (alias-alist-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-alias-alist-fix-2-forward-to-alias-alist-equiv (implies (equal acl2::x (alias-alist-fix acl2::y)) (alias-alist-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm alias-alist-equiv-of-alias-alist-fix-1-forward (implies (alias-alist-equiv (alias-alist-fix acl2::x) acl2::y) (alias-alist-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm alias-alist-equiv-of-alias-alist-fix-2-forward (implies (alias-alist-equiv acl2::x (alias-alist-fix acl2::y)) (alias-alist-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm cons-of-svar-fix-k-under-alias-alist-equiv (alias-alist-equiv (cons (cons (sv::svar-fix acl2::k) acl2::v) acl2::x) (cons (cons acl2::k acl2::v) acl2::x)))
Theorem:
(defthm cons-svar-equiv-congruence-on-k-under-alias-alist-equiv (implies (sv::svar-equiv acl2::k k-equiv) (alias-alist-equiv (cons (cons acl2::k acl2::v) acl2::x) (cons (cons k-equiv acl2::v) acl2::x))) :rule-classes :congruence)
Theorem:
(defthm cons-of-svex-fix-v-under-alias-alist-equiv (alias-alist-equiv (cons (cons acl2::k (svex-fix acl2::v)) acl2::x) (cons (cons acl2::k acl2::v) acl2::x)))
Theorem:
(defthm cons-svex-equiv-congruence-on-v-under-alias-alist-equiv (implies (sv::svex-equiv acl2::v v-equiv) (alias-alist-equiv (cons (cons acl2::k acl2::v) acl2::x) (cons (cons acl2::k v-equiv) acl2::x))) :rule-classes :congruence)
Theorem:
(defthm cons-of-alias-alist-fix-y-under-alias-alist-equiv (alias-alist-equiv (cons acl2::x (alias-alist-fix acl2::y)) (cons acl2::x acl2::y)))
Theorem:
(defthm cons-alias-alist-equiv-congruence-on-y-under-alias-alist-equiv (implies (alias-alist-equiv acl2::y y-equiv) (alias-alist-equiv (cons acl2::x acl2::y) (cons acl2::x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm alias-alist-fix-of-acons (equal (alias-alist-fix (cons (cons acl2::a acl2::b) x)) (cons (cons (sv::svar-fix acl2::a) (svex-fix acl2::b)) (alias-alist-fix x))))
Theorem:
(defthm alias-alist-fix-of-append (equal (alias-alist-fix (append std::a std::b)) (append (alias-alist-fix std::a) (alias-alist-fix std::b))))
Theorem:
(defthm consp-car-of-alias-alist-fix (equal (consp (car (alias-alist-fix x))) (consp (alias-alist-fix x))))