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