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