(vl-arrayrange-update-subexprs x subexprs) → new-x
Function:
(defun vl-arrayrange-update-subexprs (x subexprs) (declare (xargs :guard (and (vl-arrayrange-p x) (vl-exprlist-p subexprs)))) (declare (xargs :guard (equal (len subexprs) (len (vl-arrayrange->subexprs x))))) (let ((__function__ 'vl-arrayrange-update-subexprs)) (declare (ignorable __function__)) (vl-arrayrange-case x :none (vl-arrayrange-fix x) :index (vl-expr->arrayrange (car subexprs)) :range (vl-range->arrayrange (vl-range-update-subexprs x.range subexprs)) :plusminus (vl-plusminus->arrayrange (vl-plusminus-update-subexprs x.plusminus subexprs)))))
Theorem:
(defthm vl-arrayrange-p-of-vl-arrayrange-update-subexprs (b* ((new-x (vl-arrayrange-update-subexprs x subexprs))) (vl-arrayrange-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-arrayrange-update-subexprs-identity (equal (vl-arrayrange-update-subexprs x (vl-arrayrange->subexprs x)) (vl-arrayrange-fix x)))
Theorem:
(defthm vl-arrayrange-update-subexprs-identity2 (implies (equal (len y) (len (vl-arrayrange->subexprs x))) (equal (vl-arrayrange->subexprs (vl-arrayrange-update-subexprs x y)) (vl-exprlist-fix y))))
Theorem:
(defthm vl-arrayrange-update-subexprs-of-vl-arrayrange-fix-x (equal (vl-arrayrange-update-subexprs (vl-arrayrange-fix x) subexprs) (vl-arrayrange-update-subexprs x subexprs)))
Theorem:
(defthm vl-arrayrange-update-subexprs-vl-arrayrange-equiv-congruence-on-x (implies (vl-arrayrange-equiv x x-equiv) (equal (vl-arrayrange-update-subexprs x subexprs) (vl-arrayrange-update-subexprs x-equiv subexprs))) :rule-classes :congruence)
Theorem:
(defthm vl-arrayrange-update-subexprs-of-vl-exprlist-fix-subexprs (equal (vl-arrayrange-update-subexprs x (vl-exprlist-fix subexprs)) (vl-arrayrange-update-subexprs x subexprs)))
Theorem:
(defthm vl-arrayrange-update-subexprs-vl-exprlist-equiv-congruence-on-subexprs (implies (vl-exprlist-equiv subexprs subexprs-equiv) (equal (vl-arrayrange-update-subexprs x subexprs) (vl-arrayrange-update-subexprs x subexprs-equiv))) :rule-classes :congruence)