Kan extensions

The notion of Kan extensions subsumes all the other fundamental concepts in category theory.

Motivation


Suppose T:MA and K:MC are two functors from a common domain, suggestively diagrammed below[1]:

We are interested in functors S:CA that "extend" the functor T:MA "along" the functor K:MC.

For example, if the functor K:MC is fully faithful (i.e., is the categorical version of an inclusion), then for any functor S:CA we can view the composition SK:MA as the "restriction" of S to M. In this case, we might hope for the existence of a functor S:CA that literally extends the functor T, in the sense that T=SK.

In general, the best we can do is the following: for each functor S:CA, we can "compare" the composition SK with the functor T by looking at the set of natural transformations between the two. More specifically, we consider either the set of natural transformations HomAM(SK,T), or dually the set of natural transformations HomAM(T,SK). For now, let's focus on the latter.

Our first claim is that the map SHomAM(T,SK) is the object function of a functor F:ACSet. What is the arrow function? Suppose α:S1S2 is an arrow in AC, i.e., a natural transformation between functors S1,S2:CA. Let IK:KK be the identity natural transformation on the functor K:MC. "Horizontal" composition of the natural transformations IK and α then gives a natural transformation αIK:(S1K)(S2K). We can visualize this horizontal composition as so:

More concretely, the components of this natural transformation are given by (αIK)m=αK(m). In other words, they are simply the components of the natural transformation α "restricted" to the objects in the image of K.

We can now use "vertical" composition with the natural transformation αIK to define a set map

F(α):HomAM(T,S1K)HomAM(T,S2K),

namely by mapping each natural transformation β:T(S1K) to the (vertical) composition (αIK)β:T(S2K).

In other words,

F(α)=(αIK)

You can now verify that we have indeed defined a functor F:ACSet. We can interpret this functor as an exhaustive analysis of every possible functor S:CA as a candidate for "extending" the original functor T:MA "along" the functor K:MC.

Definition of Kan extension


Definition of left Kan extension

Suppose the functor F:ACSet described above is representable, i.e., there exists an object LAC together with a natural isomorphism τ:HomAC(L,)F.

By Yoneda's Lemma, the object L is then unique up to unique isomorphism. It is called the left Kan extension of T along K, and is denoted LanK(T) (or sometimes simply KT).

Let's unpack this definition a bit. In view of the definition of the functor F:ACSet, the defining property of the functor LK(T):CA is that we have natural bijections

τS:HomAC(LanK(T),S)HomAM(T,SK).

The reason the functor LanK(T) is called the left Kan extension is because it occurs on the left-hand side of its hom-set in the above bijection. As you might expect, the right Kan extension (when it exists) is a functor RanK(T):CA such that there are natural bijections

ηS:HomAC(S,RanK(T))HomAM(SK,T).

In both cases, the above bijections should look very similar to adjoint relationships, and indeed we'll see that: 1) adjoints are a special case of Kan extensions; and 2) if the left Kan extension along K of every functor T exists, then we do indeed have a functor LanK():AMAC that is left adjoint to the "restriction" functor K:ACAM (and similarly for the right Kan extension).

Local versus Global

The definition given above is sometimes called a local Kan extension, while the functor LanK:ACAM that is left adjoint to the restriction functor K:ACAM is called the global Kan extension.

Examples of Kan extensions


Starting with a category C and nothing else

Suppose C is any category. In general, there are only three functors to/from C that are guaranteed to exist:

We can now consider every possible Kan extension that involves one (or more) of these three functors. Many choices lead to "trivial" extensions, but some lead to interesting conclusions. For example, consider the situation below:

Let's first suppose the left Kan extension of the initial functor iC:0C along the (unique, empty) functor z:01 exists, and denote it L:1C. Recall that we have an equivalence C1C, where each functor 1C corresponds to an object cC (namely, the image of the unique object in 1). So, given any functor S:1C we can let sC denote the corresponding object. The left Kan extension L:1C then corresponds to an object lC, characterized by the existence of natural bijections

τS:HomC1(L,S)HomC0(tC,SK).

