### The Polycategory of Multivariable Adjunctions

#### Posted by Mike Shulman

Adjunctions are well-known and fundamental in category theory. Somewhat less well-known are *two-variable adjunctions*, consisting of functors $f:A\times B\to C$, $g:A^{op}\times C\to B$, and $h:B^{op}\times C\to A$ and natural isomorphisms

$C(f(a,b),c) \cong B(b,g(a,c)) \cong A(a,h(b,c)).$

These are also ubiquitous in mathematics, for instance in the notion of closed monoidal category, or in the hom-power-copower situation of an enriched category. But it seems that only fairly recently has there been a wider appreciation that it is worth defining and studying them in their own right (rather than simply as a pair of parametrized adjunctions $f(a,-)\dashv g(a,-)$ and $f(-,b) \dashv h(b,-)$).

Now, ordinary adjunctions are the morphisms of a 2-category $Adj$ (with an arbitrary choice of direction, say pointing in the direction of the left adjoint), whose 2-cells are compatible pairs of natural transformations (a fundamental result being that either uniquely determines the other). It’s obvious to guess that two-variable adjunctions should be the binary morphisms in a multicategory of “$n$-ary adjunctions”, and this is indeed the case. In fact, Eugenia, Nick, and Emily showed that multivariable adjunctions form a *cyclic* multicategory, and indeed even a cyclic *double* multicategory.

In this post, however, I want to argue that it’s even better to regard multivariable adjunctions as forming a slightly different structure called a polycategory.

What is a polycategory? The first thing to say about it is that it’s like a multicategory, but it allows the *codomain* of a morphism to contain multiple objects, as well as the domain. Thus we have morphisms like $f: (A,B) \to (C,D)$. However, this description is incomplete, even informally, because it doesn’t tell us how we are allowed to compose such morphisms. Indeed, there are many *different* structures that admit this same description, but differ in the ways that morphisms can be composed.

One such structure is a prop, which John and his students have been writing a lot about recently. In a prop, we compose by simply matching domains and codomains as lists — given $f: (A,B) \to (C,D)$ and $g:(C,D) \to (E,F)$ we get $g\circ f : (A,B) \to (E,F)$ — and we can also place morphisms side by side — given $f:(A,B) \to (C,D)$ and $f':(A',B') \to (C',D')$ we get $(f,f') : (A,B,A',B') \to (C,D,C',D')$.

A polycategory is different: in a polycategory we can only “compose along single objects”, with the “leftover” objects in the codomain of $f$ and the domain of $g$ surviving into the codomain and domain of $g\circ f$. For instance, given $f: (A,B) \to (C,D)$ and $g:(E,C) \to (F,G)$ we get $g\circ_C f : (E,A,B) \to (F,G,D)$. This may seem a little weird at first, and the usual examples (semantics for two-sided sequents in linear logic) are rather removed from the experience of most mathematicians. But in fact it’s exactly what we need for multivariable adjunctions!

I claim there is a polycategory $MVar$ whose objects are categories and whose “poly-arrows” are multivariable adjunctions. What is a multivariable adjunction $(A,B) \to (C,D)$? There’s really only one possible answer, once you think to ask the question: it consists of four functors

$f:C^{op}\times A\times B \to D \quad g:A \times B \times D^{op} \to C \quad h : A^{op}\times C\times D\to B \quad k : C\times D \times B^{op}\to A$

and natural isomorphisms

$D(f(c,a,b),d) \cong C(g(a,b,d),c) \cong B(b,h(a,c,d)) \cong A(a,k(c,d,b)).$

I find this definition quite illuminating already. One of the odd things about a two-variable adjunction, as usually defined, is the asymmetric placement of opposites. (Indeed, I suspect this oddness may have been a not insignificant inhibitor to their formal study.) The polycategorical perspective reveals that this arises simply from the asymmetry of having a 2-ary domain but a 1-ary codomain: a “$(2,2)$-variable adjunction” as above looks much more symmetrical.

At this point it’s an exercise for the reader to write down the general notion of $(n,m)$-variable adjunction. Of course, a $(1,1)$-variable adjunction is an ordinary adjunction, and a $(2,1)$-variable adjunction is a two-variable adjunction in the usual sense. It’s also a nice exercise to convince yourself that polycategory-style composition “along one object” is also exactly right for multivariable adjunctions. For instance, suppose in addition to $(f,g,h,k) : (A,B) \to (C,D)$ as above, we have a two-variable adjunction $(\ell,m,n) : (D,E)\to Z$ with $Z(\ell(d,e),z) \cong D(d,m(e,z)) \cong E(e,n(d,z))$. Then we have a composite multivariable adjunction $(A,B,E) \to (C,Z)$ defined by $C(g(a,b,m(e,z)),c) \cong Z(\ell(f(c,a,b),e),z) \cong A(a,k(c,m(e,z),b)) \cong \cdots$

It’s also interesting to consider what happens when the domain or codomain is *empty*. For instance, a $(0,2)$-variable adjunction $() \to (A,B)$ consists of functors $f:A^{op}\to B$ and $g:B^{op}\to A$ and a natural isomorphism $B(b,f(a)) \cong A(a,g(b))$. This is sometimes called a **mutual right adjunction** or dual adjunction, and such things do arise in plenty of examples. Many Galois connections are mutual right adjunctions between posets, and also for instance the contravariant powerset functor is mutually right adjoint to itself. Similarly, a $(2,0)$-variable adjunction $(A,B) \to ()$ is a mutual left adjunction $B(f(a),b) \cong A(g(b),a)$. Of course a mutual right or left adjunction can also be described as an ordinary adjunction between $A^{op}$ and $B$, or between $A$ and $B^{op}$, but the choice of which category to oppositize is arbitrary; the polycategory $MVar$ respects mutual right and left adjunctions as independent objects rather than forcing them into the mold of ordinary adjunctions.

