In

*
*Lawvere, W (1963). "Functorial semantics of algebraic theories" and "Some algebraic problems in the context of functorial semantics of algebraic theories". http://www.tac.mta.ca/tac/reprints/articles/5/tr5.pdf

Abstract and Concrete Categories-The Joy of Cats

WildCats

is a category theory package for

Interactive Web page

which generates examples of categorical constructions in the category of finite sets. {{DEFAULTSORT:Comma Category Categories in category theory

mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...

, a comma category (a special case being a slice category) is a construction in category theory
Category theory is a general theory of mathematical structures and their relations that was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Nowadays, cate ...

. It provides another way of looking at morphism
In mathematics, particularly in category theory, a morphism is a structure-preserving map from one mathematical structure to another one of the same type. The notion of morphism recurs in much of contemporary mathematics. In set theory, morphisms a ...

s: instead of simply relating objects of a category
Category, plural categories, may refer to:
Philosophy and general uses
* Categorization, categories in cognitive science, information science and generally
*Category of being
* ''Categories'' (Aristotle)
*Category (Kant)
*Categories (Peirce)
* ...

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 become generally known until many years later. Several mathematical concepts can be treated as comma categories. Comma categories also guarantee the existence of some limit
Limit or Limits may refer to:
Arts and media
* ''Limit'' (manga), a manga by Keiko Suenobu
* ''Limit'' (film), a South Korean film
* Limit (music), a way to characterize harmony
* "Limit" (song), a 2016 single by Luna Sea
* "Limits", a 2019 ...

s and colimit
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 ...

s. The name comes from the notation originally used by Lawvere, which involved the comma
The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...

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 twofunctor
In mathematics, specifically category theory, a functor is a Map (mathematics), mapping between Category (mathematics), categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) ar ...

s 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 $\backslash mathcal$, $\backslash mathcal$, and $\backslash mathcal$ are categories, and $S$ and $T$ (for source and target) arefunctor
In mathematics, specifically category theory, a functor is a Map (mathematics), mapping between Category (mathematics), categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) ar ...

s:
$\backslash mathcal\; A\; \backslash xrightarrow\; \backslash mathcal\; C\backslash xleftarrow\; \backslash mathcal\; B$

We can form the comma category $(S\; \backslash downarrow\; T)$ as follows:
*The objects are all triples $(A,\; B,\; h)$ with $A$ an object in $\backslash mathcal$, $B$ an object in $\backslash mathcal$, and $h\; :\; S(A)\backslash rightarrow\; T(B)$ a morphism in $\backslash mathcal$.
*The morphisms from $(A,\; B,\; h)$ to $(A\text{'},\; B\text{'},\; h\text{'})$ are all pairs $(f,\; g)$ where $f\; :\; A\; \backslash rightarrow\; A\text{'}$ and $g\; :\; B\; \backslash rightarrow\; B\text{'}$ are morphisms in $\backslash mathcal\; A$ and $\backslash mathcal\; B$ respectively, such that the following diagram commutes:
Morphisms are composed by taking $(f\text{'},\; g\text{'})\; \backslash circ\; (f,\; g)$ to be $(f\text{'}\; \backslash circ\; f,\; g\text{'}\; \backslash circ\; g)$, whenever the latter expression is defined. The identity morphism on an object $(A,\; B,\; h)$ is $(\backslash mathrm\_,\; \backslash mathrm\_)$.
Slice category

The first special case occurs when $\backslash mathcal\; =\; \backslash mathcal$, the functor $S$ is theidentity functor
In mathematics, specifically category theory, a functor is a mapping between categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) are associated to topological spaces, and ma ...

, and $\backslash mathcal=\backslash textbf$ (the category with one object $*$ and one morphism). Then $T(*)\; =\; A\_*$ for some object $A\_*$ in $\backslash mathcal$.
$\backslash mathcal\; A\; \backslash xrightarrow\; \backslash mathcal\; A\backslash xleftarrow\; \backslash textbf$

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

The dual concept to a slice category is a coslice category. Here, $\backslash mathcal\; =\; \backslash mathcal$, $S$ has domain $\backslash textbf$ and $T$ is an identity functor.
$\backslash textbf\; \backslash xrightarrow\; \backslash mathcal\; B\backslash xleftarrow\; \backslash mathcal\; B$

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

$S$ and $T$ areidentity functor
In mathematics, specifically category theory, a functor is a mapping between categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) are associated to topological spaces, and ma ...

