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