Add a binary clause to the formula
Function:
(defun ipasir-add-binary (ipasir a b) (declare (xargs :stobjs (ipasir))) (declare (xargs :guard (and (litp a) (litp b)))) (declare (xargs :guard (and (not (eq (ipasir-get-status ipasir) :undef)) (ipasir-empty-new-clause ipasir)))) (let ((__function__ 'ipasir-add-binary)) (declare (ignorable __function__)) (b* ((ipasir (ipasir-cancel-new-clause ipasir)) (ipasir (ipasir-add-lit ipasir a)) (ipasir (ipasir-add-lit ipasir b))) (ipasir-finalize-clause ipasir))))
Theorem:
(defthm ipasir-add-binary-status (b* ((?new-ipasir (ipasir-add-binary ipasir a b))) (equal (ipasir$a->status new-ipasir) :input)))
Theorem:
(defthm ipasir-add-binary-formula (b* ((?new-ipasir (ipasir-add-binary ipasir a b))) (equal (ipasir$a->formula new-ipasir) (cons (lit-list-fix (list b a)) (ipasir$a->formula ipasir)))))
Theorem:
(defthm ipasir-add-binary-eval-formula (b* ((?new-ipasir (ipasir-add-binary ipasir a b))) (equal (eval-formula (ipasir$a->formula new-ipasir) assum) (eval-formula (cons (list a b) (ipasir$a->formula ipasir)) assum))))
Theorem:
(defthm ipasir-add-binary-new-clause (b* ((?new-ipasir (ipasir-add-binary ipasir a b))) (not (ipasir$a->new-clause new-ipasir))))
Theorem:
(defthm ipasir-add-binary-assumption (b* ((?new-ipasir (ipasir-add-binary ipasir a b))) (equal (ipasir$a->assumption new-ipasir) (ipasir$a->assumption ipasir))))