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