Fixing function for hex-core-fconst structures.
(hex-core-fconst-fix x) → new-x
Function:
(defun hex-core-fconst-fix$inline (x) (declare (xargs :guard (hex-core-fconstp x))) (let ((__function__ 'hex-core-fconst-fix)) (declare (ignorable __function__)) (mbe :logic (case (hex-core-fconst-kind x) (:frac (b* ((significand (hex-frac-const-fix (std::da-nth 0 (cdr x)))) (expo (bin-expo-fix (std::da-nth 1 (cdr x))))) (cons :frac (list significand expo)))) (:int (b* ((significand (str::hex-digit-char-list-fix (std::da-nth 0 (cdr x)))) (expo (bin-expo-fix (std::da-nth 1 (cdr x))))) (cons :int (list significand expo))))) :exec x)))
Theorem:
(defthm hex-core-fconstp-of-hex-core-fconst-fix (b* ((new-x (hex-core-fconst-fix$inline x))) (hex-core-fconstp new-x)) :rule-classes :rewrite)
Theorem:
(defthm hex-core-fconst-fix-when-hex-core-fconstp (implies (hex-core-fconstp x) (equal (hex-core-fconst-fix x) x)))
Function:
(defun hex-core-fconst-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (hex-core-fconstp acl2::x) (hex-core-fconstp acl2::y)))) (equal (hex-core-fconst-fix acl2::x) (hex-core-fconst-fix acl2::y)))
Theorem:
(defthm hex-core-fconst-equiv-is-an-equivalence (and (booleanp (hex-core-fconst-equiv x y)) (hex-core-fconst-equiv x x) (implies (hex-core-fconst-equiv x y) (hex-core-fconst-equiv y x)) (implies (and (hex-core-fconst-equiv x y) (hex-core-fconst-equiv y z)) (hex-core-fconst-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm hex-core-fconst-equiv-implies-equal-hex-core-fconst-fix-1 (implies (hex-core-fconst-equiv acl2::x x-equiv) (equal (hex-core-fconst-fix acl2::x) (hex-core-fconst-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm hex-core-fconst-fix-under-hex-core-fconst-equiv (hex-core-fconst-equiv (hex-core-fconst-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-hex-core-fconst-fix-1-forward-to-hex-core-fconst-equiv (implies (equal (hex-core-fconst-fix acl2::x) acl2::y) (hex-core-fconst-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-hex-core-fconst-fix-2-forward-to-hex-core-fconst-equiv (implies (equal acl2::x (hex-core-fconst-fix acl2::y)) (hex-core-fconst-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hex-core-fconst-equiv-of-hex-core-fconst-fix-1-forward (implies (hex-core-fconst-equiv (hex-core-fconst-fix acl2::x) acl2::y) (hex-core-fconst-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hex-core-fconst-equiv-of-hex-core-fconst-fix-2-forward (implies (hex-core-fconst-equiv acl2::x (hex-core-fconst-fix acl2::y)) (hex-core-fconst-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hex-core-fconst-kind$inline-of-hex-core-fconst-fix-x (equal (hex-core-fconst-kind$inline (hex-core-fconst-fix x)) (hex-core-fconst-kind$inline x)))
Theorem:
(defthm hex-core-fconst-kind$inline-hex-core-fconst-equiv-congruence-on-x (implies (hex-core-fconst-equiv x x-equiv) (equal (hex-core-fconst-kind$inline x) (hex-core-fconst-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-hex-core-fconst-fix (consp (hex-core-fconst-fix x)) :rule-classes :type-prescription)