Function:
(defun vl-locationlist-string (n) (declare (xargs :guard (natp n))) (declare (xargs :guard (<= n 9))) (let ((__function__ 'vl-locationlist-string)) (declare (ignorable __function__)) (cond ((zp n) "") ((= n 1) (cat "~l1")) ((= n 2) (cat "~l2 and ~l1")) (t (cat "~l" (natstr n) ", " (vl-locationlist-string (- n 1)))))))
Theorem:
(defthm stringp-of-vl-locationlist-string (b* ((str (vl-locationlist-string n))) (stringp str)) :rule-classes :type-prescription)