The three styles of category theory

Introduction

Arguably (1-)category theory is the study of universal properties. There are three standard formulations of the notion of universal property which are all equivalent. Most introductions to category theory will cover all three and how they relate. By systematically preferring one formulation above the others, three styles of doing category theory arise with distinctive constructions and proof styles.

I noticed this trichotomy many years ago, but I haven’t heard anyone explicitly identify and compare these styles. Furthermore, in my opinion, one of these styles, the one I call Set-category theory, is significantly easier to use than the others, but seems poorly represented in introductions to category theory.

For myself, it wasn’t until I read Basic Concepts of Enriched Category Theory by G. M. Kelly and was introduced to indexed (co)limits (aka weighted (co)limits), that I began to recognize and appreciate Set-category theory. Indexed (co)limits are virtually absent from category theory introductions, and the closely related notion of (co)ends are also very weakly represented despite being far more useful than (conical) (co)limits. I don’t know why this is. Below I’ll be more focused on comparing the styles than illustrating the usefulness of indexed (co)limits. I may write an article about that in the future; in the mean time you can read “Basic Concepts of Enriched Category Theory” and just ignore the enriched aspect. Admittedly, it is definitely not an introduction to category theory.

Universality

What follows are three equivalent formulations of the notion of universal property including proofs of equivalence.

Initiality

Initiality is by far the simplest formulation of universal properties to understand because it is a very special case, albeit a special case that can be finagled to cover the general case.

An object, typically denoted #0#, is initial iff for every object in the category there exists a unique arrow from #0#. If #A# is an object in the category, we can write #(:A:) : 0 -> A# for the unique arrow.

Representability

Representability isn’t as simple or intuitive as initiality, but it is still pretty simple.

A functor #F : ccC^(op) -> bb "Set"# is representable iff #F ~= "Hom"(-,Y)# for some #Y#. Note that this is an isomorphism between functors, i.e. a natural isomorphism. We say #Y# represents the functor #F#. A functor #G : ccC -> bb "Set"# is co-representable iff #G ~= "Hom"(X,-)# for some #X#. Similarly we say #X# (co-)represents the functor #G#. Representable and co-representable aren’t actually different; if we set #ccD = ccC^(op)# then we could say #F# is co-representable as a functor from #ccD# and it would mean the same thing.

Now we need to prove initiality and (co-)representability equivalent. One direction is easy, #0# co-represents the functor #lambda C . {**}#.1 It’s easy to show that this says exactly that #0# is initial.

I’ll hold off on the other direction and instead prove the circular implication: Representability #=>quad# Initiality #=>quad# Universal Arrow #=>quad# Representability. Right now we’ve done the first step; we can recast initiality as representability. Next we’ll show that we can recast universal arrows as initiality and representability as a universal arrow and we’ll have shown them all equivalent.

Universal arrow

Let #U : ccC -> ccD# be a functor. #eta : A -> UX# is a universal arrow iff for all #f : A -> UY# there exists a unique arrow #(:f:) : X -> Y# such that #f = U(:f:) @ eta#. Dually, let #F : ccC -> ccD# be a functor, then #epsilon : FX -> A# is a co-universal arrow iff for all #g : FY -> A# there exists a unique arrow #(:g:) : Y -> X# such that #g = epsilon @ F(:g:)#. Again, these are equivalent notions. A co-universal arrow is just a universal arrow in the opposite category.

Now to prove Initiality #=>quad# Universal Arrow. Consider the (comma) category whose objects are pairs #(f, Y)# where #f : A -> UY# and whose arrows #k : (f, Y) -> (g, Z)# are arrows #k : Y -> Z# such that #g = Uk @ f#. #eta# is a universal arrow iff #(eta, X)# is initial in this category. This is easy to check.

Finally, Universal Arrow #=>quad# Representability. Let #G : ccC -> bb "Set"#. The claim is there exists a universal arrow #eta : {**} -> GX# iff #X# co-represents #G#. Doing the backwards direction first, if #X# co-represents #G# then there is an element of #GX# that corresponds to #id : X -> X#. Have #eta# pick out that element. Given another element #y : {**} -> GY# we need to find a unique arrow #(:y:) : X -> Y# such that #G(:y:)(eta) = y#. Naturality of the isomorphism making #X# co-represent #G# says: #f @ phi_A(a) = phi_B(Gf(a))# where #phi : G ~= "Hom"(X,-)#, #f : A -> B#, and #a in GA#. Applying #phi_Y# to both sides of the earlier equation and using #phi_X(eta) = id# we get: #(:y:) = phi_Y(y)# showing that #(:y:)# exists and is unique and thus #eta# is a universal arrow.

