
In my previous post, I gave a bit of an overview of my personal favourite brand of abstract structure: categories (if you haven’t read that post yet, then please consider yourself formally, aggressively notified to do so).
To briefly summarize the main point of that post (which you should definitely still go read if you haven’t yet, by the way), a category consists of a collection of objects and a collection of arrows, or morphisms, where the morphisms can be composed end-to-end to form new morphisms, every object has an identity or “do nothing” morphism, and the composition of morphisms is associative, essentially meaning that the order in which we choose to combine a string of three or more morphisms doesn’t affect the combined morphism we get at the end (if it helps, you can compare it to addition, which is also associative, meaning that (a+b)+c = a+(b+c) for any numbers a, b, and c). But what if I told you that we can express all of this information in “categorical language”, using only a few carefully-chosen objects and morphisms, so that we can effectively have a category inside another category?
Let’s start back at the beginning of the definition that I just gave:
“a category consists of a collection of objects and a collection of arrows…”
In math, we generally use the word “set” for what might be casually referred to as a “collection of things”. It doesn’t map on perfectly to what we might think of intuitively, in the sense that for any property X, we don’t necessarily get a set of all the things that have X property (for example, the collection of all sets is not itself a set in this sense), but for the most part it works well enough. So, for the sake of our goals here, let’s say that our category only has a set of objects (let’s call it C0) and a set of morphisms C1 (bigger, so-called “large” categories do exist, but we won’t worry about them right now).
Of course, it’s not enough just to have these two sets. After all, our objects and morphisms don’t exist in isolation. Each morphism points from one object of our category to another one. The object at the base of the arrow is often called its “source”, while the object at the arrow’s tip is the “target” of the arrow. So, given any morphism from our set, we have two ways of associating this morphism to an object of our category: we assign it either to its source or its target. We can represent these two assignments by arrows from our set of morphisms to our set of objects.
“…where the morphisms can be composed end-to-end to form new morphisms…”
We can think of composition as another kind of assignment that assigns two composable morphisms in our category to their composite. The composite is just an arrow in our category, so it seems reasonable to hope that composition should be represented by an arrow pointing at our set of morphisms. But what should the source of this arrow be?
Well, composition needs two morphisms from our category to begin with, but of course, not just any two morphisms will do. Remember that they need to be able to be lined up head-to-tail; in other words, the source of one of the morphisms has to be equal to the target of the other. So what we’re really looking for is the set of all pairs of morphisms where this is true. Lucky for us, category theory has a construction called a pullback that allows us to get exactly this. The nitty-gritty details of exactly what a pullback is don’t matter so much here; the most important part for us is that the only things we need in order to define it are the source and target morphisms that we already have.
“…every object has an identity, or ‘do-nothing’ morphism…”
Now we’re assigning certain morphisms to each of our objects, so that should look something like…
“…and the composition of morphisms is associative…”
This, along with the “identityness” of the identity morphisms, is a bit more complicated, and I won’t go over it in detail here, but it essentially amounts to the structure that we already have satisfying a few additional properties.
…And there you have it. This is a category, expressed as a diagram consisting of objects (sets) and morphisms (assignments, or “functions”), with one pullback. Due to how we defined our objects and morphisms, we would say that, up to now, we have been working inside the category with sets as objects and functions as morphisms.
And here, in my opinion, is the most interesting part: if we decide to forget exactly what our objects and morphisms are, i.e. sets and functions, then all we have is a diagram that satisfies some properties. What if we take these diagrams and properties, which are essentially patterns, and look for them in other, more exotic categories, where we aren’t just dealing with sets and functions? In particular, what if we looked for this pattern inside a category whose objects were themselves categories? This idea is one way of arriving at something called a double category, which is what I study. In upcoming posts, I’ll explain a bit more about what a double category is, and how I am trying to use them to talk about ideas and structures from logic.
Image via Openclipart