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