Skip to content

Commit ed8e604

Browse files
authored
Merge pull request #180 from coq-community/port_paramcoq_elpi
Port from paramcoq to elpi
2 parents 1c30f04 + 03cee9b commit ed8e604

File tree

11 files changed

+24
-31
lines changed

11 files changed

+24
-31
lines changed

.github/workflows/docker-action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
- 'mathcomp/mathcomp:1.18.0-coq-8.18'
1919
- 'mathcomp/mathcomp:1.17.0-coq-8.17'
2020
- 'mathcomp/mathcomp:1.15.0-coq-8.16'
21-
- 'mathcomp/mathcomp:1.14.0-coq-8.15'
22-
- 'mathcomp/mathcomp:1.13.0-coq-8.14'
2321
fail-fast: false
2422
steps:
2523
- uses: actions/checkout@v3

.github/workflows/nix-action-default.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,9 @@ jobs:
371371
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default"
372372
--argstr job "mathcomp-zify"
373373
- if: steps.stepCheck.outputs.status == 'built'
374-
name: 'Building/fetching previous CI target: paramcoq'
374+
name: 'Building/fetching previous CI target: coq-elpi'
375375
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default"
376-
--argstr job "paramcoq"
376+
--argstr job "coq-elpi"
377377
- if: steps.stepCheck.outputs.status == 'built'
378378
name: Building/fetching current CI target
379379
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "default"

.nix/config.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
## You can override Coq and other Coq coqPackages
4343
## through the following attribute
44-
coqPackages.coq.override.version = "8.15";
44+
coqPackages.coq.override.version = "8.16";
4545
coqPackages.gaia-hydras.override.version = ../.;
4646
coqPackages.goedel.override.version = ../.;
4747
coqPackages.coqprime.override.version = "master";

.nix/coq-overlays/hydra-battles-single/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{ lib, mkCoqDerivation, coq, version ? null
2-
, coqprime, equations, gaia, LibHyps, mathcomp-ssreflect, mathcomp-algebra, mathcomp-zify, paramcoq, zorns-lemma
2+
, coqprime, equations, gaia, LibHyps, mathcomp-ssreflect, mathcomp-algebra, mathcomp-zify, coq-elpi, zorns-lemma
33
, python3Packages, serapi, texlive, withMovies ? true, withTex ? true }:
44

