• 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
          • Implementation
          • Setp
          • Right
          • Left
          • Head
          • Double-containment
          • In
          • Subset
          • Intersect
          • Insert
          • Delete
          • Union
          • From-list
            • Diff
            • Set-equiv
            • To-list
            • Sfix
            • Pick-a-point
            • Cardinality
            • Set-induct
            • Set-bi-induct
            • Emptyp
          • C
          • 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
    • Set

    From-list

    Create a set from a list of values.

    Signature
    (from-list list) → set$
    Arguments
    list — Guard (true-listp list).
    Returns
    set$ — Type (setp set$).

    This is just a wrapper around insert-all.

    Time complexity: O(n\log(n)).

    Definitions and Theorems

    Function: from-list$inline

    (defun from-list$inline (list)
      (declare (xargs :guard (true-listp list)))
      (insert-all list nil))

    Theorem: setp-of-from-list

    (defthm setp-of-from-list
      (b* ((set$ (from-list$inline list)))
        (setp set$))
      :rule-classes :rewrite)