• 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-set-fix
                • Type-setp
                  • Type-set-equiv
                • 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
    • Type-set

    Type-setp

    Recognizer for type-set.

    Signature
    (type-setp x) → *

    Definitions and Theorems

    Function: type-setp

    (defun type-setp (x)
      (declare (xargs :guard t))
      (if (atom x)
          (null x)
        (and (typep (car x))
             (or (null (cdr x))
                 (and (consp (cdr x))
                      (acl2::fast-<< (car x) (cadr x))
                      (type-setp (cdr x)))))))

    Theorem: booleanp-oftype-setp

    (defthm booleanp-oftype-setp
      (booleanp (type-setp x)))

    Theorem: setp-when-type-setp

    (defthm setp-when-type-setp
      (implies (type-setp x) (setp x))
      :rule-classes (:rewrite))

    Theorem: typep-of-head-when-type-setp

    (defthm typep-of-head-when-type-setp
      (implies (type-setp x)
               (equal (typep (head x))
                      (not (emptyp x)))))

    Theorem: type-setp-of-tail-when-type-setp

    (defthm type-setp-of-tail-when-type-setp
      (implies (type-setp x)
               (type-setp (tail x))))

    Theorem: type-setp-of-insert

    (defthm type-setp-of-insert
      (equal (type-setp (insert a x))
             (and (typep a) (type-setp (sfix x)))))

    Theorem: typep-when-in-type-setp-binds-free-x

    (defthm typep-when-in-type-setp-binds-free-x
      (implies (and (in a x) (type-setp x))
               (typep a)))

    Theorem: not-in-type-setp-when-not-typep

    (defthm not-in-type-setp-when-not-typep
      (implies (and (type-setp x) (not (typep a)))
               (not (in a x))))

    Theorem: type-setp-of-union

    (defthm type-setp-of-union
      (equal (type-setp (union x y))
             (and (type-setp (sfix x))
                  (type-setp (sfix y)))))

    Theorem: type-setp-of-intersect

    (defthm type-setp-of-intersect
      (implies (or (type-setp x) (type-setp y))
               (type-setp (intersect x y))))

    Theorem: type-setp-of-difference

    (defthm type-setp-of-difference
      (implies (type-setp x)
               (type-setp (difference x y))))

    Theorem: type-setp-of-delete

    (defthm type-setp-of-delete
      (implies (type-setp x)
               (type-setp (delete a x))))