(equiv-contexts-fix x) is a usual ACL2::fty list fixing function.
(equiv-contexts-fix x) → fty::newx
In the logic, we apply pseudo-fnsym-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.
Function:
(defun equiv-contexts-fix$inline (x) (declare (xargs :guard (equiv-contextsp x))) (let ((__function__ 'equiv-contexts-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (cons (pseudo-fnsym-fix (car x)) (equiv-contexts-fix (cdr x)))) :exec x)))
Theorem:
(defthm equiv-contextsp-of-equiv-contexts-fix (b* ((fty::newx (equiv-contexts-fix$inline x))) (equiv-contextsp fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm equiv-contexts-fix-when-equiv-contextsp (implies (equiv-contextsp x) (equal (equiv-contexts-fix x) x)))
Function:
(defun equiv-contexts-equiv$inline (x y) (declare (xargs :guard (and (equiv-contextsp x) (equiv-contextsp y)))) (equal (equiv-contexts-fix x) (equiv-contexts-fix y)))
Theorem:
(defthm equiv-contexts-equiv-is-an-equivalence (and (booleanp (equiv-contexts-equiv x y)) (equiv-contexts-equiv x x) (implies (equiv-contexts-equiv x y) (equiv-contexts-equiv y x)) (implies (and (equiv-contexts-equiv x y) (equiv-contexts-equiv y z)) (equiv-contexts-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm equiv-contexts-equiv-implies-equal-equiv-contexts-fix-1 (implies (equiv-contexts-equiv x x-equiv) (equal (equiv-contexts-fix x) (equiv-contexts-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm equiv-contexts-fix-under-equiv-contexts-equiv (equiv-contexts-equiv (equiv-contexts-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-equiv-contexts-fix-1-forward-to-equiv-contexts-equiv (implies (equal (equiv-contexts-fix x) y) (equiv-contexts-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-equiv-contexts-fix-2-forward-to-equiv-contexts-equiv (implies (equal x (equiv-contexts-fix y)) (equiv-contexts-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equiv-contexts-equiv-of-equiv-contexts-fix-1-forward (implies (equiv-contexts-equiv (equiv-contexts-fix x) y) (equiv-contexts-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equiv-contexts-equiv-of-equiv-contexts-fix-2-forward (implies (equiv-contexts-equiv x (equiv-contexts-fix y)) (equiv-contexts-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm car-of-equiv-contexts-fix-x-under-pseudo-fnsym-equiv (pseudo-fnsym-equiv (car (equiv-contexts-fix x)) (car x)))
Theorem:
(defthm car-equiv-contexts-equiv-congruence-on-x-under-pseudo-fnsym-equiv (implies (equiv-contexts-equiv x x-equiv) (pseudo-fnsym-equiv (car x) (car x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cdr-of-equiv-contexts-fix-x-under-equiv-contexts-equiv (equiv-contexts-equiv (cdr (equiv-contexts-fix x)) (cdr x)))
Theorem:
(defthm cdr-equiv-contexts-equiv-congruence-on-x-under-equiv-contexts-equiv (implies (equiv-contexts-equiv x x-equiv) (equiv-contexts-equiv (cdr x) (cdr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cons-of-pseudo-fnsym-fix-x-under-equiv-contexts-equiv (equiv-contexts-equiv (cons (pseudo-fnsym-fix x) y) (cons x y)))
Theorem:
(defthm cons-pseudo-fnsym-equiv-congruence-on-x-under-equiv-contexts-equiv (implies (pseudo-fnsym-equiv x x-equiv) (equiv-contexts-equiv (cons x y) (cons x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm cons-of-equiv-contexts-fix-y-under-equiv-contexts-equiv (equiv-contexts-equiv (cons x (equiv-contexts-fix y)) (cons x y)))
Theorem:
(defthm cons-equiv-contexts-equiv-congruence-on-y-under-equiv-contexts-equiv (implies (equiv-contexts-equiv y y-equiv) (equiv-contexts-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-equiv-contexts-fix (equal (consp (equiv-contexts-fix x)) (consp x)))
Theorem:
(defthm equiv-contexts-fix-under-iff (iff (equiv-contexts-fix x) (consp x)))
Theorem:
(defthm equiv-contexts-fix-of-cons (equal (equiv-contexts-fix (cons a x)) (cons (pseudo-fnsym-fix a) (equiv-contexts-fix x))))
Theorem:
(defthm len-of-equiv-contexts-fix (equal (len (equiv-contexts-fix x)) (len x)))
Theorem:
(defthm equiv-contexts-fix-of-append (equal (equiv-contexts-fix (append std::a std::b)) (append (equiv-contexts-fix std::a) (equiv-contexts-fix std::b))))
Theorem:
(defthm equiv-contexts-fix-of-repeat (equal (equiv-contexts-fix (repeat n x)) (repeat n (pseudo-fnsym-fix x))))
Theorem:
(defthm list-equiv-refines-equiv-contexts-equiv (implies (list-equiv x y) (equiv-contexts-equiv x y)) :rule-classes :refinement)
Theorem:
(defthm nth-of-equiv-contexts-fix (equal (nth n (equiv-contexts-fix x)) (if (< (nfix n) (len x)) (pseudo-fnsym-fix (nth n x)) nil)))
Theorem:
(defthm equiv-contexts-equiv-implies-equiv-contexts-equiv-append-1 (implies (equiv-contexts-equiv x fty::x-equiv) (equiv-contexts-equiv (append x y) (append fty::x-equiv y))) :rule-classes (:congruence))
Theorem:
(defthm equiv-contexts-equiv-implies-equiv-contexts-equiv-append-2 (implies (equiv-contexts-equiv y fty::y-equiv) (equiv-contexts-equiv (append x y) (append x fty::y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm equiv-contexts-equiv-implies-equiv-contexts-equiv-nthcdr-2 (implies (equiv-contexts-equiv l l-equiv) (equiv-contexts-equiv (nthcdr n l) (nthcdr n l-equiv))) :rule-classes (:congruence))
Theorem:
(defthm equiv-contexts-equiv-implies-equiv-contexts-equiv-take-2 (implies (equiv-contexts-equiv l l-equiv) (equiv-contexts-equiv (take n l) (take n l-equiv))) :rule-classes (:congruence))