• 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
        • Atj
        • Aij
        • Language
          • Syntax
            • Grammar
            • Unicode-escapes
            • Unicode-input-char
            • Escape-sequence
            • Identifiers
            • Primitive-types
            • Reference-types
            • Keywords
            • Unicode-characters
            • Integer-literals
              • Optional-integer-type-suffix
              • Integer-literal
                • Integer-literal-fix
                • Integer-literal-case
                • Integer-literal-equiv
                • Integer-literalp
                  • Integer-literal-oct
                  • Integer-literal-hex
                  • Integer-literal-dec
                  • Integer-literal-bin
                  • Integer-literal-kind
                • Octal-integer-literals
                • Hexadecimal-integer-literals
                • Decimal-integer-literals
                • Binary-integer-literals
              • String-literals
              • Octal-digits
              • Hexadecimal-digits
              • Decimal-digits
              • Binary-digits
              • Character-literals
              • Null-literal
              • Floating-point-literals
              • Boolean-literals
              • Package-names
              • Literals
            • Semantics
        • Taspi
        • Riscv
        • Bitcoin
        • 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
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Integer-literal

    Integer-literalp

    Recognizer for integer-literal structures.

    Signature
    (integer-literalp x) → *

    Definitions and Theorems

    Function: integer-literalp

    (defun integer-literalp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'integer-literalp))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :hex))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((get (std::da-nth 0 (cdr x))))
                           (hex-integer-literalp get))))
                   ((eq (car x) :dec)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((get (std::da-nth 0 (cdr x))))
                           (dec-integer-literalp get))))
                   ((eq (car x) :oct)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((get (std::da-nth 0 (cdr x))))
                           (oct-integer-literalp get))))
                   (t (and (eq (car x) :bin)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 1))
                           (b* ((get (std::da-nth 0 (cdr x))))
                             (bin-integer-literalp get))))))))

    Theorem: consp-when-integer-literalp

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