Skip to content

Commit 4a97c2a

Browse files
authored
Merge pull request math-comp#119 from proux01/micromega-core
Adapt to math-comp/math-comp#1448
2 parents af182c0 + 8448c02 commit 4a97c2a

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

theories/common.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
From mathcomp Require all_algebra. (* Remove this line when requiring Rocq > 9.1 *)
12
From elpi Require Import elpi.
23
From Coq Require Import PeanoNat BinNat Zbool QArith.
34
From Coq.micromega Require Import OrderedRing RingMicromega.

theories/lra.v

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
From mathcomp Require all_algebra. (* Remove this line when requiring Rocq > 9.1 *)
12
From elpi Require Import elpi.
23
From Coq Require Import BinNat QArith Ring.
34
From Coq.micromega Require Import RingMicromega QMicromega EnvRing Tauto Lqa.
@@ -63,10 +64,10 @@ Definition Reval_bop2 (o : Op2) : R -> R -> bool :=
6364
| OpGt => fun x y => lt y x
6465
end.
6566

66-
Definition Reval_op2 k : Op2 -> R -> R -> rtyp k :=
67+
Definition Reval_op2 k : Op2 -> R -> R -> eKind k :=
6768
match k with isProp => Reval_pop2 | isBool => Reval_bop2 end.
6869

69-
Definition Reval_formula k (ff : RFormula R) : rtyp k :=
70+
Definition Reval_formula k (ff : RFormula R) : eKind k :=
7071
let (lhs,o,rhs) := ff in Reval_op2 k o (Reval lhs) (Reval rhs).
7172

7273
Definition Rnorm_formula k (ff : RFormula R) :=
@@ -93,8 +94,8 @@ elim: ff => // {k}.
9394
- by move=> ff1 IH1 ff2 IH2; congr eq.
9495
Qed.
9596

96-
Definition Reval_PFormula (e : PolEnv R) k (ff : Formula Z) : rtyp k :=
97-
let eval := PEeval add mul sub opp R_of_Z id exp e in
97+
Definition Reval_PFormula (e : PolEnv R) k (ff : Formula Z) : eKind k :=
98+
let eval := EnvRing.PEeval add mul sub opp R_of_Z id exp e in
9899
let (lhs,o,rhs) := ff in Reval_op2 k o (eval lhs) (eval rhs).
99100

100101
Lemma pop2_bop2 (op : Op2) (q1 q2 : R) :
@@ -104,7 +105,9 @@ Proof. by case: op => //=; rewrite eqPropE eqBoolE; split => /eqP. Qed.
104105
Lemma Reval_formula_compat (env : PolEnv R) k (f : Formula Z) :
105106
hold k (Reval_PFormula env k f) <->
106107
eval_formula add mul sub opp eqProp le lt R_of_Z id exp env f.
107-
Proof. by case: f => lhs op rhs; case: k => //=; rewrite pop2_bop2. Qed.
108+
Proof.
109+
by case: f => lhs op rhs; case: k => /=; rewrite ?pop2_bop2; case: op.
110+
Qed.
108111

109112
End Rnorm_formula.
110113

@@ -117,7 +120,7 @@ Notation RSORaddon := (RSORaddon R).
117120

118121
Definition ZTautoChecker (f : BFormula (Formula Z) isProp) (w: list (Psatz Z)) :
119122
bool :=
120-
@tauto_checker
123+
@Tauto.tauto_checker
121124
(Formula Z) (NFormula Z) unit
122125
(check_inconsistent 0 Z.eqb Z.leb)
123126
(nformula_plus_nformula 0 Z.add Z.eqb)
@@ -208,7 +211,7 @@ elim: ff => // {k}.
208211
- by move=> ff1 IH1 ff2 IH2; congr eq.
209212
Qed.
210213

211-
Definition Feval_PFormula (e : PolEnv F) k (ff : Formula Q) : rtyp k :=
214+
Definition Feval_PFormula (e : PolEnv F) k (ff : Formula Q) : eKind k :=
212215
let eval := eval_pexpr add mul sub opp F_of_Q id exp e in
213216
let (lhs,o,rhs) := ff in Feval_op2 k o (eval lhs) (eval rhs).
214217

@@ -219,7 +222,9 @@ Proof. by case: op => //=; rewrite eqPropE eqBoolE; split => /eqP. Qed.
219222
Lemma Feval_formula_compat env b f :
220223
hold b (Feval_PFormula env b f) <->
221224
eval_formula add mul sub opp eqProp le lt F_of_Q id exp env f.
222-
Proof. by case: f => lhs op rhs; case: b => //=; rewrite pop2_bop2'. Qed.
225+
Proof.
226+
by case: f => lhs op rhs; case: b => /=; rewrite ?pop2_bop2'; case: op.
227+
Qed.
223228

224229
End Fnorm_formula.
225230

theories/ring.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
From mathcomp Require all_algebra. (* Remove this line when requiring Rocq > 9.1 *)
12
From elpi Require Import elpi.
23
From Coq Require Import ZArith Ring Ring_polynom Field_theory.
34
From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq.

0 commit comments

Comments
 (0)