category object in an (∞,1)-category, groupoid object
The notion of a category can be formulated internal to any other category with enough pullbacks. By regarding groups as one-object (delooping) groupoids, this generalizes the familiar way in which, for instance
topological groups are groups internal to topological spaces
Lie groups are groups internal to smooth manifolds.
An ordinary small category is a category internal to Set.
There is a more general notion of an internal category in a monoidal category, where the pullbacks are replaced by cotensor products.
Let be any category. A category internal to consists of
together with
a composition morphism ;
such that the following diagrams commute, expressing the usual category laws:
Here, the pullback is defined via the square
Notice that inherent to this definition is the assumption that the pullbacks involved actually exist. This holds automatically when the ambient category has finite limits, but there are some important examples such as Diff where this is not the case. Here it is helpful to assume simply that and have all pullbacks; in the case of this occurs if they are submersions.
A groupoid internal to is all of the above
such that the cartesian product exists
with a morphism
such that
and
If has all pullbacks, then we can form the bicategory of spans in . A category in is precisely a monad in . The underlying 1-cell is given by the span , and the pullback is the vertex of the composite span . The morphisms and are required to be morphisms of spans, which is equivalent to imposing the source and target axioms above. Finally the unit and associativity axioms for monads imply those above.
This approach makes it easy to define the notion of internal profunctor.
A small category is a category internal to Set. In this case, is a set of objects and is a set of morphisms and the pullback is a subset of the Cartesian product.
Historically, the motivating example was (apparently) the notion of Lie groupoids: a small Lie groupoid is a groupoid internal to the category Diff of smooth manifolds. This generalises immediately to a smooth category?. Similarly, a topological groupoid is a groupoid internal to Top. (Warning: the term ‘topological category’ usually means a topological concrete category, an unrelated notion. Sometimes (e.g. in Jacob Luries ”Higher Topos Theory?”) a ‘topological category’ is defined to be a -enriched category, which is a special case of the internal definition if it is interpreted strictly and the collection of objects is small.) In these examples, is a “space of objects” and a “space of morphisms”.
Further examples:
Functors between internal categories are defined in a similar fashion. See functor. But if the ambient category does not satisfy the axiom of choice it is often better to use anafunctors instead; this makes sense when is a superextensive site.
The idea of the nerve of a small category can be generalised to give an internal nerve construction. Recall (from nerve), the basic idea is that, for a small category, , its nerve, , is a simplicial set whose set of -simplices is the set of sequences of composable morphisms of length in . This set can be given by a (multiple) pullback of copies of . That description will carry across to give a nerve construction for an internal category.
If is an internal category in some category , (which thus has, at least, the pullbacks required for the constructions to make sense),its nerve (or if more precision is needed , or similar) is the simplicial object in with
and so on. Face and degeneracy morphisms are induced from the structural moprhisms of in a fairly obvious way.
Internal functors between internal categories induce simplicial morphisms between the corresponding nerves.
A 2-group is an internal category in Grp and so has an internal nerve, which is a simplicial object in Grp, that is a simplicial group. If the 2-group corresponds to a crossed module,, then the simplicial group nerve of has Moore complex having in dimension 0, and in dimension 1, with the trivial group in all other dimensions. The only possible non-trivial boundary map from dimension 1 to dimension 0 is then the boundary of the crossed module.
One can also look at this in higher category theory and consider internal n-categories. See
A survey with an eye towards Lie groupoids is in
Discussion in terms of monads in spans is in
A detailed discussion with emphasis on the correct anafunctor morphisms between internal categories is in
Discussion with emphasis on topos theory is in section B.2.3 of
and in section V.7 of
An introduction is also in
An old discussion on variants of internal categories, crossed modules and 2-groups is archived here.