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