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