Rewrite an occurrence to eliminate multiple drivers.
Function:
(defun vl-res-rewrite-occ (occ mds idx sigma) "Returns (MV OCC' IDX' SIGMA')" (declare (xargs :guard (and (natp idx) (vl-emodwirelist-p (alist-keys mds)) (vl-res-sigma-p sigma)))) (b* ((o (gpl :o occ)) ((mv o idx sigma) (vl-res-rewrite-pat o mds idx sigma)) (occ (acl2::chgpl :o o occ))) (mv occ idx sigma)))
Theorem:
(defthm vl-res-rewrite-occ-mvtypes-1 (natp (mv-nth 1 (vl-res-rewrite-occ occ mds idx sigma))) :rule-classes :type-prescription)
Theorem:
(defthm vl-res-sigma-p-of-vl-res-rewrite-occ (implies (and (vl-emodwirelist-p (alist-keys mds)) (vl-res-sigma-p sigma)) (vl-res-sigma-p (mv-nth 2 (vl-res-rewrite-occ occ mds idx sigma)))))
Theorem:
(defthm good-esim-occp-of-vl-res-rewrite-occ (implies (good-esim-occp occ) (good-esim-occp (mv-nth 0 (vl-res-rewrite-occ occ mds idx sigma)))))