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