Universal Properties and Basic Constructions/Opposite, Product, Slice, and Comma Categories

Lesson 2.32,009 words

Opposite, Product, Slice, and Comma Categories

Categories are themselves mathematical structures, and the standard algebraic constructions apply: opposites, products, subcategories, slices, and the comma category that subsumes them. The opposite category yields the duality principle, halving the subject's proofs; slice and comma categories repackage every universal property as an initial or terminal object.

╌╌╌╌

A category is itself an algebraic structure — a two-sorted one, with objects and arrows subject to composition laws — so the standard moves of algebra apply to categories themselves: substructures, products, a formal dual, and quotient-like constructions.1 The opposite category turns the left/right symmetry between products and coproducts into the duality principle: every theorem yields a dual theorem with no further proof. The comma category gives universal properties a normal form: every for all , there exists a unique arrow statement becomes the assertion that a certain auxiliary category has an initial or terminal object.

The opposite category

Identities are unchanged, and the category axioms for follow directly from those for ; also .2

A composable pair and its composite in a category (left), and the same three arrows in the opposite category (right): objects unchanged, every arrow reversed, the composite of after becoming the composite of after .

Nothing is constructed here in any material sense — the arrows of are the arrows of , relabelled. In , a function counts as an arrow , and it is not a function from to ; it is a formal reversal and nothing more.3 Still, the opposite of a familiar category is sometimes equivalent to another familiar category (finite Boolean algebras and finite sets, for one), and such concrete dualities are theorems, not formalities.

Monoids and posets carry the reversal concretely.

  • Monoids. A monoid seen as a one-object category has opposite the category of the monoid , with multiplication read in reverse order: . A commutative monoid is its own opposite.
  • Posets. The opposite of the category of a poset is the category of — the same set under the reversed order, e.g. .

The duality principle

Every categorical concept has a dual: the concept obtained by interpreting the definition in the opposite category. The pairs assembled so far:4

Concept in Same data, read in
monomorphismepimorphism
section (split mono)retraction (split epi)
initial objectterminal object
product, projectionscoproduct, injections
equalizercoequalizer
pullbackpushout
limitcolimit

The principle: a theorem proved for all categories is also a theorem about all opposite categories — which is again all categories — so its dual is a theorem too, with no further proof. For example, having shown that any two initial objects are uniquely isomorphic, the corresponding statement for terminal objects is immediate: a terminal object of is an initial object of , and the isomorphism produced there is an isomorphism in (isomorphisms are self-dual). The same stroke disposes of the coproduct half of every product proof. Simmons' accounting: six pairs of gadgets, half the work.5

Duality also explains the systematic naming: sometimes the dual concept takes a co- prefix (limit/colimit, equalizer/coequalizer, cone/cocone), sometimes left/right (adjoints), and sometimes the names are irregular (initial/terminal, pullback/pushout, mono/epi).

Product categories

This is the direct product of algebra transplanted to categories, and it is the categorical product in the (large) category of categories and functors. The same caution as for opposites applies: an arrow of is an ordered pair of functions, not a function of pairs.6 The construction's main employment is bookkeeping for multivariable functors: the hom-functor of a locally small category is a functor

contravariant in its first variable and covariant in its second — the opposite and the product working together, and the setting for representables.

Subcategories

Examples calibrate the two adjectives:7

  • (finite sets, all functions) is a full subcategory of : restricting the objects loses no arrows between the survivors.
  • is a wide subcategory of (sets and partial functions): same objects, fewer arrows.
  • inside the category of semigroups is neither: fewer objects (only monoids) and fewer arrows (only identity-preserving homomorphisms).
  • is a full subcategory of : a homomorphism between abelian groups is just a homomorphism.

Requiring identities explicitly is not redundant — a subcollection can be closed under composition and contain, for a chosen object, an idempotent arrow acting as a local unit without containing the actual identity.

Slice categories

The next construction has no exact analogue in classical algebra; it changes the objects rather than trimming or pairing them.

An object of is an object of equipped with a map to , and an arrow is a map of that respects the equipment — a commuting triangle over . That composition works requires a one-line check: if and then .8

An arrow of the slice category over : a commuting triangle. The objects are themselves arrows and into ; the slice arrow is an arrow upstairs with after equal to .

One notational hazard: the underlying arrow does not determine the slice arrow. The same can satisfy and for different pairs, giving distinct arrows and of with the same underlying map.

Dually, the coslice has as objects the arrows out of and as arrows the commuting triangles under .

Slices as indexed families

Slice categories over package indexing. An -indexed set is a set with a function ; the fiber collects the elements of type , so the single function carries the same information as the family . A typed function between -indexed sets is one preserving types — exactly a commuting triangle over . So is the category of -indexed families of sets.9 For example, a graph's objects-and-arrows set typed by is an object of . Slices are the categorical setting for dependent types and for families of structures varying over a base; slices of presheaf categories recur in the study of presheaves.

