## Categorification

Categorification is a big, scary word that refers to a much simpler basic idea than you’d expect, and it’s also *huge* business right now. There’s a lot of this going on at *The n-Category Café*, for instance. Both knot Floer homology and Khovanov homology are examples of categorifications that seem to be popular with the crew at the *Secret Blogging Seminar*. John Baez has a bunch of papers circling around “higher-dimensional algebra”, which is again about categorification.

So what is categorification? Well, as I said the core idea’s not really that hard to grasp, but it’s even easier to understand by first considering the reverse process: decategorification. And decategorification is best first approached through an example.

Since this post will be going to this fortnight’s Carnival, I’ll be saying a fair amount that I’ve said before and linking back to definitions most regular readers should know offhand. It might seem slower, but I’ll be back up to the regular rhetorical pace tomorrow. Or you could take it as a bit of review, just to make sure you’re on top of things. Because of this, the post is going to get long, so I’ll put it behind a jump.

Continue reading

## Representations and Universals and Colimits (oh, my!)

Let’s look at universal arrows a bit more closely. If we have a functor , an object , and a universal arrow , then we can take any arrow and form the composition . The universal condition says that to every arrow corresponds a unique so that . That is, there is a bijection for every .

It’s even better than that, though: these bijections commute with arrows in . That is, if we have then the naturality condition holds for all . This makes the into the components of a natural isomorphism . That is, a universal arrow from to is a representation of the functor .

Conversely, let’s say we have a representable functor , with representation . Yoneda’s lemma tells us that this natural transformation corresponds to a unique element of , which as usual we think of as an arrow . So a representation of a functor is a universal arrow in .

So, representations of functors are the same as universal arrows. Colimits are special kinds of universal arrows, and since a universal arrow is an initial object in an apropriate comma category it is a colimit. Representations are universals are colimits.

If we swap the category for the dual category , we change limits into colimits, couniversals into universals, and contravariant representations into covariant ones. All the reasoning above applies just as well to . Thus, we see that in representations of contravariant functors are couniversals are limits.

There’s actually yet *another* concept yet to work into this story, but I’m going to take a break from it to flesh out another area of category theory for a while.

## Universal arrows and universal elements

Remember that we defined a colimit as an initial object in the comma category , and a limit as a terminal object in the comma category . It turns out that initial and terminal objects in more general comma categories are also useful.

So, say we have a categories and , an object , and a functor , so we can set up the category . Recall that an object of this category consists of an object and an arrow , and a morphism from to is an arrow such that .

Now an initial object in this category is an object of and an arrow so that for any other arrow there is a unique arrow satisfying . We call such an object, when it exists, a “universal arrow from to “. For example, a colimit of a functor is a universal arrow (in ) from to .

Dually, a terminal object in consists of an object and an arrow so that for any other arrow there exists a unique arrow satisfying . We call this a “couniversal arrow from to “. A limit of a functor is a couniversal arrow from to .

Here’s another example of a universal arrow we’ve seen before: let’s say we have an integral domain and the forgetful functor from fields to integral domains. That is, takes a field and “forgets” that it’s a field, remembering only that it’s a ring with no zerodivisors. An object of consists of a field and a homomorphism of integral domains . The universal such arrow is the field of fractions of .

As a more theoretical example, we can consider a functor and the comma category . Since an arrow in is an element of the set , we call a universal arrow from to a “universal element” of . It consists of an object and an element so that for any other element we have a unique arrow with .

As an example, let’s take to be a normal subgroup of a group . For any group we can consider the set of group homomorphisms that send every element of to the identity element of . Verify for yourself that this gives a functor . Any such homomorphism factors through the projection , so the group and the projection constitute a universal element of . We used cosets of to show that such a universal element exists, but everything after that follows from the universal property.

Another example: let be a right module over a ring , and be a left -module. Now for any abelian group we can consider the set of all -middle-linear functions from to — functions which satisfy , , and . This gives a functor from to , and the universal element is the function to the tensor product.

The concept of a universal element is a special case of a universal arrow. Very interestingly, though, when is locally small (as it usually is for us)$ the reverse is true. Indeed, if we’re considering an object and a functor then we could instead consider the set and the functor . Universal arrows for the former setup are equivalent to universal elements in the latter.

## Taking limits is functorial

It turns out that in that happy situation where a category has -limits for some small category , the assignment of a limit to a functor is itself a functor from to . That is, given functors and from to and a natural transformation we get an arrow , and composition of natural transformations goes to composition of the limit arrows.

