### Equipments

#### Posted by Mike Shulman

I mentioned in my intro that as wonderful as $n$-categories are, they’re really just one (important) part of the zoo of “higher categorical structures” out there. Today I want to tell you about another inhabitant of that zoo: a wonderful gadget called a **proarrow equipment** (or just an **equipment**), which lets us do what I call “formal category theory.” Equipments don’t seem to be very well-known, especially in the northern hemisphere (even though their inventor, R.J. Wood, is a Canadian at Dalhousie), but there are some indications that they’re gaining ground, so I’m doing my best to help them along.

This post will be a lightning-fast introduction to formal category theory in equipments. But I’m going to present the definition in a nonstandard way, because it turns out that an equipment is basically the same as what I’ve called a framed bicategory, and I find that way of thinking about it more natural—and also easier to generalize (but that’s another post). Some of it may go by a little quickly, but I think it’s the sort of thing that’s really quite fun to work out yourself once you’ve been pointed in the right direction.

What do I mean by *formal category theory*? This is an analogy to the way in which category theory can be called “formal mathematics.” That is, we see ourselves doing the same thing all the time in mathematics (limits, colimits, adjoints, universal constructions) and we write down category theory in order to do all those things *formally*, once and for all in abstract generality. But nowadays there are actually lots of kinds of category theory too: ordinary category theory, enriched category theory, internal category theory, fibered category theory, etc. After a while, one starts to get the feeling of “doing the same thing all the time” again: defining limits and colimits, proving adjoint functor and monadicity theorems, etc. So, can we “formalize” the essential aspects of category theory in an analogous way, and if so, how?

You might expect the answer to be “yes, with 2-categories.” Perhaps surprisingly, however, 2-categories don’t always suffice. We can do a *lot* of category theory in a 2-category: we can define adjunctions, construct Eilenberg-Moore and Kleisli objects for monads (the “formal theory of monads”), and talk about Kan extensions, comma objects, fibrations, and so on. But some things are missing, and some of the general notions are not always quite right. For instance, the most obvious 2-categorical analogue of a limit is a Kan extension, since in ordinary category theory limits can be identified with Kan extensions along functors to the terminal category. However, in *enriched* category theory this is insufficient; not all weighted limits arise in that way. Moreover, the “internal” notion of Kan extension in a 2-category gives the “weak” notion rather than the more important “pointwise” one.

The central observation is that what’s missing from the 2-category $Cat$ is hom-functors, and more generally profunctors. Recall that a profunctor (aka “distributor” or “(bi)module”) $C \nrightarrow D$ is a functor $D^{op}\times C \to Set$ (or to $D^{op}\otimes C\to V$, if $C$ and $D$ are $V$-enriched). Including profunctors in our “structure for formal category theory” will allow us to talk about their *representability*, which is the essential ingredient for limits, pointwise Kan extensions, and all the other things that are missing from a 2-category.

So what kind of formal structure includes categories, functors, *and* profunctors? There are several different answers, but to me, the most obvious and natural-looking answer is a double category. Specifically, there’s a double category $\underline{Prof}$ whose objects are small categories, whose vertical arrows (which we’ll just call “arrows”) are functors, whose horizontal arrows (which we’ll call “proarrows”) are profunctors, and whose squares
$\array{A & \overset{H}{\nrightarrow} & B\\
^f\downarrow & \Downarrow & \downarrow^g\\
C& \underset{K}{\nrightarrow} & D}$
are transformations $H(b,a) \to K(g b,f a)$ natural in $a$ and $b$. Composition of profunctors is by a coend:
$(H\odot K)(c,a) = \int^{b\in B} H(b,a) \otimes K(c,b)$
(note that I’m writing it in diagrammatic order) and the identity profunctor of $C$ is its hom-profunctor $U_C=Hom_C\colon C^{op}\times C\to Set$. The 2-categories $Cat$ and $Prof$ can be recovered from $\underline{Prof}$ as its vertical and horizontal 2-categories, respectively, which I’ll write as $Cat = \mathcal{V}(\underline{Prof})$ and $Prof = \mathcal{H}(\underline{Prof})$. (For $Prof$, this is basically by definition; for $Cat$, it’s a nice exercise in the Yoneda lemma.)

