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