Rewrite operators throughout a vl-modinstlist-p
(vl-modinstlist-oprewrite x warnings) → (mv warnings new-x)
Function:
(defun vl-modinstlist-oprewrite (x warnings) (declare (xargs :guard (and (vl-modinstlist-p x) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-modinstlist-oprewrite)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv (ok) nil)) ((mv warnings car-prime) (vl-modinst-oprewrite (car x) warnings)) ((mv warnings cdr-prime) (vl-modinstlist-oprewrite (cdr x) warnings))) (mv warnings (cons car-prime cdr-prime)))))
Theorem:
(defthm vl-warninglist-p-of-vl-modinstlist-oprewrite.warnings (b* (((mv ?warnings ?new-x) (vl-modinstlist-oprewrite x warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinstlist-p-of-vl-modinstlist-oprewrite.new-x (b* (((mv ?warnings ?new-x) (vl-modinstlist-oprewrite x warnings))) (vl-modinstlist-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinstlist-oprewrite-mvtypes-1 (true-listp (mv-nth 1 (vl-modinstlist-oprewrite x warnings))) :rule-classes :type-prescription)
Theorem:
(defthm vl-modinstlist-oprewrite-of-vl-modinstlist-fix-x (equal (vl-modinstlist-oprewrite (vl-modinstlist-fix x) warnings) (vl-modinstlist-oprewrite x warnings)))
Theorem:
(defthm vl-modinstlist-oprewrite-vl-modinstlist-equiv-congruence-on-x (implies (vl-modinstlist-equiv x x-equiv) (equal (vl-modinstlist-oprewrite x warnings) (vl-modinstlist-oprewrite x-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modinstlist-oprewrite-of-vl-warninglist-fix-warnings (equal (vl-modinstlist-oprewrite x (vl-warninglist-fix warnings)) (vl-modinstlist-oprewrite x warnings)))
Theorem:
(defthm vl-modinstlist-oprewrite-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-modinstlist-oprewrite x warnings) (vl-modinstlist-oprewrite x warnings-equiv))) :rule-classes :congruence)