An object of the slice over is a set sorted by into two fibers, the elements over and the elements over ; a slice arrow preserves the fiber of each element.

Comma categories

The comma category subsumes slices, coslices, and more: it is the general category of arrows from one functor to another.

The arrow condition is a commuting square in :10

An arrow of the comma category: a pair of arrows, one from each leg, whose images in the common codomain category close a commuting square between the two comma objects and .

Special cases recover the constructions above. Recall that a functor from the one-object, one-arrow category into is just a choice of object of .

  • Slice. Take (written ) and the object . An object of is a pair — the third component lives in and carries no information — and the squares degenerate to triangles over . So , and dually .11
  • Arrow category. Take : objects are all arrows of , morphisms are all commuting squares.
  • Arrows from an object to a functor. For a functor and an object , the comma category has objects the pairs and arrows the maps with . This case underlies the universal-arrow description of adjoints below.

Universal properties as initial objects

The comma category restates any universal property as initiality. Consider the free vector space on a set , with its insertion of basis vectors , where is the underlying-set functor. Its universal property says: for every vector space and function , there is a unique linear map with .

Now read that sentence inside the comma category , whose objects are pairs — sets mapping into the underlying set of some vector space. The pair is one such object, and the universal property says exactly that from it there is a unique arrow to every object : the arrow condition is the comma category's commuting triangle, and existence-plus-uniqueness of is initiality.12

The pattern is fully general. Any universal property of the form for every object equipped with an arrow of a certain type, a unique compatible factorization exists asserts that a specified object is initial (or, for the dual shape, terminal) in a suitable comma category:

Universal objectComma categoryPosition
terminal object of itselfterminal
product cone on wedges to the pairterminal
coproduct cocone on wedges from the pairinitial
free object over initial
discrete space over initial

Two facts follow immediately from this normal form.

  • One uniqueness theorem. Any two initial objects are uniquely isomorphic — proved once by the round-trip argument — now yields the essential uniqueness of every universal construction, because each is an initial or terminal object somewhere.
  • A definition of universal arrow. An initial object of is called a universal arrow from to . A functor admitting one for every is precisely a functor with a left adjoint, and the comma-category formulation is how the adjoint functor theorem manufactures adjoints.

The catalogue

ConstructionObjectsArrowsAlgebra analogue
subcategory some of 'ssome of 'ssubstructure
product pairspairs, componentwisedirect product
opposite samereversedopposite monoid/ring
slice arrows into triangles over (none exact)
coslice arrows out of triangles under (none exact)
comma arrows commuting squares(subsumes the two above)

Hom-functors built from these constructions give the representables, and the Yoneda lemma converts statements about objects into statements about the presheaves they represent. The opposite category and the product category are both built into the type of the hom-functor .

Footnotes

  1. Barr & Wells, Category Theory for Computing Science, §2.6 — constructions on categories: subcategories, products, duals, slices, free categories, presented as the categorical counterparts of the constructions of abstract algebra.
  2. Barr & Wells, §2.6.7 — the dual category, conditions D-1 through D-3; §2.6.8 — opposite monoids and posets.
  3. Barr & Wells, §2.6.9 — arrows of product and opposite categories are formal pairs and formal reversals, not functions; the vowel-classifier example.
  4. Simmons, An Introduction to Category Theory, §2.8 — monic/epic and initial/final exchanged by the opposite category; each gadget of Ch. 2 is dual to its partner.
  5. Simmons, §2.8 — by using the opposite category we can make precise this left-right symmetry, and halve the work; only one side of each uniqueness proof was carried out in §§2.2–2.7.
  6. Barr & Wells, §2.6.6 — the product of categories; §2.6.9 — its arrows are mere ordered pairs; the product of categories is the product in (§5.1, Exercise).
  7. Barr & Wells, §2.6.1–2.6.5 — subcategories, full and wide, with and monoids-in-semigroups as the calibrating examples.
  8. Barr & Wells, §2.6.10 — slice categories SC-1 through SC-3, with the associativity verification and the warning that a slice arrow is not determined by its underlying arrow.
  9. Barr & Wells, §2.6.11–2.6.13 — -indexed sets, typed sets, and typed functions; as the category of indexed families; the graph example.
  10. Leinster, Basic Category Theory, Definition 2.3.1 — the comma category , objects as triples and arrows as commuting squares.
  11. Leinster, Example 2.3.3 — slice and coslice categories as comma categories over the identity and a constant functor.
  12. Leinster, §2.3, Example 2.3.4 and the discussion of diagram (2.7) — the free vector space's universal property restated as initiality in the comma category , the route to adjunctions via initial objects.

╌╌ END ╌╌