Fixing function for lsuffix structures.
Function:
(defun lsuffix-fix$inline (x) (declare (xargs :guard (lsuffixp x))) (let ((__function__ 'lsuffix-fix)) (declare (ignorable __function__)) (mbe :logic (case (lsuffix-kind x) (:locase-l (cons :locase-l (list))) (:upcase-l (cons :upcase-l (list))) (:locase-ll (cons :locase-ll (list))) (:upcase-ll (cons :upcase-ll (list)))) :exec x)))
Theorem:
(defthm lsuffixp-of-lsuffix-fix (b* ((new-x (lsuffix-fix$inline x))) (lsuffixp new-x)) :rule-classes :rewrite)
Theorem:
(defthm lsuffix-fix-when-lsuffixp (implies (lsuffixp x) (equal (lsuffix-fix x) x)))
Function:
(defun lsuffix-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (lsuffixp acl2::x) (lsuffixp acl2::y)))) (equal (lsuffix-fix acl2::x) (lsuffix-fix acl2::y)))
Theorem:
(defthm lsuffix-equiv-is-an-equivalence (and (booleanp (lsuffix-equiv x y)) (lsuffix-equiv x x) (implies (lsuffix-equiv x y) (lsuffix-equiv y x)) (implies (and (lsuffix-equiv x y) (lsuffix-equiv y z)) (lsuffix-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm lsuffix-equiv-implies-equal-lsuffix-fix-1 (implies (lsuffix-equiv acl2::x x-equiv) (equal (lsuffix-fix acl2::x) (lsuffix-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm lsuffix-fix-under-lsuffix-equiv (lsuffix-equiv (lsuffix-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-lsuffix-fix-1-forward-to-lsuffix-equiv (implies (equal (lsuffix-fix acl2::x) acl2::y) (lsuffix-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-lsuffix-fix-2-forward-to-lsuffix-equiv (implies (equal acl2::x (lsuffix-fix acl2::y)) (lsuffix-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm lsuffix-equiv-of-lsuffix-fix-1-forward (implies (lsuffix-equiv (lsuffix-fix acl2::x) acl2::y) (lsuffix-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm lsuffix-equiv-of-lsuffix-fix-2-forward (implies (lsuffix-equiv acl2::x (lsuffix-fix acl2::y)) (lsuffix-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm lsuffix-kind$inline-of-lsuffix-fix-x (equal (lsuffix-kind$inline (lsuffix-fix x)) (lsuffix-kind$inline x)))
Theorem:
(defthm lsuffix-kind$inline-lsuffix-equiv-congruence-on-x (implies (lsuffix-equiv x x-equiv) (equal (lsuffix-kind$inline x) (lsuffix-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-lsuffix-fix (consp (lsuffix-fix x)) :rule-classes :type-prescription)