# The Unapologetic Mathematician

## Internal Categories

Just like we have monid objects, we can actually define something we could sensibly call a “category object”. In this case, however, it will be a little more accurate to use the term “internal category”.

This is because a (small) category isn’t just a set with extra structure. It’s two sets with extra structure. We have a set $O$ of objects, a set $M$ of morphisms, a function $i:O\rightarrow M$ assigning the identity morphism to each object, functions $s:M\rightarrow O$ and $t:M\rightarrow O$ assigning the source and target objects to each morphism, and an arrow $\gamma:M{}_s\times_tM\rightarrow M$ telling us how to compose certain pairs of morphisms. This involves a “fibered product”, which is just the pullback in $\mathbf{Set}$. We take the arrows $s$ and $t$ from $M$ to $O$ and pull back the square to get the set of all pairs of morphisms so that the source object of one is the target of the other.

Then there are a bunch of relations which hold:

• The source of the identity arrow on an object is the object itself.
• The target of the identity arrow on an object is the object itself.
• The identity arrow on an object acts as a left and right identity for the composition.
• The source of a composition is the source of the second member of the pair.
• The target of a composition is the target of the first member of the pair.
• The composition is associative.

I’ll leave you to write these out purely in terms of the functions $m$, $i$, $s$, and $t$.

Now we can take this whole setup and drop it into any other category, as long as that category has pairwise pullbacks. If $\mathcal{C}$ does have these pullbacks, then a category internal to $\mathcal{C}$ (or a “category object”) consists of a pair of objects and four morphisms of $\mathcal{C}$, which must satisfy the above relations. Then a category internal to $\mathbf{Set}$ is a small category.

When we’re talking about categorifying something like a group, we want to replace the underlying set of a group with a small category. That is, we want to have a group object in $\mathbf{Cal}$. But we know that internalizations commute, so this is the same thing as a “category object” in groups! That is, instead of looking for a category with a multiplication functor and so on, we can instead look for a pair of groups with source, target, composition, and identity homomorphisms between them.