• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
              • Type
              • Type-name-list-to-type-list
              • Tyname-to-type
              • Member-type-list->name-list
              • Type-completep
              • Member-type
              • Member-type-add-first
              • Member-type-add-last
              • Init-type
              • Type-option
              • Member-type-lookup
              • Tyspecseq-to-type
              • Member-type-list-option
              • Type-promoted-arithmeticp
              • Type-list-result
              • Member-type-list-result
              • Integer-type-bits-nulfun
              • Init-type-result
              • Type-result
              • Type-nonchar-integerp
              • Type-nonchar-integer-listp
              • Type-arithmetic-listp
              • Type-integer-listp
              • Integer-type-xdoc-string
              • Type-unsigned-integerp
              • Type-signed-integerp
              • Integer-type-minbits
              • Integer-type-bits
              • Type-scalarp
              • Type-integerp
                • Type-arithmeticp
                • Type-realp
                • Type-list
                • *nonchar-integer-types*
                • Member-type-list
                • Ident-type-map
                • Type-set
                • Type-option-set
                • Symbol-type-alist
                • Type-option-list
              • Integer-formats-definitions
              • Computation-states
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Types

    Type-integerp

    Check if a type is an integer type [C17:6.2.5/17].

    Signature
    (type-integerp type) → yes/no
    Arguments
    type — Guard (typep type).
    Returns
    yes/no — Type (booleanp yes/no).

    Definitions and Theorems

    Function: type-integerp

    (defun type-integerp (type)
      (declare (xargs :guard (typep type)))
      (or (type-case type :char)
          (type-signed-integerp type)
          (type-unsigned-integerp type)))

    Theorem: booleanp-of-type-integerp

    (defthm booleanp-of-type-integerp
      (b* ((yes/no (type-integerp type)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: type-integerp-of-type-fix-type

    (defthm type-integerp-of-type-fix-type
      (equal (type-integerp (type-fix type))
             (type-integerp type)))

    Theorem: type-integerp-type-equiv-congruence-on-type

    (defthm type-integerp-type-equiv-congruence-on-type
      (implies (type-equiv type type-equiv)
               (equal (type-integerp type)
                      (type-integerp type-equiv)))
      :rule-classes :congruence)