Skip to content

Commit 79db708

Browse files
committed
Port to MathComp 2
1 parent f37fda3 commit 79db708

File tree

7 files changed

+51
-40
lines changed

7 files changed

+51
-40
lines changed

.github/workflows/docker-action.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ jobs:
1717
strategy:
1818
matrix:
1919
image:
20-
- 'mathcomp/mathcomp:1.17.0-coq-8.15'
21-
- 'mathcomp/mathcomp:1.17.0-coq-8.16'
22-
- 'mathcomp/mathcomp:1.17.0-coq-8.17'
23-
- 'mathcomp/mathcomp:1.17.0-coq-8.18'
20+
- 'mathcomp/mathcomp:2.0.0-coq-8.16'
21+
- 'mathcomp/mathcomp:2.0.0-coq-8.17'
22+
- 'mathcomp/mathcomp:2.0.0-coq-8.18'
23+
- 'mathcomp/mathcomp-dev:coq-8.16'
24+
- 'mathcomp/mathcomp-dev:coq-8.17'
25+
- 'mathcomp/mathcomp-dev:coq-8.18'
26+
- 'mathcomp/mathcomp-dev:coq-dev'
2427
fail-fast: false
2528
steps:
2629
- uses: actions/checkout@v3

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ remains the sole trusted code base.
4141
- Assia Mahboubi ([**@amahboubi**](https://github.com/amahboubi))
4242
- Kazuhiko Sakaguchi ([**@pi8027**](https://github.com/pi8027))
4343
- License: [CeCILL-C](LICENSE)
44-
- Compatible Coq versions: 8.15 or later
44+
- Compatible Coq versions: 8.16 or later
4545
- Additional dependencies:
46-
- [MathComp ssreflect 1.17 or later](https://math-comp.github.io)
46+
- [MathComp ssreflect 2.0 or later](https://math-comp.github.io)
4747
- [MathComp algebra](https://math-comp.github.io)
4848
- [MathComp field](https://math-comp.github.io)
49-
- [CoqEAL 1.1.3 or later](https://github.com/coq-community/coqeal)
50-
- [MathComp real closed fields 1.1.4 or later](https://github.com/math-comp/real-closed)
49+
- [CoqEAL 2.0.0 or later](https://github.com/coq-community/coqeal)
50+
- [MathComp real closed fields 2.0.0 or later](https://github.com/math-comp/real-closed)
5151
- [MathComp bigenough 1.0.1 or later](https://github.com/math-comp/bigenough)
52-
- [Mczify](https://github.com/math-comp/mczify) 1.3.0 or later
53-
- [Algebra Tactics](https://github.com/math-comp/algebra-tactics) 1.0.0 or later
52+
- [Mczify](https://github.com/math-comp/mczify) 1.5.0 or later
53+
- [Algebra Tactics](https://github.com/math-comp/algebra-tactics) 1.2.0 or later
5454
- Coq namespace: `mathcomp.apery`
5555
- Related publication(s):
5656
- [A Formal Proof of the Irrationality of ζ(3)](https://arxiv.org/abs/1912.06611)

coq-mathcomp-apery.opam

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ remains the sole trusted code base."""
2323
build: [make "-j%{jobs}%"]
2424
install: [make "install"]
2525
depends: [
26-
"coq" {(>= "8.15" & < "8.19~") | (= "dev")}
27-
"coq-mathcomp-ssreflect" {>= "1.17" & < "1.18~"}
26+
"coq" {(>= "8.16" & < "8.19~") | (= "dev")}
27+
"coq-mathcomp-ssreflect" {(>= "2.0" & < "2.1~") | (= "dev")}
2828
"coq-mathcomp-algebra"
2929
"coq-mathcomp-field"
30-
"coq-coqeal" {>= "1.1.3" & < "2~"}
31-
"coq-mathcomp-real-closed" {>= "1.1.4" & < "2~"}
30+
"coq-coqeal" {>= "2.0.0"}
31+
"coq-mathcomp-real-closed" {>= "2.0.0"}
3232
"coq-mathcomp-bigenough" {>= "1.0.1"}
33-
"coq-mathcomp-zify" {>= "1.3.0" & < "1.14~"}
34-
"coq-mathcomp-algebra-tactics" {>= "1.0.0" & < "1.2~"}
33+
"coq-mathcomp-zify" {>= "1.5.0"}
34+
"coq-mathcomp-algebra-tactics" {>= "1.2.0"}
3535
]
3636

3737
tags: [

meta.yml

+23-17
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,31 @@ license:
5151
identifier: CECILL-C
5252

5353
supported_coq_versions:
54-
text: 8.15 or later
55-
opam: '{(>= "8.15" & < "8.19~") | (= "dev")}'
54+
text: 8.16 or later
55+
opam: '{(>= "8.16" & < "8.19~") | (= "dev")}'
5656

5757
tested_coq_opam_versions:
58-
- version: '1.17.0-coq-8.15'
58+
- version: '2.0.0-coq-8.16'
5959
repo: 'mathcomp/mathcomp'
60-
- version: '1.17.0-coq-8.16'
60+
- version: '2.0.0-coq-8.17'
6161
repo: 'mathcomp/mathcomp'
62-
- version: '1.17.0-coq-8.17'
63-
repo: 'mathcomp/mathcomp'
64-
- version: '1.17.0-coq-8.18'
62+
- version: '2.0.0-coq-8.18'
6563
repo: 'mathcomp/mathcomp'
64+
- version: 'coq-8.16'
65+
repo: 'mathcomp/mathcomp-dev'
66+
- version: 'coq-8.17'
67+
repo: 'mathcomp/mathcomp-dev'
68+
- version: 'coq-8.18'
69+
repo: 'mathcomp/mathcomp-dev'
70+
- version: 'coq-dev'
71+
repo: 'mathcomp/mathcomp-dev'
6672

6773
dependencies:
6874
- opam:
6975
name: coq-mathcomp-ssreflect
70-
version: '{>= "1.17" & < "1.18~"}'
76+
version: '{(>= "2.0" & < "2.1~") | (= "dev")}'
7177
description: |-
72-
[MathComp ssreflect 1.17 or later](https://math-comp.github.io)
78+
[MathComp ssreflect 2.0 or later](https://math-comp.github.io)
7379
- opam:
7480
name: coq-mathcomp-algebra
7581
description: |-
@@ -80,29 +86,29 @@ dependencies:
8086
[MathComp field](https://math-comp.github.io)
8187
- opam:
8288
name: coq-coqeal
83-
version: '{>= "1.1.3" & < "2~"}'
89+
version: '{>= "2.0.0"}'
8490
description: |-
85-
[CoqEAL 1.1.3 or later](https://github.com/coq-community/coqeal)
91+
[CoqEAL 2.0.0 or later](https://github.com/coq-community/coqeal)
8692
- opam:
8793
name: coq-mathcomp-real-closed
88-
version: '{>= "1.1.4" & < "2~"}'
94+
version: '{>= "2.0.0"}'
8995
description: |-
90-
[MathComp real closed fields 1.1.4 or later](https://github.com/math-comp/real-closed)
96+
[MathComp real closed fields 2.0.0 or later](https://github.com/math-comp/real-closed)
9197
- opam:
9298
name: coq-mathcomp-bigenough
9399
version: '{>= "1.0.1"}'
94100
description: |-
95101
[MathComp bigenough 1.0.1 or later](https://github.com/math-comp/bigenough)
96102
- opam:
97103
name: coq-mathcomp-zify
98-
version: '{>= "1.3.0" & < "1.14~"}'
104+
version: '{>= "1.5.0"}'
99105
description: |-
100-
[Mczify](https://github.com/math-comp/mczify) 1.3.0 or later
106+
[Mczify](https://github.com/math-comp/mczify) 1.5.0 or later
101107
- opam:
102108
name: coq-mathcomp-algebra-tactics
103-
version: '{>= "1.0.0" & < "1.2~"}'
109+
version: '{>= "1.2.0"}'
104110
description: |-
105-
[Algebra Tactics](https://github.com/math-comp/algebra-tactics) 1.0.0 or later
111+
[Algebra Tactics](https://github.com/math-comp/algebra-tactics) 1.2.0 or later
106112
107113
namespace: mathcomp.apery
108114

theories/rat_of_Z.v

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
From HB Require Import structures.
12
Require Import ZArith.
23
From mathcomp Require Import all_ssreflect all_algebra.
34
From mathcomp.zify Require Export ssrZ.
@@ -45,12 +46,14 @@ Export rat_of_ZDef.
4546
Fact rat_of_Z_is_additive : additive rat_of_Z.
4647
Proof. by move=> m n; rewrite rat_of_ZEdef !raddfB. Qed.
4748

48-
Canonical rat_of_Z_additive := Additive rat_of_Z_is_additive.
49+
HB.instance Definition _ :=
50+
GRing.isAdditive.Build Z rat rat_of_Z rat_of_Z_is_additive.
4951

5052
Fact rat_of_Z_is_multiplicative : multiplicative rat_of_Z.
5153
Proof. by rewrite rat_of_ZEdef; exact: rmorphismMP [rmorphism of _ \o _]. Qed.
5254

53-
Canonical rat_of_Z_rmorphism := AddRMorphism rat_of_Z_is_multiplicative.
55+
HB.instance Definition _ :=
56+
GRing.isMultiplicative.Build Z rat rat_of_Z rat_of_Z_is_multiplicative.
5457

5558
Lemma zify_rat_of_Z_subproof n : rat_of_Z n = (int_of_Z n)%:~R.
5659
Proof. by rewrite rat_of_ZEdef. Qed.

theories/tactics.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Proof. by rewrite 2!zifyRingE ltr_int. Qed.
8383

8484
End Internals.
8585

86-
Lemma rpred_zify (R : ringType) (S : {pred R}) (ringS : subringPred S)
87-
(kS : keyed_pred ringS) (e : zifyRing R) : rval e \in kS.
86+
Lemma rpred_zify (R : ringType) (S : subringClosed R) (e : zifyRing R) :
87+
rval e \in S.
8888
Proof. by rewrite zifyRingE rpred_int. Qed.
8989

9090
Canonical zify_zero.

theories/z3irrational.v

+2-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Qed.
7676

7777
(* Actual definition of \zeta(3) as a Cauchy real, i.e. the equivalence class *)
7878
(* of the sequence z3seq for Cauchy equivalence. *)
79-
Definition z3 : creal rat_realFieldType := CReal creal_z3seq.
79+
Definition z3 : creal rat := CReal creal_z3seq.
8080

8181
(* We prove that the sequences z3seq and b / a are asymptotically close. *)
8282
Lemma z3seq_b_over_a_asympt : {asympt e : i / `|z3seq i - b_over_a_seq i| < e}.
@@ -267,8 +267,7 @@ pose_big_enough M.
267267
- apply/lt_creal_cst; apply: mulr_gt0; first exact: lt_0_Kdelta.
268268
apply: divr_gt0; last by apply: exprn_gt0; rewrite ltr0n.
269269
rewrite invr_gt0; exact: lt_0_Ka.
270-
- apply/lt_creal_cst; rewrite ltrXn2r //; first exact: ltW.
271-
apply: hanson; raise_big_enough.
270+
- by apply/lt_creal_cst/ltrXn2r/hanson => //; raise_big_enough.
272271
- apply: lecr_lt_trans (NdeltaP _) _; first by raise_big_enough.
273272
apply/lt_creal_cst; rewrite ltr_pM2l; last exact: lt_0_Kdelta.
274273
apply: a_asympt; raise_big_enough.

0 commit comments

Comments
 (0)