Concatenates a prefix onto every string in a list of strings.
(prefix-strings prefix x) → *
(prefix-strings prefix x) produces a new string list by concatenating
Function:
(defun prefix-strings (prefix x) (declare (xargs :guard (and (stringp prefix) (string-listp x)))) (let ((acl2::__function__ 'prefix-strings)) (declare (ignorable acl2::__function__)) (if (atom x) nil (cons (cat prefix (car x)) (prefix-strings prefix (cdr x))))))
Theorem:
(defthm prefix-strings-when-atom (implies (atom x) (equal (prefix-strings prefix x) nil)))
Theorem:
(defthm prefix-strings-of-cons (equal (prefix-strings prefix (cons a x)) (cons (cat prefix a) (prefix-strings prefix x))))
Theorem:
(defthm string-listp-of-prefix-strings (string-listp (prefix-strings prefix x)))
Theorem:
(defthm len-of-prefix-strings (equal (len (prefix-strings prefix x)) (len x)))
Theorem:
(defthm streqv-implies-equal-prefix-strings-1 (implies (streqv prefix prefix-equiv) (equal (prefix-strings prefix x) (prefix-strings prefix-equiv x))) :rule-classes (:congruence))
Theorem:
(defthm list-equiv-implies-equal-prefix-strings-2 (implies (list-equiv x x-equiv) (equal (prefix-strings prefix x) (prefix-strings prefix x-equiv))) :rule-classes (:congruence))