• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
        • Aleobft
          • Aleobft-static
          • Aleobft-dynamic
          • Aleobft-arxiv
          • Aleobft-stake
          • Aleobft-proposals
          • Library-extensions
            • Lists-noforkp
            • Oset-theorems
            • Omap-theorems
            • Set::nonemptyp
              • Arithmetic-theorems
          • Leo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Library-extensions

    Set::nonemptyp

    Check if an oset is not empty, using an existential quantifier.

    When this predicate is true, it provides an under-specified witness member of the set, which is useful for certain kinds of reasoning.

    Definitions and Theorems

    Theorem: nonemptyp-suff

    (defthm set::nonemptyp-suff
      (implies (in elem set)
               (set::nonemptyp set)))

    Theorem: booleanp-of-nonemptyp

    (defthm set::booleanp-of-nonemptyp
      (b* ((yes/no (set::nonemptyp set)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: nonemptyp-when-not-emptyp

    (defthm set::nonemptyp-when-not-emptyp
      (implies (not (emptyp set))
               (set::nonemptyp set)))

    Theorem: not-emptyp-when-nonemptyp

    (defthm set::not-emptyp-when-nonemptyp
      (implies (set::nonemptyp set)
               (not (emptyp set))))

    Theorem: not-emptyp-to-nonemptyp

    (defthm set::not-emptyp-to-nonemptyp
      (equal (not (emptyp set))
             (set::nonemptyp set)))

    Theorem: emptyp-to-not-nonemptyp

    (defthm set::emptyp-to-not-nonemptyp
      (equal (emptyp set)
             (not (set::nonemptyp set))))

    Theorem: nonempty-witness-from-not-emptyp

    (defthm set::nonempty-witness-from-not-emptyp
      (implies (not (emptyp set))
               (in (set::nonempty-witness set) set))
      :rule-classes ((:forward-chaining :trigger-terms ((emptyp set)))))