Skip to content

Commit c25a0af

Browse files
authored
Merge pull request #20 from affeldt-aist/compat-mathcomp-1.10
compatibility with mathcomp 1.10.0
2 parents 495a1fa + 4e265ae commit c25a0af

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ env:
1414
- NJOBS="2"
1515
- CONTRIB_NAME="real-closed"
1616
matrix:
17-
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.7"
1817
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.8"
1918
- DOCKERIMAGE="mathcomp/mathcomp:1.8.0-coq-8.9"
20-
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.7"
2119
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.8"
2220
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.9"
2321
- DOCKERIMAGE="mathcomp/mathcomp:1.9.0-coq-8.10"
22+
- DOCKERIMAGE="mathcomp/mathcomp:1.10.0-coq-8.9"
23+
- DOCKERIMAGE="mathcomp/mathcomp:1.10.0-coq-8.10"
2424

2525
install: |
2626
# Prepare the COQ container

opam

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ build: [ make "-j" "%{jobs}%" ]
1111
install: [ make "install" ]
1212
depends: [
1313
"coq" { (>= "8.7" & < "8.11~") }
14-
"coq-mathcomp-field" { (>= "1.8.0" & < "1.10.0~") }
15-
"coq-mathcomp-bigenough" {(>= "1.0.0" & < "1.1.0~")}
14+
"coq-mathcomp-field" {(>= "1.8.0" & <= "1.10.0")}
15+
"coq-mathcomp-bigenough" {(>= "1.0.0" & < "1.1~")}
1616
]
1717

1818
tags: [ "keyword:real closed field" "keyword:small scale reflection" "keyword:mathematical components" "date:2019-05-23" "logpath:mathcomp"]

theories/complex.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ have [] := @Lemma4 _ _ 1%:M _ [::L1; L2] (erefl _).
11171117
do ![move: (_ *m _ *m _)] => t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12.
11181118
rewrite [X in X + _ + _]addrC [X in X + _ = _]addrACA.
11191119
rewrite [X in _ = (_ + _ + X) + _]addrC [X in _ = X + _]addrACA.
1120-
rewrite [X in _ + (_ + _ + X)]addrC [X in _ + X = _]addrACA.
1120+
rewrite [X in _ + (_ + _ + X) = _]addrC [X in _ + X = _]addrACA.
11211121
rewrite [X in _ = _ + (X + _)]addrC [X in _ = _ + X]addrACA.
11221122
rewrite [X in X = _]addrACA [X in _ = X]addrACA; congr (_ + _).
11231123
by rewrite addrC [X in X + _ = _]addrACA [X in _ + X = _]addrACA.

theories/polyrcf.v

+18-16
Original file line numberDiff line numberDiff line change
@@ -951,12 +951,12 @@ case pr1 : (root p r1); case/monotonic_rootN => hrootsl; last 2 first.
951951
by rewrite -[s]cat0s; apply: (cat_roots_on hr1)=> //; rewrite pr1.
952952
- case: hrootsl=> r hr; exists (r::s); constructor=> //=.
953953
by rewrite -cat1s; apply: (cat_roots_on hr1)=> //; rewrite pr1.
954-
rewrite path_min_sorted // => y; rewrite -hroot; case/andP=> hy _.
955-
rewrite (@ltr_trans _ r1) ?(itvP hy) //.
954+
rewrite path_min_sorted //; first [move=> y | apply/allP => y].
955+
rewrite -hroot; case/andP=> hy _; rewrite (@ltr_trans _ r1) ?(itvP hy) //.
956956
by rewrite (itvP (roots_on_in hr (mem_head _ _))).
957957
- exists (r1::s); constructor=> //=; last first.
958-
rewrite path_min_sorted=> // y; rewrite -hroot.
959-
by case/andP; move/itvP->.
958+
rewrite path_min_sorted //; first [move=> y | apply/allP => y].
959+
by rewrite -hroot; case/andP; move/itvP->.
960960
move=> x; rewrite in_cons; case exr1: (x == r1)=> /=.
961961
by rewrite (eqP exr1) pr1 andbT.
962962
rewrite -hroot; case px: root; rewrite ?(andbT, andbF) //.
@@ -966,7 +966,8 @@ case pr1 : (root p r1); case/monotonic_rootN => hrootsl; last 2 first.
966966
- case: hrootsl => r0 hrootsl.
967967
move/min_roots_on:hrootsl; case=> // hr0 har0 pr0 hr0r1.
968968
exists [:: r0, r1 & s]; constructor=> //=; last first.
969-
rewrite (itvP hr0) /= path_min_sorted // => y.
969+
rewrite (itvP hr0) /=.
970+
rewrite path_min_sorted //; first [move=> y | apply/allP => y].
970971
by rewrite -hroot; case/andP; move/itvP->.
971972
move=> y; rewrite !in_cons (itv_splitU2 hr1) (itv_splitU2 hr0).
972973
case eyr0: (y == r0); rewrite ?(orbT, orbF, orTb, orFb).
@@ -999,8 +1000,9 @@ Hint Resolve sorted_roots.
9991000