Similar double categories exist for all the other kinds of category theory (enriched, internal, fibered, etc.). Moreover, all these double categories have an additional very important property: given any “niche”
$\array{A & & B\\
^f\downarrow & & \downarrow^g\\
C& \underset{K}{\nrightarrow} & D}$
there exists a “universal” or “cartesian” filler square
$\array{A & \overset{K(g,f)}{\to} & B\\
^f\downarrow & \Downarrow & \downarrow^g\\
C& \underset{K}{\nrightarrow} & D}$
with the property that any other square
$\array{X & \nrightarrow & Y\\
^{f h}\downarrow & \Downarrow & \downarrow^{g k}\\
C& \underset{K}{\nrightarrow} & D}$
factors through the universal one uniquely:
$\array{X & \nrightarrow & Y\\
^{h}\downarrow & \exists! \Downarrow & \downarrow^{k}\\
A & \overset{K(g,f)}{\to} & B\\
^f\downarrow & \Downarrow & \downarrow^g\\
C& \underset{K}{\nrightarrow} & D}$
The profunctor $K(g,f)$ is of course just $K(g-,f-)\colon B^{op}\times A\to Set$. We say that a double category $\underline{X}$ having this property *equips the 2-category $\mathcal{V}(\underline{X})$ with proarrows*, and speak of the whole double category as a **proarrow equipment**, or just an **equipment**.

Of particular importance in an equipment are the proarrows $B(1,f)=U_B(id_B,f)$ and $B(f,1) = U_B(f,id_B)$, which exist for any arrow $f\colon A\to B$. By factoring the identity square
$\array{A & \overset{U_A}{\to} & A\\
^f\downarrow & ^{U_f}\Downarrow & \downarrow^f\\
B & \underset{U_B}{\to} & B}$
through the universal fillers
$\array{A & \overset{B(1,f)}{\to} & B\\
^f\downarrow &\Downarrow & \downarrow^{id}\\
B & \underset{U_B}{\to} & B} \qquad\text{and}\qquad
\array{B & \overset{B(f,1)}{\to} & A\\
^{id}\downarrow &\Downarrow & \downarrow^{f}\\
B & \underset{U_B}{\to} & B}$
that define $B(1,f)$ and $B(f,1)$, we obtain additional squares
$\array{A & \overset{U_A}{\to} & A\\
^f\downarrow &\Downarrow & \downarrow^{id}\\
B & \underset{B(f,1)}{\to} & A} \qquad\text{and}\qquad
\array{A & \overset{U_A}{\to} & A\\
^{id}\downarrow &\Downarrow & \downarrow^{f}\\
A & \underset{B(1,f)}{\to} & B}$
such that the composites
$\array{A & \overset{U_A}{\to} & A\\
^{f}\downarrow &\Downarrow & \downarrow^{id}\\
B & \overset{B(f,1)}{\to} & A\\
^{id}\downarrow &\Downarrow & \downarrow^{f}\\
B & \underset{U_B}{\to} & B} \qquad\text{and}\quad
\array{A & \overset{U_A}{\to} & A\\
^{id}\downarrow &\Downarrow & \downarrow^{f}\\
A & \underset{B(1,f)}{\to} & B\\
^f\downarrow &\Downarrow & \downarrow^{id}\\
B & \underset{U_B}{\to} & B}$
are both equal to $U_f$. And using the uniqueness of factorization through the universal squares, we can conclude moreover that the composites
$\array{A & \overset{U_A}{\to} & A & \overset{B(1,f)}{\to} & A\\
^{id}\downarrow &\Downarrow & \downarrow^{f} & \Downarrow & \downarrow^{id}\\
A & \underset{B(1,f)}{\to} & B & \underset{U_B}{\to} & B}
\qquad\text{and}\qquad
\array{B & \overset{B(f,1)}{\to} & A & \overset{U_A}{\to} & A\\
^{id}\downarrow &\Downarrow & \downarrow^{f} & \Downarrow & \downarrow^{id}\\
B & \underset{U_B}{\to} & B & \underset{B(f,1)}{\to} & A}$
are equal to the identity squares of $B(1,f)$ and $B(f,1)$ respectively. In double-category lingo which I adopted from Dawson, Paré, and Pronk, this says that $B(1,f)$ is a **companion** of $f$ and $B(f,1)$ is a **conjoint** of $f$. It follows, in particular, that $B(1,f)$ and $B(f,1)$ are adjoint in $\mathcal{H}(\underline{X})$.

