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