Since the proof of this is so similar to how we established limits in categories of functors, I’ll just refer you back to that and suggest this as practice with those techniques.

## Limits in functor categories

Today I want to give a great example of creation of limits that shows how useful it can be. For motivation, take a set , a monoid , and consider the set of functions from to . Then inherits a monoid structure from that on . Just define and take the function sending every element to the identity of as the identity of . We’re going to do the exact same thing in categories, but with having limits instead of a monoid structure.

As a preliminary result we need to note that if we have a set of categories for each of which has -limits, then the product category has -limits. Indeed, a functor from to the product consists of a list of functors from to each category , and each of these has a limiting cone. These clearly assemble into a limiting cone for the overall functor.

The special case we’re interested here is when all are the same category. Then the product category is equivalent to the functor category , where we consider as a discrete category. If has -limits, then so does for any set .

Now, any small category has a discrete subcategory : its set of objects. There is an inclusion functor . This gives rise to a functor . A functor gets sent to the functor . I claim that creates all limits.

Before I prove this, let’s expand a bit to understand what it means. Given a functor and an object we can get a functor that takes an object and evaluates at . This is an -indexed family of functors to , which is a functor to . A limit of this functor consists of a limit for each of the family of functors. The assertion is that if we have such a limit — a -limit in for each object of — then these limits over each object assemble into a functor in , which is the limit of our original .

We have a limiting cone for each object . What we need is an arrow for each arrow in and a natural transformation for each . Here’s the diagram we need:

We consider an arrow in . The outer triangle is the limiting cone for the object , and the inner triangle is the limiting cone for the object . The bottom square commutes because is functorial in and separately. The two diagonal arrows towards the bottom are the functors and applied to the arrow . Now for each we get a composite arrow , which is a cone on . Since is a limiting cone on this functor we get a unique arrow .

We now know how must act on arrows of , but we need to know that it’s a functor — that it preserves compositions. To do this, try to see the diagram above as a triangular prism viewed down the end. We get one such prism for each arrow , and for composable arrows we can stack the prisms end-to-end to get a prism for the composite. The uniqueness from the universal property now tells us that such a prism is unique, so the composition must be preserved.

Finally, for the natural transformations required to make this a cone, notice that the sides of the prism are exactly the naturality squares for a transformation from to and , so the arrows in the cones give us the components of the natural transformations we need. The proof that this is a limiting cone is straightforward, and a good exercise.

The upshot of all this is that if has -limits, then so does . Furthermore, we can evaluate such limits “pointwise”: .

As another exercise, see what needs to be dualized in the above argument (particularly in the diagram) to replace “limits” with “colimits”.

## Preservation of limits

Yesterday I talked about functors that create limits. It’s theoretically interesting, but a different condition that’s often more useful in practice is that a functor “preserve” limits.

Given a small category , a functor preserves -limits if whenever is a limiting cone for a functor then is a limiting cone for the functor . A functor is called “continuous” if it preserves all small limits. By the existence theorem, a functor is continuous if and only if it preserves all (small) products and pairwise equalizers.

As stated above, this condition is different than creating limits, but the two are related. If is a category which has -limits and is a functor which creates -limits, then we know also has -limits. I claim that preserves these limits as well. More generally, if is complete and creates all small limits then is complete and is continuous.

Indeed, let be a functor and let be a limiting cone for . Then since creates limits we know there is a unique cone in with , and this is a limiting cone on . But limiting cones are unique up to isomorphism, so this is the limit of and preserves it.

Now it’s useful to have good examples of continuous functors at hand, and we know one great family of such functors: representable functors. It should be clear that two naturally isomorphic functors are either both continuous or both not, so we just need to consider functors of the form .

First let’s note a few things down. A cone in is a family of arrows (into a family of different objects) indexed by , so we can instead think of it as a family of elements in the family of sets . That is, it’s the same thing as a cone , with vertex a set with one element. Also, remember from our proof of the completeness of that if we have a cone then we get a function from to the set of cones on with vertex . That is, . Finally, we can read the definition of a limit as saying that the set of cones is in bijection with the set of arrows

Now we see that

In the first bijection we use the equivalence of cones with vertex and functions from to the set of cones with vertex . In the second we use the fact that a cone in from to a family of hom-sets is equivalent to a cone in . In the third bijection we use the definition of limits to replace a cone from to by an arrow from to .

