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