Replaces the hidexpr nested inside the scopeexpr.
(vl-scopeexpr-replace-hid x new-hid) → new-x
Function:
(defun vl-scopeexpr-replace-hid (x new-hid) (declare (xargs :guard (and (vl-scopeexpr-p x) (vl-hidexpr-p new-hid)))) (let ((__function__ 'vl-scopeexpr-replace-hid)) (declare (ignorable __function__)) (vl-scopeexpr-case x :end (change-vl-scopeexpr-end x :hid new-hid) :colon (change-vl-scopeexpr-colon x :rest (vl-scopeexpr-replace-hid x.rest new-hid)))))
Theorem:
(defthm vl-scopeexpr-p-of-vl-scopeexpr-replace-hid (b* ((new-x (vl-scopeexpr-replace-hid x new-hid))) (vl-scopeexpr-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopeexpr-replace-hid-of-vl-scopeexpr-fix-x (equal (vl-scopeexpr-replace-hid (vl-scopeexpr-fix x) new-hid) (vl-scopeexpr-replace-hid x new-hid)))
Theorem:
(defthm vl-scopeexpr-replace-hid-vl-scopeexpr-equiv-congruence-on-x (implies (vl-scopeexpr-equiv x x-equiv) (equal (vl-scopeexpr-replace-hid x new-hid) (vl-scopeexpr-replace-hid x-equiv new-hid))) :rule-classes :congruence)
Theorem:
(defthm vl-scopeexpr-replace-hid-of-vl-hidexpr-fix-new-hid (equal (vl-scopeexpr-replace-hid x (vl-hidexpr-fix new-hid)) (vl-scopeexpr-replace-hid x new-hid)))
Theorem:
(defthm vl-scopeexpr-replace-hid-vl-hidexpr-equiv-congruence-on-new-hid (implies (vl-hidexpr-equiv new-hid new-hid-equiv) (equal (vl-scopeexpr-replace-hid x new-hid) (vl-scopeexpr-replace-hid x new-hid-equiv))) :rule-classes :congruence)