Scopesubstitute into a vl-modinst-p.
(vl-modinst-scopesubst x ss) → new-x
Function:
(defun vl-modinst-scopesubst (x ss) (declare (xargs :guard (and (vl-modinst-p x) (vl-scopestack-p ss)))) (declare (ignorable x ss)) (let ((__function__ 'vl-modinst-scopesubst)) (declare (ignorable __function__)) (change-vl-modinst x :range (vl-maybe-range-scopesubst (vl-modinst->range x) ss) :paramargs (vl-paramargs-scopesubst (vl-modinst->paramargs x) ss) :portargs (vl-arguments-scopesubst (vl-modinst->portargs x) ss))))
Theorem:
(defthm vl-modinst-p-of-vl-modinst-scopesubst (b* ((new-x (vl-modinst-scopesubst x ss))) (vl-modinst-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinst-scopesubst-of-vl-modinst-fix-x (equal (vl-modinst-scopesubst (vl-modinst-fix x) ss) (vl-modinst-scopesubst x ss)))
Theorem:
(defthm vl-modinst-scopesubst-vl-modinst-equiv-congruence-on-x (implies (vl-modinst-equiv x x-equiv) (equal (vl-modinst-scopesubst x ss) (vl-modinst-scopesubst x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-modinst-scopesubst-of-vl-scopestack-fix-ss (equal (vl-modinst-scopesubst x (vl-scopestack-fix ss)) (vl-modinst-scopesubst x ss)))
Theorem:
(defthm vl-modinst-scopesubst-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-modinst-scopesubst x ss) (vl-modinst-scopesubst x ss-equiv))) :rule-classes :congruence)