• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
          • Defbyte
          • Defresult
          • Fold
          • Defsubtype
          • Defset
          • Specific-types
          • Defflatsum
          • Deflist-of-len
          • Pos-list
          • Defbytelist
          • Defomap
          • Defbyte-standard-instances
          • Deffixtype-alias
          • Defbytelist-standard-instances
          • Defunit
          • Byte-list
          • Database
          • Byte
          • Pos-option
          • Nibble
          • Nat-option
          • String-option
          • Byte-list20
          • Byte-list32
          • Byte-list64
          • Pseudo-event-form
          • Natoption/natoptionlist
          • Nati
          • Character-list
          • Nat/natlist
          • Maybe-string
          • Nibble-list
          • Natoption/natoptionlist-result
          • Nat/natlist-result
          • Nat-option-list-result
          • Set
          • String-result
          • String-list-result
          • Nat-result
          • Nat-option-result
          • Nat-list-result
          • Maybe-string-result
          • Integer-result
          • Character-result
          • Character-list-result
          • Boolean-result
          • Map
          • Bag
          • Pos-set
          • Hex-digit-char-list
          • Dec-digit-char-list
          • Pseudo-event-form-list
          • Nat-option-list
          • Symbol-set
            • Symbol-sfix
            • Symbol-setp
              • Symbol-sequiv
            • String-set
            • Nat-set
            • Oct-digit-char-list
            • Bin-digit-char-list
            • Bit-list
          • Isar
          • Kestrel-utilities
          • Set
          • Soft
          • C
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Symbol-set

    Symbol-setp

    Recognizer for symbol-set.

    Signature
    (symbol-setp x) → *

    Definitions and Theorems

    Function: symbol-setp

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

    Theorem: booleanp-ofsymbol-setp

    (defthm booleanp-ofsymbol-setp
      (booleanp (symbol-setp x)))

    Theorem: setp-when-symbol-setp

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

    Theorem: symbolp-of-head-when-symbol-setp

    (defthm symbolp-of-head-when-symbol-setp
      (implies (symbol-setp x)
               (symbolp (set::head x))))

    Theorem: symbol-setp-of-tail-when-symbol-setp

    (defthm symbol-setp-of-tail-when-symbol-setp
      (implies (symbol-setp x)
               (symbol-setp (set::tail x))))

    Theorem: symbol-setp-of-insert

    (defthm symbol-setp-of-insert
      (equal (symbol-setp (set::insert a x))
             (and (symbolp a)
                  (symbol-setp (set::sfix x)))))

    Theorem: symbolp-when-in-symbol-setp-binds-free-x

    (defthm symbolp-when-in-symbol-setp-binds-free-x
      (implies (and (set::in a x) (symbol-setp x))
               (symbolp a)))

    Theorem: not-in-symbol-setp-when-not-symbolp

    (defthm not-in-symbol-setp-when-not-symbolp
      (implies (and (symbol-setp x) (not (symbolp a)))
               (not (set::in a x))))

    Theorem: symbol-setp-of-union

    (defthm symbol-setp-of-union
      (equal (symbol-setp (set::union x y))
             (and (symbol-setp (set::sfix x))
                  (symbol-setp (set::sfix y)))))

    Theorem: symbol-setp-of-intersect

    (defthm symbol-setp-of-intersect
      (implies (and (symbol-setp x) (symbol-setp y))
               (symbol-setp (set::intersect x y))))

    Theorem: symbol-setp-of-difference

    (defthm symbol-setp-of-difference
      (implies (symbol-setp x)
               (symbol-setp (set::difference x y))))

    Theorem: symbol-setp-of-delete

    (defthm symbol-setp-of-delete
      (implies (symbol-setp x)
               (symbol-setp (set::delete a x))))