Under the equivalence C1C, the set on the left is bijective to the set HomC(l,s). Similarly, under the equivalence C01, the set on the right is simply a singleton set. (The composition SK:0C must always equal the unique functor tC, and the only natural transformation from the functor tC to itself is the identity (empty) natural transformation.)

So, for every object sC the set HomC(l,s) is a singleton set. In other words, for every object sC there is a unique arrow lc. This exactly says that l is an initial object in C.

One can fairly easily show that the converse is true, namely that if C has an initial object then the left Kan extension of iC:0C along z:01 exists (and is the functor L:1C corresponding to that initial object). Thus, we have the following:

Initial objects as left Kan extensions

A category C has an initial object if and only if the left Kan extension of iC:0C along z:01 exists.

Dually, a similar argument proves:

Terminal objects as right Kan extensions

A category C has a terminal object if and only if the right Kan extension of iC:0C along z:01 exists.


Somewhat curiously, we can also realize initial objects as right Kan extensions. In this case, we begin from the diagram

One can then show the following:

Initial objects as right Kan extensions

A category C has an initial object if and only if the right Kan extension of the identity functor IC:CC along the terminal functor tC:C1 exists.

The proof of the above statement is slightly less straightforward than the previous argument, but is not terribly difficult (and also follows as a special case of the next type of example). And analogously, we have the dual result:

Terminal objects as left Kan extensions

A category C has a terminal object if and only if the left Kan extension of the identity functor IC:CC along the terminal functor tC:C1 exists.

In any case, out of all of the possible "extension diagrams" we can consider for a general category C, these are the only two that lead to interesting outcomes, namely those that characterize the initial and terminal objects in C.

Starting with a functor F:CD and nothing else

Suppose now F:CD is a given functor. Following the ideas of the previous set of examples, we can consider all "extension diagrams" that involve this functor. Once again, without knowing anything more about the categories C and D, there aren't very many ways to complete an "extension diagram" where one "leg" is the given functor F:CD. And out of those limited possibilities, there are only two that lead to interesting extensions.

For the first, consider the following diagram:

Suppose the left Kan extension of F along tC exists. It is then a functor L:1D together with a natural isomorphism

τS:HomD1(L,S)HomDC(F,StC).

Once again, the functors L and S correspond to objects l and s in D, and the set on the left is canonically identified with the set of arrows ls. As for the set on the right, the functor StC sends every object cC to the object sD, so a natural transformation FStC is exactly a "cone" from F to s. The above natural bijection is then exactly the condition for the object l (together with the natural isomorphism τ) to be the colimit of the functor F. Indeed, the image under τL of the identity arrow ll gives the cone from F to l through which all other cones uniquely factor.

It's not hard to prove that the converse is also true, and so we have the following:

Colimits as left Kan extensions

The left Kan extension of a functor F:CD along the terminal functor tC:C1 gives a colimit of F, and conversely.

Dually, we also have the following result:

Limits as right Kan extensions

The right Kan extension of a functor F:CD along the terminal functor tC:C1 gives a limit of F, and conversely.


As for the other interesting diagram, now consider the following situation:

Suppose a left Kan extension of IC along F exists, and let G=LanF(IC):DC denote this functor. This functor comes endowed with a natural isomorphism

τS:HomCD(G,S)HomCC(IC,SF).

Consider the special case of the component map when S=G. This is a natural bijection

τG:HomCD(G,G)HomCC(IC,GF).

Under this bijection, the identity natural transformation on G corresponds to a specific natural transformation τ:ICGF.

This situation should feel suspiciously similar. It looks like  might be some type of adjoint functor! Indeed, one can prove the following:

Adjoints as Kan extensions

A left (respectively, right) Kan extension of the identity functor  along the functor  is exactly a functor  that is right (respectively, left) adjoint to .

Left versus right

There is not a typo in the above result. The left Kan extension corresponds to a right adjoint, and a right Kan extension corresponds to a left adjoint. Definitely inconvenient for human memory!

If you're interested in the details of this proof (and a lot more about Kan extensions), definitely check out Chapter X in Mac Lane's Categories for the Working Mathematician.

Suggested next note


Ab-categories
Additive categories
Abelian categories


  1. Here I'm using the exact notation Mac Lane uses in Categories for the Working Mathematician, in case you want to reference his exposition. ↩︎