• 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-point-placeholders
              • Pointers
              • Floating-point-value-set-parameters
              • Values
              • Primitive-operations
                • Integer-operations
                • Floating-point-operations
                  • Float-greateq
                  • Double-lesseq
                  • Double-greateq
                  • Double-great
                  • Float-lesseq
                  • Float-less
                    • Float-great
                    • Double-less
                    • Float-sub
                    • Float-rem
                    • Float-neq
                    • Float-mul
                    • Double-sub
                    • Double-rem
                    • Double-neq
                    • Double-mul
                    • Double-eq
                    • Double-div
                    • Double-add
                    • Float-eq
                    • Float-div
                    • Float-add
                    • Double-plus
                    • Double-minus
                    • Float-plus
                    • Float-minus
                  • Boolean-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
    • Floating-point-operations

    Float-less

    Less-than comparison < on floats [JLS14:4.2.4] [JLS14:15.20.1].

    Signature
    (float-less operand-left operand-right) → result
    Arguments
    operand-left — Guard (float-valuep operand-left).
    operand-right — Guard (float-valuep operand-right).
    Returns
    result — Type (boolean-valuep result).

    Definitions and Theorems

    Function: float-less

    (defun float-less (operand-left operand-right)
      (declare (xargs :guard (and (float-valuep operand-left)
                                  (float-valuep operand-right))))
      (b* ((x (float-value->float operand-left))
           (y (float-value->float operand-right)))
        (boolean-value (float-less-abs x y))))

    Theorem: boolean-valuep-of-float-less

    (defthm boolean-valuep-of-float-less
      (b* ((result (float-less operand-left operand-right)))
        (boolean-valuep result))
      :rule-classes :rewrite)

    Theorem: float-less-of-float-value-fix-operand-left

    (defthm float-less-of-float-value-fix-operand-left
      (equal (float-less (float-value-fix operand-left)
                         operand-right)
             (float-less operand-left operand-right)))

    Theorem: float-less-float-value-equiv-congruence-on-operand-left

    (defthm float-less-float-value-equiv-congruence-on-operand-left
      (implies (float-value-equiv operand-left operand-left-equiv)
               (equal (float-less operand-left operand-right)
                      (float-less operand-left-equiv operand-right)))
      :rule-classes :congruence)

    Theorem: float-less-of-float-value-fix-operand-right

    (defthm float-less-of-float-value-fix-operand-right
      (equal (float-less operand-left
                         (float-value-fix operand-right))
             (float-less operand-left operand-right)))

    Theorem: float-less-float-value-equiv-congruence-on-operand-right

    (defthm float-less-float-value-equiv-congruence-on-operand-right
      (implies (float-value-equiv operand-right operand-right-equiv)
               (equal (float-less operand-left operand-right)
                      (float-less operand-left operand-right-equiv)))
      :rule-classes :congruence)