Add a unary clause to the formula, permanently restricting the given literal to be true.
(ipasir-add-unary ipasir a) → new-ipasir
Function:
(defun ipasir-add-unary (ipasir a) (declare (xargs :stobjs (ipasir))) (declare (xargs :guard (litp a))) (declare (xargs :guard (and (not (eq (ipasir-get-status ipasir) :undef)) (ipasir-empty-new-clause ipasir)))) (let ((__function__ 'ipasir-add-unary)) (declare (ignorable __function__)) (b* ((ipasir (ipasir-cancel-new-clause ipasir)) (ipasir (ipasir-add-lit ipasir a))) (ipasir-finalize-clause ipasir))))
Theorem:
(defthm ipasir-add-unary-status (b* ((?new-ipasir (ipasir-add-unary ipasir a))) (equal (ipasir$a->status new-ipasir) :input)))
Theorem:
(defthm ipasir-add-unary-formula (b* ((?new-ipasir (ipasir-add-unary ipasir a))) (equal (ipasir$a->formula new-ipasir) (cons (lit-list-fix (list a)) (ipasir$a->formula ipasir)))))
Theorem:
(defthm ipasir-add-unary-eval-formula (b* ((?new-ipasir (ipasir-add-unary ipasir a))) (equal (eval-formula (ipasir$a->formula new-ipasir) env) (b-and (eval-lit a env) (eval-formula (ipasir$a->formula ipasir) env)))))
Theorem:
(defthm ipasir-add-unary-new-clause (b* ((?new-ipasir (ipasir-add-unary ipasir a))) (not (ipasir$a->new-clause new-ipasir))))
Theorem:
(defthm ipasir-add-unary-assumption (b* ((?new-ipasir (ipasir-add-unary ipasir a))) (equal (ipasir$a->assumption new-ipasir) (ipasir$a->assumption ipasir))))