• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • 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
            • Bitxor-values
            • Bitior-values
            • Bitand-values
            • Shr-values
            • Shl-values
            • Test-value
            • Rem-values
            • Lt-values
              • Le-values
              • Gt-values
              • Ge-values
              • Sub-values
              • Mul-values
              • Div-values
              • Add-values
              • Ne-values
              • Eq-values
              • Bitnot-value
              • Plus-value
              • Minus-value
              • Lognot-value
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Bytes
            • Keywords
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • Representation
          • Transformation-tools
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Operations

    Lt-values

    Apply < to values [C17:6.5.8/2] [C17:6.5.8/3] [C17:6.5.8/6].

    Signature
    (lt-values val1 val2) → resval
    Arguments
    val1 — Guard (valuep val1).
    val2 — Guard (valuep val2).
    Returns
    resval — Type (value-resultp resval).

    It is an error if the values are not real; we do not support comparison of pointers yet.

    Definitions and Theorems

    Function: lt-values

    (defun lt-values (val1 val2)
      (declare (xargs :guard (and (valuep val1) (valuep val2))))
      (let ((__function__ 'lt-values))
        (declare (ignorable __function__))
        (if (and (value-realp val1)
                 (value-realp val2))
            (lt-real-values val1 val2)
          (error (list :lt-mistype :required
                       :real :real :supplied (value-fix val1)
                       (value-fix val2))))))

    Theorem: value-resultp-of-lt-values

    (defthm value-resultp-of-lt-values
      (b* ((resval (lt-values val1 val2)))
        (value-resultp resval))
      :rule-classes :rewrite)

    Theorem: lt-values-of-value-fix-val1

    (defthm lt-values-of-value-fix-val1
      (equal (lt-values (value-fix val1) val2)
             (lt-values val1 val2)))

    Theorem: lt-values-value-equiv-congruence-on-val1

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

    Theorem: lt-values-of-value-fix-val2

    (defthm lt-values-of-value-fix-val2
      (equal (lt-values val1 (value-fix val2))
             (lt-values val1 val2)))

    Theorem: lt-values-value-equiv-congruence-on-val2

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