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