• 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
      • 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
        • Values
          • Integer-values
            • Integer-operations
              • Def-uint/int-binary-op
              • Def-uint/int-unary-op
              • Def-uint/int-comparison
              • Uint-mod
              • Uint-div
              • Uint-shr
              • Uint-shl
              • Int-mod
              • Int-div
              • Uint-xor
              • Uint-sub
              • Uint-mul
              • Uint-ior
              • Uint-exp
              • Uint-and
              • Uint-add
              • Int-xor
              • Int-sub
              • Int-mul
              • Int-ior
              • Int-and
              • Int-add
              • Uint-le
              • Uint-ge
              • Uint-ne
              • Uint-lt
              • Uint-gt
              • Uint-eq
              • Int-ne
              • Int-lt
              • Int-le
              • Int-gt
                • Int-ge
                • Int-eq
                • Uint-minus
                • Uint-not
                • Int-not
                • Int-minus
              • Bit-size
              • Uint
              • Int
            • Boolean-values
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Integer-operations

    Int-gt

    Greater-than comparison of signed integer values.

    Signature
    (int-gt left right) → result
    Arguments
    left — Guard (intp left).
    right — Guard (intp right).
    Returns
    result — Type (boolp result).

    Definitions and Theorems

    Function: int-gt

    (defun int-gt (left right)
      (declare (xargs :guard (and (intp left) (intp right))))
      (declare (xargs :guard (= (int->size left) (int->size right))))
      (b* ((x (int->value left))
           (y (int->value right)))
        (bool (> x y))))

    Theorem: boolp-of-int-gt

    (defthm boolp-of-int-gt
      (b* ((result (int-gt left right)))
        (boolp result))
      :rule-classes :rewrite)

    Theorem: int-gt-of-int-fix-left

    (defthm int-gt-of-int-fix-left
      (equal (int-gt (int-fix left) right)
             (int-gt left right)))

    Theorem: int-gt-int-equiv-congruence-on-left

    (defthm int-gt-int-equiv-congruence-on-left
      (implies (int-equiv left left-equiv)
               (equal (int-gt left right)
                      (int-gt left-equiv right)))
      :rule-classes :congruence)

    Theorem: int-gt-of-int-fix-right

    (defthm int-gt-of-int-fix-right
      (equal (int-gt left (int-fix right))
             (int-gt left right)))

    Theorem: int-gt-int-equiv-congruence-on-right

    (defthm int-gt-int-equiv-congruence-on-right
      (implies (int-equiv right right-equiv)
               (equal (int-gt left right)
                      (int-gt left right-equiv)))
      :rule-classes :congruence)