Turn zero or more parts into a single part containing the initial parts, comma-separated.
Function:
(defun print-comma-sep (parts) (declare (xargs :guard (msg-listp parts))) (let ((__function__ 'print-comma-sep)) (declare (ignorable __function__)) (cond ((endp parts) "") ((endp (cdr parts)) (car parts)) (t (msg "~@0, ~@1" (car parts) (print-comma-sep (cdr parts)))))))
Theorem:
(defthm msgp-of-print-comma-sep (implies (msg-listp parts) (b* ((part (print-comma-sep parts))) (msgp part))) :rule-classes :rewrite)