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