Adjunctions are well-known and fundamental in category theory. Somewhat less well-known are *two-variable adjunctions*, consisting of functors $<semantics>f:A\times B\to C<annotation\; encoding="application/x-tex">f:A\backslash times\; B\backslash to\; C</annotation></semantics>$, $<semantics>g:{A}^{\mathrm{op}}\times C\to B<annotation\; encoding="application/x-tex">g:A^\{op\}\backslash times\; C\backslash to\; B</annotation></semantics>$, and $<semantics>h:{B}^{\mathrm{op}}\times C\to A<annotation\; encoding="application/x-tex">h:B^\{op\}\backslash times\; C\backslash to\; A</annotation></semantics>$ and natural isomorphisms

$$<semantics>C(f(a,b),c)\cong B(b,g(a,c))\cong A(a,h(b,c)).<annotation\; encoding="application/x-tex">\; C(f(a,b),c)\; \backslash cong\; B(b,g(a,c))\; \backslash cong\; A(a,h(b,c)).</annotation></semantics>$$

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 $<semantics>f(a,-)\u22a3g(a,-)<annotation\; encoding="application/x-tex">f(a,-)\backslash dashv\; g(a,-)</annotation></semantics>$ and $<semantics>f(-,b)\u22a3h(b,-)<annotation\; encoding="application/x-tex">f(-,b)\; \backslash dashv\; h(b,-)</annotation></semantics>$).

