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