Next we need to show that #eta : {**} -> GX# being a universal arrow implies that #X# co-represents #G#. We immediately have a parameterized bijection namely #(: - :)_Y : GY ~= "Hom"(X,Y)#. All we need to do is show that it is natural in #Y# which is to say #f @ (:a:)_A = (:Gf(a):)_B# where #f : A -> B#. We have #Gf(a) = Gf(G(:a:)(eta)) = (Gf @ G(:a:))(eta) = G(f @ (:a:))(eta)#. Using #f = (:Gf(eta):)_B# which is a consequence of #eta# being universal, we get #(:Gf(a):)_B = f @ (:a:)_A# as desired.

Initiality

In the initiality style of doing category theory, the main exercise is defining an appropriate category. This is pretty difficult from both a creativity perspective and a notational perspective. Once an appropriate category is defined, though, the proofs are typically not too hard. Perhaps the main tool is the comma category as that allows the compact and flexible specification of many categories, though it can often take a touch of creativity to recognize a category as a comma category. Technically, the proof above implies that for any universal property there’s an appropriate comma category in which the universal object is the initial object.

This style is often seen in introductions to category theory. If you’ve ever read about categories of (co)cones or wedges, then you’ve seen an example of this style with an ad-hoc definition of the relevant categories. In practice, the categories needed to characterize a specific universal property are of little interest on their own so the effort spent defining them isn’t repaid. The main exception is the category of #F#-algebras for some functor #F#. (Incidentally, the category of #F#-algebras is a subcategory of a comma category.)

The style of proof is to leverage the uniqueness of the mediating morphism to equate two seemingly different things. Lambek’s lemma is an excellent illustration of this proof style.

Set-category theory

The core of this style of category theory is representability and its parameterized variant. Representability alone is already very powerful and ergonomic. Every limit or colimit in a category represents a limit of homsets. This means all the tools and intuitions of set theory are available. This is the basis for my naming of this style: we elucidate the structure of a category by relating it to the structure of the category of sets.

The main tools of this style are (co)ends, indexed (co)limits, and adjunctions in the form #"Hom"(FA,B) ~= "Hom"(A,UB)#. In particular, the intimate connection between ends/indexed limits and sets of natural transformations significantly eases moving up and down functor categories.

By far the best part of this approach is the style of proof. By leveraging continuity properties, characterizations in terms of (parameterized) representability, some general isomorphisms, and occasionally some hand-crafted isomorphisms, nearly any categorical theorem can be proven in a dozen or less isomorphisms. The presentation looks and feels very much like solving an algebraic equation. The proofs are easy to read and easy to write.

The main drawback of this style is that most of the properties above weaken and some disappear when working in enriched or higher categories.

Cat-category theory

Arguably, this style should be based on universal arrows. While it technically is, in practice, it’s rare that one talks about universal arrows and instead the parameterized version, namely adjunctions in their unit/counit formulation are the main tool. After adjunctions would be Kan extensions. All of these are concepts that live naturally at the level of 2-categories which makes them much easier to generalize.

The main style of proof is diagram chasing, i.e. proving typically several equalities. On the one hand, proving an equation is straight-forward equational reasoning; on the other hand, there tend to be several equations that need to be proven at a time, they tend to be fine-grained and thus detailed and tedious, and often general results don’t obviously apply. The solution to most of these problems is to use string diagrams instead. Many of the bureaucratic details completely disappear and the proofs become crystal clear. A wonderful example of this style of proof is proving that an adjunction gives rise to a monad. With normal diagram chasing it’s mildly tedious. With string diagrams it proves itself.

One issue that comes up in this style is the elegant definitions tend to be wholesale. For example, there’s a nice adjunction that characterizes all limits of any given shape. Unfortunately, the adjunction only exists if all the limits of that shape exists. If they don’t all exist, then you need to use some other method to talk about the limits that do exist. Technically, universal arrows could handle this, but usually representability is used instead.

Conclusion

Ultimately, one should become familiar with all these approaches. There are definitely problems that fit nicer in some than others. However, when it comes to universal properties the Set-category theory wins hands down. Cat-category theory tends to be more useful when working with structures that aren’t characterized by a universal property such as monoidal structure. Initiality has its niche with initial algebras. I don’t have any ideas on where it might also be a profitable perspective. In fact, I’m not completely sure it’s a good thing that we think about initial algebras as initial algebras. There are interesting interactions between initial algebras and adjunctions for example and it’s not clear to me that they wouldn’t be more accessible with a different presentation of initial algebras.

Texts illustrating these approaches


  1. #{**}# is just some singleton set.