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