But now we can use the definition of limits *again*, now saying that

and since this holds for any set we must have . Therefore preserves the limit.

## Limits of sets and Creation of limits

We know that the category has equalizers and all (small) products, so by the existence theorem we know it is complete. However, it will be useful to have an explicit calculation of all small limits at hand. We’ll find this by walking through the existence theorem in this category.

Given any small category , a functor is a collection of sets and functions . We can take the product of all the sets in the collection , consisting of all lists of elements with each . It comes with projections , but the triangles formed by these projections might not commute — is not equal to in general.

So take the subset of the product consisting of all those lists with for all morphisms of . Then we have functions defined by which do make the required triangles commute, giving a cone on . If is any other cone on then each determines a list which lies in , which determines a unique function .

Now such a list is a list of elements of the various , and when it comes right down to it we just don’t like thinking about elements if we don’t have to. Instead of talking about an element of a set , we can talk about an arrow , where is a terminal object in — a set with one point. So what we really have here is a list of arrows with , which is a cone on !

So here’s the result of our calculation: The limit set is the set of all cones from to in . Further, we see that this set always exists, so is complete.

We could do a similar calculation in another category like , but we actually don’t have to reproduce all this work. Instead, we can consider the functor which assigns to every group its underlying set. If is a functor, then the composite has a limit . I claim that there is a unique group structure on this set so that the arrows are actually group homomorphisms to the groups , and that this cone in is a limiting cone.

Since the projection just reads off the component from the list, we see that for it to be a homomorphism we have to use the product from . That is, , so the component of the product must be , using the product from . Similarly the component of must be , using the inversion from .

Now if is any cone in then is a cone in , so for some unique function . We can check that

so must also be a group homomorphism, proving the required universal property.

In general we say that a functor creates a limit for a functor if for every limiting cone in there exists a unique cone in with and , and further this cone is a limiting cone. The above theorem can then be stated that the functor creates all limits. As a consequence, is complete.

A similar proof to the preceding theorem can be given to show that the “underlying set” functors from , , , , and other algebraic categories all create all (small) limits, and thus those categories are complete. This also shows that the group (ring, module, etc.) structure on a product (equalizer, pullback) is completely determined by the limit on the underlying sets.

## The Existence Theorem for Limits

Of course, though we’ve defined limits, we don’t know in general whether or not they exist. Specific limits in specific categories have been handled in an *ad hoc* manner. We show that the Cartesian product is a product in , or that there is a subset which equalizes a pair of morphisms, but we have been doing this all by hand and there are so many different kinds of limits that it’s impossible to handle them all like this. Luckily, we can build complicated limits out of simpler ones in many cases.

In fact, we’ve already seen this: we built pullbacks from products and equalizers. Actually we explicitly built pushouts from coproducts and coequalizers, but the pullback construction is just the dual. Anyhow, that construction shows the general idea. If a category has finite products and equalizers of pairs then it has limits for all functors from finite categories . If it has *all* products (indexed by arbitrary sets) as well as pairwise equalizers then it is complete. Conversely, since products and equalizers are examples of limits completeness of a category implies their existence. That is, once we have these kinds of limits all the others come for free.

The proof is summed up in this somewhat arcane diagram.

So let’s unpack it. We’re in a category and are considering a functor , where is either a small or a finite category.

Starting in the middle row we’ve got the product of all the objects in the image of and the product over all the *morphisms* of of the images of their target objects. Now towards the top we have a projection from the second product onto each factor, and since each factor is in the image of we also have morphisms from the first product. There’s actually a triangle at the top for each morphism in the category , but we only draw one. Now by the universal property of the second product there exists a unique arrow from the first product to the second that makes all these triangles commute.

We do a similar thing on the bottom. We again have the projections from the second product to its factors. For each morphism in there’s a projection from the first product onto the image of its *source*, and then there’s an arrow from the image of the source to the image of the target. Again, there’s one such square at the bottom for each morphism in , but we only draw one. Again, by the universal property of the second product there exists a unique arrow from the first product to the second that makes all of these squares commute.

So now we have two parallel arrows from the first product to the second, and we take their equalizer, which gives an arrow into the first product. We also have an arrow out of the product for each object of , so we can compose to get an arrow for each object . I claim that this is the limit we seek.

First we need to check that this is a cone on . For an arrow in we need to see that . The lower commuting square for tells us that . The upper commuting square tells us that . So we calculate as desired.

