The concept of a strict 2-category was first introduced byCharles Ehresmann in his work onenriched categories in 1965.[1] The more general concept ofbicategory (orweak 2-category), where composition of morphisms isassociative only up to a 2-isomorphism, was introduced in 1967 byJean Bénabou.[2]
A(2, 1)-category is a 2-category where each 2-morphism is invertible.
for each pairs of 0-cells, a set called the set of 1-cells from to,
for each pairs of 1-cells in the same hom-set, a set called the set of 2-cells from to,
ordinary compositions: maps,
vertical compositions: maps, where are in the same hom-set,
horizontal compositions: maps for and
that are subject to the following conditions
the 0-cells, the 1-cells and the ordinary compositions form a category,
for each, 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 to is the set of all 2-cells of the form with some,
The0-cells,1-cells, and2-cells terminology is replaced by0-morphisms,1-morphisms, and2-morphisms in some sources[4] (see alsoHigher category theory). Vertical compositions and horizontal compositions are also written as.
The interchange law can be drawn as apasting diagram as follows:
=
=
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. The2-cell are drawn with double arrows ⇒, the1-cell with single arrows →, and the0-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 acoherent 2-isomorphism.
Given amonoidal categoryV, a categoryCenriched overV is an abstract version of a category; namely, it consists of the data
a class ofobjects,
for each pair of objects, ahom-object in,
compositions: morphisms in,
identities: morphisms in
that are subject to the associativity and the unit axioms. In particular, if is the category of sets with cartesian product, then a category enriched over it is an ordinary category.
If, the category of small categories withproduct of categories, then a category enriched over it is exactly a strict 2-category. Indeed, 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 totricategories, and more generally toweakn-categories forn-categories, although such an inductive approach is not necessarily common today.
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 acoherent isomorphism. The coherent condition here is similar to those needed formonoidal categories; thus, for example, a monoidal category is the same as a weak 2-category with one 0-cell.[5]
In higher category theory, ifC is an∞-category (aweak 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.
The archetypal 2-category is thecategory of small categories, with natural transformations serving as 2-morphisms.[6] The objects (0-cells) are all small categories, and for objectsa andb the hom-set acquires a structure of a category as afunctor category. A vertical composition is[7] the composition of natural transformations.
Similarly, given a monoidal categoryV, the category of (small) categories enriched overV is a 2-category. Also, if is a category, then thecomma category is a 2-category with natural transformations that map to the identity.[6]
LikeCat,groupoids (categories where morphisms are invertible) form a 2-category, where a 2-morphism is a natural transformation. Often, one also considersGrpd where all 2-morphisms are invertible transformations. In the latter case, it is a (2, 1)-category.
The categoryOrd ofpreordered sets is a 2-category since each hom-set has a natural preordered structure; thus a category structure by for each elementx.
More generally, the category ofordered objects in some category is a 2-category.[6]
Consider a simplemonoidal category, such as the monoidal preorderBool[8] based on themonoid M = ({T, F},∧, T). As a category this is presented with two objects {T, F} and single morphismg: F → T.
We can reinterpret this monoid as a bicategory with a single objectx (one 0-cell); this construction is analogous to construction of a small category from a monoid. The objects {T, F} become morphisms, and the morphismg becomes a natural transformation (forming afunctor category for the single hom-categoryB(x,x)).
Every bicategory is "biequivalent"[9] to a 2-category.[10][11][12] This is an instance ofstrictification (a process of replacing coherent isomorphisms with equalities.)
TheDuskin nerve of a 2-categoryC is a simplicial set where eachn-simplex is determined by the following data:n objects, morphisms and 2-morphisms that are subject to the (obvious) compatibility conditions.[13] Then the following are equivalent:[14]
is a (2, 1)-category; i.e., each 2-morphism is invertible.
By definition, a functor is simply a structure-preserving map; i.e., objects map to objects, morphisms to morphisms, etc. So, a2-functor between 2-categories can be defined exactly the same way.[15][16] In practice though, this notion of a 2-functor is not used much. It is far more common to use theirlax analogs (just as a weak 2-category is used more).
LetC,D be bicategories. We denote composition in "diagrammatic order".[17] Alax functor P from C to D, denoted, consists of the following data:
for each objectx inC, an object;
for each pair of objectsx,y ∈ C a functor on morphism-categories,;
for each objectx∈C, a 2-morphism inD;
for each triple of objects,x,y,z ∈C, a 2-morphism inD that is natural inf: x→y andg: y→z.
These must satisfy three commutative diagrams, which record the interaction between left unity, right unity, and associativity betweenC andD.[18]
A lax functor in which all of the structure 2-morphisms, i.e. the and above, are invertible is called apseudofunctor.
There is also a lax version of a natural transformation. LetC andD be 2-categories, and let be 2-functors. A lax natural transformation between them consists of
Fong, Brendan; Spivak, David I. (2018-10-12). "Seven Sketches in Compositionality: An Invitation to Applied Category Theory".arXiv:1803.05316 [math.CT].
Jurčo, Branislav; Sämann, Christian; Wolf, Martin (April 2015). "Semistrict higher gauge theory".Journal of High Energy Physics.2015 (4).arXiv:1403.7185.doi:10.1007/JHEP04(2015)087.
MacLane, Saunders; Paré, Robert (1985). "Coherence for bicategories and indexed categories".Journal of Pure and Applied Algebra.37:59–80.doi:10.1016/0022-4049(85)90087-8.