Rewrite operators throughout a vl-modinst-p
(vl-modinst-oprewrite x warnings) → (mv warnings new-x)
Function:
(defun vl-modinst-oprewrite (x warnings) (declare (xargs :guard (and (vl-modinst-p x) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-modinst-oprewrite)) (declare (ignorable __function__)) (b* ((x (vl-modinst-fix x))) (b* (((vl-modinst x) x) ((mv warnings args-prime) (vl-arguments-oprewrite x.portargs warnings))) (mv warnings (change-vl-modinst x :portargs args-prime))))))
Theorem:
(defthm vl-warninglist-p-of-vl-modinst-oprewrite.warnings (b* (((mv ?warnings ?new-x) (vl-modinst-oprewrite x warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinst-p-of-vl-modinst-oprewrite.new-x (b* (((mv ?warnings ?new-x) (vl-modinst-oprewrite x warnings))) (vl-modinst-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinst-oprewrite-of-vl-modinst-fix-x (equal (vl-modinst-oprewrite (vl-modinst-fix x) warnings) (vl-modinst-oprewrite x warnings)))
Theorem:
(defthm vl-modinst-oprewrite-vl-modinst-equiv-congruence-on-x (implies (vl-modinst-equiv x x-equiv) (equal (vl-modinst-oprewrite x warnings) (vl-modinst-oprewrite x-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modinst-oprewrite-of-vl-warninglist-fix-warnings (equal (vl-modinst-oprewrite x (vl-warninglist-fix warnings)) (vl-modinst-oprewrite x warnings)))
Theorem:
(defthm vl-modinst-oprewrite-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-modinst-oprewrite x warnings) (vl-modinst-oprewrite x warnings-equiv))) :rule-classes :congruence)