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