• 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
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Bytes
            • Keywords
            • Real-operations
              • Lt-real-values
              • Le-real-values
              • Gt-real-values
              • Ge-real-values
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • 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
    • Real-operations

    Ge-real-values

    Apply >= to real values [C17:6.5.8/3] [C17:6.5.8/6].

    Signature
    (ge-real-values val1 val2) → resval
    Arguments
    val1 — Guard (valuep val1).
    val2 — Guard (valuep val2).
    Returns
    resval — Type (valuep resval).

    We perform the usual arithmetic conversions and then we apply the operation on the integers. In our current formalization, integers are the only real values. This ACL2 function will be extended with more cases if/when we extend our model with non-integer real values.

    Definitions and Theorems

    Function: ge-real-values

    (defun ge-real-values (val1 val2)
      (declare (xargs :guard (and (valuep val1) (valuep val2))))
      (declare (xargs :guard (and (value-realp val1)
                                  (value-realp val2))))
      (let ((__function__ 'ge-real-values))
        (declare (ignorable __function__))
        (b* (((mv val1 val2)
              (uaconvert-values val1 val2)))
          (ge-integer-values val1 val2))))

    Theorem: valuep-of-ge-real-values

    (defthm valuep-of-ge-real-values
      (b* ((resval (ge-real-values val1 val2)))
        (valuep resval))
      :rule-classes :rewrite)

    Theorem: ge-real-values-of-value-fix-val1

    (defthm ge-real-values-of-value-fix-val1
      (equal (ge-real-values (value-fix val1) val2)
             (ge-real-values val1 val2)))

    Theorem: ge-real-values-value-equiv-congruence-on-val1

    (defthm ge-real-values-value-equiv-congruence-on-val1
      (implies (value-equiv val1 val1-equiv)
               (equal (ge-real-values val1 val2)
                      (ge-real-values val1-equiv val2)))
      :rule-classes :congruence)

    Theorem: ge-real-values-of-value-fix-val2

    (defthm ge-real-values-of-value-fix-val2
      (equal (ge-real-values val1 (value-fix val2))
             (ge-real-values val1 val2)))

    Theorem: ge-real-values-value-equiv-congruence-on-val2

    (defthm ge-real-values-value-equiv-congruence-on-val2
      (implies (value-equiv val2 val2-equiv)
               (equal (ge-real-values val1 val2)
                      (ge-real-values val1 val2-equiv)))
      :rule-classes :congruence)