Process the
(tailrec-process-variant variant description error-erp error-val ctx state) → (mv erp val state)
Function:
(defun tailrec-process-variant (variant description error-erp error-val ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (msgp description))) (b* (((unless (tailrec-variantp variant)) (er-soft+ ctx error-erp error-val "~@0 must be :MONOID, :MONOID-ALT, :ASSOC or :ASSOC-ALT." description))) (value nil)))
Theorem:
(defthm return-type-of-tailrec-process-variant.erp (b* (((mv ?erp ?val acl2::?state) (tailrec-process-variant variant description error-erp error-val ctx state))) (implies erp (equal erp error-erp))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-tailrec-process-variant.val (b* (((mv ?erp ?val acl2::?state) (tailrec-process-variant variant description error-erp error-val ctx state))) (and (implies erp (equal val error-val)) (implies (and (not erp) error-erp) (not val)))) :rule-classes :rewrite)