2-category

Generalization of category

In category theory in mathematics, a 2-category is a category with "morphisms between morphisms", called 2-morphisms. A basic example is the category Cat of all (small) categories, where a 2-morphism is a natural transformation between functors.

The concept of a strict 2-category was first introduced by Charles Ehresmann in his work on enriched categories in 1965.[1] The more general concept of bicategory (or weak 2-category), where composition of morphisms is associative only up to a 2-isomorphism, was introduced in 1967 by Jean Bénabou.[2]

A (2, 1)-category is a 2-category where each 2-morphism is invertible.

## Definitions

[edit]

### A strict 2-category

[edit]

By definition, a strict 2-category C consists of the data:[3]

* a class of 0-cells,
* for each pairs of 0-cells  a , b {\displaystyle a,b} , a set  Hom ⁡ ( a , b ) {\displaystyle \operatorname {Hom} (a,b)} called the set of 1-cells from  a {\displaystyle a} to  b {\displaystyle b} ,
* for each pairs of 1-cells  f , g {\displaystyle f,g} in the same hom-set, a set  2Mor ⁡ ( f , g ) {\displaystyle \operatorname {2Mor} (f,g)} called the set of 2-cells from  f {\displaystyle f} to  g {\displaystyle g} ,
* ordinary compositions: maps  ∘ : Hom ⁡ ( b , c ) × Hom ⁡ ( a , b ) -> Hom ⁡ ( a , c ) {\displaystyle \circ :\operatorname {Hom} (b,c)\times \operatorname {Hom} (a,b)\to \operatorname {Hom} (a,c)} ,
* vertical compositions: maps  ∘ : 2Mor ⁡ ( g , h ) × 2Mor ⁡ ( f , g ) -> 2Mor ⁡ ( f , h ) {\displaystyle \circ :\operatorname {2Mor} (g,h)\times \operatorname {2Mor} (f,g)\to \operatorname {2Mor} (f,h)} , where  f , g , h {\displaystyle f,g,h} are in the same hom-set,
* horizontal compositions: maps  ∗ : 2Mor ⁡ ( u , v ) × 2Mor ⁡ ( f , g ) -> 2Mor ⁡ ( u ∘ f , v ∘ g ) {\displaystyle *:\operatorname {2Mor} (u,v)\times \operatorname {2Mor} (f,g)\to \operatorname {2Mor} (u\circ f,v\circ g)} for  f , g : a -> b {\displaystyle f,g:a\to b} and  u , v : b -> c {\displaystyle u,v:b\to c}

that are subject to the following conditions

* the 0-cells, the 1-cells and the ordinary compositions form a category,
* for each  a , b {\displaystyle a,b} ,  Hom ⁡ ( a , b ) {\displaystyle \operatorname {Hom} (a,b)} together with the vertical compositions is a category,
* the 2-cells together with the horizontal compositions form a category; namely, an object is a 0-cell and the hom-set from  a {\displaystyle a} to  b {\displaystyle b} is the set of all 2-cells of the form  α : f ⇒ g {\displaystyle \alpha :f\Rightarrow g} with some  f , g : a -> b {\displaystyle f,g:a\to b} ,
* the interchange law:  ( δ ∗ β ) ∘ ( γ ∗ α ) {\displaystyle (\delta *\beta )\circ (\gamma *\alpha )} , when defined, is the same as  ( δ ∘ γ ) ∗ ( β ∘ α ) {\displaystyle (\delta \circ \gamma )*(\beta \circ \alpha )} .

The 0-cells, 1-cells, and 2-cells terminology is replaced by 0-morphisms, 1-morphisms, and 2-morphisms in some sources[4] (see also Higher category theory). Vertical compositions and horizontal compositions are also written as  ∘ 1 , ∘ 0 {\displaystyle \circ _{1},\circ _{0}} .

The interchange law can be drawn as a pasting diagram as follows:

|  = |  |  = |  |  ∘ 0 {\displaystyle \circ _{0}} |

|
|
|
|
|
|

∘ 1 {\displaystyle \circ _{1}}

Here the left-hand diagram denotes the vertical composition of horizontal composites, the right-hand diagram denotes the horizontal composition of vertical composites, and the diagram in the centre is the customary representation of both. The 2-cell are drawn with double arrows ⇒, the 1-cell with single arrows →, and the 0-cell with points.

Since the definition, as can be seen, is not short, in practice, it is more common to use some generalization of category theory such as higher category theory (see below) or enriched category theory to define a strict 2-category. The notion of strict 2-category differs from the more general notion of a weak 2-category defined below in that composition of 1-cells (horizontal composition) is required to be strictly associative, whereas in the weak version, it needs only be associative up to a coherent 2-isomorphism.