s on $\backslash mathcal$ (so $\backslash mathcal\; =\; \backslash mathcal\; =\; \backslash mathcal$).
$\backslash mathcal\; \backslash xrightarrow\; \backslash mathcal\; C\backslash xleftarrow\; \backslash mathcal\; C$

In this case, the comma category is the arrow category $\backslash mathcal^\backslash rightarrow$. Its objects are the morphisms of $\backslash mathcal$, and its morphisms are commuting squares in $\backslash mathcal$.
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 ofadjoint functor
In mathematics, specifically category theory, adjunction is a relationship that two functors may exhibit, intuitively corresponding to a weak form of equivalence between two related categories. Two functors that stand in this relationship are kno ...

s. For example, if $T$ is the forgetful functor In mathematics, in the area of category theory, a forgetful functor (also known as a stripping functor) 'forgets' or drops some or all of the input's structure or properties 'before' mapping to the output. For an algebraic structure of a given signa ...

mapping an abelian group
In mathematics, an abelian group, also called a commutative group, is a group in which the result of applying the group operation to two group elements does not depend on the order in which they are written. That is, the group operation is commut ...

to its underlying set
In mathematics, an algebraic structure consists of a nonempty set ''A'' (called the underlying set, carrier set or domain), a collection of operations on ''A'' (typically binary operations such as addition and multiplication), and a finite se ...

, and $s$ is some fixed set
Set, The Set, SET or SETS may refer to:
Science, technology, and mathematics Mathematics
*Set (mathematics), a collection of elements
*Category of sets, the category whose objects and morphisms are sets and total functions, respectively
Electro ...

(regarded as a functor from 1), then the comma category $(s\; \backslash downarrow\; T)$ has objects that are maps from $s$ to a set underlying a group. This relates to the left adjoint of $T$, which is the functor that maps a set to the free abelian group
In mathematics, a free abelian group is an abelian group with a basis. Being an abelian group means that it is a set with an addition operation that is associative, commutative, and invertible. A basis, also called an integral basis, is a subse ...

having that set as its basis. In particular, the initial object
In category theory, a branch of mathematics, an initial object of a category is an object in such that for every object in , there exists precisely one morphism .
The dual notion is that of a terminal object (also called terminal element): ...

of $(s\; \backslash downarrow\; T)$ is the canonical injection $s\backslash rightarrow\; T(G)$, where $G$ is the free group generated by $s$.
An object of $(s\; \backslash downarrow\; T)$ is called a ''morphism from $s$ to $T$'' or a ''$T$-structured arrow with domain $s$''. An object of $(S\; \backslash downarrow\; t)$ is called a ''morphism from $S$ to $t$'' or a ''$S$-costructured arrow with codomain $t$''.
Another special case occurs when both $S$ and $T$ are functors with domain $\backslash textbf$. If $S(*)=A$ and $T(*)=B$, then the comma category $(S\; \backslash downarrow\; T)$, written $(A\backslash downarrow\; B)$, is the discrete category In mathematics, in the field of category theory, a discrete category is a category whose only morphisms are the identity morphisms:
:hom''C''(''X'', ''X'') = {id''X''} for all objects ''X''
:hom''C''(''X'', ''Y'') = ∅ for all objects ''X'' ≠ ''Y ...

whose objects are morphisms from $A$ to $B$.
An inserter category In category theory, a branch of mathematics, the inserter category is a variation of the comma category where the two functors are required to have the same domain category.
Definition
If ''C'' and ''D'' are two categories and ''F'' and ''G'' ar ...

is a (non-full) subcategory of the comma category where $\backslash mathcal\; =\; \backslash mathcal$ and $f\; =\; g$ are required. The comma category can also be seen as the inserter of $S\; \backslash circ\; \backslash pi\_1$ and $T\; \backslash circ\; \backslash pi\_2$, where $\backslash pi\_1$ and $\backslash pi\_2$ are the two projection functors out of the product category
In the mathematical field of category theory, the product of two categories ''C'' and ''D'', denoted and called a product category, is an extension of the concept of the Cartesian product of two sets. Product categories are used to define bifun ...

$\backslash mathcal\; \backslash times\; \backslash mathcal$.
Properties

For each comma category there are forgetful functors from it. * Domain functor, $S\backslash downarrow\; T\; \backslash to\; \backslash mathcal\; A$, which maps: ** objects: $(A,\; B,\; h)\backslash mapsto\; A$; ** morphisms: $(f,\; g)\backslash mapsto\; f$; * Codomain functor, $S\backslash downarrow\; T\; \backslash to\; \backslash mathcal\; B$, which maps: ** objects: $(A,\; B,\; h)\backslash mapsto\; B$; ** morphisms: $(f,\; g)\backslash mapsto\; g$. * Arrow functor, $S\backslash downarrow\; T\backslash to\; ^$, which maps: ** objects: $(A,\; B,\; h)\backslash mapsto\; h$; ** morphisms: $(f,\; g)\backslash mapsto\; (Sf,Tg)$;Examples of use

