Make a list satisfying keyword-value-listp by associating each member of a true-list of keywords list of keywords with a given value.
(make-keyword-value-list-from-keys-and-value keys val) → kvlist
The keywords in the result are in the same order as in the input keys.
Function:
(defun make-keyword-value-list-from-keys-and-value (keys val) (declare (xargs :guard (keyword-listp keys))) (let ((__function__ 'make-keyword-value-list-from-keys-and-value)) (declare (ignorable __function__)) (cond ((endp keys) nil) (t (list* (car keys) val (make-keyword-value-list-from-keys-and-value (cdr keys) val))))))
Theorem:
(defthm keyword-value-listp-of-make-keyword-value-list-from-keys-and-value (implies (and (keyword-listp keys)) (b* ((kvlist (make-keyword-value-list-from-keys-and-value keys val))) (keyword-value-listp kvlist))) :rule-classes :rewrite)