Skip to content

Commit fc77628

Browse files
committed
Compatibility with Coq 8.11
1 parent c17e673 commit fc77628

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+551
-229
lines changed

.gitignore

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
*vo
2+
*vos
3+
*vok
24
*glob
3-
*~
45
*aux
6+
57
*crashcoqide
68
*v.d
9+
710
makefile
811
_CoqProject
12+
913
.*
10-
Awodey*
14+
*~

Base.v

+3-1
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,15 @@ match goal with
221221
| _ => my_simpl; eauto
222222
end.
223223

224+
#[refine]
224225
Instance Setoid_kernel {A B : Type} (f : A -> B) : Setoid A :=
225226
{| equiv := fun a a' : A => f a = f a' |}.
226227
Proof. solve_equiv. Defined.
227228

229+
#[refine]
228230
Instance Setoid_kernel_equiv {A B : Type} (S : Setoid B) (f : A -> B)
229231
: Setoid A := {| equiv := fun a a' : A => f a == f a' |}.
230-
Proof. solve_equiv. Defined.
232+
Proof. all: solve_equiv. Defined.
231233

232234
Inductive JMequiv {A : Type} {is_setoid : Setoid A} (x : A)
233235
: forall {B : Type}, B -> Prop :=

Bifunctor.v

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Add Rec LoadPath "/home/zeimer/Code/Coq".
2-
31
Require Import Cat.Cat.
42

53
Require Import Cat.Limits.BinProdCoprod.
@@ -31,6 +29,7 @@ Definition second
3129
{C D E : Cat} {F : Bifunctor C D E} {A : Ob C} {X Y : Ob D} (f : Hom X Y)
3230
: Hom (biob A X) (biob A Y) := bimap (id A) f.
3331