Now if is any other cone on then the arrows in the cone combine to give a unique arrow . Since this is a cone, we can check that . Thus factors uniquely through , giving the universal property we need.

In the finite case, our discussion of multiple products shows that all we need are binary products, a terminal object, and binary equalizers to have all finite products and binary equalizers, and thus to have all finite limits. In general, infinite products have to be dealt with on their own.

Many of our algebraic categories can now be shown to be complete. For examples, each of , , , , and is complete.

Dually, a category is cocomplete if and only if it has all coproducts and pairwise coequalizers. It has all finite colimits if and only if it has all finite coproducts and pairwise coequalizers. You should determine which of the above list of categories are cocomplete.

## Limits and Colimits

One of the *big* tools in category theory is the limit of a functor. In fact, depending on the source category, limits give whole families of useful constructions, including (multiple) equalizers, (multiple) products, (multiple) pullbacks, and more we haven’t talked about yet. The dual notion of a colimit similarly generalizes (multiple) coequalizers, (multiple) coproducts, (multiple) pushouts, and so on.

Given a functor the limit of (if it exists) is a couniversal cone on — a terminal object in the comma category . That is, it consists of an object and arrows for each object , and for any other object with arrows there is a unique arrow with for all . We often write to denote the limit of the functor from the category . As usual, limits are unique up to isomorphism.

Dually, the colimit of (if it exists) is a universal cocone on — an initial object in the comma category . It’s given by an object and arrows so that for any other object and arrows there is a unique arrow with for all . We often write to denote the colimit of the functor from the category .

If is a set — a category with only identity arrows — then a functor from to is a collection of objects of , one for each element of . The limit of this functor is the product of these objects, and the colimit is their coproduct.

If consists of two objects with a set of parallel arrows from one to the other, then a functor from to is a collection of parallel morphisms in . The limit of this functor is the equalizer of the collection, and the colimit is their coequalizer.

Check for yourself that limits over the category are pullbacks, while colimits over the category are pushouts.

If the category has an initial object then we have a unique arrow for every object . Now for any functor we see that . Indeed, we can just use for the required arrows, which are compatible with all the other arrows from because is a functor. Any other cone on must have an arrow , and compatibility requires that any other arrow in the cone is the composition . So if has an initial object then limits are trivial.

The interesting case is when does *not* have an initial object. We can add a new object to with a unique arrow to every other object, getting a category which *does* have an initial object. The question is whether a given functor can be extended to a functor . If it can, then the image of the new initial object is the vertex of a cone on . If there is a *couniversal* such extension, that’s the limit of .

Dually, if has a terminal object then . If doesn’t have a terminal object, we can add one to get a category , and colimits tell us when and how we can extend a functor “universally” to a functor .

If there exists a limit in for any functor from a finite category we say that “has finite limits”. If there exists a limit for any functor from a small category we say that is “complete”. The dual conditions are that “has finite colimits” and that is “cocomplete”, respectively.

## Cones and cocones

There are a few auxiliary concepts we’ll need before the next major topic. Let’s start with two categories and , and the category of functors . If the following seems very complicated, consider to be any particular toy category you’d like, so this category of functors is a diagram category.

Now, for every object there is a constant functor that sends every object of to , and every morphism to the identity on . Actually, this assignment of the constant functor to an object of is a functor from to . Indeed, given a morphism we get a natural transformation from the one constant functor to the other, whose component at each object of is . We call this the “diagonal” functor . That is, is the constant functor with value .

Let be some particular functor in . A cone is an object in the comma category . Let’s unpack this definition. Since has as its source, and is a fixed object — the same thing as a functor from the category to , we know what objects of this category look like.

An object of the category consists of an object of and an arrow from to . But an arrow in is a natural transformation of functors. That is, for each object of we need an arrow in from to . But for all objects . So we just need an object and an arrow for each .

Of course, there’s also naturality conditions to be concerned with. If is an arrow in , and and are the required arrows from , then naturality requires that . So we need a collection of arrows from to the objects in the image of that are compatible with the arrows from . Such a collection defines an object in the comma category — a cone on .

Cocones are defined similarly. A cocone on is an object in the comma category . That is, it’s an object and a collection of arrows *from* the objects in the image of that are compatible with the arrows from .

The description may seem a little odd, but try writing it out for some very simple categories . For example, let be a set. Then try letting it be an ordinal, or another preorder. After you write down the definition of a cone and a cocone on some simple categories the general idea should seem to make more sense.