(vttree-add-warnings x vttree &key ctx) → new-vttree
Function:
(defun vttree-add-warnings-fn (x vttree ctx) (declare (xargs :guard (and (vl-warninglist-p x) (vttree-p vttree)))) (let ((__function__ 'vttree-add-warnings)) (declare (ignorable __function__)) (if (atom x) (vttree-fix vttree) (vttree-join (if ctx (make-vttree-context :ctx ctx :subtree (make-vttree-warnings :warnings x)) (make-vttree-warnings :warnings x)) vttree))))
Theorem:
(defthm vttree-p-of-vttree-add-warnings (b* ((new-vttree (vttree-add-warnings-fn x vttree ctx))) (vttree-p new-vttree)) :rule-classes :rewrite)
Theorem:
(defthm vttree->warnings-of-vttree-add-warnings (b* ((?new-vttree (vttree-add-warnings-fn x vttree ctx))) (equal (vttree->warnings new-vttree) (append (vl-warninglist-add-ctx x ctx) (vttree->warnings vttree)))))
Theorem:
(defthm vttree->constraints-of-vttree-add-warnings (b* ((?new-vttree (vttree-add-warnings-fn x vttree ctx))) (equal (vttree->constraints new-vttree) (vttree->constraints vttree))))
Theorem:
(defthm vttree-add-warnings-fn-of-vl-warninglist-fix-x (equal (vttree-add-warnings-fn (vl-warninglist-fix x) vttree ctx) (vttree-add-warnings-fn x vttree ctx)))
Theorem:
(defthm vttree-add-warnings-fn-vl-warninglist-equiv-congruence-on-x (implies (vl-warninglist-equiv x x-equiv) (equal (vttree-add-warnings-fn x vttree ctx) (vttree-add-warnings-fn x-equiv vttree ctx))) :rule-classes :congruence)
Theorem:
(defthm vttree-add-warnings-fn-of-vttree-fix-vttree (equal (vttree-add-warnings-fn x (vttree-fix vttree) ctx) (vttree-add-warnings-fn x vttree ctx)))
Theorem:
(defthm vttree-add-warnings-fn-vttree-equiv-congruence-on-vttree (implies (vttree-equiv vttree vttree-equiv) (equal (vttree-add-warnings-fn x vttree ctx) (vttree-add-warnings-fn x vttree-equiv ctx))) :rule-classes :congruence)