Comma category
From Academic Kids

A comma category (also sometimes called a slice category) is a construction in category theory, a branch of mathematics. It provides another way of looking at morphisms: instead of simply relating objects of a category to one another, they become objects in their own right. This notion was introduced in 1963 by F. W. Lawvere, although the technique did not become generally known until many years later. Today, it has become particularly important to mathematicians, because several important mathematical concepts can be treated as comma categories. There are also certain guarantees about the existence of limits and colimits in the context of comma categories. The name comes from the notation originally used by Lawvere, which involved the comma punctuation mark. Although standard notation has changed, the use of a comma as an operator being potentially confusing, the name persists.
Contents 
Definition
The most general comma category construction involves two converging functors. Typically, one of these will be a "selection" or "constant" functor: many accounts of category theory consider these special cases only, but the term is actually much more general. (A selection functor maps every object in the domain category to the same, fixed object in the codomain category, and every domain morphism to the identity morphism of that fixed object. Often, the choice of domain category is not relevant; typically, the discrete category having only one object is used.)
General form
Suppose that <math>\mathcal{A}<math>, <math>\mathcal{B}<math>, and <math>\mathcal{C}<math> are categories, and <math>T<math> and <math>S<math> are functors
 Missing image
CommaCategory04.png
Image:CommaCategory04.png
We can form the comma category <math>(T \downarrow S)<math> as follows:
 The objects are triples <math>(\alpha, \beta, f)<math>, with <math>\alpha<math> an object in <math>\mathcal{A}<math>, <math>\beta<math> an object in <math>\mathcal{B}<math>, and <math>f : T(\alpha)\rightarrow S(\beta)<math> a morphism in <math>\mathcal{C}<math>.
 The morphisms from <math>(\alpha, \beta, f)<math> to <math>(\alpha', \beta', f')<math> are pairs <math>(g, h)<math> where <math>g : \alpha \rightarrow \alpha'<math> and <math>h : \beta \rightarrow \beta'<math> are morphisms in <math>\mathcal A<math> and <math>\mathcal B<math> respectively, such that the following diagram commutes:
CommaCategory03.png
Morphisms in (T ↓ S)
Morphisms are composed by taking <math>(g, h) \circ (g', h')<math> to be <math>(g \circ g', h \circ h')<math>, whenever the latter expression is defined.
Category of objects under A
The first special case occurs with <math>T<math> being a selection functor, and <math>S<math> an identity functor (so <math>\mathcal{B} = \mathcal{C}<math>). (Then <math>T(\alpha) = A<math> for some fixed <math>A<math> in <math>\mathcal{C}<math> and every <math>\alpha<math> in <math>\mathcal{A}<math>). We then have the category of objects under <math>A<math>, sometimes called objects coover <math>A<math>, written <math>(A \downarrow \mathcal{C})<math>. This is also known as the coslice category with respect to <math>A<math>. The objects <math>(\alpha, \beta, f)<math> can be simplified to <math>(\beta, f)<math>, since fixing <math>A<math> makes <math>\alpha<math> irrelevant; and <math>f : T(\alpha) \rightarrow S(\beta)<math> simplifies to <math>f : A \rightarrow \beta<math>  often, <math>f<math> is called something like <math>i_\beta<math>, to indicate injection. In a similar way, morphisms like <math>(g, h) : (B, i_B) \rightarrow (B', i_{B'})<math> reduce to simply <math>h : B \rightarrow B'<math>, as <math>g<math> is just the identity morphism on <math>A<math>. The following must be a commutative diagram:
CommaCategory02.png
Image:CommaCategory02.png
Category of objects over A
Similarly, <math>T<math> might be an identity functor and <math>S<math> a selection functor: this is the category of objects over <math>A<math> (where <math>A<math> is the object of <math>\mathcal{C}<math> selected by <math>S<math>), written <math>(\mathcal{C} \downarrow A)<math>. This is also known as the slice category over <math>A<math>. It is the dual concept to objectsunder<math>A<math>. The objects are pairs <math>(\beta, \pi_\beta)<math> with <math>\pi_\beta : \beta \rightarrow A<math>; the <math>\pi<math> stands for projection onto <math>A<math>. Given <math>(B, \pi_B)<math> and <math>(B', \pi_{B'})<math>, a morphism in the comma category is a map <math>g : B \rightarrow B'<math> making the following diagram commute:
CommaCategory01.png
Image:CommaCategory01.png
Other variations
In either of these two cases, the identity functor may be replaced with some other functor; this yields a family of categories particularly useful in the study of adjoint functors. For example, if <math>S<math> is the forgetful functor mapping an abelian group to its underlying set, and <math>t<math> is the set selected by <math>T<math>, then <math>(t \downarrow S)<math> is a comma category whose objects are maps from <math>t<math> to certain sets. This relates to the left adjoint of <math>S<math>, which is the functor that maps a set to the free abelian group having that set as its basis: some of the objects of <math>(t \downarrow S)<math> will be sets underlying such groups.
Another special case occurs when both <math>S<math> and <math>T<math> are selection functors. If <math>S<math> selects <math>A<math> and <math>T<math> selects <math>B<math>, then the comma category produced is equivalent to the set of morphisms between <math>A<math> and <math>B<math>. (Strictly, it is a discrete category  all the morphisms are identity morphisms  which may be identified with the set of its objects.)
Examples of use
Some notable categories
Several interesting categories have a natural definition in terms of comma categories.
 The category of pointed sets is a comma category, <math>(\bull \downarrow \mathbf{Set})<math> with <math>\bull<math> being (a functor selecting) any singleton set, and <math>\mathbf{Set}<math> (the identity functor of) the category of sets. Each object of this category is a set, together with a function selecting some element of the set: the "basepoint". Morphisms are functions on sets which map points to points. In a similar fashion one can form the category of pointed spaces <math>(\bull \downarrow \mathbf{Top})<math>.
 The category of graphs is <math>(\mathbf{Set} \downarrow D)<math>, with <math>D : \mathbf{Set} \rightarrow \mathbf{Set}<math> the functor taking a set <math>s<math> to <math>s \times s<math>. The objects <math>(a, b, f)<math> then consist of two sets and a function; <math>a<math> is an indexing set, <math>b<math> is a set of nodes, and <math>f : a \mapsto (b \times b)<math> chooses pairs of elements of <math>b<math> for each input from <math>a<math>. That is, <math>f<math> picks out certain edges from the set <math>b \times b<math> of possible edges. A morphism in this category is made up of two functions, one on the indexing set and one on the node set. They must "agree" according to the general definition above, meaning that <math>(g, h) : (a, b, f) \mapsto (a', b', f')<math> must satisfy <math>f' \circ g = S(h) \circ f<math>. In other words, the edge corresponding to a certain element of the indexing set, when translated, must be the same as the edge for the translated index.
 Many "augmentation" or "labelling" operations can be expressed in terms of comma categories. Let <math>T<math> be the functor taking each graph to the set of its edges, and let <math>A<math> be (a functor selecting) some particular set: then <math>(T \downarrow A)<math> is the category of graphs whose edges are labelled by elements of <math>A<math>. This form of comma category is often called objects <math>T<math>over <math>A<math>  closely related to the "objects over <math>A<math>" discussed above. Here, each object takes the form <math>(B, \pi_B)<math>, where <math>B<math> is a graph and <math>\pi_B<math> a function from the edges of <math>B<math> to <math>A<math>. The nodes of the graph could be labelled in essentially the same way.
 A category is said to be locally cartesian closed if every slice of it is cartesian closed (see above for the notion of slice). Locally cartesian closed categories are the classifying categories of dependent type theories.
Limits and universal morphisms
Colimits in comma categories may be "inherited". There is a theorem which says that if <math>\mathcal{A}<math> and <math>\mathcal{B}<math> are cocomplete, <math>T : \mathcal{A} \rightarrow \mathcal{C}<math> is a cocontinuous functor, and <math>S : \mathcal{B} \rightarrow \mathcal{C}<math> another functor (not necessarily cocontinuous), then the comma category <math>(T \downarrow S)<math> produced will also be cocomplete. For example, in the above construction of the category of graphs, the category of sets is cocomplete, and the identity functor is cocontinuous: so graphs are also cocomplete  all (small) limits exist. This result is much harder to obtain directly. See Limit (category theory) for more information on the terminology used in this example.
The notion of a universal morphism to a particular colimit, or from a limit, can be expressed in terms of a comma category. Essentially, we create a category whose objects are cones, and where the limiting cone is a terminal object; then, each universal morphism for the limit is just the morphism to the terminal object. This works in the dual case, with a category of cocones having an initial object. For example, let <math>\mathcal{C}<math> be a category with <math>F : \mathcal{C} \rightarrow \mathcal{C} \times \mathcal{C}<math> the functor taking each object <math>c<math> to <math>(c, c)<math> and each arrow <math>f<math> to <math>(f, f)<math>. A universal morphism from <math>(a, b)<math> to <math>F<math> consists, by definition, of an object <math>(c, c)<math> and morphism <math>\rho : (a, b) \rightarrow (c, c)<math> with the universal property that for any morphism <math>\rho' : (a, b) \rightarrow (d, d)<math> there is a unique morphism <math>\sigma : c \rightarrow d<math> with <math>F(\sigma) \circ \rho = \rho'<math>. In other words, it is an object in the comma category <math>((a, b) \downarrow F)<math> having a morphism to any other object in that category; it is initial. This serves to define the coproduct in <math>\mathcal{C}<math>, when it exists.
Adjunctions
Lawvere showed that the functors <math>F : \mathcal{C} \rightarrow \mathcal{D}<math> and <math>G : \mathcal{D} \rightarrow \mathcal{C}<math> are adjoint if and only if the comma categories <math>(F \downarrow \mathcal{D})<math> and <math>(\mathcal{C} \downarrow G)<math> are isomorphic, and equivalent elements in the comma category can be projected onto the same element of <math>\mathcal{C} \times \mathcal{D}<math>. This allows adjunctions to be described without involving sets, and was in fact the original motivation for introducing comma categories.