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
Function:
(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:
(defthm intern-list-fn-when-atom (implies (atom x) (equal (intern-list-fn x pkg) nil)))
Theorem:
(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:
(defthm symbol-listp-of-intern-list-fn (symbol-listp (intern-list-fn x pkg)))
Theorem:
(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:
(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:
(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:
(defthm intern-list-fn-of-rev (equal (intern-list-fn (rev x) pkg) (rev (intern-list-fn x pkg))))