Add a list of clauses to the formula
(ipasir-add-clauses ipasir clauses) → new-ipasir
Function:
(defun ipasir-add-clauses (ipasir clauses) (declare (xargs :stobjs (ipasir))) (declare (xargs :guard (lit-list-listp clauses))) (declare (xargs :guard (and (not (eq (ipasir-get-status ipasir) :undef)) (ipasir-empty-new-clause ipasir)))) (let ((__function__ 'ipasir-add-clauses)) (declare (ignorable __function__)) (if (atom clauses) (b* ((ipasir (ipasir-cancel-new-clause ipasir))) (ipasir-input ipasir)) (b* ((ipasir (ipasir-add-list ipasir (car clauses)))) (ipasir-add-clauses ipasir (cdr clauses))))))
Theorem:
(defthm ipasir-add-clauses-status (b* ((?new-ipasir (ipasir-add-clauses ipasir clauses))) (equal (ipasir$a->status new-ipasir) :input)))
Theorem:
(defthm ipasir-add-clauses-formula (b* ((?new-ipasir (ipasir-add-clauses ipasir clauses))) (equal (ipasir$a->formula new-ipasir) (append (rev (rev-each (lit-list-list-fix clauses))) (ipasir$a->formula ipasir)))))
Theorem:
(defthm ipasir-add-clauses-eval-formula (b* ((?new-ipasir (ipasir-add-clauses ipasir clauses))) (equal (eval-formula (ipasir$a->formula new-ipasir) env) (eval-formula (append clauses (ipasir$a->formula ipasir)) env))))
Theorem:
(defthm ipasir-add-clauses-new-clause (b* ((?new-ipasir (ipasir-add-clauses ipasir clauses))) (not (ipasir$a->new-clause new-ipasir))))
Theorem:
(defthm ipasir-add-clauses-assumption (b* ((?new-ipasir (ipasir-add-clauses ipasir clauses))) (equal (ipasir$a->assumption new-ipasir) (ipasir$a->assumption ipasir))))