More generally, a $(0,n)$-variable adjunction $() \to (A_1,\dots,A_n)$ is a “mutual right multivariable adjunction” between $n$ contravariant functors $f_i : A_{i+1}\times \cdots \times A_n \times A_1 \times \cdots \times A_{i-1}\to A_i^{op}.$ Just as a $(0,2)$-variable adjunction can be forced into the mold of a $(1,1)$-variable adjunction by oppositizing one category, an $(n,1)$-variable adjunction can be forced into the mold of a $(0,n)$-variable adjunction by oppositizing all but one of the categories — Eugenia, Nick, and Emily found this helpful in describing the cyclic action. But the polycategory $MVar$ again treats them as independent objects.

What role, then, do opposite categories play in the polycategory $MVar$? Or put differently, what happened to the cyclic action on the multicategory? The answer is once again quite beautiful: opposite categories are duals. The usual notion of dual pair $(A,B)$ in a monoidal category consists of a unit and counit $\eta : I \to A\otimes B$ and $\varepsilon :B \otimes A \to I$ satisfying the triangle identities. This cannot be phrased in a mere multicategory, because $\eta$ involves two objects in its codomain (and $\varepsilon$ involves zero), whereas in a multicategory every morphism has exactly one object in its codomain. But in a polycategory, with this restriction lifted, we can write $\eta : () \to (A, B)$ and $\varepsilon : (B,A)\to ()$, and it turns out that the composition rule of a polycategory is exactly what we need for the triangle identities to make sense: $\varepsilon \circ_A \eta = 1_{B}$ and $\varepsilon \circ_{B} \eta = 1_A$.

What is a dual pair in $MVar$? As we saw above, $\eta$ is a mutual right adjunction $B(b,\eta_1(a)) \cong A(a,\eta_2(b))$, and $\varepsilon$ is a mutual left adjunction $B(\varepsilon_1(a),b) \cong A(\varepsilon_2(b),a)$. The triangle identities (suitably weakened up to isomorphism) say that $\varepsilon_2 \circ \eta_1 \cong 1_A$ and $\eta_2 \circ \varepsilon_1 \cong 1_A$ and $\varepsilon_1 \circ \eta_2 \cong 1_B$ and $\eta_1 \circ \varepsilon_2 \cong 1_B$; thus these two adjunctions are actually both the same dual equivalence $B\simeq A^{op}$. In particular, there is a canonical dual pair $(A,A^{op})$, and any other dual pair is equivalent to this one.

Let me say that again: in the polycategory $MVar$, *opposite categories are duals*. I find this really exciting: opposite categories are one of the more mysterious parts of category theory to me, largely because they don’t have a universal property in $Cat$; but in $MVar$, they do! To be sure, they also have universal properties in other places. In 1606.05058 I noted that you can give them a universal property as a representing object for contravariant functors; but this is fairly tautological. And it’s also well-known that they are duals in the usual monoidal sense (not our generalized polycategory sense) in the monoidal bicategory Prof; but this characterizes them only up to *Morita* equivalence, whereas the duality in $MVar$ characterizes them up to *ordinary* equivalence of categories. Of course, we did already use opposite categories in *defining* the notion of multivariable adjunction, so it’s not as if this produces them out of thin air; but I do feel that it does give an important insight into what they are.

In particular, the dual pair $(A,A^{op})$ allows us to implement the “cyclic action” on multivariable adjunctions by simple composition. Given a $(2,1)$-variable adjunction $(A,B) \to C$, we can compose it polycategorically with $\eta : () \to (A,A^{op})$ to obtain a $(1,2)$-variable adjunction $B \to (A^{op},C)$. Then we can compose that with $\varepsilon : (C^{op},C)\to ()$ to obtain another $(2,1)$-variable adjunction $(B,C^{op})\to A^{op}$. This is exactly the action of the cyclic structure described by Eugenia, Nick, and Emily on our original multivariable adjunction. (In fact, there’s a precise sense in which a cyclic multicategory is “almost” equivalent to a polycategory with duals; for now I’ll leave that as an exercise for the reader.)

Note the similarity to how dual pairs in a monoidal category shift back and forth: $Hom(A\otimes B, C) \cong Hom(B, A^\ast \otimes C) \cong Hom(B\otimes C^\ast, A^\ast).$ In string diagram notation, the latter is represented by “turning strings around”, regarding the unit and counit of the dual pair $(A,A^\ast)$ as a “cup” and “cap”. Pleasingly, there is also a string diagram notation for polycategories, in which dual pairs behave exactly the same way; we simply restrict the ways that strings are allowed to be connected together — for instance, no two vertices can be joined by more than one string. (More generally, the condition is that the string diagram should be “simply connected”.)

In future posts I’ll explore some other neat things related to the polycategory $MVar$. For now, let me leave you with some negative thinking puzzles:

- What is a $(0,1)$-variable adjunction?
- How about a $(1,0)$-variable adjunction?
- How about a $(0,0)$-variable adjunction?

## Re: The polycategory of multivariable adjunctions

I forgot to mention that a one-object (symmetric) polycategory is also known as a

dioperad. So if you know what a dioperad is, then you know what a polycategory is: it’s a “colored dioperad”.