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