(vl-hidexpr-update-subexprs x subexprs) → new-x
Function:
(defun vl-hidexpr-update-subexprs (x subexprs) (declare (xargs :guard (and (vl-hidexpr-p x) (vl-exprlist-p subexprs)))) (declare (xargs :guard (equal (len subexprs) (len (vl-hidexpr->subexprs x))))) (let ((__function__ 'vl-hidexpr-update-subexprs)) (declare (ignorable __function__)) (vl-hidexpr-case x :end (vl-hidexpr-fix x) :dot (b* (((vl-hidindex x.first)) (nsubexprs (len x.first.indices)) (subexprs (vl-exprlist-fix subexprs))) (change-vl-hidexpr-dot x :first (change-vl-hidindex x.first :indices (take nsubexprs subexprs)) :rest (vl-hidexpr-update-subexprs x.rest (nthcdr nsubexprs subexprs)))))))
Theorem:
(defthm vl-hidexpr-p-of-vl-hidexpr-update-subexprs (b* ((new-x (vl-hidexpr-update-subexprs x subexprs))) (vl-hidexpr-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-hidexpr-update-subexprs-identity (equal (vl-hidexpr-update-subexprs x (vl-hidexpr->subexprs x)) (vl-hidexpr-fix x)))
Theorem:
(defthm vl-hidexpr-update-subexprs-identity2 (implies (equal (len y) (len (vl-hidexpr->subexprs x))) (equal (vl-hidexpr->subexprs (vl-hidexpr-update-subexprs x y)) (vl-exprlist-fix y))))
Theorem:
(defthm vl-hidexpr-update-subexprs-of-vl-hidexpr-fix-x (equal (vl-hidexpr-update-subexprs (vl-hidexpr-fix x) subexprs) (vl-hidexpr-update-subexprs x subexprs)))
Theorem:
(defthm vl-hidexpr-update-subexprs-vl-hidexpr-equiv-congruence-on-x (implies (vl-hidexpr-equiv x x-equiv) (equal (vl-hidexpr-update-subexprs x subexprs) (vl-hidexpr-update-subexprs x-equiv subexprs))) :rule-classes :congruence)
Theorem:
(defthm vl-hidexpr-update-subexprs-of-vl-exprlist-fix-subexprs (equal (vl-hidexpr-update-subexprs x (vl-exprlist-fix subexprs)) (vl-hidexpr-update-subexprs x subexprs)))
Theorem:
(defthm vl-hidexpr-update-subexprs-vl-exprlist-equiv-congruence-on-subexprs (implies (vl-exprlist-equiv subexprs subexprs-equiv) (equal (vl-hidexpr-update-subexprs x subexprs) (vl-hidexpr-update-subexprs x subexprs-equiv))) :rule-classes :congruence)