### As a category enriched over Cat

[edit]

Given a monoidal category V, a category C enriched over V is an abstract version of a category; namely, it consists of the data

* a class of objects,
* for each pair of objects  a , b {\displaystyle a,b} , a hom-object Hom ⁡ ( a , b ) {\displaystyle \operatorname {Hom} (a,b)} in  V {\displaystyle V} ,
* compositions: morphisms  Hom ⁡ ( b , c ) ⊗ Hom ⁡ ( a , b ) -> Hom ⁡ ( a , c ) {\displaystyle \operatorname {Hom} (b,c)\otimes \operatorname {Hom} (a,b)\to \operatorname {Hom} (a,c)} in  V {\displaystyle V} ,
* identities: morphisms  1 -> Hom ⁡ ( a , a ) {\displaystyle 1\to \operatorname {Hom} (a,a)} in  V {\displaystyle V}

that are subject to the associativity and the unit axioms. In particular, if  V = Set {\displaystyle V={\textbf {Set}}} is the category of sets with  ⊗ {\displaystyle \otimes } cartesian product, then a category enriched over it is an ordinary category.

If  V = Cat {\displaystyle V={\textbf {Cat}}} , the category of small categories with  ⊗ {\displaystyle \otimes } product of categories, then a category enriched over it is exactly a strict 2-category. Indeed,  Hom ⁡ ( a , b ) {\displaystyle \operatorname {Hom} (a,b)} has a structure of a category; so it gives the 2-cells and vertical compositions. Also, each composition is a functor; in particular, it sends 2-cells to 2-cells and that gives the horizontal compositions. The interchange law is a consequence of the functoriality of the compositions.

A similar process for 3-categories leads to tricategories, and more generally to weak n-categories for n-categories, although such an inductive approach is not necessarily common today.

### A weak 2-category

[edit]

A weak 2-category or a bicategory can be defined exactly the same way a strict 2-category is defined except that the horizontal composition is required to be associative up to a coherent isomorphism. The coherent condition here is similar to those needed for monoidal categories; thus, for example, a monoidal category is the same as a weak 2-category with one 0-cell.[citation needed]

In higher category theory, if C is an ∞-category (a weak Kan complex) whose structure is determined only by 0-simplexes, 1-simplexes and 2-simplexes, then it is a weak (2, 1)-category; i.e., a weak 2-category in which every 2-morphism is invertible. So, a weak 2-category is an (∞, 2)-category whose structure is determined only by 0, 1, 2-simplexes.

## Examples

[edit]

### Category of small categories

[edit]

The archetypal 2-category is the category of small categories, with natural transformations serving as 2-morphisms.[5] The objects (0-cells) are all small categories, and for objects a and b the hom-set  Hom ⁡ ( a , b ) {\displaystyle \operatorname {Hom} (a,b)} acquires a structure of a category as a functor category. A vertical composition is[6] the composition of natural transformations.

Similarly, given a monoidal category V, the category of (small) categories enriched over V is a 2-category. Also, if  A {\displaystyle A} is a category, then the comma category C a t ↓ A {\displaystyle \mathbf {Cat} \downarrow A} is a 2-category with natural transformations that map to the identity.[5]

### Grpd

[edit]

Like Cat, groupoids (categories where morphisms are invertible) form a 2-category, where a 2-morphism is a natural transformation. Often, one also considers Grpd where all 2-morphisms are invertible transformations. In the latter case, it is a (2, 1)-category.

### Ord

[edit]

The category Ord of preordered sets is a 2-category since each hom-set has a natural preordered structure; thus a category structure by  f ≤ g ⇔ f ( x ) ≤ g ( x ) {\displaystyle f\leq g\Leftrightarrow f(x)\leq g(x)} for each element x.

More generally, the category of ordered objects in some category is a 2-category.[5]

### Boolean monoidal category

[edit]

Consider a simple monoidal category, such as the monoidal preorder Bool[7] based on the monoid M = ({T, F}, ∧, T). As a category this is presented with two objects {T, F} and single morphism g: F → T.

We can reinterpret this monoid as a bicategory with a single object x (one 0-cell); this construction is analogous to construction of a small category from a monoid. The objects {T, F} become morphisms, and the morphism g becomes a natural transformation (forming a functor category for the single hom-category B(x, x)).

### Coherence theorem

[edit]

* Every bicategory is "biequivalent"[8] to a 2-category.[9]

## Duskin nerve

[edit]

