(elab-modlist-fix x) is a usual fty list fixing function.
(elab-modlist-fix x) → fty::newx
In the logic, we apply elab-mod$a-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 elab-modlist-fix$inline (x) (declare (xargs :guard (elab-modlist-p x))) (let ((__function__ 'elab-modlist-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (cons (elab-mod$a-fix (car x)) (elab-modlist-fix (cdr x)))) :exec x)))
Theorem:
(defthm elab-modlist-p-of-elab-modlist-fix (b* ((fty::newx (elab-modlist-fix$inline x))) (elab-modlist-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm elab-modlist-fix-when-elab-modlist-p (implies (elab-modlist-p x) (equal (elab-modlist-fix x) x)))
Function:
(defun elab-modlist-equiv$inline (x y) (declare (xargs :guard (and (elab-modlist-p x) (elab-modlist-p y)))) (equal (elab-modlist-fix x) (elab-modlist-fix y)))
Theorem:
(defthm elab-modlist-equiv-is-an-equivalence (and (booleanp (elab-modlist-equiv x y)) (elab-modlist-equiv x x) (implies (elab-modlist-equiv x y) (elab-modlist-equiv y x)) (implies (and (elab-modlist-equiv x y) (elab-modlist-equiv y z)) (elab-modlist-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm elab-modlist-equiv-implies-equal-elab-modlist-fix-1 (implies (elab-modlist-equiv x x-equiv) (equal (elab-modlist-fix x) (elab-modlist-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm elab-modlist-fix-under-elab-modlist-equiv (elab-modlist-equiv (elab-modlist-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-elab-modlist-fix-1-forward-to-elab-modlist-equiv (implies (equal (elab-modlist-fix x) y) (elab-modlist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-elab-modlist-fix-2-forward-to-elab-modlist-equiv (implies (equal x (elab-modlist-fix y)) (elab-modlist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm elab-modlist-equiv-of-elab-modlist-fix-1-forward (implies (elab-modlist-equiv (elab-modlist-fix x) y) (elab-modlist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm elab-modlist-equiv-of-elab-modlist-fix-2-forward (implies (elab-modlist-equiv x (elab-modlist-fix y)) (elab-modlist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm car-of-elab-modlist-fix-x-under-elab-mod$a-equiv (elab-mod$a-equiv (car (elab-modlist-fix x)) (car x)))
Theorem:
(defthm car-elab-modlist-equiv-congruence-on-x-under-elab-mod$a-equiv (implies (elab-modlist-equiv x x-equiv) (elab-mod$a-equiv (car x) (car x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cdr-of-elab-modlist-fix-x-under-elab-modlist-equiv (elab-modlist-equiv (cdr (elab-modlist-fix x)) (cdr x)))
Theorem:
(defthm cdr-elab-modlist-equiv-congruence-on-x-under-elab-modlist-equiv (implies (elab-modlist-equiv x x-equiv) (elab-modlist-equiv (cdr x) (cdr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cons-of-elab-mod$a-fix-x-under-elab-modlist-equiv (elab-modlist-equiv (cons (elab-mod$a-fix x) y) (cons x y)))
Theorem:
(defthm cons-elab-mod$a-equiv-congruence-on-x-under-elab-modlist-equiv (implies (elab-mod$a-equiv x x-equiv) (elab-modlist-equiv (cons x y) (cons x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm cons-of-elab-modlist-fix-y-under-elab-modlist-equiv (elab-modlist-equiv (cons x (elab-modlist-fix y)) (cons x y)))
Theorem:
(defthm cons-elab-modlist-equiv-congruence-on-y-under-elab-modlist-equiv (implies (elab-modlist-equiv y y-equiv) (elab-modlist-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-elab-modlist-fix (equal (consp (elab-modlist-fix x)) (consp x)))
Theorem:
(defthm elab-modlist-fix-under-iff (iff (elab-modlist-fix x) (consp x)))
Theorem:
(defthm elab-modlist-fix-of-cons (equal (elab-modlist-fix (cons a x)) (cons (elab-mod$a-fix a) (elab-modlist-fix x))))
Theorem:
(defthm len-of-elab-modlist-fix (equal (len (elab-modlist-fix x)) (len x)))
Theorem:
(defthm elab-modlist-fix-of-append (equal (elab-modlist-fix (append std::a std::b)) (append (elab-modlist-fix std::a) (elab-modlist-fix std::b))))
Theorem:
(defthm elab-modlist-fix-of-repeat (equal (elab-modlist-fix (repeat acl2::n x)) (repeat acl2::n (elab-mod$a-fix x))))
Theorem:
(defthm list-equiv-refines-elab-modlist-equiv (implies (list-equiv x y) (elab-modlist-equiv x y)) :rule-classes :refinement)
Theorem:
(defthm nth-of-elab-modlist-fix (equal (nth acl2::n (elab-modlist-fix x)) (if (< (nfix acl2::n) (len x)) (elab-mod$a-fix (nth acl2::n x)) nil)))
Theorem:
(defthm elab-modlist-equiv-implies-elab-modlist-equiv-append-1 (implies (elab-modlist-equiv x fty::x-equiv) (elab-modlist-equiv (append x y) (append fty::x-equiv y))) :rule-classes (:congruence))
Theorem:
(defthm elab-modlist-equiv-implies-elab-modlist-equiv-append-2 (implies (elab-modlist-equiv y fty::y-equiv) (elab-modlist-equiv (append x y) (append x fty::y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm elab-modlist-equiv-implies-elab-modlist-equiv-nthcdr-2 (implies (elab-modlist-equiv acl2::l l-equiv) (elab-modlist-equiv (nthcdr acl2::n acl2::l) (nthcdr acl2::n l-equiv))) :rule-classes (:congruence))
Theorem:
(defthm elab-modlist-equiv-implies-elab-modlist-equiv-take-2 (implies (elab-modlist-equiv acl2::l l-equiv) (elab-modlist-equiv (take acl2::n acl2::l) (take acl2::n l-equiv))) :rule-classes (:congruence))