|
| 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 | +(* Micromega: A reflexive tactic using the Positivstellensatz *) |
| 12 | +(* *) |
| 13 | +(* Frédéric Besson (Irisa/Inria) *) |
| 14 | +(* *) |
| 15 | +(************************************************************************) |
| 16 | + |
| 17 | +(* TODO: remove this file when requiring Rocq >= 9.2 |
| 18 | + and use the identical file in Corelib instead *) |
| 19 | + |
| 20 | +From Stdlib Require Import BinNums RatDef micromega_formula micromega_witness. |
| 21 | + |
| 22 | +(** This file provide access to the witness generation tactics |
| 23 | +of the micromega OCaml plugin. The following tactics are provided, |
| 24 | +where [ff : BFormula (Formula Q) isProp]: |
| 25 | +- wlra_Q wit ff : set [wit] to a value of type [Psatz Q] |
| 26 | +- wlia wit ff : set [wit] to a value of type [ZArithProof] |
| 27 | +- wnia wit ff : set [wit] to a value of type [ZArithProof] |
| 28 | +- wnra_Q wit ff : set [wit] to a value of type [Psatz Q] |
| 29 | +- wsos_Q wit ff : set [wit] to a value of type [Psatz Q] |
| 30 | +- wsos_Z wit ff : set [wit] to a value of type [Psatz Z] |
| 31 | +- wpsatz_Z <n> wit ff : set [wit] to a value of type [ZArithProof] |
| 32 | +- wpsatz_Q <n> wit ff : set [wit] to a value of type [Psatz Q] |
| 33 | +The last four require the external Csdp numerical solver. |
| 34 | +
|
| 35 | +Beware that all tactic expect an Ltac name for [wit] and an actual |
| 36 | +value for [ff] (not just an identifier). That is, the following works |
| 37 | +<< |
| 38 | + pose (ff := ...). |
| 39 | + let ff' := eval unfold ff in ff in wlra_Q wit ff'. |
| 40 | +>> |
| 41 | +but not |
| 42 | +<< |
| 43 | + pose (ff := ...). |
| 44 | + wlra_Q wit ff. |
| 45 | +>> |
| 46 | +See test-suite/micromega/witness_tactics.v for an example. *) |
| 47 | + |
| 48 | +Declare ML Module "rocq-runtime.plugins.micromega". |
0 commit comments