The Duskin nerve N h c ( C ) {\displaystyle N^{hc}(C)} of a 2-category C is a simplicial set where each n-simplex is determined by the following data: n objects  x 1 , … , x n {\displaystyle x_{1},\dots ,x_{n}} , morphisms  f i j : x i -> x j , i < j {\displaystyle f_{ij}:x_{i}\to x_{j},\,i<j} and 2-morphisms  μ i j k : f j k ∘ f i j -> f i k , i < j < k {\displaystyle \mu _{ijk}:f_{jk}\circ f_{ij}\rightarrow f_{ik},\,i<j<k} that are subject to the (obvious) compatibility conditions.[10] Then the following are equivalent: [11]

* C {\displaystyle C} is a (2, 1)-category; i.e., each 2-morphism is invertible.
* N h c ( C ) {\displaystyle N^{hc}(C)} is a weak Kan complex.

The Duskin nerve is an instance of the homotopy coherent nerve.

## Functors and natural transformations

[edit]

By definition, a functor is simply a structure-preserving map; i.e., objects map to objects, morphisms to morphisms, etc. So, a 2-functor between 2-categories can be defined exactly the same way.[12][13] In practice though, this notion of a 2-functor is not used much. It is far more common to use their lax analogs (just as a weak 2-category is used more).

Let C,D be bicategories. We denote composition in "diagrammatic order".[14] A lax functor P from C to D, denoted  P : C -> D {\displaystyle P:C\to D} , consists of the following data:

* for each object x in C, an object  P x ∈ D {\displaystyle P_{x}\in D} ;
* for each pair of objects x,y ∈ C a functor on morphism-categories,  P x , y : C ( x , y ) -> D ( P x , P y ) {\displaystyle P_{x,y}:C(x,y)\to D(P_{x},P_{y})} ;
* for each object x∈C, a 2-morphism  P id x : id P x -> P x , x ( id x ) {\displaystyle P_{{\text{id}}_{x}}:{\text{id}}_{P_{x}}\to P_{x,x}({\text{id}}_{x})} in D;
* for each triple of objects, x,y,z ∈C, a 2-morphism  P x , y , z ( f , g ) : P x , y ( f ) ; P y , z ( g ) -> P x , z ( f ; g ) {\displaystyle P_{x,y,z}(f,g):P_{x,y}(f);P_{y,z}(g)\to P_{x,z}(f;g)} in D that is natural in f: x→y and g: y→z.

These must satisfy three commutative diagrams, which record the interaction between left unity, right unity, and associativity between C and D.[15]

A lax functor in which all of the structure 2-morphisms, i.e. the  P id x {\displaystyle P_{{\text{id}}_{x}}} and  P x , y , z {\displaystyle P_{x,y,z}} above, are invertible is called a pseudofunctor.

There is also a lax version of a natural transformation. Let C and D be 2-categories, and let  F , G : C -> D {\displaystyle F,G\colon C\to D} be 2-functors. A lax natural transformation  α : F -> G {\displaystyle \alpha \colon F\to G} between them consists of