Now, ordinary adjunctions are the morphisms of a 2-category $<semantics>\mathrm{Adj}<annotation\; encoding="application/x-tex">Adj</annotation></semantics>$ (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 “$<semantics>n<annotation\; encoding="application/x-tex">n</annotation></semantics>$-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 $<semantics>f:(A,B)\to (C,D)<annotation\; encoding="application/x-tex">f:\; (A,B)\; \backslash to\; (C,D)</annotation></semantics>$. 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 $<semantics>f:(A,B)\to (C,D)<annotation\; encoding="application/x-tex">f:\; (A,B)\; \backslash to\; (C,D)</annotation></semantics>$ and $<semantics>g:(C,D)\to (E,F)<annotation\; encoding="application/x-tex">g:(C,D)\; \backslash to\; (E,F)</annotation></semantics>$ we get $<semantics>g\circ f:(A,B)\to (E,F)<annotation\; encoding="application/x-tex">g\backslash circ\; f\; :\; (A,B)\; \backslash to\; (E,F)</annotation></semantics>$ — and we can also place morphisms side by side — given $<semantics>f:(A,B)\to (C,D)<annotation\; encoding="application/x-tex">f:(A,B)\; \backslash to\; (C,D)</annotation></semantics>$ and $<semantics>f\prime :(A\prime ,B\prime )\to (C\prime ,D\prime )<annotation\; encoding="application/x-tex">f\text{\'}:(A\text{\'},B\text{\'})\; \backslash to\; (C\text{\'},D\text{\'})</annotation></semantics>$ we get $<semantics>(f,f\prime ):(A,B,A\prime ,B\prime )\to (C,D,C\prime ,D\prime )<annotation\; encoding="application/x-tex">(f,f\text{\'})\; :\; (A,B,A\text{\'},B\text{\'})\; \backslash to\; (C,D,C\text{\'},D\text{\'})</annotation></semantics>$.

A polycategory is different: in a polycategory we can only “compose along single objects”, with the “leftover” objects in the codomain of $<semantics>f<annotation\; encoding="application/x-tex">f</annotation></semantics>$ and the domain of $<semantics>g<annotation\; encoding="application/x-tex">g</annotation></semantics>$ surviving into the codomain and domain of $<semantics>g\circ f<annotation\; encoding="application/x-tex">g\backslash circ\; f</annotation></semantics>$. For instance, given $<semantics>f:(A,B)\to (C,D)<annotation\; encoding="application/x-tex">f:\; (A,B)\; \backslash to\; (C,D)</annotation></semantics>$ and $<semantics>g:(E,C)\to (F,G)<annotation\; encoding="application/x-tex">g:(E,C)\; \backslash to\; (F,G)</annotation></semantics>$ we get $<semantics>g{\circ}_{C}f:(E,A,B)\to (F,G,D)<annotation\; encoding="application/x-tex">g\backslash circ\_C\; f\; :\; (E,A,B)\; \backslash to\; (F,G,D)</annotation></semantics>$. 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 $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$ whose objects are categories and whose “poly-arrows” are multivariable adjunctions. What is a multivariable adjunction $<semantics>(A,B)\to (C,D)<annotation\; encoding="application/x-tex">(A,B)\; \backslash to\; (C,D)</annotation></semantics>$? There’s really only one possible answer, once you think to ask the question: it consists of four functors

$$<semantics>f:{C}^{\mathrm{op}}\times A\times B\to D\phantom{\rule{1em}{0ex}}g:A\times B\times {D}^{\mathrm{op}}\to C\phantom{\rule{1em}{0ex}}h:{A}^{\mathrm{op}}\times C\times D\to B\phantom{\rule{1em}{0ex}}k:C\times D\times {B}^{\mathrm{op}}\to A<annotation\; encoding="application/x-tex">\; f:C^\{op\}\backslash times\; A\backslash times\; B\; \backslash to\; D\; \backslash quad\; g:A\; \backslash times\; B\; \backslash times\; D^\{op\}\; \backslash to\; C\; \backslash quad\; h\; :\; A^\{op\}\backslash times\; C\backslash times\; D\backslash to\; B\; \backslash quad\; k\; :\; C\backslash times\; D\; \backslash times\; B^\{op\}\backslash to\; A\; </annotation></semantics>$$

and natural isomorphisms

$$<semantics>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)).<annotation\; encoding="application/x-tex">\; D(f(c,a,b),d)\; \backslash cong\; C(g(a,b,d),c)\; \backslash cong\; B(b,h(a,c,d))\; \backslash cong\; A(a,k(c,d,b)).\; </annotation></semantics>$$

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 “$<semantics>(2,2)<annotation\; encoding="application/x-tex">(2,2)</annotation></semantics>$-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 $<semantics>(n,m)<annotation\; encoding="application/x-tex">(n,m)</annotation></semantics>$-variable adjunction. Of course, a $<semantics>(1,1)<annotation\; encoding="application/x-tex">(1,1)</annotation></semantics>$-variable adjunction is an ordinary adjunction, and a $<semantics>(2,1)<annotation\; encoding="application/x-tex">(2,1)</annotation></semantics>$-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 $<semantics>(f,g,h,k):(A,B)\to (C,D)<annotation\; encoding="application/x-tex">(f,g,h,k)\; :\; (A,B)\; \backslash to\; (C,D)</annotation></semantics>$ as above, we have a two-variable adjunction $<semantics>(\ell ,m,n):(D,E)\to Z<annotation\; encoding="application/x-tex">(\backslash ell,m,n)\; :\; (D,E)\backslash to\; Z</annotation></semantics>$ with $<semantics>Z(\ell (d,e),z)\cong D(d,m(e,z))\cong E(e,n(d,z))<annotation\; encoding="application/x-tex">Z(\backslash ell(d,e),z)\; \backslash cong\; D(d,m(e,z))\; \backslash cong\; E(e,n(d,z))</annotation></semantics>$. Then we have a composite multivariable adjunction $<semantics>(A,B,E)\to (C,Z)<annotation\; encoding="application/x-tex">(A,B,E)\; \backslash to\; (C,Z)</annotation></semantics>$ defined by
$$<semantics>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 <annotation\; encoding="application/x-tex">\; C(g(a,b,m(e,z)),c)\; \backslash cong\; Z(\backslash ell(f(c,a,b),e),z)\; \backslash cong\; A(a,k(c,m(e,z),b))\; \backslash cong\; \backslash cdots\; </annotation></semantics>$$

