In category theory, a strict 2category is a category with "morphisms between morphisms", that is, where each homset itself carries the structure of a category. It can be formally defined as a category enriched over Cat (the category of categories and functors, with the monoidal structure given by product of categories).
The concept of 2category was first introduced by Charles Ehresmann in his work on enriched categories in 1965.^{[1]} The more general concept of bicategory (or weak 2category), where composition of morphisms is associative only up to a 2isomorphism, was introduced in 1968 by Jean Bénabou.^{[2]}
YouTube Encyclopedic

1/2Views:1 6661 338

BVSS Secondary 2 Category  Sec 2E1

Category Theory 1.7: Horizontal Composition and 2Categories
Transcription
Definition
A 2category C consists of:
 A class of 0cells (or objects) A, B, ....
 For all objects A and B, a category . The objects of this category are called 1cells and its morphisms are called 2cells; the composition in this category is usually written or and called vertical composition or composition along a 1cell.
 For any object A there is a functor from the terminal category (with one object and one arrow) to that picks out the identity 1cell id_{A} on A and its identity 2cell id_{idA}. In practice these two are often denoted simply by A.
 For all objects A, B and C, there is a functor , called horizontal composition or composition along a 0cell, which is associative and admits^{[clarification needed]} the identity 1 and 2cells of id_{A} as identities. Here, associativity for means that horizontally composing twice to is independent of which of the two and are composed first. The composition symbol is often omitted, the horizontal composite of 2cells and being written simply as .
The 0cells, 1cells, and 2cells terminology is replaced by 0morphisms, 1morphisms, and 2morphisms in some sources^{[3]} (see also Higher category theory).
The notion of 2category differs from the more general notion of a bicategory in that composition of 1cells (horizontal composition) is required to be strictly associative, whereas in a bicategory it needs only be associative up to a 2isomorphism. The axioms of a 2category are consequences of their definition as Catenriched categories:
 Vertical composition is associative and unital, the units being the identity 2cells id_{f}.
 Horizontal composition is also (strictly) associative and unital, the units being the identity 2cells id_{idA} on the identity 1cells id_{A}.
 The interchange law holds; i.e. it is true that for composable 2cells
The interchange law follows from the fact that is a functor between hom categories. It can be drawn as a pasting diagram as follows:
=  =  
Here the lefthand diagram denotes the vertical composition of horizontal composites, the righthand diagram denotes the horizontal composition of vertical composites, and the diagram in the centre is the customary representation of both. The 2cell are drawn with double arrows ⇒, the 1cell with single arrows →, and the 0cell with points.
Examples
The category Ord (of preordered sets) is a 2category since preordered sets can easily be interpreted as categories.
Category of small categories
The archetypal 2category is the category of small categories, with natural transformations serving as 2morphisms; typically 2morphisms are given by Greek letters (such as above) for this reason.
The objects (0cells) are all small categories, and for all objects A and B the category is a functor category. In this context, vertical composition is^{[4]} the composition of natural transformations.
Doctrines
In mathematics, a doctrine is simply a 2category which is heuristically regarded as a system of theories. For example, algebraic theories, as invented by William Lawvere, is an example of a doctrine, as are multisorted theories, operads, categories, and toposes.
The objects of the 2category are called theories, the 1morphisms are called models of the A in B, and the 2morphisms are called morphisms between models.
The distinction between a 2category and a doctrine is really only heuristic: one does not typically consider a 2category to be populated by theories as objects and models as morphisms. It is this vocabulary that makes the theory of doctrines worth while.
For example, the 2category Cat of categories, functors, and natural transformations is a doctrine. One sees immediately that all presheaf categories are categories of models.
As another example, one may take the subcategory of Cat consisting only of categories with finite products as objects and productpreserving functors as 1morphisms. This is the doctrine of multisorted algebraic theories. If one only wanted 1sorted algebraic theories, one would restrict the objects to only those categories that are generated under products by a single object.
Doctrines were discovered by Jonathan Mock Beck.
See also
 ncategory
 2category at the nLab
References
 ^ Charles Ehresmann, Catégories et structures, Dunod, Paris 1965.
 ^ Jean Bénabou, Introduction to bicategories, in Reports of the Midwest Category Seminar, Springer, Berlin, 1967, pp. 177.
 ^ "2category in nLab". ncatlab.org. Retrieved 20230220.
 ^ "vertical composition in nLab". ncatlab.org. Retrieved 20230220.
Footnotes
 Generalised algebraic models, by Claudia Centazzo.