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