32+
#[refine]
3433
Instance ProductBifunctor {C : Cat} {hp : has_products C} :
3534
Bifunctor C C C :=
3635
{
@@ -43,6 +42,7 @@ Proof.
4342
unfold Proper, respectful. all: fpair.
4443
Defined.
4544

45+
#[refine]
4646
Instance CoproductBifunctor {C : Cat} {hp : has_coproducts C} :
4747
Bifunctor C C C :=
4848
{
@@ -54,6 +54,7 @@ Proof.
5454
unfold Proper, respectful. all: copair.
5555
Defined.
5656

57+
#[refine]
5758
Instance BiComp {C C' D D' E : Cat}
5859
(B : Bifunctor C' D' E) (F : Functor C C') (G : Functor D D')
5960
: Bifunctor C D E :=
@@ -68,6 +69,7 @@ Proof.
6869
intros. rewrite 2 pres_id, bimap_pres_id. reflexivity.
6970
Defined.
7071

72+
#[refine]
7173
Instance Const {E : Cat} (X : Ob E) (C D : Cat)
7274
: Bifunctor C D E :=
7375
{

CartesianClosed.v

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Add Rec LoadPath "/home/zeimer/Code/Coq".
2-
31
Require Export Cat.
42
Require Import Limits.InitTerm.
53
Require Import Limits.BinProdCoprod.

Cat.v

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
Add Rec LoadPath "/home/zeimer/Code/Coq".
2-
31
Require Export Cat.Base.
42

5-
(*Require Import Unicode.Utf8.*)
6-
73
Class Cat : Type :=
84
{
95
Ob : Type;
@@ -185,6 +181,7 @@ match goal with
185181
| _ => cbn in *
186182
end; eauto).
187183

184+
#[refine]
188185
Instance Dual (C : Cat) : Cat :=
189186
{|
190187
Ob := Ob C;

Contravariant.v

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Add Rec LoadPath "/home/zeimer/Code/Coq".
2-
31
Require Import Cat.Cat.
42

53
Set Implicit Arguments.
@@ -18,6 +16,7 @@ Class Contravariant (C : Cat) (D : Cat) : Type :=
1816
Arguments coob [C D] _ _.
1917
Arguments comap [C D] _ [X Y] _.
2018

19+
#[refine]
2120
Instance Const {D : Cat} (X : Ob D) (C : Cat)
2221
: Contravariant C D :=
2322
{

Distributive.v

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Add Rec LoadPath "/home/zeimer/Code/Coq".
2-
31
Require Import BinProdCoprod.
42
Require Import InitTerm.
53

Enriched.v

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Add Rec LoadPath "/home/zeimer/Code/Coq".
2-
31
Require Import Cat.Cat.
42
Require Import Cat.Bifunctor.
53

@@ -37,6 +35,7 @@ Instance wut (C : Cat) (X Y : Ob C) : Setoid' :=
3735
setoid := @HomSetoid C X Y;
3836
}.
3937

38+
#[refine]
4039
Instance Enriched_CoqSetoid : Enriched
4140
(Monoidal_has_terminal_and_products
4241
CoqSetoid_has_term

Exponential.v

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Class has_exponentials (C : Cat) {hp : has_products C} : Type :=
2222
exponential_skolem X Y (expOb X Y) (eval X Y) (@curry X Y)
2323
}.
2424

25-
Arguments expOb [C] [hp] [has_exponentials] _ _.
26-
Arguments eval [C] [hp] [has_exponentials] [X] [Y].
27-
Arguments curry [C] [hp] [has_exponentials] [X] [Y] [Z] _.
25+
Arguments expOb {C hp has_exponentials} _ _.
26+
Arguments eval {C hp has_exponentials X Y}.
27+
Arguments curry {C hp has_exponentials X Y Z} _.
2828

2929
Definition uncurry
3030
{C : Cat} {hp : has_products C} {he : has_exponentials C}
@@ -146,7 +146,7 @@ Proof.
146146
apply ProductFunctor_fmap_Proper; cat. rewrite H3; cat.
147147
Qed.
148148

149-
Arguments exponential_skolem_uiso [C hp X Y E eval curry E' eval' curry'] _ _.
149+
Arguments exponential_skolem_uiso {C hp X Y E eval curry E' eval' curry'} _ _.
150150

151151
Theorem exponential_skolem_iso :
152152
forall (C : Cat) (hp : has_products C) (X Y : Ob C)
@@ -172,6 +172,7 @@ Proof.
172172
cat.
173173
Qed.
174174

175+
#[refine]
175176
Instance ExponentialFunctor
176177
(C : Cat) (hp : has_products C) (he : has_exponentials C)
177178
(X : Ob C) : Functor C C :=

Functor.v

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Add Rec LoadPath "/home/zeimer/Code/Coq".
2-
31
Require Import Cat.Cat.
42

53
Set Implicit Arguments.
@@ -92,6 +90,7 @@ Proof.
9290
(* TODO : cat should work here *)
9391
Defined.
9492

93+
#[refine]
9594
Instance FunctorComp {C D E : Cat} (T : Functor C D) (S : Functor D E)
9695
: Functor C E :=
9796
{
@@ -103,6 +102,7 @@ Proof.
103102
(* Functor laws *) all: functor.
104103
Defined.
105104

105+
#[refine]
106106
Instance FunctorId (C : Cat) : Functor C C :=
107107
{
108108
fob := fun A : Ob C => A;
@@ -113,6 +113,7 @@ Proof.
113113
(* Functors laws *) all: functor.
114114
Defined.
115115

116+
#[refine]
116117
Instance CAT : Cat :=
117118
{
118119
Ob := Cat;
@@ -129,6 +130,7 @@ Proof.
129130
(* Category laws *) all: cat.
130131
Defined.
131132

133+
#[refine]
132134
Instance ConstFunctor {D : Cat} (X : Ob D) (C : Cat)
133135
: Functor C D :=
134136
{

Instances/Apartoid.v

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Add Rec LoadPath "/home/zeimer/Code/Coq".
2-
31
Require Import Cat.
42
Require Import InitTerm.
53
Require Import BinProdCoprod.
@@ -114,6 +112,7 @@ Proof.
114112
intros. intro. apply H0. apply H. apply H1.
115113
Qed.
116114

115+
#[refine]
117116
Instance ApartoidCat : Cat :=
118117
{
119118
Ob := Apartoid;
@@ -137,6 +136,7 @@ Proof.
137136
(* Category laws *) all: apartoid.
138137
Defined.
139138

139+
#[refine]
140140
Instance Apartoid_init : Apartoid :=
141141
{
142142
carrier := Empty_set;
@@ -149,6 +149,7 @@ Proof.
149149
red. exists (fun (e : Empty_set) => match e with end). apartoid.
150150
Defined.
151151

152+
#[refine]
152153
Instance Apartoid_has_init : has_init ApartoidCat :=
153154
{
154155
init := Apartoid_init;
@@ -157,6 +158,7 @@ Instance Apartoid_has_init : has_init ApartoidCat :=
157158
Proof. apartoid. Defined.
158159

159160
(* Things can be done this way too. *)
161+
#[refine]
160162
Instance Apartoid_has_init' : has_init ApartoidCat := {}.
161163
Proof.
162164
refine {| carrier := Empty_set;
@@ -170,6 +172,7 @@ Restart.
170172
all: apartoid'. exists (fun e : Empty_set => match e with end). apartoid.
171173
Defined.
172174

175+
#[refine]
173176
Instance Apartoid_term : Apartoid :=
174177
{
175178
carrier := unit;
@@ -182,13 +185,15 @@ Proof.
182185
red; simpl. exists (fun _ => tt). auto.
183186
Defined.
184187

188+
#[refine]
185189
Instance Apartoid_has_term : has_term ApartoidCat :=
186190
{
187191
term := Apartoid_term;
188192
delete := Apartoid_delete
189193
}.
190194
Proof. apartoid. Defined.
191195

196+
#[refine]
192197
Instance Apartoid_prodOb (X Y : Apartoid) : Apartoid :=
193198
{
194199
carrier := prod X Y;
@@ -221,6 +226,7 @@ Proof.
221226
red. exists (fun x : X => (f x, g x)). apartoid.
222227
Defined.
223228

229+
#[refine]
224230
Instance Apartoid_has_products : has_products ApartoidCat :=
225231
{
226232
prodOb := Apartoid_prodOb;
@@ -233,6 +239,7 @@ Proof.
233239
(* Product law *) apartoid.
234240
Defined.
235241

242+
#[refine]
236243
Instance Apartoid_coprodOb (X Y : Apartoid) : Apartoid :=
237244
{
238245
carrier := X + Y;
@@ -275,6 +282,7 @@ Proof.
275282
destruct x, x'; apartoid.
276283
Defined.
277284

285+
#[refine]
278286
Instance Apartoid_has_coproducts : has_coproducts ApartoidCat :=
279287
{
280288
coprodOb := Apartoid_coprodOb;
@@ -287,6 +295,7 @@ Proof.
287295
(* Product law *) red; apartoid'. destruct x; apartoid.
288296
Defined.
289297

298+
#[refine]
290299
Instance Apartoid_bigProdOb {J : Set} (A : J -> Apartoid) : Apartoid :=
291300
{
292301
carrier := forall j : J, A j;
@@ -317,6 +326,7 @@ Proof.
317326
eapply Hfj; eauto.
318327
Defined.
319328

329+
#[refine]
320330
Instance Apartoid_has_all_products : has_all_products ApartoidCat :=
321331
{
322332
bigProdOb := @Apartoid_bigProdOb;
@@ -332,6 +342,7 @@ Proof.
332342
eapply H; eauto.
333343
Defined.
334344

345+
#[refine]
335346
Instance Apartoid_eq_ob {X Y : Apartoid} (f g : ApartoidHom X Y)
336347
: Apartoid :=
337348
{
@@ -406,6 +417,7 @@ Inductive Apartoid_coeq_equiv {X Y : Apartoid} (f g : ApartoidHom X Y)
406417
Apartoid_coeq_equiv f g y1 y3.
407418

408419
(* TODO: finish *)
420+
#[refine]
409421
Instance Apartoid_coeq_ob {X Y : Apartoid} (f g : ApartoidHom X Y)
410422
: Apartoid :=
411423
{
@@ -428,6 +440,7 @@ Proof.
428440

429441
(* TODO: make this more dependent (change JMeq to some lifted heterogenous
430442
apartness... *)
443+
#[refine]
431444
Instance Apartoid_bigCoprodOb {J : Apartoid} (A : J -> Apartoid) : Apartoid :=
432445
{
433446
carrier := {j : J & A j};

0 commit comments

Comments
 (0)