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