Some notable categories

Several interesting categories have a natural definition in terms of comma categories. * The category ofpointed set
In mathematics, a pointed set (also based set or rooted set) is an ordered pair (X, x_0) where X is a set and x_0 is an element of X called the base point, also spelled basepoint.
Maps between pointed sets (X, x_0) and (Y, y_0) – called based ma ...

s is a comma category, $\backslash scriptstyle$ with $\backslash scriptstyle$ being (a functor selecting) any singleton set
In mathematics, a singleton, also known as a unit set or one-point set, is a set with exactly one element. For example, the set \ is a singleton whose single element is 0.
Properties
Within the framework of Zermelo–Fraenkel set theory, the ...

, and $\backslash scriptstyle$ (the identity functor of) the category of sets
In the mathematical field of category theory, the category of sets, denoted as Set, is the category whose objects are sets. The arrows or morphisms between sets ''A'' and ''B'' are the total functions from ''A'' to ''B'', and the composition of m ...

. 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 space
In mathematics, a pointed space or based space is a topological space with a distinguished point, the basepoint. The distinguished point is just simply one particular point, picked out from the space, and given a name, such as x_0, that remains u ...

s $\backslash scriptstyle$.
*The category of associative algebras over a ring $R$ is the coslice category $\backslash scriptstyle$, since any ring homomorphism $f:\; R\; \backslash to\; S$ induces an associative $R$-algebra structure on $S$, and vice versa. Morphisms are then maps $h:\; S\; \backslash to\; T$ that make the diagram commute.
* The category of graphs
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discre ...

is $\backslash scriptstyle$, with $\backslash scriptstyle$ the functor taking a set $s$ to $s\; \backslash 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\; \backslash rightarrow\; (b\; \backslash times\; b)$ chooses pairs of elements of $b$ for each input from $a$. That is, $f$ picks out certain edges from the set $b\; \backslash 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)\; \backslash rightarrow\; (a\text{'},\; b\text{'},\; f\text{'})$ must satisfy $f\text{'}\; \backslash circ\; g\; =\; D(h)\; \backslash 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\; \backslash 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,\; \backslash pi\_B)$, where $B$ is a graph and $\backslash 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
In category theory, a category is Cartesian closed if, roughly speaking, any morphism defined on a product of two objects can be naturally identified with a morphism defined on one of the factors. These categories are particularly important in math ...

(see above for the notion of ''slice''). Locally cartesian closed categories are the classifying categories of dependent type theories.
Limits and universal morphisms

Limits
Limit or Limits may refer to:
Arts and media
* ''Limit'' (manga), a manga by Keiko Suenobu
* ''Limit'' (film), a South Korean film
* Limit (music), a way to characterize harmony
* "Limit" (song), a 2016 single by Luna Sea
* "Limits", a 2019 ...

and colimits
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 su ...

in comma categories may be "inherited". If $\backslash mathcal$ and $\backslash mathcal$ are complete
Complete may refer to:
Logic
* Completeness (logic)
* Completeness of a theory, the property of a theory that every formula in the theory's language or its negation is provable
Mathematics
* The completeness of the real numbers, which implies t ...

