Add clauses restricting
Function:
(defun ipasir-set-buf (ipasir out in) (declare (xargs :stobjs (ipasir))) (declare (xargs :guard (and (litp out) (litp in)))) (declare (xargs :guard (and (not (eq (ipasir-get-status ipasir) :undef)) (ipasir-empty-new-clause ipasir)))) (let ((__function__ 'ipasir-set-buf)) (declare (ignorable __function__)) (b* ((ipasir (ipasir-cancel-new-clause ipasir)) (ipasir (ipasir-add-binary ipasir (l- out) in))) (ipasir-add-binary ipasir out (l- in)))))
Theorem:
(defthm ipasir-set-buf-status (b* ((?new-ipasir (ipasir-set-buf ipasir out in))) (equal (ipasir$a->status new-ipasir) :input)))
Theorem:
(defthm ipasir-set-buf-formula (b* ((?new-ipasir (ipasir-set-buf ipasir out in))) (implies (syntaxp (not (equal ipasir ''nil))) (equal (ipasir$a->formula new-ipasir) (append (ipasir$a->formula (ipasir-set-buf nil out in)) (ipasir$a->formula ipasir))))))
Theorem:
(defthm ipasir-set-buf-eval-formula (b* ((?new-ipasir (ipasir-set-buf ipasir out in))) (equal (eval-formula (ipasir$a->formula new-ipasir) env) (b-and (b-eqv (eval-lit out env) (eval-lit in env)) (eval-formula (ipasir$a->formula ipasir) env)))))
Theorem:
(defthm ipasir-set-buf-new-clause (b* ((?new-ipasir (ipasir-set-buf ipasir out in))) (not (ipasir$a->new-clause new-ipasir))))
Theorem:
(defthm ipasir-set-buf-assumption (b* ((?new-ipasir (ipasir-set-buf ipasir out in))) (equal (ipasir$a->assumption new-ipasir) (ipasir$a->assumption ipasir))))