Now the central lemma about these companions and conjoints is the following: there is a natural bijection between squares of the form $\array{A_0 & \overset{H}{\to} & B_0\\ ^{f_1}\downarrow && \downarrow^{g_1}\\ A_1 && B_1\\ ^{f_2}\downarrow & \Downarrow & \downarrow^{g_2}\\ A_2 && B_2\\ ^{f_3}\downarrow && \downarrow^{g_3}\\ A_3 & \underset{K}{\to} & B_3 }$ and squares of the form $\array{A_1 & \overset{A_1(f_1 ,1)}{\to} & A_0 & \overset{H}{\to} & B_0 & \overset{B_1(1,g_1)}{\to} & B_1\\ ^{f_2}\downarrow && &\Downarrow & && \downarrow^{g_2}\\ A_2 & \underset{A_3(1,f_3)}{\to} & A_3 & \underset{K}{\to} & B_3 & \underset{B_3(g_3 ,1)}{\to} & B_2.}$ I like to think of this as saying that vertical arrows can be “slid around corners” to become horizontal arrows, turning them into the “representable proarrows” $B(1,f)$ or $B(f,1)$ (depending on whether you slid them “backwards” or “forwards” to get around the corner). The bijection is just given by composing with the four special squares defined above. In particular, by a Yoneda argument, for any $f\colon A\to C$, $g\colon B\to D$, and $K\colon C\nrightarrow D$ we have

so the companions and conjoints determine the rest of the cartesian squares. Note that this is an equipment-version of Yoneda reduction, aka the co-Yoneda lemma. Also, we have a bijection between 2-cells $f\to g$ in $\mathcal{V}(\underline{X})$ and 2-cells $B(1,f)\to B(1,g)$ in $\mathcal{H}(\underline{X})$. It follows that the functor $\mathcal{V}(\underline{X})\to \mathcal{H}(\underline{X})$ sending $f$ to $B(1,f)$ is locally fully faithful.

Wood’s original definition of an *equipment* was a functor $K\to M$ between (weak) 2-categories which is bijective on objects, locally fully faithful, and such that the image of each arrow of $K$ has a right adjoint in $M$. Thus, our definition implies his. The converse is not too hard either, so the two are equivalent. However, I find that the double-category way of thinking makes the structure look much more natural; Wood’s definition looks very ad-hoc to me. The double-categorical approach also (a) automatically gives you a good 2- or 3-category of equipments, which is tricky to do with Wood’s definition (I believe this was first realized by Verity in his thesis), and (b) generalizes better to situations in which the coends that define profunctor composition may not exist. But those are for another day.

