(vl-alwayslist-ifmerge x warnings) → (mv warnings new-x)
Function:
(defun vl-alwayslist-ifmerge (x warnings) (declare (xargs :guard (and (vl-alwayslist-p x) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-alwayslist-ifmerge)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv (ok) x)) ((mv warnings car) (vl-always-ifmerge (car x) warnings)) ((mv warnings cdr) (vl-alwayslist-ifmerge (cdr x) warnings))) (mv warnings (cons car cdr)))))
Theorem:
(defthm vl-warninglist-p-of-vl-alwayslist-ifmerge.warnings (b* (((mv ?warnings ?new-x) (vl-alwayslist-ifmerge x warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-alwayslist-p-of-vl-alwayslist-ifmerge.new-x (b* (((mv ?warnings ?new-x) (vl-alwayslist-ifmerge x warnings))) (vl-alwayslist-p new-x)) :rule-classes :rewrite)