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