* a morphism  α c : F ( c ) -> G ( c ) {\displaystyle \alpha _{c}\colon F(c)\to G(c)} in D for every object  c ∈ C {\displaystyle c\in C} and
* a 2-morphism  α f : G ( f ) ∘ α c -> α c ′ ∘ F ( f ) {\displaystyle \alpha _{f}\colon G(f)\circ \alpha _{c}\to \alpha _{c'}\circ F(f)} for every morphism  f : c -> c ′ {\displaystyle f\colon c\to c'} in C

satisfying some equations (see [16] or [17])

## Related notion: double category

[edit]

While a strict 2-category is a category enriched over Cat, a category internal to Cat is called a double category.

## See also

[edit]

* n-category
* Doctrine (mathematics)
* Pseudofunctor
* String diagram
* 2-Yoneda lemma

## Footnotes

[edit]

1. ^ Ehresmann 1965
2. ^ Bénabou 1967
3. ^ Kelly & Street 1974, § 1.2.
4. ^ 2-category in nLab
5. ^ a b c Kelly & Street 1974, § 1.3.
6. ^ Vertical composition in nLab
7. ^ Fong & Spivak 2018
8. ^ Leinster 1998, 2.2 Biequivalence
9. ^ Leinster 1998, 2.3 The Coherence Theorem
10. ^ Khan 2023, Construction 1.5.1.
11. ^ Khan 2023, Theorem 1.5.2.
12. ^ Kelly & Street 1974, § 1.4.
13. ^ 2-functor in nLab
14. ^ Composition in nLab
15. ^ Pseudofunctor in nLab
16. ^ Lax natural transformation in nLab
17. ^ Gray 1974

## References

[edit]

* Bénabou, Jean (1967). "Introduction to bicategories". Reports of the Midwest Category Seminar. Lecture Notes in Mathematics. Vol. 47\. pp. 1–77\. doi:10.1007/BFb0074299. ISBN 978-3-540-03918-1.
* Centazzo, Claudia (2004). Generalised Algebraic Models. Presses univ. de Louvain. ISBN 978-2-930344-78-2.
* Ehresmann, Charles (1965). Catégories et structures. Dunod, Paris. MR 0213410. OCLC 1199888.
* Fong, Brendan; Spivak, David I. (2018-10-12). "Seven Sketches in Compositionality: An Invitation to Applied Category Theory". arXiv:1803.05316 [math.CT].
* Gray, John W. (1974). Formal Category Theory: Adjointness for 2-Categories. Lecture Notes in Mathematics. Vol. 391\. doi:10.1007/BFb0061280. ISBN 978-3-540-06830-3.
* Khan, Adeel A. (2023). "Lectures on algebraic stacks". arXiv:2310.12456 [math.AG].
* Kelly, G. M.; Street, Ross (1974). "Review of the elements of 2-categories". In Kelly, Gregory M. (ed.). Category Seminar: Proceedings of the Sydney Category Theory Seminar, 1972/1973. Lecture Notes in Mathematics. Vol. 420\. Springer. pp. 75–103\. doi:10.1007/BFb0063101. ISBN 978-3-540-06966-9. MR 0357542.
* Kelly, Gregory Maxwell (1982), Basic concepts of enriched category theory (PDF), London Mathematical Society Lecture Note Series, vol. 64, Cambridge University Press, Cambridge-New York, ISBN 0-521-28702-2, MR 0651714
* Laumon, Gérard; Moret-Bailly, Laurent (2000). Champs algébriques. Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics. Vol. 39\. Berlin, New York: Springer-Verlag. doi:10.1007/978-3-540-24899-6. ISBN 978-3-540-65761-3. MR 1771927.
* Leinster, Tom (1998). "Basic Bicategories". arXiv:math/9810017.
* Warner, Garth (13 December 2012). Fibrations and Sheaves. EPrint Collection, University of Washington. hdl:1773/20977.

## Further reading

[edit]

* Lack, Stephen (2010). "A 2-Categories Companion". Towards Higher Categories. The IMA Volumes in Mathematics and its Applications. Vol. 152\. pp. 105–191\. arXiv:math/0702535. Bibcode:2007math......2535L. doi:10.1007/978-1-4419-1524-5_4. ISBN 978-1-4419-1523-8.
* Johnson, Niles; Yau, Donald (2021). 2-Dimensional Categories. Oxford University Press. arXiv:2002.06055. doi:10.1093/oso/9780198871378.001.0001. ISBN 978-0-19-887137-8.
* Kerodon, https://kerodon.net/tag/007K

## External links

[edit]

* Media related to Strict 2-category at Wikimedia Commons
* "2-category in nLab". ncatlab.org.
* "2-functor in nLab". ncatlab.org.
* "Bicategory in nLab". ncatlab.org.
* "Composition in nLab". ncatlab.org.
* "Lax natural transformation in nLab". ncatlab.org.
* "Pseudofunctor in nLab". ncatlab.org.
* "Vertical composition in nLab". ncatlab.org.

* v
* t
* e

Category theory

Key concepts

| Key concepts|

* Category
* Abelian
* Additive
* Concrete
* Pre-abelian
* Preadditive
* Bicategory
* Adjoint functors
* CCC
* Commutative diagram
* End
* Exponential
* Functor
* Kan extension
* Morphism
* Natural transformation
* Universal property
* Yoneda lemma

|

Universal constructions|

| Limits|

* Terminal objects
* Products
* Equalizers
* Kernels
* Pullbacks
* Inverse limit

|

Colimits|

* Initial objects
* Coproducts
* Coequalizers
* Cokernels and quotients
* Pushout
* Direct limit

Algebraic categories|

* Sets
* Relations
* Magmas
* Groups
* Abelian groups
* Rings (Fields)
* Modules (Vector spaces)

Constructions on categories|

* Free category
* Functor category
* Kleisli category
* Opposite category
* Quotient category
* Product category
* Comma category
* Subcategory

Higher category theory

| Key concepts|

* Categorification
* Enriched category
* Higher-dimensional algebra
* Homotopy hypothesis
* Model category
* Simplex category
* String diagram
* Topos

|

n-categories|

| Weak n-categories|

* Bicategory (pseudofunctor)
* Tricategory
* Tetracategory
* Kan complex
* ∞-groupoid
* ∞-topos

|

Strict n-categories|

* 2-category (2-functor)
* 3-category

Categorified concepts|

* 2-group
* 2-ring
* En-ring
* (Traced)(Symmetric) monoidal category
* n-group
* n-monoid

* Category
* Outline
* Glossary

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template