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