# Understanding 2-category theory

There are a lot of examples of categories, functors and natural transformations — one can find them anywhere. On the contrary (weak) 2-categorical stuff seems to be more subtle. I have comprehended that, while categories intuitively consist of sets with structure and structure-preserving maps, 2-categories consist of categories with structure, structure-preserving functors and natural transformations between such functors. I know several such examples, but are there another examples of 2-categories (which are not $$Ord$$-enriched)?

And the similar question about pseudofunctors ((op)lax functors). Where can I find examples of non-trivial morphisms between 2-categories?

• It might also make sense to look at enriched categories in general. nLab seems to be very good at giving the general enriched point of view wherever possible. – jgon Dec 28 '18 at 16:07
• I wrote up something like an answer, and then found myself unsure if it answered your question. What kinds of examples might count as answers to your questions, and which not? It's easy to think of examples of subcategories of Cat, categories of enriched categories, categories of internal categories, etc., but I'm not certain if you're trying to explicitly avoid such examples. – Malice Vidrine Dec 28 '18 at 23:36

As I mention in my comment above, I'm not sure if you are wanting to rule out examples that are obviously related to 2-categories of categories. But in case such examples do constitute at least a partial answer, I offer the following, with the disclaimer that my examples will definitely be slanted towards the topics I'm familiar with.

As you suggest, any time you're dealing with some class of categories you're likely to use 2-categorical notions. We use the fact that $$\mathbf{Cat}$$ is a 2-category constantly in our use of functor categories. The 2-categorical structure on $$\mathfrak{Top}$$ (the 2-category of toposes and geometric morphisms) is how we are able to state things like classifying topos theorems (which need $$\mathfrak{Top}/\mathbf{Set}(\mathcal{E},\mathcal{F})$$ to be a category for any Grothendieck toposes $$\mathcal{E},\mathcal{F})$$.

Many other categories of categories, like the category of finite categories, or the category of groupoids, the category of abelian groups, will all be examples of 2-categories where the hom-categories are not typically partial orders; and for related reasons, so will the categories of internal categories in a finitely complete category. Additionally, as someone alludes to in the comments, categories of $$\mathcal{V}$$-enriched categories also have a 2-categorical structure (which can look different from the one on $$\mathbf{Cat}$$; e.g. the category of $$\mathbf{Ab}$$-enriched/pre-additive categories).

Pseudofunctors are also quite common; many results in topos theory, like Diaconescu's theorem (the one about flat functors, not the one about the axiom of choice), are best stated in the language of indexed categories, which are just pseudofunctors from a category to $$\mathbf{Cat}$$.

• Given a geometric morphism $$f:\mathcal{E}\to\mathcal{S}$$, the operation sending $$A\in\mathcal{S}$$ to $$\mathcal{E}/f^*(A)$$ is a pseudofunctor $$\mathcal{S}^{op}\to \mathfrak{Top}$$. (This form of indexing is especially helpful in the proof of Diaconescu's theorem.)

• The operation sending $$\mathbb{A}\in\mathbf{cat}(\mathcal{E})$$ (the category of internal categories in a topos $$\mathcal{E}$$) to the category of internal diagrams on $$\mathbb{A}$$ is a pseudofunctor $$\mathbf{cat}(\mathcal{E})^{op}\to\mathfrak{Top}$$.

• For finitely complete $$\mathcal{C}$$, the assignment $$A\in \mathcal{C}$$ to $$\mathcal{C}/A$$ is a pseudofunctor $$\mathcal{C}^{op}\to\mathbf{Cat}$$. (Indexed categories of this form will show up in some guise almost any time you deal with indexed categories.)

• In fact in categorical logic, indexed categories (or the very closely related fibred category) are ubiquitous as semantics for type theories, so the literature there will give you plenty of examples.

(I exclude mention of the action on morphisms above as I assume they're fairly transparent.)

Not only are indexed categories defined in terms of a 2-categorical notion, but they and their notion of "indexed functor" and "indexed natural transformation" also form a 2-category. And as above, we can also talk about an internal indexed category (or cloven fibration) in a 2-category $$\mathcal{C}$$, the category of which in $$\mathcal{C}$$ will again have the structure of a 2-category.

And this is without touching on things like bicategories---of objects and spans in a category with pullbacks; categories with profunctors or anafunctors; and their internal counterparts---and pseudofunctors between them.

Most of these examples are, in a sense, unsurprising places to find 2-categorical notions, since most of them are examples where the objects of the 2-category are some form of actual category. At the moment I can't think of good examples of surprising 2-categories. But I hope I've given the impression that the unsurprising cases are not mere novelties, but are ubiquitous and quite useful.