Skip to content

Commit 0e6e3c9

Browse files
committed
Compile with mathcomp 2.3.0
1 parent a0480bf commit 0e6e3c9

File tree

6 files changed

+81
-101
lines changed

6 files changed

+81
-101
lines changed

.github/workflows/coq-action.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
image:
18-
- mathcomp/mathcomp:1.13.0-coq-8.13
19-
- mathcomp/mathcomp:1.12.0-coq-8.13
18+
- mathcomp/mathcomp:2.3.0-coq-8.20
2019
fail-fast: false
2120
steps:
2221
- uses: actions/checkout@v2
@@ -34,7 +33,7 @@ jobs:
3433
endGroup
3534
startGroup Build coq-mathcomp-dioid dependencies
3635
opam pin add -n -y -k path coq-mathcomp-dioid .
37-
opam remove coq-mathcomp-algebra coq-mathcomp-character coq-mathcomp-field coq-mathcomp-fingroup coq-mathcomp-solvable # coq-mathcomp-ssreflect is enough
36+
opam remove coq-mathcomp-character coq-mathcomp-field coq-mathcomp-solvable # coq-mathcomp-algebra is enough
3837
opam install -y -j ${NJOBS} coq-mathcomp-dioid --deps-only
3938
opam list
4039
endGroup

README.md

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,21 @@ The main algebraic structures defined are:
1212
More details can be found in comments at the beginning of each .v file.
1313

1414
Installation
15-
------------
16-
17-
This is currently not available as an OPAM (>= 2.0) package:
18-
19-
When MathComp Analysis for MathComp 2 will be released, this will be
20-
installable by typing:
21-
22-
```
23-
% opam repo add coq-released https://coq.inria.fr/opam/released
24-
% opam install coq-mathcomp-dioid
25-
```
15+
============
2616

2717
Dependencies
2818
------------
2919

30-
* Coq (>= 8.16)
31-
* The Mathcomp library (>= 2.0.0)
32-
* Hierarchy Builder (= 1.4.0)
33-
* Mathcomp Analysis (hierarchy-builder branch)
20+
* Coq (>= 8.20)
21+
* The Mathcomp library (>= 2.3.0)
22+
* Hierarchy Builder (= 1.8.0)
23+
* Mathcomp classical (= 1.8.0)
3424

3525
Dependencies can be installed with OPAM (>= 2.0) by typing:
3626

3727
```
3828
% opam repo add coq-released https://coq.inria.fr/opam/released
39-
% opam install coq-mathcomp-algebra.2.0.0
40-
```
41-
42-
Except MathComp Analysis (or only its mathcomp-classical package) that
43-
must currently be installed from source:
44-
45-
```
46-
% git clone https://github.com/math-comp/analysis
47-
% git checkout hierarchy-builder
48-
% make -j4 -C classical
49-
% make -C classical install
29+
% opam install coq.8.20.1 coq-mathcomp-algebra.2.3.0 coq-mathcomp-classical.1.8.0
5030
```
5131

5232
Compilation
@@ -56,4 +36,5 @@ Just type
5636

5737
```
5838
% make
39+
% make install
5940
```

complete_dioid.v

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ HB.structure Definition CompleteDioid d :=
8585

8686
Section CompleteDioidTheory.
8787

88-
Variables (disp : unit) (D : completeDioidType disp).
88+
Variables (disp : Order.disp_t) (D : completeDioidType disp).
8989

9090
Implicit Types a b c : D.
9191
Implicit Types B : set D.
9292

9393
Notation set_add := set_join.
9494

95-
Lemma bottom_zero : 0%O = 0%R :> D.
95+
Lemma bottom_zero : \bot = 0%R :> D.
9696
Proof. by apply/le_anti; rewrite le0x le0d. Qed.
9797

