1.5Categories
Chapter (PDF)A category consists of:
A class of objects of the category.
For every , a set of morphisms between objects, with the following properties:
Identity. For every , there exists a morphism , called the identity on .
Composition. For any , there is a composition operation: morphisms and determine a morphism .
Associativity. For any , morphisms , , compose associatively. That is, .
Unitality. For any and any morphism , we have that and .
We can define a category , whose objects are all possible sets and whose morphisms are functions mapping one set to another.
From here, we provide examples of common categories.
Suppose is a set with an relation that is reflexive and transitive. This determines a category whose objects are the elements of and whose morphisms are such that whenever , if and otherwise. We verify the axioms as follows:
Identity. Note, for any , and so .
Composition. Suppose and for some . Then note and , so by transitivity, , meaning the morphisms determine the morphism .
Associativity. This follows from the transitivity of .
Unitality. This follows trivially from how composition is defined.
Many important categories fall out of this exam. For a trivial one, consider any set and as its relation (which is actually an equivalence relation!). As such, all the morphisms are identity morphisms—such a category is called discrete.
Branching off from previous discussion, we can endow with the relation ( iff. ). This induces a category whose objects are integers and whose morphisms are connections for every .
We can create more abstract—and consequently more powerful—categories: one such example is the slice category. Let be any category with . We can define a category as follows:
Objects. An object is a morphism for any . That is, the slice category comprises all the morphisms going to for its objects.
Morphisms. Suppose such that and for . Then a morphism is defined such that . Graphically, is a morphism in making the following triangle commute.
Verification of the category axioms is trivially shown by pulling back to , so they are omitted.
In a similar, yet opposite, sentiment, we define the coslice category. Let be any category with . We can define a category as follows:
Objects. An object is a morphism for any . That is, the coslice category comprises all the morphisms that map to some other object in the category.
Morphisms. Suppose such that and for . Then a morphism is defined such that . Graphically, is a morphism in making the following triangle commute.
Note the similarities between the coslice category and the slice category.
Consider the set endowed with the relation , and let be the category induced by this relation. Fix , and consider the slice category . Then the objects are morphisms for any . The morphisms are maps between two objects, so they take the form for .
Let and let be a fixed singleton . Then the objects of are precisely set-functions of form . Suppose and . Then a morphism is determined in the sense that .