In the last post on groups and related stuff, I talked about the algebraic construction of monoids. A monoid is, basically, the algebraic construction of a category - it's based on the same ideas, and has the same properties; just the presentation of it is different.
But you can also see a monoid in categorical terms. It's what we computer scientists would call a bootstrapped definition: we're relying on the fact that we have all of the constructs of category theory, and then using category theory to rebuild its own basic concepts.
The basic idea of the construction is to start pretty much the same way we did algebraically. The difference is that instead of saying "start with a set", we start with a category.
In this post, I'll define a monoidal category, also called a tensor category. A monoidal category is
a category with a functor, where the functor has the basic properties of a monoid. This is something stronger than a basic monoid - but we can define an algebraic monoid using objects in a monoidal category.
A monoidal category is a category C, paired with a bi-functor - that is a two-argument functor ⊗:C×C→C. This is the categorical form of the tensor operation from the algebraic monoid. To make it a monoidal category, we need to take the tensor operation, and define the properties that it needs to have. They're called its coherence conditions, and basically, they're the properties that are needed to make the diagrams that we're going to use commute.
So - the tensor functor is a bifunctor from C×C to C. There is also an object I∈C, which is called the unit object, which is basically the identity element of the monoid. As we would expect from
the algebraic definition, the tensor functor has two basic properties: associativity, and identity.
Associativity is expressed categorically using a natural isomorphism, which we'll name α. For any three object X, Y, and Z, α includes a component αX,Y,Z (which I'll label α(X,Y,Z) in diagrams, because subscripts in diagrams are a pain!), which is a mapping from (X⊗Y)⊗Z to X⊗(Y⊗Z). The natural isomorphism says, in categorical terms, that the the two objects on either side of its mappings are
The identity property is again expressed via natural isomorphism. The category must include an object I (called the unit), and
two natural isomorphisms, called &lamba; and ρ. For any
arrow X in C, &lamba; and ρ contain components λX and ρX such that λX maps from I⊗X→X, and ρX maps from X⊗I to X.
Now, all of the pieces that we need are on the table. All we need to do is explain how they all fit together - what kinds of properties
these pieces need to have for this to - that is, for these definitions to give us a structure that looks like the algebraic notion of monoidal structures, but built in category theory. The properties
are, more or less, exact correspondences with the associativity and identity requirements of the algebraic monoid. But with category theory, we can say it visually. The two diagrams below each describe one of the two properties.
The upper (pentagonal) diagram must commute for all A, B, C, and D. It describes the associativity property. Each arrow in the diagram is a component of the natural isomorphism over
the category, and the diagram describes what it means for the
natural isomorphism to define associativity.
Similarly, the bottom diagram defines identity. The arrows are all components of natural isomorphisms, and they describe the properties that the natural isomorphisms must have in order for them, together with the unit I to define identity.
This is clearly a whole lot more complicated than the algebraic form. What is it doing?
What we've done is create something much more general. Instead of having a simple notion of abstract functions, we've jumped it up; the basic elements are categories. With algebraic monoids, we were basically working with functions from a set S to itself - and looking at how we could take two functions, each from S to S, and end up with a new composed function S to S; and then looking at what kinds of properties we could get from that.
Here we're looking at categories - essentially monoids with bunches of functions - and looking at functors, which map categories to categories. Just like in the algebraic monoid, we mapped values from a set to itself, in the category, we're looking at functors that map from a category to itself. So we're building a structure with monoidal properties in terms of a structure with monoidal properties. That's where the added complexity of this comes from: we've created a monoidal category, which is an object with a lot more interesting and rich structure to it than a simple algebraic monoid. Using this, we can show what a simple monoid looks like in category theory: it's a particular kind of object in a monoidal category. (But that's a subject for another post.)
So what does this mess give us? We've done a lot more work than we did in the algebraic monoid. I've said this gives us something with
more properties. But does that really have any benefit? Does this express anything that we care about beyond what we could do with the simple algebraic monoid?
Yes. I'll talk more about them later, but one example is that
if we've got a commutative ring, then we can define structures over it called modules. The modules over the ring form a monoidal category - which means that we can define them as being a monoid, but more than just a simple monoid - it's a monoid whose
composition operation preserves the structural properties of modules over the ring.