10001001
Lemma path_roots p a b : path <%R a (roots p a b).
10011002
Proof.
1002-
case: rootsP=> //= p0 hp sp; rewrite path_min_sorted //.
1003-
by move=> y; rewrite -hp; case/andP; move/itvP->.
1003+
case: rootsP=> //= p0 hp sp.
1004+
rewrite path_min_sorted //; first [move=> y | apply/allP => y].
1005+
by rewrite -hp; case/andP; move/itvP->.
10041006
Qed.
10051007
Hint Resolve path_roots.
10061008

@@ -1139,7 +1141,7 @@ case/and3P=> hx hax; rewrite (eqP hax) in rax sax.
11391141
case: rootsP p0=> // p0 rxb sxb _.
11401142
case/andP=> px0 hxb; rewrite (eqP hxb) in rxb sxb.
11411143
rewrite [_ :: _](@roots_uniq p a b) //; last first.
1142-
rewrite /= path_min_sorted // => y.
1144+
rewrite /= path_min_sorted //; first [move=> y | apply/allP => y].
11431145
by rewrite -(eqP hxb); move/roots_in; move/itvP->.
11441146
move=> y; rewrite (itv_splitU2 hx) !andb_orl in_cons.
11451147
case hy: (y == x); first by rewrite (eqP hy) px0 orbT.
@@ -1171,9 +1173,9 @@ case/and3P=> hx hax; rewrite (eqP hax) in rax sax.
11711173
case: rootsP p0=> // p0 rxb sxb _.
11721174
case/andP=> px0 hxb; rewrite (eqP hxb) in rxb sxb.
11731175
rewrite [rcons _ _](@roots_uniq p a b) //; last first.
1174-
rewrite -[rcons _ _]revK rev_sorted rev_rcons /= path_min_sorted.
1175-
by rewrite -rev_sorted revK.
1176-
move=> y; rewrite mem_rev; rewrite -(eqP hxb).
1176+
rewrite -[rcons _ _]revK rev_sorted rev_rcons /=.
1177+
rewrite path_min_sorted; [by rewrite -rev_sorted revK|].
1178+
first [move=> y | apply/allP => y]; rewrite mem_rev; rewrite -(eqP hxb).
11771179
by move/roots_in; move/itvP->.
11781180
move=> y; rewrite (itv_splitU2 hx) mem_rcons in_cons !andb_orl.
11791181
case hy: (y == x); first by rewrite (eqP hy) px0 orbT.
@@ -1388,15 +1390,15 @@ Qed.
13881390
Lemma gdcop_eq0 p q : (gdcop p q == 0) = (q == 0) && (p != 0).
13891391
Proof.
13901392
case: (eqVneq q 0) => [-> | q0].
1391-
rewrite gdcop0 /= eqxx /=.
1392-
by case: (eqVneq p 0) => [-> | pn0]; rewrite ?(negPf pn0) eqxx ?oner_eq0.
1393+
rewrite gdcop0 /=.
1394+
by have [|] := (boolP (p == 0)) => [p0| pn0] /=; rewrite ?eqxx ?oner_eq0.
13931395
rewrite /gdcop; move: {-1}(size q) (leqnn (size q))=> k hk.
1394-
case: (eqVneq p 0) => [-> | p0].
1395-
rewrite eqxx andbF; apply: negPf.
1396+
case (eqVneq p 0) => [-> | p0].
1397+
rewrite ?eqxx andbF; apply: negPf.
13961398
elim: k q q0 {hk} => [|k ihk] q q0 /=; first by rewrite eqxx oner_eq0.
13971399
case: ifP => _ //.
13981400
by apply: ihk; rewrite gcdp0 divpp ?q0 // polyC_eq0; apply/lc_expn_scalp_neq0.
1399-
rewrite p0 (negPf q0) /=; apply: negPf.
1401+
rewrite ?(negbTE q0) andFb; apply: negPf.
14001402
elim: k q q0 hk => [|k ihk] /= q q0 hk.
14011403
by move: hk q0; rewrite leqn0 size_poly_eq0; move->.
14021404
case: ifP=> cpq; first by rewrite (negPf q0).

0 commit comments

Comments
 (0)