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