• 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
            • Std/typed-lists/symbol-listp
            • Intern-list
            • Symbol-list-names
              • Symbol-listp-basics
            • Symbolp
            • 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
    • Symbol-name
    • Symbol-listp

    Symbol-list-names

    Extract the name of every symbol in a list.

    (symbol-list-names x) just maps symbol-name across the list x, returning a new list that has the names of all the symbols in x.

    Example:

    (symbol-list-names '(:foo acl2::bar str::baz))
      -->
    ("foo" "bar" "baz")

    Definitions and Theorems

    Function: symbol-list-names

    (defun symbol-list-names (x)
      (declare (xargs :guard (symbol-listp x)))
      (if (atom x)
          nil
        (cons (symbol-name (car x))
              (symbol-list-names (cdr x)))))

    Theorem: symbol-list-names-when-atom

    (defthm symbol-list-names-when-atom
      (implies (atom x)
               (equal (symbol-list-names x) nil)))

    Theorem: symbol-list-names-of-cons

    (defthm symbol-list-names-of-cons
      (equal (symbol-list-names (cons a x))
             (cons (symbol-name a)
                   (symbol-list-names x))))

    Theorem: string-listp-of-symbol-list-names

    (defthm string-listp-of-symbol-list-names
      (string-listp (symbol-list-names x)))

    Theorem: list-equiv-implies-equal-symbol-list-names-1

    (defthm list-equiv-implies-equal-symbol-list-names-1
      (implies (list-equiv x x-equiv)
               (equal (symbol-list-names x)
                      (symbol-list-names x-equiv)))
      :rule-classes (:congruence))

    Theorem: symbol-list-names-of-append

    (defthm symbol-list-names-of-append
      (equal (symbol-list-names (append x y))
             (append (symbol-list-names x)
                     (symbol-list-names y))))

    Theorem: symbol-list-names-of-revappend

    (defthm symbol-list-names-of-revappend
      (equal (symbol-list-names (revappend x y))
             (revappend (symbol-list-names x)
                        (symbol-list-names y))))

    Theorem: symbol-list-names-of-rev

    (defthm symbol-list-names-of-rev
      (equal (symbol-list-names (rev x))
             (rev (symbol-list-names x))))