| 1 | (************************************************************************) |
| 2 | (* * The Rocq Prover / The Rocq Development Team *) |
| 3 | (* v * Copyright INRIA, CNRS and contributors *) |
| 4 | (* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 | (* \VV/ **************************************************************) |
| 6 | (* // * This file is distributed under the terms of the *) |
| 7 | (* * GNU Lesser General Public License Version 2.1 *) |
| 8 | (* * (see LICENSE file for the text of the license) *) |
| 9 | (************************************************************************) |
| 10 | |
| 11 | module Mc = Micromega |
| 12 | |
| 13 | type ('prf, 'model) res = Prf of 'prf | Model of 'model | Unknown |
| 14 | type zres = (Mc.zArithProof, int * Mc.z list) res |
| 15 | type qres = (Mc.q Mc.psatz, int * Mc.q list) res |
| 16 | |
| 17 | (** [q_cert_of_pos prf] converts a Sos proof into a rational Rocq proof *) |
| 18 | val q_cert_of_pos : Sos_types.positivstellensatz -> Mc.q Mc.psatz |
| 19 | |
| 20 | (** [z_cert_of_pos prf] converts a Sos proof into an integer Rocq proof *) |
| 21 | val z_cert_of_pos : Sos_types.positivstellensatz -> Mc.z Mc.psatz |
| 22 | |
| 23 | (** [lia depth sys] generates an unsat proof for the linear constraints in [sys]. *) |
| 24 | val lia : int -> (Mc.z Mc.pExpr * Mc.op1) list -> zres |
| 25 | |
| 26 | (** [nlia depth sys] generates an unsat proof for the non-linear constraints in [sys]. |
| 27 | The solver is incomplete -- the problem is undecidable *) |
| 28 | val nlia : int -> (Mc.z Mc.pExpr * Mc.op1) list -> zres |
| 29 | |
| 30 | (** [linear_prover_with_cert depth sys] generates an unsat proof for the linear constraints in [sys]. |
| 31 | Over the rationals, the solver is complete. *) |
| 32 | val linear_prover_with_cert : int -> (Mc.q Mc.pExpr * Mc.op1) list -> qres |
| 33 | |
| 34 | (** [nlinear depth sys] generates an unsat proof for the non-linear constraints in [sys]. |
| 35 | The solver is incompete -- the problem is decidable. *) |
| 36 | val nlinear_prover : int -> (Mc.q Mc.pExpr * Mc.op1) list -> qres |