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