Substitute into a vl-range-p.
(vl-range-subst x sigma) → new-x
Function:
(defun vl-range-subst (x sigma) (declare (xargs :guard (and (vl-range-p x) (vl-sigma-p sigma)))) (declare (ignorable x sigma)) (let ((__function__ 'vl-range-subst)) (declare (ignorable __function__)) (change-vl-range x :msb (vl-expr-subst (vl-range->msb x) sigma) :lsb (vl-expr-subst (vl-range->lsb x) sigma))))
Theorem:
(defthm vl-range-p-of-vl-range-subst (b* ((new-x (vl-range-subst x sigma))) (vl-range-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-range-subst-of-vl-range-fix-x (equal (vl-range-subst (vl-range-fix x) sigma) (vl-range-subst x sigma)))
Theorem:
(defthm vl-range-subst-vl-range-equiv-congruence-on-x (implies (vl-range-equiv x x-equiv) (equal (vl-range-subst x sigma) (vl-range-subst x-equiv sigma))) :rule-classes :congruence)
Theorem:
(defthm vl-range-subst-of-vl-sigma-fix-sigma (equal (vl-range-subst x (vl-sigma-fix sigma)) (vl-range-subst x sigma)))
Theorem:
(defthm vl-range-subst-vl-sigma-equiv-congruence-on-sigma (implies (vl-sigma-equiv sigma sigma-equiv) (equal (vl-range-subst x sigma) (vl-range-subst x sigma-equiv))) :rule-classes :congruence)