It’s also interesting to consider what happens when the domain or codomain is *empty*. For instance, a $<semantics>(0,2)<annotation\; encoding="application/x-tex">(0,2)</annotation></semantics>$-variable adjunction $<semantics>()\to (A,B)<annotation\; encoding="application/x-tex">()\; \backslash to\; (A,B)</annotation></semantics>$ consists of functors $<semantics>f:{A}^{\mathrm{op}}\to B<annotation\; encoding="application/x-tex">f:A^\{op\}\backslash to\; B</annotation></semantics>$ and $<semantics>g:{B}^{\mathrm{op}}\to A<annotation\; encoding="application/x-tex">g:B^\{op\}\backslash to\; A</annotation></semantics>$ and a natural isomorphism $<semantics>B(b,f(a))\cong A(a,g(b))<annotation\; encoding="application/x-tex">B(b,f(a))\; \backslash cong\; A(a,g(b))</annotation></semantics>$. 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 $<semantics>(2,0)<annotation\; encoding="application/x-tex">(2,0)</annotation></semantics>$-variable adjunction $<semantics>(A,B)\to ()<annotation\; encoding="application/x-tex">(A,B)\; \backslash to\; ()</annotation></semantics>$ is a mutual left adjunction $<semantics>B(f(a),b)\cong A(g(b),a)<annotation\; encoding="application/x-tex">B(f(a),b)\; \backslash cong\; A(g(b),a)</annotation></semantics>$. Of course a mutual right or left adjunction can also be described as an ordinary adjunction between $<semantics>{A}^{\mathrm{op}}<annotation\; encoding="application/x-tex">A^\{op\}</annotation></semantics>$ and $<semantics>B<annotation\; encoding="application/x-tex">B</annotation></semantics>$, or between $<semantics>A<annotation\; encoding="application/x-tex">A</annotation></semantics>$ and $<semantics>{B}^{\mathrm{op}}<annotation\; encoding="application/x-tex">B^\{op\}</annotation></semantics>$, but the choice of which category to oppositize is arbitrary; the polycategory $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$ respects mutual right and left adjunctions as independent objects rather than forcing them into the mold of ordinary adjunctions.

More generally, a $<semantics>(0,n)<annotation\; encoding="application/x-tex">(0,n)</annotation></semantics>$-variable adjunction $<semantics>()\to ({A}_{1},\dots ,{A}_{n})<annotation\; encoding="application/x-tex">()\; \backslash to\; (A\_1,\backslash dots,A\_n)</annotation></semantics>$ is a “mutual right multivariable adjunction” between $<semantics>n<annotation\; encoding="application/x-tex">n</annotation></semantics>$ contravariant functors
$$<semantics>{f}_{i}:{A}_{i+1}\times \cdots \times {A}_{n}\times {A}_{1}\times \cdots \times {A}_{i-1}\to {A}_{i}^{\mathrm{op}}.<annotation\; encoding="application/x-tex">f\_i\; :\; A\_\{i+1\}\backslash times\; \backslash cdots\; \backslash times\; A\_n\; \backslash times\; A\_1\; \backslash times\; \backslash cdots\; \backslash times\; A\_\{i-1\}\backslash to\; A\_i^\{op\}.</annotation></semantics>$$
Just as a $<semantics>(0,2)<annotation\; encoding="application/x-tex">(0,2)</annotation></semantics>$-variable adjunction can be forced into the mold of a $<semantics>(1,1)<annotation\; encoding="application/x-tex">(1,1)</annotation></semantics>$-variable adjunction by oppositizing one category, an $<semantics>(n,1)<annotation\; encoding="application/x-tex">(n,1)</annotation></semantics>$-variable adjunction can be forced into the mold of a $<semantics>(0,n)<annotation\; encoding="application/x-tex">(0,n)</annotation></semantics>$-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 $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$ again treats them as independent objects.

