Skip to content

Commit dbb98e9

Browse files
authored
compatibility with mathcomp-dev and lost with mathcomp < 1.9.0 (#64)
- compatibility with mathcomp-dev and lost with mathcomp < 1.9.0 + updating opam dependencies + adding travis jobs
1 parent ceaf677 commit dbb98e9

5 files changed

Lines changed: 28 additions & 23 deletions

File tree

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ env:
1414
- NJOBS="2"
1515
- CONTRIB_NAME="finmap"
1616
matrix:
17-
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.7"
18-
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.8"
19-
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.9"
2017
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.7"
2118
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.8"
2219
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.9"
2320
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.10"
21+
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.11"
22+
- DOCKERIMAGE="mathcomp/mathcomp:1.10.0-coq-8.7"
23+
- DOCKERIMAGE="mathcomp/mathcomp:1.10.0-coq-8.8"
24+
- DOCKERIMAGE="mathcomp/mathcomp:1.10.0-coq-8.9"
25+
- DOCKERIMAGE="mathcomp/mathcomp:1.10.0-coq-8.10"
26+
- DOCKERIMAGE="mathcomp/mathcomp:1.10.0-coq-8.11"
2427
- DOCKERIMAGE="mathcomp/mathcomp-dev:coq-8.7"
2528
- DOCKERIMAGE="mathcomp/mathcomp-dev:coq-8.8"
2629
- DOCKERIMAGE="mathcomp/mathcomp-dev:coq-8.9"
27-
# - DOCKERIMAGE="mathcomp/mathcomp-dev:coq-8.10"
30+
- DOCKERIMAGE="mathcomp/mathcomp-dev:coq-8.10"
31+
- DOCKERIMAGE="mathcomp/mathcomp-dev:coq-8.11"
2832

2933
install: |
3034
# Prepare the COQ container

finmap.v

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -410,18 +410,18 @@ Variable (K : choiceType).
410410
Implicit Types (k : K) (ks : seq K).
411411
Definition f (s : seq K) := choose (perm_eq (undup s)) (undup s).
412412
Fact perm s : perm_eq (f s) (undup s).
413-
Proof. by rewrite perm_eq_sym chooseP. Qed.
413+
Proof. by rewrite perm_sym chooseP. Qed.
414414
Fact uniq s : uniq (f s).
415-
Proof. by rewrite (perm_eq_uniq (perm _)) undup_uniq. Qed.
415+
Proof. by rewrite (perm_uniq (perm _)) undup_uniq. Qed.
416416
Fact E (s : seq K) : f s =i s.
417-
Proof. by move=> x; rewrite (perm_eq_mem (perm _)) mem_undup. Qed.
417+
Proof. by move=> x; rewrite (perm_mem (perm _)) mem_undup. Qed.
418418
Lemma eq (s s' : seq K) : s =i s' <-> f s = f s'.
419419
Proof.
420420
split=> [eq_ss'|eq_ss' k]; last by rewrite -E eq_ss' E.
421421
rewrite /f; have peq_ss' : perm_eq (undup s) (undup s').
422-
by apply: uniq_perm_eq; rewrite ?undup_uniq // => x; rewrite !mem_undup.
422+
by apply: uniq_perm; rewrite ?undup_uniq // => x; rewrite !mem_undup.
423423
rewrite (@choose_id _ _ _ (undup s')) //=; apply: eq_choose => x /=.
424-
by apply: sym_left_transitive; [exact: perm_eq_sym | exact: (@perm_eq_trans)|].
424+
by apply: sym_left_transitive; [exact: perm_sym | exact: (@perm_trans)|].
425425
Qed.
426426
End SortKeys.
427427
End SortKeys.
@@ -472,7 +472,7 @@ by apply/eq_sort_keys => x; rewrite -sort_keysE eq_ks_ks' sort_keysE.
472472
Qed.
473473

474474
Lemma size_sort_keys ks : size (sort_keys ks) = size (undup ks).
475-
Proof. exact: perm_eq_size. Qed.
475+
Proof. exact: perm_size. Qed.
476476

477477
End ChoiceKeys.
478478
Arguments eq_sort_keys {K s s'}.
@@ -1115,7 +1115,7 @@ Lemma enum_imfset2 (T1 : choiceType) (T2 : T1 -> choiceType)
11151115
[seq f x y | x <- enum_finmem p1, y <- enum_finmem (p2 x)].
11161116
Proof.
11171117
move=> f_inj; rewrite unlock.
1118-
apply: uniq_perm_eq => [||i]; rewrite ?seq_fset_uniq ?seq_fsetE //.
1118+
apply: uniq_perm => [||i]; rewrite ?seq_fset_uniq ?seq_fsetE //.
11191119
rewrite allpairs_uniq_dep ?enum_finmem_uniq//.
11201120
by move=> x; rewrite enum_finmem_uniq.
11211121
move=> t0 t0' /allpairsPdep[t1 [t2]]; rewrite !enum_finmemE => -[tp1 tp2 ->/=].
@@ -2127,7 +2127,7 @@ Proof. by rewrite enumT unlock. Qed.
21272127
Lemma enum_fset1 (T : choiceType) (x : T) :
21282128
enum [finType of [fset x]] = [:: [`fset11 x]].
21292129
Proof.
2130-
apply/perm_eq_small=> //; apply/uniq_perm_eq => //.
2130+
apply/perm_small_eq=> //; apply/uniq_perm => //.
21312131
by apply/enum_uniq.
21322132
case=> [y hy]; rewrite mem_seq1 mem_enum /in_mem /=.
21332133
by rewrite eqE /=; rewrite in_fset1 in hy.
@@ -2266,7 +2266,7 @@ Proof. by rewrite big_seq_fsetE big_fset1. Qed.
22662266

22672267
End BigFSet.
22682268

2269-
Notation eq_big_imfset := (eq_big_perm _ (enum_imfset _ _)).
2269+
Notation eq_big_imfset := (perm_big _ (enum_imfset _ _)).
22702270

22712271
Section BigComFSet.
22722272
Variable (R : Type) (idx : R) (op : Monoid.com_law idx).
@@ -2360,7 +2360,7 @@ End BigComFSet.
23602360
Arguments big_fsetD1 {R idx op I} a [A F].
23612361

23622362

2363-
Notation eq_big_imfset2 := (eq_big_perm _ (enum_imfset2 _ _)).
2363+
Notation eq_big_imfset2 := (perm_big _ (enum_imfset2 _ _)).
23642364

23652365
Section BigComImfset2.
23662366
Variables (R : Type) (idx : R) (op : Monoid.com_law idx)

multiset.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Qed.
230230

231231
Lemma perm_undup_mset A : perm_eq (undup A) (finsupp A).
232232
Proof.
233-
apply: uniq_perm_eq; rewrite ?undup_uniq // => a.
233+
apply: uniq_perm; rewrite ?undup_uniq // => a.
234234
by rewrite mem_undup msuppE.
235235
Qed.
236236

@@ -242,7 +242,7 @@ Lemma big_mset X P F :
242242
\big[op/idx]_(i <- X | P i) F i =
243243
\big[op/idx]_(i <- finsupp X | P i) iterop (X i) op (F i) idx.
244244
Proof.
245-
rewrite [in RHS](eq_big_perm (undup X)) 1?perm_eq_sym ?perm_undup_mset//.
245+
rewrite [in RHS](perm_big (undup X)) 1?perm_sym ?perm_undup_mset//.
246246
rewrite -[in LHS]big_undup_iterop_count; apply: eq_bigr => i _.
247247
by rewrite count_mem_mset.
248248
Qed.
@@ -271,7 +271,7 @@ Proof. by apply/msetP=> a; rewrite mset_seqE count_mem_mset. Qed.
271271

272272
Lemma eq_seq_msetP s s' : reflect (seq_mset s = seq_mset s') (perm_eq s s').
273273
Proof.
274-
apply: (iffP idP) => [/perm_eqP perm_ss'|eq_ss'].
274+
apply: (iffP idP) => [/permP perm_ss'|eq_ss'].
275275
by apply/msetP => a; rewrite !mset_seqE perm_ss'.
276276
by apply/allP => a _ /=; rewrite -!mset_seqE eq_ss'.
277277
Qed.

opam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ build: [ make "-j" "%{jobs}%" ]
1212
install: [ make "install" ]
1313

1414
depends: [
15-
"coq" { (>= "8.7" & < "8.11~") | (= "dev") }
16-
"coq-mathcomp-ssreflect" { (>= "1.8.0" & < "1.11~") | (= "dev") }
15+
"coq" { (>= "8.7" & < "8.12~") | (= "dev") }
16+
"coq-mathcomp-ssreflect" { (>= "1.9.0" & < "1.12~") | (= "dev") }
1717
"coq-mathcomp-bigenough" { (>= "1.0.0" & < "1.1~") | (= "dev") }
1818
]
1919
tags: [ "keyword:finmap" "keyword:finset" "keyword:multiset" "keyword:order"]

shell.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{withEmacs ? false,
22
nixpkgs ? (fetchTarball {
3-
url = "https://github.com/NixOS/nixpkgs/archive/650a295621b27c4ebe0fa64a63fd25323e64deb3.tar.gz";
4-
sha256 = "0rxjkfiq53ibz0rzggvnp341b6kgzgfr9x6q07m2my7ijlirs2da";
3+
url = "https://github.com/NixOS/nixpkgs/archive/05f0934825c2a0750d4888c4735f9420c906b388.tar.gz";
4+
sha256 = "1g8c2w0661qn89ajp44znmwfmghbbiygvdzq0rzlvlpdiz28v6gy";
55
}),
6-
coq-version ? "8.9",
7-
mc ? "1.8.0",
6+
coq-version ? "8.11",
7+
mc ? "1.10.0",
88
print-env ? false
99
}:
1010
let
@@ -16,6 +16,7 @@ let
1616
"8.8" = coqPackages_8_8;
1717
"8.9" = coqPackages_8_9;
1818
"8.10" = coqPackages_8_10;
19+
"8.11" = coqPackages_8_11;
1920
}."${coq-version}");
2021
in
2122
coqPackages.overrideScope' (self: super: {

0 commit comments

Comments
 (0)