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