9898
Lemma set_addDl a B : set_add (a |` B) = a + set_add B.
@@ -109,10 +109,10 @@ Proof. by rewrite -[in LHS](set_join1 b) -set_addDl set_joinU !set_join1. Qed.
109109
Lemma set_addU A B : set_add (A `|` B) = set_add A + set_add B.
110110
Proof. by rewrite set_joinU add_join. Qed.
111111

112-
Lemma add_d1 : @right_zero D D 1%O +%R.
112+
Lemma add_d1 : @right_zero D D \top +%R.
113113
Proof. by move=> x; apply/eqP; rewrite -le_def lex1. Qed.
114114

115-
Lemma add_1d : @left_zero D D 1%O +%R.
115+
Lemma add_1d : @left_zero D D \top +%R.
116116
Proof. by move=> x; rewrite addrC add_d1. Qed.
117117

118118
Lemma set_add0 (F : nat -> D) : set_add [set F i | i in [set x | 'I_0 x]] = 0%R.
@@ -353,7 +353,7 @@ apply/idP/idP => H; [exact: set_join_ub|].
353353
by move: (div_mul_le b a); apply/le_trans/led_mul2r.
354354
Qed.
355355

356-
Lemma div_top x : 1%O / x = 1%O.
356+
Lemma div_top x : \top / x = \top.
357357
Proof. apply/le_anti /andP; split; [|rewrite -mul_div_equiv]; exact: lex1. Qed.
358358

359359
Lemma led_divl a b c : a <= b -> a / c <= b / c.
@@ -482,7 +482,7 @@ HB.end.
482482

483483
Section ComCompleteDioidTheory.
484484

485-
Variables (disp : unit) (D : comCompleteDioidType disp).
485+
Variables (disp : Order.disp_t) (D : comCompleteDioidType disp).
486486

487487
Implicit Types a b : D.
488488

@@ -586,7 +586,7 @@ HB.instance Definition _ :=
586586
HB.end.
587587

588588
HB.factory Record SubChoice_isJoinSubCompleteDioid d (D : completeDioidType d)
589-
S (d' : unit) U of SubChoice D S U := {
589+
S (d' : Order.disp_t) U of SubChoice D S U := {
590590
semiring_closed_subproof : semiring_closed S;
591591
opredSJ_subproof : set_join_closed S;
592592
}.
@@ -598,8 +598,8 @@ HB.instance Definition _ :=
598598
SubDioid_SubPOrder_isJoinSubCompleteDioid.Build d D S d' U opredSJ_subproof.
599599
HB.end.
600600

601-
HB.factory Record SubChoice_isJoinSubComCompleteDioid
602-
d (D : comCompleteDioidType d) S (d' : unit) U of SubChoice D S U := {
601+
HB.factory Record SubChoice_isJoinSubComCompleteDioid d
602+
(D : comCompleteDioidType d) S (d' : Order.disp_t) U of SubChoice D S U := {
603603
semiring_closed_subproof : semiring_closed S;
604604
opredSJ_subproof : set_join_closed S;
605605
}.
@@ -648,7 +648,7 @@ HB.instance Definition _ :=
648648
HB.end.
649649

650650
HB.factory Record SubChoice_isSubCompleteDioid d (D : completeDioidType d) S
651-
(d' : unit) U of SubChoice D S U := {
651+
(d' : Order.disp_t) U of SubChoice D S U := {
652652
semiring_closed_subproof : semiring_closed S;
653653
opredSM_subproof : set_meet_closed S;
654654
opredSJ_subproof : set_join_closed S;
@@ -662,8 +662,8 @@ HB.instance Definition _ :=
662662
opredSM_subproof opredSJ_subproof.
663663
HB.end.
664664

665-
HB.factory Record SubChoice_isSubComCompleteDioid
666-
d (D : comCompleteDioidType d) S (d' : unit) U of SubChoice D S U := {
665+
HB.factory Record SubChoice_isSubComCompleteDioid d
666+
(D : comCompleteDioidType d) S (d' : Order.disp_t) U of SubChoice D S U := {
667667
semiring_closed_subproof : semiring_closed S;
668668
opredSM_subproof : set_meet_closed S;
669669
opredSJ_subproof : set_join_closed S;
@@ -746,7 +746,7 @@ Notation "[ 'SubChoice_isSubComCompleteDioid' 'of' U 'by' <: 'with' disp ]" :=
746746
(* Testing subtype hierarchy
747747
Section Test0.
748748
749-
Variables (d : unit) (T : choiceType) (S : {pred T}).
749+
Variables (d : Order.disp_t) (T : choiceType) (S : {pred T}).
750750
751751
Inductive B := mkB x & x \in S.
752752
Definition vB u := let: mkB x _ := u in x.
@@ -759,7 +759,7 @@ End Test0.
759759
Module Test1.
760760
Section Test1.
761761
762-
Variables (d : unit) (D : completeDioidType d) (S : semiringClosed D).
762+
Variables (d : Order.disp_t) (D : completeDioidType d) (S : semiringClosed D).
763763
Hypothesis SSJ : set_join_closed S.
764764
765765
HB.instance Definition _ := isJoinCompleteLatticeClosed.Build d D S SSJ.
@@ -773,7 +773,7 @@ End Test1.
773773
Module Test2.
774774
Section Test2.
775775
776-
Variables (d : unit) (D : completeDioidType d) (S : semiringClosed D).
776+
Variables (d : Order.disp_t) (D : completeDioidType d) (S : semiringClosed D).
777777
Hypothesis SSM : set_meet_closed S.
778778
Hypothesis SSJ : set_join_closed S.
779779
@@ -787,7 +787,7 @@ End Test2.
787787
Module Test3.
788788
Section Test3.
789789
790-
Variables (d : unit) (D : comCompleteDioidType d) (S : semiringClosed D).
790+
Variables (d : Order.disp_t) (D : comCompleteDioidType d) (S : semiringClosed D).
791791
Hypothesis SSJ : set_join_closed S.
792792
793793
HB.instance Definition _ := isJoinCompleteLatticeClosed.Build d D S SSJ.

0 commit comments

Comments
 (0)