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