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