Skip to content

Commit b609371

Browse files
committed
Prepare move of micromega_tactics.v to Corelib
1 parent 86cc268 commit b609371

File tree

5 files changed

+52
-8
lines changed

5 files changed

+52
-8
lines changed

theories/micromega/Lia.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
From Stdlib Require Import PreOmega ZMicromega RingMicromega VarMap DeclConstantZ.
1818
From Stdlib Require Import BinNums.
1919
From Stdlib.micromega Require Tauto.
20-
Declare ML Module "rocq-runtime.plugins.micromega_core".
21-
Declare ML Module "rocq-runtime.plugins.micromega".
20+
From Stdlib Require Export micromega_tactics.
2221

2322
Ltac zchecker :=
2423
let __wit := fresh "__wit" in

theories/micromega/Lqa.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ From Stdlib Require Import RingMicromega.
2020
From Stdlib Require Import VarMap.
2121
From Stdlib Require Import DeclConstant.
2222
From Stdlib.micromega Require Tauto.
23-
Declare ML Module "rocq-runtime.plugins.micromega_core".
24-
Declare ML Module "rocq-runtime.plugins.micromega".
23+
From Stdlib Require Export micromega_tactics.
2524

2625
Ltac rchange :=
2726
let __wit := fresh "__wit" in

theories/micromega/Lra.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ From Stdlib Require Import RingMicromega.
2121
From Stdlib Require Import VarMap.
2222
From Stdlib.micromega Require Tauto.
2323
From Stdlib Require Import Rregisternames.
24-
25-
Declare ML Module "rocq-runtime.plugins.micromega".
24+
From Stdlib Require Export micromega_tactics.
2625

2726
Ltac rchange :=
2827
let __wit := fresh "__wit" in

theories/micromega/Psatz.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ From Stdlib.micromega Require Tauto.
2626
From Stdlib Require Lia.
2727
From Stdlib Require Lra.
2828
From Stdlib Require Lqa.
29-
30-
Declare ML Module "rocq-runtime.plugins.micromega".
29+
From Stdlib Require Export micromega_tactics.
3130

3231
Ltac lia := Lia.lia.
3332

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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

Comments
 (0)