2-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 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. The more general concept of bicategory, where composition of morphisms is associative only up to a 2-isomorphism, was introduced in 1967 by Jean Bénabou.
A -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:- a class of 0-cells,
- 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
- 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,
- the interchange law:, when defined, is the same as.
The interchange law can be drawn as a pasting 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. 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 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 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 hom-object in,
- compositions: morphisms in,
- identities: morphisms in
If, the category of small categories with product 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 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.In higher category theory, if C is an ∞-category whose structure is determined only by 0-simplexes, 1-simplexes and 2-simplexes, then it is a weak -category; i.e., a weak 2-category in which every 2-morphism is invertible. So, a weak 2-category is an -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. The objects are all small categories, and for objects and the hom-set acquires a structure of a category as a functor category. A vertical composition is the composition of natural transformations.Similarly, given a monoidal category V, the category of categories enriched over V is a 2-category. Also, if is a category, then the comma category is a 2-category with natural transformations that map to the identity.
Grpd
Like Cat, groupoids 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 -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 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 based on the monoid M =. As a category this is presented with two objects and single morphism g: F → T.We can reinterpret this monoid as a bicategory with a single object x ; this construction is analogous to construction of a small category from a monoid. The objects become morphisms, and the morphism g becomes a natural transformation.
Coherence theorem
- Every bicategory is "biequivalent" to a 2-category. This is an instance of strictification
Duskin nerve
- is a -category; i.e., each 2-morphism is invertible.
- is a weak Kan complex.
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. In practice though, this notion of a 2-functor is not used much. It is far more common to use their lax analogs.Let C,D be bicategories. We denote composition in "diagrammatic order". A lax functor P from C to D, denoted, consists of the following data:
- for each object x in C, an object ;
- for each pair of objects x,y ∈ C a functor on morphism-categories, ;
- for each object x∈C, a 2-morphism in D;
- for each triple of objects, x,y,z ∈C, a 2-morphism in D that is natural in f: x→y and g: y→z.
A lax functor in which all of the structure 2-morphisms, i.e. the and 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 be 2-functors. A lax natural transformation between them consists of
- a morphism in D for every object and
- a 2-morphism for every morphism in C