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