Skip to content

Commit f086fac

Browse files
authored
Merge pull request #30 from coq-community/coqeal_99
Adapt to coq-community/coqeal#99
2 parents 85a28d9 + f4966f3 commit f086fac

File tree

5 files changed

+31
-41
lines changed

5 files changed

+31
-41
lines changed

.github/workflows/docker-action.yml

+4-11
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,13 @@ jobs:
1717
strategy:
1818
matrix:
1919
image:
20-
- 'mathcomp/mathcomp:2.1.0-coq-8.16'
21-
- 'mathcomp/mathcomp:2.1.0-coq-8.17'
22-
- 'mathcomp/mathcomp:2.1.0-coq-8.18'
23-
- 'mathcomp/mathcomp:2.2.0-coq-8.16'
24-
- 'mathcomp/mathcomp:2.2.0-coq-8.17'
25-
- 'mathcomp/mathcomp:2.2.0-coq-8.18'
26-
- 'mathcomp/mathcomp:2.2.0-coq-8.19'
27-
- 'mathcomp/mathcomp:2.2.0-coq-dev'
28-
- 'mathcomp/mathcomp-dev:coq-8.18'
29-
- 'mathcomp/mathcomp-dev:coq-8.19'
20+
- 'mathcomp/mathcomp:2.3.0-coq-8.20'
21+
- 'mathcomp/mathcomp:2.3.0-coq-dev'
22+
- 'mathcomp/mathcomp-dev:coq-8.20'
3023
- 'mathcomp/mathcomp-dev:coq-dev'
3124
fail-fast: false
3225
steps:
33-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
3427
- uses: coq-community/docker-coq-action@v1
3528
with:
3629
opam_file: 'coq-mathcomp-apery.opam'

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ remains the sole trusted code base.
4646
- [MathComp ssreflect 2.1 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 2.0.0 or later](https://github.com/coq-community/coqeal)
49+
- [CoqEAL 2.0.4 or later](https://github.com/coq-community/coqeal)
5050
- [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)
5252
- [Mczify](https://github.com/math-comp/mczify) 1.5.0 or later

coq-mathcomp-apery.opam

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ build: [make "-j%{jobs}%"]
2424
install: [make "install"]
2525
depends: [
2626
"coq" {(>= "8.16" & < "8.20~") | (= "dev")}
27-
"coq-mathcomp-ssreflect" {(>= "2.1" & < "2.3~") | (= "dev")}
27+
"coq-mathcomp-ssreflect" {(>= "2.3" & < "2.4~") | (= "dev")}
2828
"coq-mathcomp-algebra"
2929
"coq-mathcomp-field"
30-
"coq-coqeal" {>= "2.0.0"}
30+
"coq-coqeal" {>= "2.0.4"}
3131
"coq-mathcomp-real-closed" {>= "2.0.0"}
3232
"coq-mathcomp-bigenough" {>= "1.0.1"}
3333
"coq-mathcomp-zify" {>= "1.5.0"}

meta.yml

+6-20
Original file line numberDiff line numberDiff line change
@@ -55,33 +55,19 @@ supported_coq_versions:
5555
opam: '{(>= "8.16" & < "8.20~") | (= "dev")}'
5656

5757
tested_coq_opam_versions:
58-
- version: '2.1.0-coq-8.16'
58+
- version: '2.3.0-coq-8.20'
5959
repo: 'mathcomp/mathcomp'
60-
- version: '2.1.0-coq-8.17'
60+
- version: '2.3.0-coq-dev'
6161
repo: 'mathcomp/mathcomp'
62-
- version: '2.1.0-coq-8.18'
63-
repo: 'mathcomp/mathcomp'
64-
- version: '2.2.0-coq-8.16'
65-
repo: 'mathcomp/mathcomp'
66-
- version: '2.2.0-coq-8.17'
67-
repo: 'mathcomp/mathcomp'
68-
- version: '2.2.0-coq-8.18'
69-
repo: 'mathcomp/mathcomp'
70-
- version: '2.2.0-coq-8.19'
71-
repo: 'mathcomp/mathcomp'
72-
- version: '2.2.0-coq-dev'
73-
repo: 'mathcomp/mathcomp'
74-
- version: 'coq-8.18'
75-
repo: 'mathcomp/mathcomp-dev'
76-
- version: 'coq-8.19'
62+
- version: 'coq-8.20'
7763
repo: 'mathcomp/mathcomp-dev'
7864
- version: 'coq-dev'
7965
repo: 'mathcomp/mathcomp-dev'
8066

8167
dependencies:
8268
- opam:
8369
name: coq-mathcomp-ssreflect
84-
version: '{(>= "2.1" & < "2.3~") | (= "dev")}'
70+
version: '{(>= "2.3" & < "2.4~") | (= "dev")}'
8571
description: |-
8672
[MathComp ssreflect 2.1 or later](https://math-comp.github.io)
8773
- opam:
@@ -94,9 +80,9 @@ dependencies:
9480
[MathComp field](https://math-comp.github.io)
9581
- opam:
9682
name: coq-coqeal
97-
version: '{>= "2.0.0"}'
83+
version: '{>= "2.0.4"}'
9884
description: |-
99-
[CoqEAL 2.0.0 or later](https://github.com/coq-community/coqeal)
85+
[CoqEAL 2.0.4 or later](https://github.com/coq-community/coqeal)
10086
- opam:
10187
name: coq-mathcomp-real-closed
10288
version: '{>= "2.0.0"}'

theories/rho_computations.v

+18-7
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,23 @@ Context (RexpAQ : refines (RAQ ==> Logic.eq ==> RAQ)%rel (@GRing.exp _) exp_op).
196196
Context (RZtoAQ : refines (Logic.eq ==> RAQ)%rel rat_of_Z cast).
197197
Context (Rnat_to_AQ : refines (Logic.eq ==> RAQ)%rel natr cast).
198198

199-
Parametricity positive.
200-
Parametricity Z.
201-
Parametricity generic_beta.
202-
Parametricity generic_alpha.
203-
Parametricity generic_h.
204-
Parametricity generic_h_iter.
199+
Elpi derive.param2 positive.
200+
Elpi derive.param2 Z.
201+
Elpi derive.param2 generic_beta.
202+
Elpi derive.param2 generic_alpha.
203+
Elpi derive.param2 generic_h.
204+
Elpi derive.param2 generic_h_iter.
205205

206206
Global Instance refines_bool_eq x y : refines Z_R x y -> refines eq x y.
207207
Proof. by rewrite !refinesE; case => // p q; elim => // ? ? _ [->]. Qed.
208208

209+
Global Instance refines_expAQ :
210+
refines (exp_of_R RAQ nat_R) (GRing.exp (R:=rat)) expAQ.
211+
Proof. by rewrite /exp_of_R refinesE => *; apply: refinesP. Qed.
212+
213+
Global Instance refines_ZtoAQ : refines (cast_of_R Z_R RAQ) rat_of_Z ZtoAQ.
214+
Proof. by rewrite /cast_of_R refinesE => *; apply: refinesP. Qed.
215+
209216
Global Instance refines_beta :
210217
refines (RAQ ==> RAQ)%rel beta (generic_beta _ _ _ _).
211218
Proof. by param generic_beta_R. Qed.
@@ -218,9 +225,13 @@ Global Instance refines_h :
218225
refines (RAQ ==> RAQ ==> RAQ)%rel h (generic_h _ _ _ _ _ _).
219226
Proof. by param generic_h_R. Qed.
220227

228+
Global Instance refines_nat_to_AQ :
229+
refines (cast_of_R nat_R RAQ) natr nat_to_AQ.
230+
Proof. by rewrite /cast_of_R refinesE => *; apply: refinesP. Qed.
231+
221232
Global Instance refines_h_iter n :
222233
refines (RAQ)%rel (h_iter n) (generic_h_iter _ _ _ _ _ _ _ _ n).
223-
Proof. by param generic_h_iter_R; rewrite refinesE; elim: n => //= *; constructor. Qed.
234+
Proof. by param generic_h_iter_R; rewrite refinesE; apply: nat_Rxx. Qed.
224235

225236
End parametric.
226237

0 commit comments

Comments
 (0)