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