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