Scopesubstitute into a vl-modelement-p.
(vl-modelement-scopesubst x ss) → new-x
Function:
(defun vl-modelement-scopesubst (x ss) (declare (xargs :guard (and (vl-modelement-p x) (vl-scopestack-p ss)))) (declare (ignorable x ss)) (let ((__function__ 'vl-modelement-scopesubst)) (declare (ignorable __function__)) (b* ((x (vl-modelement-fix x))) (case (tag x) (:vl-portdecl (vl-portdecl-scopesubst x ss)) (:vl-assign (vl-assign-scopesubst x ss)) (:vl-alias (vl-alias-scopesubst x ss)) (:vl-vardecl (vl-vardecl-scopesubst x ss)) (:vl-paramdecl (vl-paramdecl-scopesubst x ss)) (:vl-fundecl (vl-fundecl-scopesubst x ss)) (:vl-modinst (vl-modinst-scopesubst x ss)) (:vl-gateinst (vl-gateinst-scopesubst x ss)) (:vl-always (vl-always-scopesubst x ss)) (:vl-initial (vl-initial-scopesubst x ss)) (otherwise x)))))
Theorem:
(defthm vl-modelement-p-of-vl-modelement-scopesubst (b* ((new-x (vl-modelement-scopesubst x ss))) (vl-modelement-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-modelement-scopesubst-of-vl-modelement-fix-x (equal (vl-modelement-scopesubst (vl-modelement-fix x) ss) (vl-modelement-scopesubst x ss)))
Theorem:
(defthm vl-modelement-scopesubst-vl-modelement-equiv-congruence-on-x (implies (vl-modelement-equiv x x-equiv) (equal (vl-modelement-scopesubst x ss) (vl-modelement-scopesubst x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-modelement-scopesubst-of-vl-scopestack-fix-ss (equal (vl-modelement-scopesubst x (vl-scopestack-fix ss)) (vl-modelement-scopesubst x ss)))
Theorem:
(defthm vl-modelement-scopesubst-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-modelement-scopesubst x ss) (vl-modelement-scopesubst x ss-equiv))) :rule-classes :congruence)