• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
          • Aij
          • Language
            • Syntax
            • Semantics
              • Primitive-function-macros
              • Primitive-values
                • Floating-pointx-value
                  • Floating-pointx-valuep
                • Doublex-value-fns
                • Primitivex-value
                • Floatx-value-fns
                • Primitive-value
                • Numericx-value
                • Numeric-value
                • Integral-value
                • Int-value
                • Char-value
                • Byte-value
                • Short-value
                • Long-value
                • Float-value
                • Double-value
                • Boolean-value
                • Floating-point-value
                • Disjoint-primitive-values
                • Short-value-list
                • Long-value-list
                • Int-value-list
                • Float-value-list
                • Double-value-list
                • Char-value-list
                • Byte-value-list
                • Boolean-value-list
              • Floating-point-placeholders
              • Pointers
              • Floating-point-value-set-parameters
              • Values
              • Primitive-operations
              • Primitive-conversions
              • Reference-values
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Primitive-values

Floating-pointx-value

Fixtype of Java floating-point values [JLS14:4.2.3], including extended-exponent values [JLS14:4.2.3].

Definitions and Theorems

Function: floating-pointx-valuep

(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: booleanp-of-floating-pointx-valuep

(defthm booleanp-of-floating-pointx-valuep
  (b* ((yes/no (floating-pointx-valuep x)))
    (booleanp yes/no))
  :rule-classes :rewrite)

Theorem: floating-pointx-valuep-when-floating-point-valuep

(defthm floating-pointx-valuep-when-floating-point-valuep
  (implies (floating-point-valuep x)
           (floating-pointx-valuep x)))

Theorem: floating-pointx-valuep-when-floatx-valuep

(defthm floating-pointx-valuep-when-floatx-valuep
  (implies (floatx-valuep x)
           (floating-pointx-valuep x)))

Theorem: floating-pointx-valuep-when-doublex-valuep

(defthm floating-pointx-valuep-when-doublex-valuep
  (implies (doublex-valuep x)
           (floating-pointx-valuep x)))

Function: floating-pointx-value-fix

(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: floating-pointx-valuep-of-floating-pointx-value-fix

(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: floating-pointx-value-fix-when-floating-pointx-valuep

(defthm floating-pointx-value-fix-when-floating-pointx-valuep
  (implies (floating-pointx-valuep x)
           (equal (floating-pointx-value-fix x)
                  x)))

Function: floating-pointx-value-equiv$inline

(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: floating-pointx-value-equiv-is-an-equivalence

(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: floating-pointx-value-equiv-implies-equal-floating-pointx-value-fix-1

(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: floating-pointx-value-fix-under-floating-pointx-value-equiv

(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: equal-of-floating-pointx-value-fix-1-forward-to-floating-pointx-value-equiv

(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: equal-of-floating-pointx-value-fix-2-forward-to-floating-pointx-value-equiv

(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: floating-pointx-value-equiv-of-floating-pointx-value-fix-1-forward

(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: floating-pointx-value-equiv-of-floating-pointx-value-fix-2-forward

(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)

Subtopics

Floating-pointx-valuep
Recognizer for floating-pointx-value.