• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • 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
        • 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
    • 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))))