(vl-valuerange-update-subexprs x subexprs) → new-x
Function:
(defun vl-valuerange-update-subexprs (x subexprs) (declare (xargs :guard (and (vl-valuerange-p x) (vl-exprlist-p subexprs)))) (declare (xargs :guard (equal (len subexprs) (len (vl-valuerange->subexprs x))))) (let ((__function__ 'vl-valuerange-update-subexprs)) (declare (ignorable __function__)) (vl-valuerange-case x :valuerange-single (make-vl-valuerange-single :expr (first subexprs)) :valuerange-range (make-vl-valuerange-range :low (first subexprs) :high (second subexprs)))))
Theorem:
(defthm vl-valuerange-p-of-vl-valuerange-update-subexprs (b* ((new-x (vl-valuerange-update-subexprs x subexprs))) (vl-valuerange-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-valuerange-update-subexprs-identity (equal (vl-valuerange-update-subexprs x (vl-valuerange->subexprs x)) (vl-valuerange-fix x)))
Theorem:
(defthm vl-valuerange-update-subexprs-identity2 (implies (equal (len y) (len (vl-valuerange->subexprs x))) (equal (vl-valuerange->subexprs (vl-valuerange-update-subexprs x y)) (vl-exprlist-fix y))))
Theorem:
(defthm vl-valuerange-update-subexprs-of-vl-valuerange-fix-x (equal (vl-valuerange-update-subexprs (vl-valuerange-fix x) subexprs) (vl-valuerange-update-subexprs x subexprs)))
Theorem:
(defthm vl-valuerange-update-subexprs-vl-valuerange-equiv-congruence-on-x (implies (vl-valuerange-equiv x x-equiv) (equal (vl-valuerange-update-subexprs x subexprs) (vl-valuerange-update-subexprs x-equiv subexprs))) :rule-classes :congruence)
Theorem:
(defthm vl-valuerange-update-subexprs-of-vl-exprlist-fix-subexprs (equal (vl-valuerange-update-subexprs x (vl-exprlist-fix subexprs)) (vl-valuerange-update-subexprs x subexprs)))
Theorem:
(defthm vl-valuerange-update-subexprs-vl-exprlist-equiv-congruence-on-subexprs (implies (vl-exprlist-equiv subexprs subexprs-equiv) (equal (vl-valuerange-update-subexprs x subexprs) (vl-valuerange-update-subexprs x subexprs-equiv))) :rule-classes :congruence)