You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: theories/WildCat/TwoOneCat.v
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
RequireImport Basics.Overture Basics.Tactics.
2
+
RequireImportTypes.Forall.
2
3
RequireImport WildCat.Core.
3
4
RequireImport WildCat.NatTrans.
4
5
RequireImport WildCat.Prod.
@@ -10,7 +11,11 @@ Local Open Scope twocat.
10
11
11
12
(** * Wild (2,1)-categories *)
12
13
14
+
(** This file introduces two basic 2-dimensional structures, (2,1)-categories and bicategories. Bicategories classically have 0-cells, 1-cells and 2-cells; our presentation includes 3-cells expressing coherence relations between 2-cells, that would classically be expressed as truncated equalities. The paradigmatic example of a bicategory is the bicategory of categories, functors and natural transformations. Other common bicategories are the bicategory of sets and spans, the bicategory of rings and ring bimodules, and the bicategory of categories and profunctors. A (2,1)-category is a bicategory where all 2-cells are invertible; a (2,1)-category can also be seen as an ordinary category extended with coherence conditions on 2-cells, expressed as 3-cells. *)
15
+
13
16
(** ** Wild 1-categorical structures *)
17
+
18
+
(** We start by introducing the common core of the theory of 1-categories and the theory of bicategories. A wild 1-bicategory is like a wild 1-category, but without the requirement that the 2-cells are invertible in general. The theory of 1-bicategories is the fragment of the theory of bicategories containing all 0-cells, 1-cells and 2-cells, but subject to no coherence conditions between 2-cells (which would require 3-cells to express.) *)
14
19
Class Is1Bicat (A : Type) `{!IsGraph A, !Is2Graph A, !Is01Cat A} :=
15
20
{
16
21
is01bicat_hom :: forall (a b : A), Is01Cat (a $-> b) ;
@@ -26,6 +31,7 @@ Class Is1Bicat (A : Type) `{!IsGraph A, !Is2Graph A, !Is01Cat A} :=
26
31
bicat_idr_opp : forall {a b : A} (f : a $-> b), f $=> f $o Id a;
27
32
}.
28
33
34
+
(** A wild 1-category is precisely a wild 1-bicategory such that the 2-cells are invertible. *)
29
35
Definition is1cat_is1bicat (A : Type) `{Is1Bicat A}
30
36
(p : forall a b : A, Is0Gpd (Hom a b))
31
37
: Is1Cat A.
@@ -37,6 +43,7 @@ Proof.
37
43
- exact (@bicat_idr _ _ _ _ _).
38
44
Defined.
39
45
46
+
(** Conversely, forgetting the inverses of 2-cells, one recovers a 1-bicategory from a 1-category. *)
40
47
Definition is1bicat_is1cat (A : Type) `{Is1Cat A}
41
48
: Is1Bicat A.
42
49
Proof.
@@ -60,8 +67,8 @@ Instance is0bifunctor_bicat_comp (A : Type) `{Is1Bicat A} (a b c : A)
60
67
Instance Is0Functor_swap (A: Type) `{Is1Bicat A} (a b c : A)
(** The full structure of a bicategory, incorporating all appropriate coherence conditions. *)
90
98
Class IsBicat (A : Type) `{H: Is1Bicat A} `{!Is3Graph A} :=
91
99
{
92
100
is1cat_hom :: forall (a b : A), Is1Cat (a $-> b) ;
@@ -116,6 +124,7 @@ Class IsBicat (A : Type) `{H: Is1Bicat A} `{!Is3Graph A} :=
116
124
(g $@L bicat_idl f) $o (bicat_assoc f (Id b) g) $== (bicat_idr g $@R f)
117
125
}.
118
126
127
+
(** A (2,1)-category is a bicategory such that all 2-cells have a unique inverse. Here we have chosen to define (2,1)-categories as extending the theory of bicategories, but the theory of (2,1)-categories also extends the theory of 1-categories with coherence conditions on 2-cells. TODO: Give a constructor to upgrade a 1-category to a (2,1)-category by adding appropriate coherence conditions. *)
119
128
Class Is21Cat (A : Type) `{IsBicat A} :=
120
129
{
121
130
is0gpd_hom :: forall (a b : A), Is0Gpd (a $-> b) ;
0 commit comments