Fixtype of Java floating-point values [JLS14:4.2.3], including extended-exponent values [JLS14:4.2.3].
Function:
(defun floating-pointx-valuep (x) (declare (xargs :guard t)) (let ((__function__ 'floating-pointx-valuep)) (declare (ignorable __function__)) (or (floating-point-valuep x) (floatx-valuep x) (doublex-valuep x))))
Theorem:
(defthm booleanp-of-floating-pointx-valuep (b* ((yes/no (floating-pointx-valuep x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm floating-pointx-valuep-when-floating-point-valuep (implies (floating-point-valuep x) (floating-pointx-valuep x)))
Theorem:
(defthm floating-pointx-valuep-when-floatx-valuep (implies (floatx-valuep x) (floating-pointx-valuep x)))
Theorem:
(defthm floating-pointx-valuep-when-doublex-valuep (implies (doublex-valuep x) (floating-pointx-valuep x)))
Function:
(defun floating-pointx-value-fix (x) (declare (xargs :guard (floating-pointx-valuep x))) (mbe :logic (if (floating-pointx-valuep x) x (float-value (float-value-abs-pos-zero))) :exec x))
Theorem:
(defthm floating-pointx-valuep-of-floating-pointx-value-fix (b* ((fixed-x (floating-pointx-value-fix x))) (floating-pointx-valuep fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm floating-pointx-value-fix-when-floating-pointx-valuep (implies (floating-pointx-valuep x) (equal (floating-pointx-value-fix x) x)))
Function:
(defun floating-pointx-value-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (floating-pointx-valuep acl2::x) (floating-pointx-valuep acl2::y)))) (equal (floating-pointx-value-fix acl2::x) (floating-pointx-value-fix acl2::y)))
Theorem:
(defthm floating-pointx-value-equiv-is-an-equivalence (and (booleanp (floating-pointx-value-equiv x y)) (floating-pointx-value-equiv x x) (implies (floating-pointx-value-equiv x y) (floating-pointx-value-equiv y x)) (implies (and (floating-pointx-value-equiv x y) (floating-pointx-value-equiv y z)) (floating-pointx-value-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm floating-pointx-value-equiv-implies-equal-floating-pointx-value-fix-1 (implies (floating-pointx-value-equiv acl2::x x-equiv) (equal (floating-pointx-value-fix acl2::x) (floating-pointx-value-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm floating-pointx-value-fix-under-floating-pointx-value-equiv (floating-pointx-value-equiv (floating-pointx-value-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-floating-pointx-value-fix-1-forward-to-floating-pointx-value-equiv (implies (equal (floating-pointx-value-fix acl2::x) acl2::y) (floating-pointx-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-floating-pointx-value-fix-2-forward-to-floating-pointx-value-equiv (implies (equal acl2::x (floating-pointx-value-fix acl2::y)) (floating-pointx-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm floating-pointx-value-equiv-of-floating-pointx-value-fix-1-forward (implies (floating-pointx-value-equiv (floating-pointx-value-fix acl2::x) acl2::y) (floating-pointx-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm floating-pointx-value-equiv-of-floating-pointx-value-fix-2-forward (implies (floating-pointx-value-equiv acl2::x (floating-pointx-value-fix acl2::y)) (floating-pointx-value-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)