What role, then, do opposite categories play in the polycategory $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$? 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 $<semantics>(A,B)<annotation\; encoding="application/x-tex">(A,B)</annotation></semantics>$ in a monoidal category consists of a unit and counit $<semantics>\eta :I\to A\otimes B<annotation\; encoding="application/x-tex">\backslash eta\; :\; I\; \backslash to\; A\backslash otimes\; B</annotation></semantics>$ and $<semantics>\epsilon :B\otimes A\to I<annotation\; encoding="application/x-tex">\backslash varepsilon\; :B\; \backslash otimes\; A\; \backslash to\; I</annotation></semantics>$ satisfying the triangle identities. This cannot be phrased in a mere multicategory, because $<semantics>\eta <annotation\; encoding="application/x-tex">\backslash eta</annotation></semantics>$ involves two objects in its codomain (and $<semantics>\epsilon <annotation\; encoding="application/x-tex">\backslash varepsilon</annotation></semantics>$ 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 $<semantics>\eta :()\to (A,B)<annotation\; encoding="application/x-tex">\backslash eta\; :\; ()\; \backslash to\; (A,\; B)</annotation></semantics>$ and $<semantics>\epsilon :(B,A)\to ()<annotation\; encoding="application/x-tex">\backslash varepsilon\; :\; (B,A)\backslash to\; ()</annotation></semantics>$, and it turns out that the composition rule of a polycategory is exactly what we need for the triangle identities to make sense: $<semantics>\epsilon {\circ}_{A}\eta ={1}_{B}<annotation\; encoding="application/x-tex">\backslash varepsilon\; \backslash circ\_A\; \backslash eta\; =\; 1\_\{B\}</annotation></semantics>$ and $<semantics>\epsilon {\circ}_{B}\eta ={1}_{A}<annotation\; encoding="application/x-tex">\backslash varepsilon\; \backslash circ\_\{B\}\; \backslash eta\; =\; 1\_A</annotation></semantics>$.

What is a dual pair in $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$? As we saw above, $<semantics>\eta <annotation\; encoding="application/x-tex">\backslash eta</annotation></semantics>$ is a mutual right adjunction $<semantics>B(b,{\eta}_{1}(a))\cong A(a,{\eta}_{2}(b))<annotation\; encoding="application/x-tex">B(b,\backslash eta\_1(a))\; \backslash cong\; A(a,\backslash eta\_2(b))</annotation></semantics>$, and $<semantics>\epsilon <annotation\; encoding="application/x-tex">\backslash varepsilon</annotation></semantics>$ is a mutual left adjunction $<semantics>B({\epsilon}_{1}(a),b)\cong A({\epsilon}_{2}(b),a)<annotation\; encoding="application/x-tex">B(\backslash varepsilon\_1(a),b)\; \backslash cong\; A(\backslash varepsilon\_2(b),a)</annotation></semantics>$. The triangle identities (suitably weakened up to isomorphism) say that $<semantics>{\epsilon}_{2}\circ {\eta}_{1}\cong {1}_{A}<annotation\; encoding="application/x-tex">\backslash varepsilon\_2\; \backslash circ\; \backslash eta\_1\; \backslash cong\; 1\_A</annotation></semantics>$ and $<semantics>{\eta}_{2}\circ {\epsilon}_{1}\cong {1}_{A}<annotation\; encoding="application/x-tex">\backslash eta\_2\; \backslash circ\; \backslash varepsilon\_1\; \backslash cong\; 1\_A</annotation></semantics>$ and $<semantics>{\epsilon}_{1}\circ {\eta}_{2}\cong {1}_{B}<annotation\; encoding="application/x-tex">\backslash varepsilon\_1\; \backslash circ\; \backslash eta\_2\; \backslash cong\; 1\_B</annotation></semantics>$ and $<semantics>{\eta}_{1}\circ {\epsilon}_{2}\cong {1}_{B}<annotation\; encoding="application/x-tex">\backslash eta\_1\; \backslash circ\; \backslash varepsilon\_2\; \backslash cong\; 1\_B</annotation></semantics>$; thus these two adjunctions are actually both the same dual equivalence $<semantics>B\simeq {A}^{\mathrm{op}}<annotation\; encoding="application/x-tex">B\backslash simeq\; A^\{op\}</annotation></semantics>$. In particular, there is a canonical dual pair $<semantics>(A,{A}^{\mathrm{op}})<annotation\; encoding="application/x-tex">(A,A^\{op\})</annotation></semantics>$, and any other dual pair is equivalent to this one.

Let me say that again: in the polycategory $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$, *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 $<semantics>\mathrm{Cat}<annotation\; encoding="application/x-tex">Cat</annotation></semantics>$; but in $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$, 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 $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$ 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 $<semantics>(A,{A}^{\mathrm{op}})<annotation\; encoding="application/x-tex">(A,A^\{op\})</annotation></semantics>$ allows us to implement the “cyclic action” on multivariable adjunctions by simple composition. Given a $<semantics>(2,1)<annotation\; encoding="application/x-tex">(2,1)</annotation></semantics>$-variable adjunction $<semantics>(A,B)\to C<annotation\; encoding="application/x-tex">(A,B)\; \backslash to\; C</annotation></semantics>$, we can compose it polycategorically with $<semantics>\eta :()\to (A,{A}^{\mathrm{op}})<annotation\; encoding="application/x-tex">\backslash eta\; :\; ()\; \backslash to\; (A,A^\{op\})</annotation></semantics>$ to obtain a $<semantics>(1,2)<annotation\; encoding="application/x-tex">(1,2)</annotation></semantics>$-variable adjunction $<semantics>B\to ({A}^{\mathrm{op}},C)<annotation\; encoding="application/x-tex">B\; \backslash to\; (A^\{op\},C)</annotation></semantics>$. Then we can compose that with $<semantics>\epsilon :({C}^{\mathrm{op}},C)\to ()<annotation\; encoding="application/x-tex">\backslash varepsilon\; :\; (C^\{op\},C)\backslash to\; ()</annotation></semantics>$ to obtain another $<semantics>(2,1)<annotation\; encoding="application/x-tex">(2,1)</annotation></semantics>$-variable adjunction $<semantics>(B,{C}^{\mathrm{op}})\to {A}^{\mathrm{op}}<annotation\; encoding="application/x-tex">(B,C^\{op\})\backslash to\; A^\{op\}</annotation></semantics>$. 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:
$$<semantics>\mathrm{Hom}(A\otimes B,C)\cong \mathrm{Hom}(B,{A}^{*}\otimes C)\cong \mathrm{Hom}(B\otimes {C}^{*},{A}^{*}).<annotation\; encoding="application/x-tex">Hom(A\backslash otimes\; B,\; C)\; \backslash cong\; Hom(B,\; A^\backslash ast\; \backslash otimes\; C)\; \backslash cong\; Hom(B\backslash otimes\; C^\backslash ast,\; A^\backslash ast).</annotation></semantics>$$
In string diagram notation, the latter is represented by “turning strings around”, regarding the unit and counit of the dual pair $<semantics>(A,{A}^{*})<annotation\; encoding="application/x-tex">(A,A^\backslash ast)</annotation></semantics>$ 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 $<semantics>\mathrm{MVar}<annotation\; encoding="application/x-tex">MVar</annotation></semantics>$. For now, let me leave you with some negative thinking puzzles:

- What is a $<semantics>(0,1)<annotation\; encoding="application/x-tex">(0,1)</annotation></semantics>$-variable adjunction?
- How about a $<semantics>(1,0)<annotation\; encoding="application/x-tex">(1,0)</annotation></semantics>$-variable adjunction?
- How about a $<semantics>(0,0)<annotation\; encoding="application/x-tex">(0,0)</annotation></semantics>$-variable adjunction?