Now let me try to convince you that we do formal category theory in an equipment. Let’s start with this: two (vertical) arrows $f\colon A\to B$ and $g\colon B\to A$ are adjoint (in $\mathcal{V}(\underline{X})$) if and only if we have an isomorphism $B(f,1)\cong A(1,g)$. Why? Well, an adjunction $f\dashv g$ comes with a unit and a counit, which (expressed in $\underline{X}$) are of the form $\array{A & \overset{U_A}{\to} & A\\ ^f\downarrow && \downarrow\\ B & \overset{\eta}{\Leftarrow} & \downarrow^{id} \\ ^g\downarrow && \downarrow\\ A& \underset{U_A}{\to} & A} \qquad\text{and}\qquad \array{B & \overset{U_B}{\to} & B\\ \downarrow && \downarrow^g\\ ^{id}\downarrow & \overset{\varepsilon}{\Leftarrow} & A \\ \downarrow && \downarrow^f\\ B& \underset{U_B}{\to} & B.}$ Applying the bijection of the central lemma, we see that $\eta$ corresponds to a map $B(f,1) \to A(1,g)$, and likewise $\varepsilon$ corresponds to a map $A(1,g)\to B(f,1)$. The triangle identities for $\eta$ and $\varepsilon$ are then equivalent to saying that these two maps are inverse isomorphisms. So we’ve recovered the classical equivalence between the “diagrammatic” and isomorphism-of-hom-sets definitions of an adjunction, in a purely formal way.

Now let’s define limits. I’m not sure who first realized that limits can be defined in the following way, but Ross Street is a good guess. The notion of limit we end up with is actually more general than what you’re probably used to, but this extra generality turns out to be useful. Let $d\colon D\to C$ be an arrow and let $J\colon D\nrightarrow A$ be a proarrow; we’re going to define what it means for an arrow $\ell\colon A\to C$ to be the *$J$-weighted limit* of $d$. In the equipment $\underline{V\text{-}Prof}$ of $V$-enriched categories, if $A$ is the unit $V$-category $I$, then this will recover the usual notion of weighted limit. Of course, in a general equipment we may not have a “unit object,” so that extra generality is unavoidable; it’s like using generalized elements in ordinary category theory.

To make things easier, let’s assume that $\underline{X}$ is *closed*, in the sense that composition of proarrows has adjoints in each variable
$\mathcal{H}(\underline{X})(H\odot K,L) \cong \mathcal{H}(\underline{X})(H,K\rhd L) \cong \mathcal{H}(\underline{X})(K,L\lhd H).$
The central lemma implies that analogously to (1), we have

In $V\text{-}Prof$, the adjoints are given by the ends $(K\rhd L)(b,a) = \int_{c\in C} [K(c,b), L(c,a)]$ and $(L \lhd H)(c,b) = \int_{a\in A} [H(b,a), L(c,a)].$ Therefore, (2) is an abstract form of the Yoneda lemma, just as (1) is an abstract form of the co-Yoneda lemma.

Now recall that for $V$-categories $D$ and $C$, an object $\ell\in C$ is a $J$-weighted limit of $d\colon D\to C$ if we have an isomorphism
$\begin{aligned}
C(-,\ell) &\cong [D,V](J, C(-,x))\\
&= \int_{x\in D} [J(x), C(-,d(x))].
\end{aligned}$
Thus it makes sense to define, in a closed equipment, an arrow $\ell\colon A\to C$ to be the $J$-weighted limit of $d$ if we have an isomorphism
$C(1,\ell) \cong C(1,d) \lhd J.$
(If our equipment is not closed, we simply assert that $C(1,\ell)$ has the universal property that $C(1,d) \lhd J$ would have if it existed.) In particular, when $A$ is the unit $V$-category, this recovers the classical notion. But even in $\underline{V\text{-}Prof}$ there are interesting examples for other values of $A$. If we take $J = D(j,1)$ for some functor $j\colon A\to D$, then (1) and (2) imply that
$\begin{aligned}
C(1,d) \lhd J &= C(1,d) \lhd D(j,1)\\
& \cong j^\ast C(1,d)\\
& \cong D(1,j) \odot C(1,d)\\
& \cong C(1,d j)
\end{aligned}$
so that $\ell = d j$ is the $J$-weighted limit of $d$. That is, $D(j,1)$-weighted limits are just given by composition with $j$. But more interestingly, one can show that if $J = D(1,k)$ for some $k\colon D\to A$, then $J$-weighted limits specialize to *pointwise* right Kan extensions along $k$. That is, the extra data in an equipment lets us define the good notion of Kan extension (even in the enriched case) as a special case of a general notion of limit.

