## 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 of objects, a set of morphisms, a function assigning the identity morphism to each object, functions and assigning the source and target objects to each morphism, and an arrow telling us how to compose certain pairs of morphisms. This involves a “fibered product”, which is just the pullback in . We take the arrows and from to 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 , , , and .

Now we can take this whole setup and drop it into any other category, as long as that category has pairwise pullbacks. If does have these pullbacks, then a category internal to (or a “category object”) consists of a pair of objects and four morphisms of , which must satisfy the above relations. Then a category internal to 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 . 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.