2-category#Definitions

{{Short description|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.{{harvnb|Ehresmann|1965}} 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.{{harvnb|Bénabou|1967}}

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

Definitions

= A strict 2-category =

By definition, a strict 2-category C consists of the data:{{harvnb|Kelly|Street|1974|loc=§ 1.2.}}

  • a class of 0-cells,
  • for each pairs of 0-cells a, b, a set \operatorname{Hom}(a, b) called the set of 1-cells from a to b,
  • for each pairs of 1-cells f, g in the same hom-set, a set \operatorname{2Mor}(f, g) called the set of 2-cells from f to g,
  • ordinary compositions: maps \circ : \operatorname{Hom}(b, c) \times \operatorname{Hom}(a, b) \to \operatorname{Hom}(a, c),
  • vertical compositions: maps \circ : \operatorname{2Mor}(g, h)\times \operatorname{2Mor}(f, g) \to \operatorname{2Mor}(f, h), where f, g, h are in the same hom-set,
  • horizontal compositions: maps * : \operatorname{2Mor}(u, v) \times \operatorname{2Mor}(f, g) \to \operatorname{2Mor}(u \circ f, v \circ g) for f, g : a \to b and 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, \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 to b is the set of all 2-cells of the form \alpha : f \Rightarrow g with some f, g : a \to b,
  • the interchange law: (\delta * \beta) \circ (\gamma * \alpha), when defined, is the same as (\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{{harvnb|2-category in nLab}} (see also Higher category theory). Vertical compositions and horizontal compositions are also written as \circ_1, \circ_0.

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

cellpadding="2" align="center"
valign="center"

| 240px

| rowspan="3" style="font-size:large" | = 

| rowspan="3" |240px

| rowspan="3" style="font-size:large" | = 

| rowspan="3" |132px

| rowspan="3" style="font-size:large" |\circ_0

| rowspan="3" |132px

style="font-size:large" align="center" |\circ_1
240px

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 =

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, a hom-object \operatorname{Hom}(a, b) in V,
  • compositions: morphisms \operatorname{Hom}(b, c) \otimes \operatorname{Hom}(a, b) \to \operatorname{Hom}(a, c) in V,
  • identities: morphisms 1 \to \operatorname{Hom}(a, a) in V

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

If V = \textbf{Cat}, the category of small categories with \otimes product of categories, then a category enriched over it is exactly a strict 2-category. Indeed, \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 =

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.{{fact|date=April 2025}}

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

= Category of small categories =

The archetypal 2-category is the category of small categories, with natural transformations serving as 2-morphisms.{{harvnb|Kelly|Street|1974|loc=§ 1.3.}} The objects (0-cells) are all small categories, and for objects {{mvar|a}} and {{mvar|b}} the hom-set \operatorname{Hom}(a, b) acquires a structure of a category as a functor category. A vertical composition is{{harvnb|Vertical composition in nLab}} 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 is a category, then the comma category \mathbf{Cat} \downarrow A is a 2-category with natural transformations that map to the identity.

= Grpd =

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 =

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 \le g \Leftrightarrow f(x) \le g(x) for each element x.

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

= Boolean monoidal category =

Consider a simple monoidal category, such as the monoidal preorder Bool{{harvnb|Fong|Spivak|2018}} 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 =

  • Every bicategory is "biequivalent"{{harvnb|Leinster|1998|loc=2.2 Biequivalence

}} to a 2-category.{{harvnb|Leinster|1998|loc=2.3 The Coherence Theorem}}{{harvnb|Gurski|2013|loc= 2.2 Coherence for bicategories}}{{harvnb|Johnson|Yau|2021|loc= Theorem 8.4.1 }} This is an instance of strictification (a process of replacing coherent isomorphisms with equalities.)

Duskin nerve

The Duskin nerve 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, \dots, x_n, morphisms f_{ij} : x_i \to x_j, \, i < j and 2-morphisms \mu_{ijk} : f_{jk} \circ f_{ij} \rightarrow f_{ik} , \, i < j < k that are subject to the (obvious) compatibility conditions.{{harvnb|Khan|2023|loc=Construction 1.5.1.}} Then the following are equivalent: {{harvnb|Khan|2023|loc=Theorem 1.5.2.}}

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

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

Functors and natural transformations

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.{{harvnb|Kelly|Street|1974|loc=§ 1.4.}}{{harvnb|2-functor in nLab}} 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".{{harvnb|Composition in nLab}} A lax functor P from C to D, denoted P: C\to D, consists of the following data:

  • for each object x in C, an object P_x\in D;
  • for each pair of objects x,y ∈ C a functor on morphism-categories, P_{x,y}: C(x,y)\to D(P_x,P_y);
  • for each object x∈C, a 2-morphism 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)\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.{{harvnb|Pseudofunctor in nLab}}

A lax functor in which all of the structure 2-morphisms, i.e. the P_{\text{id}_x} and 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\colon C\to D be 2-functors. A lax natural transformation \alpha\colon F\to G between them consists of

  • a morphism \alpha_c\colon F(c)\to G(c) in D for every object c\in C and
  • a 2-morphism \alpha_f\colon G(f)\circ\alpha_c \to \alpha_{c'}\circ F(f) for every morphism f\colon c\to c' in C

satisfying some equations (see {{harvnb|Lax natural transformation in nLab}} or {{harvnb|Gray|1974}})

Related notion: double category

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

See also

Footnotes

{{reflist}}

References

{{ref begin}}

  • {{cite book|author-link=Jean Bénabou |chapter-url=https://link.springer.com/chapter/10.1007/BFb0074299 |doi=10.1007/BFb0074299 |chapter=Introduction to bicategories |title=Reports of the Midwest Category Seminar |series=Lecture Notes in Mathematics |date=1967 |last1=Bénabou |first1=Jean |volume=47 |pages=1–77 |isbn=978-3-540-03918-1 }}
  • {{cite book |url=https://books.google.com/books?id=WKTk1n6ggKsC | title=Generalised Algebraic Models | isbn=978-2-930344-78-2 | last1=Centazzo | first1=Claudia | date=2004 | publisher=Presses univ. de Louvain }}
  • {{cite book |url=https://books.google.com/books?id=Q2WnAAAAIAAJ | title=Catégories et structures | last1=Ehresmann | first1=Charles | date=1965|publisher=Dunod, Paris| mr=0213410|oclc=1199888|author-link=Charles Ehresmann}}
  • {{Cite arXiv |last1=Fong |first1=Brendan |last2=Spivak |first2=David I. |date=2018-10-12 |title=Seven Sketches in Compositionality: An Invitation to Applied Category Theory |class=math.CT |eprint=1803.05316 }}
  • {{cite book |url=https://link.springer.com/book/10.1007/BFb0061280 |doi=10.1007/BFb0061280 |title=Formal Category Theory: Adjointness for 2-Categories |series=Lecture Notes in Mathematics |date=1974 |volume=391 |isbn=978-3-540-06830-3|first=John W. |last=Gray }}
  • {{cite arXiv |eprint=2310.12456 |last1=Khan |first1=Adeel A. |title=Lectures on algebraic stacks |date=2023 |class=math.AG }}
  • {{cite conference

|author1-link=Max Kelly

|author2-link=Ross Street

| last1 = Kelly | first1 = G. M.

| last2 = Street | first2 = Ross

| editor-last = Kelly | editor-first = Gregory M.

| contribution = Review of the elements of 2-categories

| doi = 10.1007/BFb0063101

| isbn = 978-3-540-06966-9

| mr = 357542

| pages = 75–103

| publisher = Springer

| series = Lecture Notes in Mathematics

| title = Category Seminar: Proceedings of the Sydney Category Theory Seminar, 1972/1973

| volume = 420

| year = 1974}}

  • {{citation

|author1-link=Max Kelly

| last = Kelly | first = Gregory Maxwell

| isbn = 0-521-28702-2

| mr = 651714

| publisher = Cambridge University Press, Cambridge-New York

| series = London Mathematical Society Lecture Note Series

| title = Basic concepts of enriched category theory

| volume = 64

| year = 1982

|url=http://www.tac.mta.ca/tac/reprints/articles/10/tr10.pdf}}

  • {{Cite book | last1=Laumon | first1=Gérard | author1-link=Gérard Laumon| last2=Moret-Bailly | first2=Laurent | title=Champs algébriques | publisher=Springer-Verlag | location=Berlin, New York | series=Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics | isbn=978-3-540-65761-3 | mr=1771927 | year=2000 | volume=39|doi=10.1007/978-3-540-24899-6}}
  • {{cite arXiv|author-link=Tom Leinster|eprint=math/9810017 |last1=Leinster |first1=Tom |title=Basic Bicategories |date=1998 }}
  • {{cite book |url=http://hdl.handle.net/1773/20977 |publisher= EPrint Collection, University of Washington|hdl=1773/20977 |title=Fibrations and Sheaves |date=13 December 2012 |last1=Warner |first1=Garth }}
  • {{cite book |doi=10.1017/CBO9781139542333.003 |chapter=Coherence for bicategories |title=Coherence in Three-Dimensional Category Theory |date=2013 |pages=21–34 |isbn=978-1-139-54233-3|last1= Gurski |first1=Nick }}
  • {{cite book |arxiv=2002.06055| doi=10.1093/oso/9780198871378.001.0001| title=2-Dimensional Categories| date=2021| last1=Johnson| first1=Niles| last2=Yau| first2=Donald| isbn=978-0-19-887137-8|publisher=Oxford University Press}}

{{ref end}}

Further reading

  • {{cite book |chapter-url=https://link.springer.com/chapter/10.1007/978-1-4419-1524-5_4 |doi=10.1007/978-1-4419-1524-5_4 |chapter=A 2-Categories Companion |title=Towards Higher Categories |series=The IMA Volumes in Mathematics and its Applications |date=2010 |last1=Lack |first1=Stephen |volume=152 |pages=105–191 |isbn=978-1-4419-1523-8 |arxiv=math/0702535|bibcode=2007math......2535L}}

  • {{Cite web |title=2.2 The Theory of 2-Categories |url=https://kerodon.net/tag/007K |website=Kerodon}}
  • {{cite journal |doi=10.1016/0022-4049(85)90087-8 |title=Coherence for bicategories and indexed categories |date=1985 |last1=MacLane |first1=Saunders |last2=Paré |first2=Robert |journal=Journal of Pure and Applied Algebra |volume=37 |pages=59–80 }}