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