Extend vl-replicate-gateinst across a vl-gateinstlist-p.
(vl-replicate-gateinstlist x nf ss warnings) → (mv warnings new-gateinsts nf)
Function:
(defun vl-replicate-gateinstlist (x nf ss warnings) (declare (xargs :guard (and (vl-gateinstlist-p x) (vl-namefactory-p nf) (vl-scopestack-p ss) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-replicate-gateinstlist)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv (ok) nil (vl-namefactory-fix nf))) ((mv warnings car-prime nf) (vl-replicate-gateinst (car x) nf ss warnings)) ((mv warnings cdr-prime nf) (vl-replicate-gateinstlist (cdr x) nf ss warnings)) (new-gateinsts (append car-prime cdr-prime))) (mv warnings new-gateinsts nf))))
Theorem:
(defthm vl-warninglist-p-of-vl-replicate-gateinstlist.warnings (b* (((mv ?warnings ?new-gateinsts ?nf) (vl-replicate-gateinstlist x nf ss warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-gateinstlist-p-of-vl-replicate-gateinstlist.new-gateinsts (b* (((mv ?warnings ?new-gateinsts ?nf) (vl-replicate-gateinstlist x nf ss warnings))) (vl-gateinstlist-p new-gateinsts)) :rule-classes :rewrite)
Theorem:
(defthm vl-namefactory-p-of-vl-replicate-gateinstlist.nf (b* (((mv ?warnings ?new-gateinsts ?nf) (vl-replicate-gateinstlist x nf ss warnings))) (vl-namefactory-p nf)) :rule-classes :rewrite)
Theorem:
(defthm vl-replicate-gateinstlist-mvtypes-1 (true-listp (mv-nth 1 (vl-replicate-gateinstlist x nf ss warnings))) :rule-classes :type-prescription)
Theorem:
(defthm vl-replicate-gateinstlist-of-vl-gateinstlist-fix-x (equal (vl-replicate-gateinstlist (vl-gateinstlist-fix x) nf ss warnings) (vl-replicate-gateinstlist x nf ss warnings)))
Theorem:
(defthm vl-replicate-gateinstlist-vl-gateinstlist-equiv-congruence-on-x (implies (vl-gateinstlist-equiv x x-equiv) (equal (vl-replicate-gateinstlist x nf ss warnings) (vl-replicate-gateinstlist x-equiv nf ss warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-replicate-gateinstlist-of-vl-namefactory-fix-nf (equal (vl-replicate-gateinstlist x (vl-namefactory-fix nf) ss warnings) (vl-replicate-gateinstlist x nf ss warnings)))
Theorem:
(defthm vl-replicate-gateinstlist-vl-namefactory-equiv-congruence-on-nf (implies (vl-namefactory-equiv nf nf-equiv) (equal (vl-replicate-gateinstlist x nf ss warnings) (vl-replicate-gateinstlist x nf-equiv ss warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-replicate-gateinstlist-of-vl-scopestack-fix-ss (equal (vl-replicate-gateinstlist x nf (vl-scopestack-fix ss) warnings) (vl-replicate-gateinstlist x nf ss warnings)))
Theorem:
(defthm vl-replicate-gateinstlist-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-replicate-gateinstlist x nf ss warnings) (vl-replicate-gateinstlist x nf ss-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-replicate-gateinstlist-of-vl-warninglist-fix-warnings (equal (vl-replicate-gateinstlist x nf ss (vl-warninglist-fix warnings)) (vl-replicate-gateinstlist x nf ss warnings)))
Theorem:
(defthm vl-replicate-gateinstlist-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-replicate-gateinstlist x nf ss warnings) (vl-replicate-gateinstlist x nf ss warnings-equiv))) :rule-classes :congruence)