Amazingly, a huge amount of category theory can be done at this level of generality. I’ll give just one more example (for now): the theorem that right adjoints preserve limits. Suppose that $\ell\colon A\to C$ is a $J$-weighted limit of $d\colon D\to C$ in the above sense, and let $g\colon C\to B$ be an arrow with a left adjoint $f\colon B\to C$. We want to show that $g\ell$ is a $J$-weighted limit of $g d$. But we have $\begin{aligned} B(1,g\ell) &\cong C(1,\ell) \odot B(1,g)\\ &\cong \big(C(1,d) \lhd J\big) \odot C(f,1)\\ &\cong C(1,f) \rhd \big(C(1,d) \lhd J\big)\\ &\cong \big(C(1,f) \rhd C(1,d)\big) \lhd J\\ &\cong \big(C(1,d) \odot C(f,1)\big) \lhd J\\ &\cong \big(C(1,d) \odot B(1,g)\big) \lhd J\\ &\cong B(1,g d) \lhd J. \end{aligned}$ which is what we want.

Finally, in the interests of full disclosure, I should say that equipments are not the *only* way to do formal category theory. A sort-of equivalent approach, due to Street and Walters, is a “Yoneda structure,” which equips a 2-category with “presheaf objects” so that profunctors can be recovered as functors $A\to P B$. (It’s only “sort-of” equivalent due to differences in how size is dealt with.) Alternately, one can start from a well-behaved 2-category, such as a 2-topos, and *construct* an equipment or Yoneda structure, in one of several ways, and if one likes one can work only with those constructions without ever saying “equipment” or “Yoneda structure.” But I think that isolating the “proarrow structure” that enables us to do formal category theory is helpful, and can provide useful insights even if we only care about one particular kind of category theory—just like knowing some ordinary category theory can be helpful even if we only care about one particular category.

## Re: Equipments

You know me, so I'm trying to understand equipments by first figuring out what they are a categorification of. Your introductory paragraphs imply that they're a categorification of categories, but I don't buy it. Let me decategorify paragraph 4 (where the first paragraph is paragraph 0):

So maybe an equipment is a categorification of something like an allegory?

Except that we usually

don'tthink of relations as missing from ordinary category theory. We can define an internal relation $C \nrightarrow D$ in any category to be an object $R$ with morphisms $p\colon R \to C$ and $q\colon R \to D$ that satisfy a joint monicity condition. So why can't we define an internal profunctor $C \nrightarrow D$ in any $2$-category to be an object $R$ with morphisms $p\colon R \to C$ and $q\colon R \to D$ equipped with a joint monicity structure?Trying to write down that structure, I see that already this is not possible even when dealing with posets as categories enriched over $\mathbb{2}$. Of course, that means that there

isan interesting decategorification of the notion of equipment which serves as a universe in which to doorder theory. (This is an example of how categorification directly takes us from posets to categories or from categories to groupoids, while it is laxification that takes us from sets to posets or from groupoids to categories, and these are separate operations.) Has anybody studied that?Conversely, I would hope that, as an unlaxified categorification of our ability to study relations internal to an arbitrary category, we can also study profunctors internal to an arbitrary $(2,1)$-category. Do we have a theorem about that, that any locally groupoidal $2$-category naturally has the structure of an equipment?

I think that I may have talked with you about this already on your personal web, Mike, but I can't check it now since the Ruby on Rails application is down. (In principle, I could check my backups, but that's not very convenient.) Sorry if you already explained all of this and it didn't stick the first time.