# Comma category

Last updated

In mathematics, a comma category (a special case being a slice category) is a construction in category theory. It provides another way of looking at morphisms: instead of simply relating objects of a category to one another, morphisms become objects in their own right. This notion was introduced in 1963 by F. W. Lawvere (Lawvere, 1963 p. 36), although the technique did not[ citation needed ] become generally known until many years later. Several mathematical concepts can be treated as comma categories. Comma categories also guarantee the existence of some limits and colimits. The name comes from the notation originally used by Lawvere, which involved the comma punctuation mark. The name persists even though standard notation has changed, since the use of a comma as an operator is potentially confusing, and even Lawvere dislikes the uninformative term "comma category" (Lawvere, 1963 p. 13).

## Definition

The most general comma category construction involves two functors with the same codomain. Often one of these will have domain 1 (the one-object one-morphism category). Some accounts of category theory consider only these special cases, but the term comma category is actually much more general.

### General form

Suppose that ${\displaystyle {\mathcal {A}}}$, ${\displaystyle {\mathcal {B}}}$, and ${\displaystyle {\mathcal {C}}}$ are categories, and ${\displaystyle S}$ and ${\displaystyle T}$ (for source and target) are functors:

${\displaystyle {\mathcal {A}}{\xrightarrow {\;\;S\;\;}}{\mathcal {C}}{\xleftarrow {\;\;T\;\;}}{\mathcal {B}}}$

We can form the comma category ${\displaystyle (S\downarrow T)}$ as follows:

