Extract the name of every symbol in a list.
(symbol-list-names x) just maps symbol-name across the
list
Example:
(symbol-list-names '(:foo acl2::bar str::baz)) --> ("foo" "bar" "baz")
Function:
(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:
(defthm symbol-list-names-when-atom (implies (atom x) (equal (symbol-list-names x) nil)))
Theorem:
(defthm symbol-list-names-of-cons (equal (symbol-list-names (cons a x)) (cons (symbol-name a) (symbol-list-names x))))
Theorem:
(defthm string-listp-of-symbol-list-names (string-listp (symbol-list-names x)))
Theorem:
(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:
(defthm symbol-list-names-of-append (equal (symbol-list-names (append x y)) (append (symbol-list-names x) (symbol-list-names y))))
Theorem:
(defthm symbol-list-names-of-revappend (equal (symbol-list-names (revappend x y)) (revappend (symbol-list-names x) (symbol-list-names y))))
Theorem:
(defthm symbol-list-names-of-rev (equal (symbol-list-names (rev x)) (rev (symbol-list-names x))))