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