• The objects are all triples ${\displaystyle (A,B,h)}$ with ${\displaystyle A}$ an object in ${\displaystyle {\mathcal {A}}}$, ${\displaystyle B}$ an object in ${\displaystyle {\mathcal {B}}}$, and ${\displaystyle h:S(A)\rightarrow T(B)}$ a morphism in ${\displaystyle {\mathcal {C}}}$.
• The morphisms from ${\displaystyle (A,B,h)}$ to ${\displaystyle (A',B',h')}$ are all pairs ${\displaystyle (f,g)}$ where ${\displaystyle f:A\rightarrow A'}$ and ${\displaystyle g:B\rightarrow B'}$ are morphisms in ${\displaystyle {\mathcal {A}}}$ and ${\displaystyle {\mathcal {B}}}$ respectively, such that the following diagram commutes:

Morphisms are composed by taking ${\displaystyle (f',g')\circ (f,g)}$ to be ${\displaystyle (f'\circ f,g'\circ g)}$, whenever the latter expression is defined. The identity morphism on an object ${\displaystyle (A,B,h)}$ is ${\displaystyle (\mathrm {id} _{A},\mathrm {id} _{B})}$.

### Slice category

The first special case occurs when ${\displaystyle {\mathcal {C}}={\mathcal {A}}}$, the functor ${\displaystyle S}$ is the identity functor, and ${\displaystyle {\mathcal {B}}={\textbf {1}}}$ (the category with one object ${\displaystyle *}$ and one morphism). Then ${\displaystyle T(*)=A_{*}}$ for some object ${\displaystyle A_{*}}$ in ${\displaystyle {\mathcal {A}}}$.

${\displaystyle {\mathcal {A}}\xrightarrow {\;\;\mathrm {id} _{\mathcal {A}}\;\;} {\mathcal {A}}\xleftarrow {\;\;A_{*}\;\;} {\textbf {1}}}$

In this case, the comma category is written ${\displaystyle ({\mathcal {A}}\downarrow A_{*})}$, and is often called the slice category over ${\displaystyle A_{*}}$ or the category of objects over ${\displaystyle A_{*}}$. The objects ${\displaystyle (A,*,h)}$ can be simplified to pairs ${\displaystyle (A,h)}$, where ${\displaystyle h:A\rightarrow A_{*}}$. Sometimes, ${\displaystyle h}$ is denoted by ${\displaystyle \pi _{A}}$. A morphism ${\displaystyle (f,\mathrm {id} _{*})}$ from ${\displaystyle (A,\pi _{A})}$ to ${\displaystyle (A',\pi _{A'})}$ in the slice category can then be simplified to an arrow ${\displaystyle f:A\rightarrow A'}$ making the following diagram commute:

### Coslice category

The dual concept to a slice category is a coslice category. Here, ${\displaystyle {\mathcal {C}}={\mathcal {B}}}$, ${\displaystyle S}$ has domain ${\displaystyle {\textbf {1}}}$ and ${\displaystyle T}$ is an identity functor.

${\displaystyle {\textbf {1}}\xrightarrow {\;\;B_{*}\;\;} {\mathcal {B}}\xleftarrow {\;\;\mathrm {id} _{\mathcal {B}}\;\;} {\mathcal {B}}}$

In this case, the comma category is often written ${\displaystyle (B_{*}\downarrow {\mathcal {B}})}$, where ${\displaystyle B_{*}=S(*)}$ is the object of ${\displaystyle {\mathcal {B}}}$ selected by ${\displaystyle S}$. It is called the coslice category with respect to ${\displaystyle B_{*}}$, or the category of objects under ${\displaystyle B_{*}}$. The objects are pairs ${\displaystyle (B,\iota _{B})}$ with ${\displaystyle \iota _{B}:B_{*}\rightarrow B}$. Given ${\displaystyle (B,\iota _{B})}$ and ${\displaystyle (B',\iota _{B'})}$, a morphism in the coslice category is a map ${\displaystyle g:B\rightarrow B'}$ making the following diagram commute:

### Arrow category

${\displaystyle S}$ and ${\displaystyle T}$ are identity functors on ${\displaystyle {\mathcal {C}}}$ (so ${\displaystyle {\mathcal {A}}={\mathcal {B}}={\mathcal {C}}}$).

${\displaystyle {\mathcal {C}}\xrightarrow {\;\;\mathrm {id} _{\mathcal {C}}\;\;} {\mathcal {C}}\xleftarrow {\;\;\mathrm {id} _{\mathcal {C}}\;\;} {\mathcal {C}}}$

In this case, the comma category is the arrow category ${\displaystyle {\mathcal {C}}^{\rightarrow }}$. Its objects are the morphisms of ${\displaystyle {\mathcal {C}}}$, and its morphisms are commuting squares in ${\displaystyle {\mathcal {C}}}$. [1]

### Other variations

In the case of the slice or coslice category, 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 ${\displaystyle T}$ is the forgetful functor mapping an abelian group to its underlying set, and ${\displaystyle s}$ is some fixed set (regarded as a functor from 1), then the comma category ${\displaystyle (s\downarrow T)}$ has objects that are maps from ${\displaystyle s}$ to a set underlying a group. This relates to the left adjoint of ${\displaystyle T}$, which is the functor that maps a set to the free abelian group having that set as its basis. In particular, the initial object of ${\displaystyle (s\downarrow T)}$ is the canonical injection ${\displaystyle s\rightarrow T(G)}$, where ${\displaystyle G}$ is the free group generated by ${\displaystyle s}$.

An object of ${\displaystyle (s\downarrow T)}$ is called a morphism from ${\displaystyle s}$ to ${\displaystyle T}$ or a ${\displaystyle T}$-structured arrow with domain ${\displaystyle s}$. [1] An object of ${\displaystyle (S\downarrow t)}$ is called a morphism from ${\displaystyle S}$ to ${\displaystyle t}$ or a ${\displaystyle S}$-costructured arrow with codomain ${\displaystyle t}$. [1]

Another special case occurs when both ${\displaystyle S}$ and ${\displaystyle T}$ are functors with domain ${\displaystyle {\textbf {1}}}$. If ${\displaystyle S(*)=A}$ and ${\displaystyle T(*)=B}$, then the comma category ${\displaystyle (S\downarrow T)}$, written ${\displaystyle (A\downarrow B)}$, is the discrete category whose objects are morphisms from ${\displaystyle A}$ to ${\displaystyle B}$.

An inserter category is a (non-full) subcategory of the comma category where ${\displaystyle {\mathcal {A}}={\mathcal {B}}}$ and ${\displaystyle f=g}$ are required. The comma category can also be seen as the inserter of ${\displaystyle S\circ \pi _{1}}$ and ${\displaystyle T\circ \pi _{2}}$, where ${\displaystyle \pi _{1}}$ and ${\displaystyle \pi _{2}}$ are the two projection functors out of the product category ${\displaystyle {\mathcal {A}}\times {\mathcal {B}}}$.

## Properties

For each comma category there are forgetful functors from it.

• Domain functor, ${\displaystyle S\downarrow T\to {\mathcal {A}}}$, which maps:
• objects: ${\displaystyle (A,B,h)\mapsto A}$;
• morphisms: ${\displaystyle (f,g)\mapsto f}$;
• Codomain functor, ${\displaystyle S\downarrow T\to {\mathcal {B}}}$, which maps:
• objects: ${\displaystyle (A,B,h)\mapsto B}$;
• morphisms: ${\displaystyle (f,g)\mapsto g}$.
• Arrow functor, ${\displaystyle S\downarrow T\to {\mathcal {C}}^{\rightarrow }}$, which maps:
• objects: ${\displaystyle (A,B,h)\mapsto h}$;
• morphisms: ${\displaystyle (f,g)\mapsto (Sf,Tg)}$;

## 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, ${\displaystyle \scriptstyle {(\bullet \downarrow \mathbf {Set} )}}$ with ${\displaystyle \scriptstyle {\bullet }}$ being (a functor selecting) any singleton set, and ${\displaystyle \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 ${\displaystyle \scriptstyle {(\bullet \downarrow \mathbf {Top} )}}$.
• The category of associative algebras over a ring ${\displaystyle R}$ is the coslice category ${\displaystyle \scriptstyle {(R\downarrow \mathbf {Ring} )}}$, since any ring homomorphism ${\displaystyle f:R\to S}$ induces an associative ${\displaystyle R}$-algebra structure on ${\displaystyle S}$, and vice versa. Morphisms are then maps ${\displaystyle h:S\to T}$ that make the diagram commute.
• The category of graphs is ${\displaystyle \scriptstyle {(\mathbf {Set} \downarrow D)}}$, with ${\displaystyle \scriptstyle {D:\,\mathbf {Set} \rightarrow \mathbf {Set} }}$ the functor taking a set ${\displaystyle s}$ to ${\displaystyle s\times s}$. The objects ${\displaystyle (a,b,f)}$ then consist of two sets and a function; ${\displaystyle a}$ is an indexing set, ${\displaystyle b}$ is a set of nodes, and ${\displaystyle f:a\rightarrow (b\times b)}$ chooses pairs of elements of ${\displaystyle b}$ for each input from ${\displaystyle a}$. That is, ${\displaystyle f}$ picks out certain edges from the set ${\displaystyle 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 ${\displaystyle (g,h):(a,b,f)\rightarrow (a',b',f')}$ must satisfy ${\displaystyle 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 ${\displaystyle S}$ be the functor taking each graph to the set of its edges, and let ${\displaystyle A}$ be (a functor selecting) some particular set: then ${\displaystyle (S\downarrow A)}$ is the category of graphs whose edges are labelled by elements of ${\displaystyle A}$. This form of comma category is often called objects ${\displaystyle S}$-over ${\displaystyle A}$ - closely related to the "objects over ${\displaystyle A}$" discussed above. Here, each object takes the form ${\displaystyle (B,\pi _{B})}$, where ${\displaystyle B}$ is a graph and ${\displaystyle \pi _{B}}$ a function from the edges of ${\displaystyle B}$ to ${\displaystyle 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 ${\displaystyle {\mathcal {A}}}$ and ${\displaystyle {\mathcal {B}}}$ are complete, ${\displaystyle S\colon {\mathcal {A}}\rightarrow {\mathcal {C}}}$ is a continuous functor, and ${\displaystyle T:{\mathcal {B}}\rightarrow {\mathcal {C}}}$ is another functor (not necessarily continuous), then the comma category ${\displaystyle (S\downarrow T)}$ produced is complete, [2] and the projection functors ${\displaystyle (S\downarrow T)\rightarrow {\mathcal {A}}}$ and ${\displaystyle (S\downarrow T)\rightarrow {\mathcal {B}}}$ are continuous. Similarly, if ${\displaystyle {\mathcal {A}}}$ and ${\displaystyle {\mathcal {B}}}$ are cocomplete, and ${\displaystyle S:{\mathcal {A}}\rightarrow {\mathcal {C}}}$ is cocontinuous, then ${\displaystyle (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 ${\displaystyle {\mathcal {C}}}$ be a category with ${\displaystyle F:{\mathcal {C}}\rightarrow {\mathcal {C}}\times {\mathcal {C}}}$ the functor taking each object ${\displaystyle c}$ to ${\displaystyle (c,c)}$ and each arrow ${\displaystyle f}$ to ${\displaystyle (f,f)}$. A universal morphism from ${\displaystyle (a,b)}$ to ${\displaystyle F}$ consists, by definition, of an object ${\displaystyle (c,c)}$ and morphism ${\displaystyle \rho$ :(a,b)\rightarrow (c,c)} with the universal property that for any morphism ${\displaystyle \rho ':(a,b)\rightarrow (d,d)}$ there is a unique morphism ${\displaystyle \sigma :c\rightarrow d}$ with ${\displaystyle F(\sigma )\circ \rho =\rho '}$. In other words, it is an object in the comma category ${\displaystyle ((a,b)\downarrow F)}$ having a morphism to any other object in that category; it is initial. This serves to define the coproduct in ${\displaystyle {\mathcal {C}}}$, when it exists.

Lawvere showed that the functors ${\displaystyle F:{\mathcal {C}}\rightarrow {\mathcal {D}}}$ and ${\displaystyle G:{\mathcal {D}}\rightarrow {\mathcal {C}}}$ are adjoint if and only if the comma categories ${\displaystyle (F\downarrow id_{\mathcal {D}})}$ and ${\displaystyle (id_{\mathcal {C}}\downarrow G)}$, with ${\displaystyle id_{\mathcal {D}}}$ and ${\displaystyle id_{\mathcal {C}}}$ the identity functors on ${\displaystyle {\mathcal {D}}}$ and ${\displaystyle {\mathcal {C}}}$ respectively, are isomorphic, and equivalent elements in the comma category can be projected onto the same element of ${\displaystyle {\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 ${\displaystyle S,T}$ are equal, then the diagram which defines morphisms in ${\displaystyle S\downarrow T}$ with ${\displaystyle A=B,A'=B',f=g}$ is identical to the diagram which defines a natural transformation ${\displaystyle 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 ${\displaystyle 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 [3] that a natural transformation ${\displaystyle \eta :S\to T}$, with ${\displaystyle S,T:{\mathcal {A}}\to {\mathcal {C}}}$, corresponds to a functor ${\displaystyle {\mathcal {A}}\to (S\downarrow T)}$ which maps each object ${\displaystyle A}$ to ${\displaystyle (A,A,\eta _{A})}$ and maps each morphism ${\displaystyle f=g}$ to ${\displaystyle (f,g)}$. This is a bijective correspondence between natural transformations ${\displaystyle S\to T}$ and functors ${\displaystyle {\mathcal {A}}\to (S\downarrow T)}$ which are sections of both forgetful functors from ${\displaystyle S\downarrow T}$.

## Related Research Articles

In mathematics, specifically category theory, a functor is a mapping between categories. Functors were first considered in algebraic topology, where algebraic objects are associated to topological spaces, and maps between these algebraic objects are associated to continuous maps between spaces. Nowadays, functors are used throughout modern mathematics to relate various categories. Thus, functors are important in all areas within mathematics to which category theory is applied.

In mathematics, especially in category theory and homotopy theory, a groupoid generalises the notion of group in several equivalent ways. A groupoid can be seen as a:

In category theory, a branch of mathematics, a universal property is an important property which is satisfied by a universal morphism. Universal morphisms can also be thought of more abstractly as initial or terminal objects of a comma category. Universal properties occur almost everywhere in mathematics, and hence the precise category theoretic concept helps point out similarities between different branches of mathematics, some of which may even seem unrelated.

In mathematics, the Yoneda lemma is arguably the most important result in category theory. It is an abstract result on functors of the type morphisms into a fixed object. It is a vast generalisation of Cayley's theorem from group theory. It allows the embedding of any locally small category into a category of functors defined on that category. It also clarifies how the embedded category, of representable functors and their natural transformations, relates to the other objects in the larger functor category. It is an important tool that underlies several modern developments in algebraic geometry and representation theory. It is named after Nobuo Yoneda.

In category theory, a branch of mathematics, the abstract notion of a limit captures the essential properties of universal constructions such as products, pullbacks and inverse limits. The dual notion of a colimit generalizes constructions such as disjoint unions, direct sums, coproducts, pushouts and direct limits.

In category theory, a branch of mathematics, a natural transformation provides a way of transforming one functor into another while respecting the internal structure of the categories involved. Hence, a natural transformation can be considered to be a "morphism of functors". Indeed, this intuition can be formalized to define so-called functor categories. Natural transformations are, after categories and functors, one of the most fundamental notions of category theory and consequently appear in the majority of its applications.

In mathematics, specifically category theory, adjunction is a relationship that two functors may have. Two functors that stand in this relationship are known as adjoint functors, one being the left adjoint and the other the right adjoint. Pairs of adjoint functors are ubiquitous in mathematics and often arise from constructions of "optimal solutions" to certain problems, such as the construction of a free group on a set in algebra, or the construction of the Stone–Čech compactification of a topological space in topology.

In mathematics, a sheaf is a tool for systematically tracking data attached to the open sets of a topological space and defined locally with regard to them. For example, for each open set, the data could be the ring of continuous functions defined on that open set. Such data is well behaved in that it can be restricted to smaller open sets, and also the data assigned to an open set is equivalent to all collections of compatible data assigned to collections of smaller open sets covering the original open set.

In category theory, a branch of mathematics, a monad is an endofunctor, together with two natural transformations required to fulfill certain coherence conditions. Monads are used in the theory of pairs of adjoint functors, and they generalize closure operators on partially ordered sets to arbitrary categories.

In mathematics, especially in the field of category theory, the concept of injective object is a generalization of the concept of injective module. This concept is important in cohomology, in homotopy theory and in the theory of model categories. The dual notion is that of a projective object.

In category theory, a branch of mathematics, a pullback is the limit of a diagram consisting of two morphisms f : X → Z and g : Y → Z with a common codomain. The pullback is often written

In mathematics, the derived categoryD(A) of an abelian category A is a construction of homological algebra introduced to refine and in a certain sense to simplify the theory of derived functors defined on A. The construction proceeds on the basis that the objects of D(A) should be chain complexes in A, with two such chain complexes considered isomorphic when there is a chain map that induces an isomorphism on the level of homology of the chain complexes. Derived functors can then be defined for chain complexes, refining the concept of hypercohomology. The definitions lead to a significant simplification of formulas otherwise described by complicated spectral sequences.

In mathematics, specifically in category theory, an exponential object or map object is the categorical generalization of a function space in set theory. Categories with all finite products and exponential objects are called cartesian closed categories. Categories without adjoined products may still have an exponential law.

This is a glossary of properties and concepts in category theory in mathematics.

In category theory, a strict 2-category is a category with "morphisms between morphisms", that is, where each hom-set itself carries the structure of a category. It can be formally defined as a category enriched over Cat.

In category theory, an end of a functor is a universal extranatural transformation from an object e of X to S.

In category theory, monoidal functors are functors between monoidal categories which preserve the monoidal structure. More specifically, a monoidal functor between two monoidal categories consists of a functor between the categories, along with two coherence maps—a natural transformation and a morphism that preserve monoidal multiplication and unit, respectively. Mathematicians require these coherence maps to satisfy additional properties depending on how strictly they want to preserve the monoidal structure; each of these properties gives rise to a slightly different definition of monoidal functors

In category theory, a branch of mathematics, the diagonal functor is given by , which maps objects as well as morphisms. This functor can be employed to give a succinct alternate description of the product of objects within the category : a product is a universal arrow from to . The arrow comprises the projection maps.

The Grothendieck construction is a construction used in the mathematical field of category theory.

In category theory, a branch of mathematics, an ∞-groupoid is an abstract homotopical model for topological spaces. One model uses Kan complexes which are fibrant objects in the category of simplicial sets. It is an ∞-category generalization of a groupoid, a category in which every morphism is an isomorphism.

## References

1. Adámek, Jiří; Herrlich, Horst; Strecker, George E. (1990). Abstract and Concrete Categories (PDF). John Wiley & Sons. ISBN   0-471-60922-6.
2. Rydheard, David E.; Burstall, Rod M. (1988). Computational category theory (PDF). Prentice Hall.
3. Mac Lane, Saunders (1998), Categories for the Working Mathematician , Graduate Texts in Mathematics 5 (2nd ed.), Springer-Verlag, p. 48, ISBN   0-387-98403-8