55
with lib; mkCoqDerivation rec {
@@ -50,7 +50,7 @@ with lib; mkCoqDerivation rec {
5050
mathcomp-ssreflect
5151
mathcomp-algebra
5252
mathcomp-zify
53-
paramcoq
53+
coq-elpi
5454
zorns-lemma
5555
];
5656

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ the proceedings of [JFLA 2022](http://jfla.inria.fr/jfla2022.html).
6565
- Compatible Coq versions: 8.14 or later
6666
- Additional dependencies:
6767
- [Equations](https://github.com/mattam82/Coq-Equations) 1.2 or later
68-
- [Paramcoq](https://github.com/coq-community/paramcoq) 1.1.3 or later
69-
- [MathComp SSReflect](https://github.com/math-comp/math-comp) 1.13 or later
68+
- [Coq-elpi](https://github.com/LPCIC/coq-elpi) 1.16 or later
69+
- [MathComp SSReflect](https://github.com/math-comp/math-comp) 1.15 or later
7070
- [MathComp Algebra](https://github.com/math-comp/math-comp)
7171
- [Gaia's Schütte ordinals](https://github.com/coq-community/gaia) 1.14 or later
7272
- [Mczify](https://github.com/math-comp/mczify)

coq-addition-chains.opam

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ correctness."""
1717
build: ["dune" "build" "-p" name "-j" jobs]
1818
depends: [
1919
"dune" {>= "2.5"}
20-
"coq" {>= "8.14"}
21-
"coq-paramcoq" {>= "1.1.3"}
22-
"coq-mathcomp-ssreflect" {>= "1.13.0" & < "1.19"}
20+
"coq" {>= "8.16"}
21+
"coq-elpi" {>= "1.16.0"}
22+
"coq-mathcomp-ssreflect" {>= "1.15.0" & < "1.19"}
2323
"coq-mathcomp-algebra"
2424
]
2525

coq-gaia-hydras.opam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ similar concepts in the two projects."""
1616
build: ["dune" "build" "-p" name "-j" jobs]
1717
depends: [
1818
"dune" {>= "2.5"}
19-
"coq" {>= "8.14"}
19+
"coq" {>= "8.16"}
2020
"coq-hydra-battles" {= version}
21-
"coq-mathcomp-ssreflect" {>= "1.13.0" & < "1.19"}
21+
"coq-mathcomp-ssreflect" {>= "1.15.0" & < "1.19"}
2222
"coq-mathcomp-zify" {< "2"}
2323
"coq-gaia-schutte" {>= "1.14" & < "1.18"}
2424
]

coq-goedel.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ without induction) that is complete is inconsistent."""
1616
build: ["dune" "build" "-p" name "-j" jobs]
1717
depends: [
1818
"dune" {>= "2.5"}
19-
"coq" {>= "8.14"}
19+
"coq" {>= "8.16"}
2020
"coq-hydra-battles" {= version}
2121
"coq-coqprime" {>= "1.3.0"}
2222
]

coq-hydra-battles.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ properties of epsilon0)."""
1818
build: ["dune" "build" "-p" name "-j" jobs]
1919
depends: [
2020
"dune" {>= "2.5"}
21-
"coq" {>= "8.14"}
21+
"coq" {>= "8.16"}
2222
"coq-equations" {>= "1.2"}
2323
"coq-zorns-lemma" {>= "10.2.0"}
2424
"coq-libhyps"

meta.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ tested_coq_opam_versions:
126126
repo: 'mathcomp/mathcomp'
127127
- version: '1.15.0-coq-8.16'
128128
repo: 'mathcomp/mathcomp'
129-
- version: '1.14.0-coq-8.15'
130-
repo: 'mathcomp/mathcomp'
131-
- version: '1.13.0-coq-8.14'
132-
repo: 'mathcomp/mathcomp'
133129

134130
dependencies:
135131
- opam:
@@ -138,10 +134,10 @@ dependencies:
138134
description: |-
139135
[Equations](https://github.com/mattam82/Coq-Equations) 1.2 or later
140136
- opam:
141-
name: coq-paramcoq
142-
version: '{>= "1.1.3"}'
137+
name: coq-elpi
138+
version: '{>= "1.16.0"}'
143139
description: |-
144-
[Paramcoq](https://github.com/coq-community/paramcoq) 1.1.3 or later
140+
[Coq-elpi](https://github.com/LPCIC/coq-elpi) 1.16 or later
145141
- opam:
146142
name: coq-mathcomp-ssreflect
147143
version: '{>= "1.13.0" & < "1.19"}'

theories/additions/Addition_Chains.v

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
21
(** * Addition Chains
32
Pierre Casteran, LaBRI, University of Bordeaux
43
54
*)
5+
From elpi Require Import derive param2.
66

77
From additions Require Export Monoid_instances Pow.
88
From Coq Require Import Relations RelationClasses Lia List.
9-
From Param Require Import Param.
10-
9+
1110
From additions Require Import More_on_positive.
1211
Generalizable Variables A op one Aeq.
1312
Infix "==" := Monoid_def.equiv (at level 70) : type_scope.
@@ -232,7 +231,7 @@ Abort.
232231
(** Binary trees of multiplications over A *)
233232

234233
Inductive Monoid_Exp (A:Type) : Type :=
235-
Mul_node (t t' : Monoid_Exp A) | One_node | A_node (a:A).
234+
Mul_node (t t' : Monoid_Exp) | One_node | A_node (a:A).
236235

237236
Arguments Mul_node {A} _ _.
238237
Arguments One_node {A} .
@@ -399,7 +398,7 @@ the corresponding variables of type A and B are always bound to related
399398

400399

401400
(* begin snippet paramDemo *)
402-
Parametricity computation.
401+
Elpi derive.param2 computation.
403402

404403
Print computation_R.
405404
(* end snippet paramDemo *)
@@ -507,7 +506,7 @@ Lemma power_R_is_a_refinement (a:A) :
507506
(computation_eval (M:= Natplus) gamma_nat).
508507
(* end snippet powerRRef *)
509508
Proof.
510-
induction 1;simpl;[auto | ].
509+
induction 1 as [|x1 x2 x_R y1 y2 y_R];simpl;[auto | ].
511510
apply H; destruct x_R, y_R; split.
512511
unfold mult_op, nat_plus_op.
513512
+ lia.
@@ -560,9 +559,9 @@ Proof.
560559
(fun n p => n = Pos.to_nat p) 1 xH
561560
(refl_equal 1)).
562561
unfold the_exponent, the_exponent_nat, chain_execute, chain_apply.
563-
generalize (c nat 1), (c _ 1%positive); induction 1.
562+
generalize (c nat 1), (c _ 1%positive); induction 1 as [|x1 x2 x_R y1 y2 y_R].
564563
- cbn; assumption.
565-
- apply (H (x₁ + y₁)%nat (x₂ + y₂)%positive); rewrite Pos2Nat.inj_add;
564+
- apply (H (x1 + y1)%nat (x2 + y2)%positive); rewrite Pos2Nat.inj_add;
566565
now subst.
567566
Qed.
568567

0 commit comments

Comments
 (0)