Extract and attach in-bounds warnings to a description list.
(vl-descriptionlist-inject-warnings x warnings) → (mv new-x beyond)
Function:
(defun vl-descriptionlist-inject-warnings (x warnings) (declare (xargs :guard (and (vl-descriptionlist-p x) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-descriptionlist-inject-warnings)) (declare (ignorable __function__)) (b* ((x (vl-descriptionlist-fix x)) (warnings (vl-warninglist-fix warnings)) ((when (atom x)) (mv nil warnings)) ((when (atom warnings)) (mv x nil)) ((mv first warnings) (vl-description-inject-warnings (car x) warnings)) ((mv rest warnings) (vl-descriptionlist-inject-warnings (cdr x) warnings))) (mv (cons first rest) warnings))))
Theorem:
(defthm vl-descriptionlist-p-of-vl-descriptionlist-inject-warnings.new-x (b* (((mv ?new-x ?beyond) (vl-descriptionlist-inject-warnings x warnings))) (vl-descriptionlist-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-warninglist-p-of-vl-descriptionlist-inject-warnings.beyond (b* (((mv ?new-x ?beyond) (vl-descriptionlist-inject-warnings x warnings))) (vl-warninglist-p beyond)) :rule-classes :rewrite)
Theorem:
(defthm vl-descriptionlist->names-of-vl-descriptionlist-inject-warnings (b* (((mv ?new-x ?beyond) (vl-descriptionlist-inject-warnings x warnings))) (equal (vl-descriptionlist->names new-x) (vl-descriptionlist->names x))) :rule-classes :rewrite)
Theorem:
(defthm vl-descriptionlist-inject-warnings-of-vl-descriptionlist-fix-x (equal (vl-descriptionlist-inject-warnings (vl-descriptionlist-fix x) warnings) (vl-descriptionlist-inject-warnings x warnings)))
Theorem:
(defthm vl-descriptionlist-inject-warnings-vl-descriptionlist-equiv-congruence-on-x (implies (vl-descriptionlist-equiv x x-equiv) (equal (vl-descriptionlist-inject-warnings x warnings) (vl-descriptionlist-inject-warnings x-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-descriptionlist-inject-warnings-of-vl-warninglist-fix-warnings (equal (vl-descriptionlist-inject-warnings x (vl-warninglist-fix warnings)) (vl-descriptionlist-inject-warnings x warnings)))
Theorem:
(defthm vl-descriptionlist-inject-warnings-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-descriptionlist-inject-warnings x warnings) (vl-descriptionlist-inject-warnings x warnings-equiv))) :rule-classes :congruence)