, $T\; :\; \backslash mathcal\; \backslash rightarrow\; \backslash mathcal$ is a continuous functor, and $S\; \backslash colon\; \backslash mathcal\; \backslash rightarrow\; \backslash mathcal$ is another functor (not necessarily continuous), then the comma category $(S\; \backslash downarrow\; T)$ produced is complete, and the projection functors $(S\backslash downarrow\; T)\; \backslash rightarrow\; \backslash mathcal$ and $(S\backslash downarrow\; T)\; \backslash rightarrow\; \backslash mathcal$ are continuous. Similarly, if $\backslash mathcal$ and $\backslash mathcal$ are cocomplete, and $S\; :\; \backslash mathcal\; \backslash rightarrow\; \backslash mathcal$ is cocontinuous, then $(S\; \backslash 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
In mathematics, more specifically in category theory, a universal property is a property that characterizes up to an isomorphism the result of some constructions. Thus, universal properties can be used for defining some objects independently fro ...

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
In category theory, a branch of mathematics, an initial object of a category is an object in such that for every object in , there exists precisely one morphism .
The dual notion is that of a terminal object (also called terminal element): ...

; 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 $\backslash mathcal$ be a category with $F\; :\; \backslash mathcal\; \backslash rightarrow\; \backslash mathcal\; \backslash times\; \backslash mathcal$ 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 $\backslash rho\; :\; (a,\; b)\; \backslash rightarrow\; (c,\; c)$ with the universal property that for any morphism $\backslash rho\text{'}\; :\; (a,\; b)\; \backslash rightarrow\; (d,\; d)$ there is a unique morphism $\backslash sigma\; :\; c\; \backslash rightarrow\; d$ with $F(\backslash sigma)\; \backslash circ\; \backslash rho\; =\; \backslash rho\text{'}$. In other words, it is an object in the comma category $((a,\; b)\; \backslash downarrow\; F)$ having a morphism to any other object in that category; it is initial. This serves to define the coproduct
In category theory, the coproduct, or categorical sum, is a construction which includes as examples the disjoint union of sets and of topological spaces, the free product of groups, and the direct sum of modules and vector spaces. The coprodu ...

in $\backslash mathcal$, when it exists.
Adjunctions

Lawvere showed that the functors $F\; :\; \backslash mathcal\; \backslash rightarrow\; \backslash mathcal$ and $G\; :\; \backslash mathcal\; \backslash rightarrow\; \backslash mathcal$ areadjoint
In mathematics, the term ''adjoint'' applies in several situations. Several of these share a similar formalism: if ''A'' is adjoint to ''B'', then there is typically some formula of the type
:(''Ax'', ''y'') = (''x'', ''By'').
Specifically, adjoin ...

if and only if the comma categories $(F\; \backslash downarrow\; id\_\backslash mathcal)$ and $(id\_\backslash mathcal\; \backslash downarrow\; G)$, with $id\_\backslash mathcal$ and $id\_\backslash mathcal$ the identity functors on $\backslash mathcal$ and $\backslash mathcal$ respectively, are isomorphic, and equivalent elements in the comma category can be projected onto the same element of $\backslash mathcal\; \backslash times\; \backslash mathcal$. 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\backslash downarrow\; T$ with $A=B,\; A\text{'}=B\text{'},\; f=g$ is identical to the diagram which defines anatural transformation
In category theory, a branch of mathematics, a natural transformation provides a way of transforming one functor into another while respecting the internal structure (i.e., the composition of morphisms) of the categories involved. Hence, a natur ...

$S\backslash 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)\backslash 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 $\backslash eta:S\backslash to\; T$, with $S,\; T:\backslash mathcal\; A\; \backslash to\; \backslash mathcal\; C$, corresponds to a functor $\backslash mathcal\; A\; \backslash to\; (S\backslash downarrow\; T)$ which maps each object $A$ to $(A,\; A,\; \backslash eta\_A)$ and maps each morphism $f=g$ to $(f,\; g)$. This is a bijective
In mathematics, a bijection, also known as a bijective function, one-to-one correspondence, or invertible function, is a function between the elements of two sets, where each element of one set is paired with exactly one element of the other s ...

correspondence between natural transformations $S\backslash to\; T$ and functors $\backslash mathcal\; A\; \backslash to\; (S\backslash downarrow\; T)$ which are sections
Section, Sectioning or Sectioned may refer to:
Arts, entertainment and media
* Section (music), a complete, but not independent, musical idea
* Section (typography), a subdivision, especially of a chapter, in books and documents
** Section sig ...

of both forgetful functors from $S\backslash downarrow\; T$.
References

External links

* J. Adamek, H. Herrlich, G. SteckerAbstract and Concrete Categories-The Joy of Cats

WildCats

is a category theory package for

Mathematica
Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow machine learning, statistics, symbolic computation, data manipulation, network analysis, time series analysis, NLP, optimizat ...

. Manipulation and visualization of objects, morphism
In mathematics, particularly in category theory, a morphism is a structure-preserving map from one mathematical structure to another one of the same type. The notion of morphism recurs in much of contemporary mathematics. In set theory, morphisms a ...

s, categories, functor
In mathematics, specifically category theory, a functor is a Map (mathematics), mapping between Category (mathematics), categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) ar ...

s, natural transformation
In category theory, a branch of mathematics, a natural transformation provides a way of transforming one functor into another while respecting the internal structure (i.e., the composition of morphisms) of the categories involved. Hence, a natur ...

s, universal properties.Interactive Web page

which generates examples of categorical constructions in the category of finite sets. {{DEFAULTSORT:Comma Category Categories in category theory