(vl-valuerangelist-update-subexprs x subexprs) → new-x
Function:
(defun vl-valuerangelist-update-subexprs (x subexprs) (declare (xargs :guard (and (vl-valuerangelist-p x) (vl-exprlist-p subexprs)))) (declare (xargs :guard (equal (len subexprs) (len (vl-valuerangelist->subexprs x))))) (let ((__function__ 'vl-valuerangelist-update-subexprs)) (declare (ignorable __function__)) (if (atom x) x (let ((len (len (vl-valuerange->subexprs (car x))))) (cons (vl-valuerange-update-subexprs (car x) (take len subexprs)) (vl-valuerangelist-update-subexprs (cdr x) (nthcdr len subexprs)))))))
Theorem:
(defthm vl-valuerangelist-p-of-vl-valuerangelist-update-subexprs (b* ((new-x (vl-valuerangelist-update-subexprs x subexprs))) (vl-valuerangelist-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-valuerangelist-update-subexprs-identity (equal (vl-valuerangelist-update-subexprs x (vl-valuerangelist->subexprs x)) (vl-valuerangelist-fix x)))
Theorem:
(defthm vl-valuerangelist-update-subexprs-identity2 (implies (equal (len y) (len (vl-valuerangelist->subexprs x))) (equal (vl-valuerangelist->subexprs (vl-valuerangelist-update-subexprs x y)) (vl-exprlist-fix y))))
Theorem:
(defthm vl-valuerangelist-update-subexprs-of-vl-valuerangelist-fix-x (equal (vl-valuerangelist-update-subexprs (vl-valuerangelist-fix x) subexprs) (vl-valuerangelist-update-subexprs x subexprs)))
Theorem:
(defthm vl-valuerangelist-update-subexprs-vl-valuerangelist-equiv-congruence-on-x (implies (vl-valuerangelist-equiv x x-equiv) (equal (vl-valuerangelist-update-subexprs x subexprs) (vl-valuerangelist-update-subexprs x-equiv subexprs))) :rule-classes :congruence)
Theorem:
(defthm vl-valuerangelist-update-subexprs-of-vl-exprlist-fix-subexprs (equal (vl-valuerangelist-update-subexprs x (vl-exprlist-fix subexprs)) (vl-valuerangelist-update-subexprs x subexprs)))
Theorem:
(defthm vl-valuerangelist-update-subexprs-vl-exprlist-equiv-congruence-on-subexprs (implies (vl-exprlist-equiv subexprs subexprs-equiv) (equal (vl-valuerangelist-update-subexprs x subexprs) (vl-valuerangelist-update-subexprs x subexprs-equiv))) :rule-classes :congruence)