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