• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Mutual-recursion
        • Memoize
        • Mbe
        • Io
        • Defpkg
        • Apply$
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Defconst
        • Fast-alists
        • Defmacro
        • Loop$-primer
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
        • Efficiency
        • Irrelevant-formals
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
        • Invariant-risk
        • Errors
        • Defabbrev
        • Conses
        • Alists
        • Set-register-invariant-risk
        • Strings
        • Program-wrapper
        • Get-internal-time
        • Basics
        • Packages
        • Oracle-eval
        • Defmacro-untouchable
        • <<
        • Primitive
        • Revert-world
        • Unmemoize
        • Set-duplicate-keys-action
        • Symbols
          • Symbol-listp
          • Symbolp
            • Intern
            • Intern-in-package-of-symbol
            • Symbol-fix
            • Intern$
              • Intern-list
              • Symbol-equiv
            • Symbol-name
            • Symbol-package-name
            • Keywordp
            • Add-to-set
            • Symbol<
            • Packn
            • Packn-pos
            • Symbol-name-lst
          • Def-list-constructor
          • Easy-simplify-term
          • Defiteration
          • Fake-oracle-eval
          • Defopen
          • Sleep
        • Operational-semantics
        • Real
        • Start-here
        • Miscellaneous
        • Output-controls
        • Bdd
        • Macros
        • Installation
        • Mailing-lists
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Symbols
    • Intern-in-package-of-symbol
    • Intern$
    • Symbol-listp

    Intern-list

    Generate a list of symbols in some package.

    Examples:

    (intern-list '("FOO" "BAR"))           --> (acl2::foo acl2::bar)
    (intern-list '("FOO" "BAR") 'str::foo) --> (str::foo str::bar)

    (intern-list x &optional (pkg ''acl2::acl2-pkg-witness)) is a macro that takes

    • names, a list of strings that will become the symbol-names of the new symbols, and optionally
    • pkg, a symbol that is used as a package indicator, as in intern-in-package-of-symbol.

    Definitions and Theorems

    Function: intern-list-fn

    (defun intern-list-fn (x pkg)
      (declare (xargs :guard (and (string-listp x) (symbolp pkg))))
      (if (atom x)
          nil
        (cons (intern-in-package-of-symbol (car x)
                                           pkg)
              (intern-list-fn (cdr x) pkg))))

    Theorem: intern-list-fn-when-atom

    (defthm intern-list-fn-when-atom
      (implies (atom x)
               (equal (intern-list-fn x pkg) nil)))

    Theorem: intern-list-fn-of-cons

    (defthm intern-list-fn-of-cons
      (equal (intern-list-fn (cons a x) pkg)
             (cons (intern-in-package-of-symbol a pkg)
                   (intern-list-fn x pkg))))

    Theorem: symbol-listp-of-intern-list-fn

    (defthm symbol-listp-of-intern-list-fn
      (symbol-listp (intern-list-fn x pkg)))

    Theorem: list-equiv-implies-equal-intern-list-fn-1

    (defthm list-equiv-implies-equal-intern-list-fn-1
      (implies (list-equiv x x-equiv)
               (equal (intern-list-fn x pkg)
                      (intern-list-fn x-equiv pkg)))
      :rule-classes (:congruence))

    Theorem: intern-list-fn-of-append

    (defthm intern-list-fn-of-append
      (equal (intern-list-fn (append x y) pkg)
             (append (intern-list-fn x pkg)
                     (intern-list-fn y pkg))))

    Theorem: intern-list-fn-of-revappend

    (defthm intern-list-fn-of-revappend
      (equal (intern-list-fn (revappend x y) pkg)
             (revappend (intern-list-fn x pkg)
                        (intern-list-fn y pkg))))

    Theorem: intern-list-fn-of-rev

    (defthm intern-list-fn-of-rev
      (equal (intern-list-fn (rev x) pkg)
             (rev (intern-list-fn x pkg))))