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