Fixtype of lists of characters.
The recognizer is character-listp and the fixer is str::character-list-fix.
Function:
(defun character-list-equiv$inline (x y) (declare (xargs :guard (and (character-listp x) (character-listp y)))) (equal (str::character-list-fix x) (str::character-list-fix y)))
Theorem:
(defthm character-list-equiv-is-an-equivalence (and (booleanp (character-list-equiv x y)) (character-list-equiv x x) (implies (character-list-equiv x y) (character-list-equiv y x)) (implies (and (character-list-equiv x y) (character-list-equiv y z)) (character-list-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm character-list-equiv-implies-equal-character-list-fix-1 (implies (character-list-equiv x x-equiv) (equal (str::character-list-fix x) (str::character-list-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm character-list-fix-under-character-list-equiv (character-list-equiv (str::character-list-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-character-list-fix-1-forward-to-character-list-equiv (implies (equal (str::character-list-fix x) y) (character-list-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-character-list-fix-2-forward-to-character-list-equiv (implies (equal x (str::character-list-fix y)) (character-list-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm character-list-equiv-of-character-list-fix-1-forward (implies (character-list-equiv (str::character-list-fix x) y) (character-list-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm character-list-equiv-of-character-list-fix-2-forward (implies (character-list-equiv x (str::character-list-fix y)) (character-list-equiv x y)) :rule-classes :forward-chaining)