Some notable categories Several interesting categories have a natural definition in terms of comma categories. • The category of
pointed sets is a comma category, \scriptstyle {(\bull \downarrow \mathbf{Set})} with \scriptstyle {\bull} being (a functor selecting) any
singleton set, and \scriptstyle {\mathbf{Set}} (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 basepoints to basepoints. In a similar fashion one can form the category of
pointed spaces \scriptstyle {(\bull \downarrow \mathbf{Top})}. • The category of associative algebras over a ring R is the coslice category \scriptstyle {(R \downarrow \mathbf{Ring})}, since any ring homomorphism f: R \to S induces an associative R-algebra structure on S, and vice versa. Morphisms are then maps h: S \to T that make the diagram commute. • The category of
graphs is \scriptstyle {(\mathbf{Set} \downarrow D)}, with \scriptstyle {D: \, \mathbf{Set} \rightarrow \mathbf{Set}} the functor taking a set s to s \times s. The objects (a, b, f) then consist of two sets and a function; a is an indexing set, b is a set of nodes, and f : a \rightarrow (b \times b) chooses pairs of elements of b for each input from a. That is, f picks out certain edges from the set b \times b 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 (g, h) : (a, b, f) \rightarrow (a', b', f') must satisfy f' \circ g = D(h) \circ f. 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 S be the functor taking each graph to the set of its edges, and let A be (a functor selecting) some particular set: then (S \downarrow A) is the category of graphs whose edges are labelled by elements of A. This form of comma category is often called
objects S-over A - closely related to the "objects over A" discussed above. Here, each object takes the form (B, \pi_B), where B is a graph and \pi_B a function from the edges of B to A. 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 Limits and
colimits in comma categories may be "inherited". If \mathcal{A} and \mathcal{B} are
complete, T : \mathcal{B} \rightarrow \mathcal{C} is a
continuous functor, and S \colon \mathcal{A} \rightarrow \mathcal{C} is another functor (not necessarily continuous), then the comma category (S \downarrow T) produced is complete, and the projection functors (S\downarrow T) \rightarrow \mathcal{A} and (S\downarrow T) \rightarrow \mathcal{B} are continuous. Similarly, if \mathcal{A} and \mathcal{B} are cocomplete, and S : \mathcal{A} \rightarrow \mathcal{C} is
cocontinuous, then (S \downarrow T) is cocomplete, and the projection functors are cocontinuous. For example, note that in the above construction of the category of graphs as a comma category, the category of sets is complete and cocomplete, and the identity functor is continuous and cocontinuous. Thus, the category of graphs is complete and cocomplete. 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 \mathcal{C} be a category with F : \mathcal{C} \rightarrow \mathcal{C} \times \mathcal{C} the functor taking each object c to (c, c) and each arrow f to (f, f). A universal morphism from (a, b) to F consists, by definition, of an object (c, c) and morphism \rho : (a, b) \rightarrow (c, c) with the universal property that for any morphism \rho' : (a, b) \rightarrow (d, d) there is a unique morphism \sigma : c \rightarrow d with F(\sigma) \circ \rho = \rho'. In other words, it is an object in the comma category ((a, b) \downarrow F) having a morphism to any other object in that category; it is initial. This serves to define the
coproduct in \mathcal{C}, when it exists.
Adjunctions William Lawvere showed that the functors F : \mathcal{C} \rightarrow \mathcal{D} and G : \mathcal{D} \rightarrow \mathcal{C} are
adjoint if and only if the comma categories (F \downarrow id_\mathcal{D}) and (id_\mathcal{C} \downarrow G), with id_\mathcal{D} and id_\mathcal{C} the identity functors on \mathcal{D} and \mathcal{C} respectively, are isomorphic, and equivalent elements in the comma category can be projected onto the same element of \mathcal{C} \times \mathcal{D}. This allows adjunctions to be described without involving sets, and was in fact the original motivation for introducing comma categories.
Natural transformations If the domains of S, T are equal, then the diagram which defines morphisms in S\downarrow T with A=B, A'=B', f=g is identical to the diagram which defines a
natural transformation S\to T. The difference between the two notions is that a natural transformation is a particular collection of morphisms of type of the form S(A)\to T(A), while objects of the comma category contains
all morphisms of type of such form. A functor to the comma category selects that particular collection of morphisms. This is described succinctly by an observation by S.A. Huq that a natural transformation \eta:S\to T, with S, T:\mathcal A \to \mathcal C, corresponds to a functor \mathcal A \to (S\downarrow T) which maps each object A to (A, A, \eta_A) and maps each morphism f=g to (f, g). This is a
bijective correspondence between natural transformations S\to T and functors \mathcal A \to (S\downarrow T) which are
sections of both forgetful functors from S\downarrow T. ==References==