Lecture 35 - Categories versus Preorders

Lecture 35 - Categories versus Preorders

Why did I spend the first 33 lectures in a course on category theory talking, not about categories, but about preorders? It's because preorders are categories with at most one morphism from any object \(x\) to any object \(y\). Since there's at most one, we don't need to give it a name: we just write \(x \le y\) if such a morphism exists. And then your experience with inequalities helps you understand what's going on!

But beware! Since there's at at most one morphism from any object \(x\) to any object \(y\) in a preorder, any time you have two morphisms \(f, g : x \to y\) they are automatically equal. This hid one of the most important features of category theory, namely equations between morphisms.

The definition of category theory starts out with three fundamental equations between morphisms: the associative law

[ (h \circ g) \circ f = h \circ (g \circ f) ]

whenever we have three morphisms that can be composed, and the left and right unit laws

[ 1_y \circ f = f = f \circ 1_x ]

whenever we have a morphism \(f : x \to y\). These were all automatic and thus not mentioned in our study of preorders. As we continue, we'll see a lot more equations between morphisms - so get ready for this change of focus!

Eventually, we'll take almost everything we've done with preorders and generalize it to categories. Here's a little list of these things. It won't make sense yet, so don't worry about it too much - but I still want to show it to you:

So, there's a lot of stuff to learn - but whenever you meet one of these concepts and need some examples and insights, you can fall back on your knowledge of preorders!

In Lecture 25 we saw this Petri net:

Since we were studying preorders we treated each reaction, like "fill crust", as a mere inequality. The name of the reaction didn't really matter in our work. If there were two different ways to transform crust and filling into a lemon pie, that wouldn't affect anything at all.

Now that we're studying categories we can treat each reaction as a morphism, and write:

$$ [\textrm{fill crust}] : [\textrm{crust}] + [\textrm{filling}] \to [\textrm{lemon pie}] . $$

This lets us distinguish between two different morphisms from \( [\textrm{crust}] + [\textrm{filling}]\) to \([\textrm{lemon pie}] \). For example, we can distinguish between

$$ [\textrm{fill crust slowly}] : [\textrm{crust}] + [\textrm{filling}] \to [\textrm{lemon pie}] . $$

and

$$ [\textrm{fill crust quickly}] : [\textrm{crust}] + [\textrm{filling}] \to [\textrm{lemon pie}] $$

This is very important when we're studying real-world manufacturing processes, where there are often several ways to turn the same inputs into the same outputs.

You'll notice the \(+\) sign in these formulas, which lets us combine resources. That's a sign that we're working with a symmetric monoidal preorder, or symmetric monoidal category. That's too fancy for us now: we'll start by studying plain old categories. So, instead of using manufacturing as an example, we'll look at something else: databases.

Puzzle 102. What is the category with the fewest morphisms that is not a preorder?

Puzzle 103. Figure out the best way to take any category \(\mathcal{C}\) and "squash it down", getting a preorder whose elements are the objects of \(\mathcal{C}\).

To read other lectures go here.


© 2018 John Baez