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