• 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
            • Bit-size
            • Uint
            • Int
              • Intp
                • Int-fix
                • Make-int
                • Int-equiv
                • Change-int
                • Int->value
                • Int->size
            • Boolean-values
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Int

    Intp

    Recognizer for int structures.

    Signature
    (intp x) → *

    Definitions and Theorems

    Function: intp

    (defun intp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'intp))
        (declare (ignorable __function__))
        (and (consp x)
             (eq (car x) :int)
             (true-listp (cdr x))
             (eql (len (cdr x)) 2)
             (b* ((size (std::da-nth 0 (cdr x)))
                  (value (std::da-nth 1 (cdr x))))
               (and (bit-size-p size)
                    (integerp value)
                    (signed-byte-p size value))))))

    Theorem: consp-when-intp

    (defthm consp-when-intp
      (implies (intp x) (consp x))
      :rule-classes :compound-recognizer)