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