• 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
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
          • Primitive-functions
          • Translated-terms
          • Values
          • Evaluation
          • Program-equivalence
          • Functions
            • Function
            • Function-lookup
            • Function-option
            • Lift-function
            • Lift-function-list
            • Function-set
              • Function-set-fix
              • Function-setp
                • Function-set-equiv
            • Packages
            • Programs
            • Interpreter
            • Evaluation-states
          • 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
    • Function-set

    Function-setp

    Recognizer for function-set.

    Signature
    (function-setp x) → *

    Definitions and Theorems

    Function: function-setp

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

    Theorem: booleanp-offunction-setp

    (defthm booleanp-offunction-setp
      (booleanp (function-setp x)))

    Theorem: setp-when-function-setp

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

    Theorem: functionp-of-head-when-function-setp

    (defthm functionp-of-head-when-function-setp
      (implies (function-setp x)
               (equal (functionp (head x))
                      (not (emptyp x)))))

    Theorem: function-setp-of-tail-when-function-setp

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

    Theorem: function-setp-of-insert

    (defthm function-setp-of-insert
      (equal (function-setp (insert a x))
             (and (functionp a)
                  (function-setp (sfix x)))))

    Theorem: functionp-when-in-function-setp-binds-free-x

    (defthm functionp-when-in-function-setp-binds-free-x
      (implies (and (in a x) (function-setp x))
               (functionp a)))

    Theorem: not-in-function-setp-when-not-functionp

    (defthm not-in-function-setp-when-not-functionp
      (implies (and (function-setp x)
                    (not (functionp a)))
               (not (in a x))))

    Theorem: function-setp-of-union

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

    Theorem: function-setp-of-intersect

    (defthm function-setp-of-intersect
      (implies (and (function-setp x)
                    (function-setp y))
               (function-setp (intersect x y))))

    Theorem: function-setp-of-difference

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

    Theorem: function-setp-of-delete

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