Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

November 15, 2019

Doubles for Monoidal Categories

Posted by John Baez

guest post by Fosco Loregian and Bryce Clarke

This post belongs to the series of the Applied Category Theory Adjoint School 2019 posts. It is the result of the work of the group “Profunctor optics” led by Bartosz Milewski, and constitutes a theoretical preliminary to the real meat, i.e. the discussion of Riley’s paper Categories of Optics by Mario Roman and Emily Pillmore (hi guys! We did our best to open you the way!)

In the following post, we first introduce you to the language of co/ends. Then we deconstruct this paper by Pastro and Street:

Our goal is to make its main result (almost) straightforward: Tambara modules can be characterized as particular profunctors, precisely those that interact well with a monoidal action on their domain. For a fixed category XX, these endoprofunctors form the Kleisli category of a monad on Prof(X,X)Prof(X,X).

Coend calculus

Coend calculus rules the behaviour of certain universal objects associated to functors of two variables T:C op×CDT : C^{op}\times C \to D; intuitively, end(T)end(T) stands to TT as the limit limF\lim\, F of F:ABF : A \to B stands to FF; the major difference is that end(T)end(T) takes into account the fact that TT eats at the same time two “terms” of the same “type” CC, once covariantly in the second component, and once contravariantly in the first: on arrows f:ccf : c\to c' the functor TT acts in fact as follows:

Now, a distinguising feature of the objects that depend contra-covariantly on the same variable is that they can be integrated: given a sufficiently regular function f(x)f(x), its dependence from xx can be thought as “covariant” (and defined, say, on a topological vector space VR nV\cong \mathbf{R}^n), whereas the “dxd x” in the symbol f(x)dx \int f(x)d x is contravariant (it belongs to a certain dual space of covectors on VV); altogether, the integral can be thought as exhibiting a contra-covariant dependence from xx.

Ends and coends are associated to functors T:C op×CDT : C^{op}\times C \to D in a similar fashion that resembles integration: they are certain objects cT(c,c)\int_c T(c,c) (the end) and cT(c,c)\int^c T(c,c) (the coend), canonically associated to TT, treating cc as a mute variable (meaning that cT(c,c)\int_c T(c,c) and cT(c,c)\int_{c'} T(c',c') are the same object), and satisfying a “commutative rule of integrals” analogous to f(x,y)dxdy=(f(x,y)dx)dy=(f(x,y)dy)dx \int f(x,y) d x d y = \int \Big(\int f(x,y)d x\Big) d y = \int \Big(\int f(x,y)d y\Big) d x The end of TT is endowed with projections on the “symmetrized components” cT(c,c)T(c,c)\int_c T(c,c) \to T(c',c'), one for each object cc'; dually, the coend cT(c,c)\int^c T(c,c) is endowed with injections T(c,c) cT(c,c)T(c',c') \to \int^c T(c,c).

All in all, this happens also for colimits, so the two constructions are -at least intuitively- tightly related: this intuition can of course be made more precise. Every universal object built in category theory can be thought either as a subobject of a product (a limit), or as a quotient of a coproduct (a colimit), and co/ends make no exception:

  • An end arises as an “object of invariants” cT\int_c T for the action of TT given by the functions on arrows T xy:hom C op×C(x,y)hom D(Tx,Ty)T_{x y} : \hom_{C^{op}\times C}(x,y) \to \hom_D(T x, T y), and it is defined as the subobject of cCT(c,c)\prod_{c\in C} T(c,c) of those elements invariant under this action.
  • Dually, a coend arises as a “quotient space” of cCT(c,c)\coprod_{c\in C}T(c,c) by a suitable equivalence relation generated by the same functions T xy:hom C op×C(x,y)hom D(Tx,Ty)T_{x y} : \hom_{C^{op}\times C}(x,y) \to \hom_D(T x, T y), i.e. as a space of orbits for the action.

More on this will be explained later on in the discussion.

What is more important now, and quite astounding, is that such contra-covariant actions arise at every corner of category theory: using co/ends it is possible to re-state the Yoneda lemma and the theory of Kan extensions, and to find plenty of applications to algebra, topology, geometry… and functional programming. :-)

Dinaturality

As already said, a functor T:C op×CDT : C^{op}\times C \to D acts on morphisms as

given two such functors, say P,Q:C op×CDP,Q : C^{op}\times C \to D, we can consider the two diagrams

and

Given two functors F,G:ABF,G : A \to B a natural transformation can be seen as a family of maps that “fill the gap” between F(f)F(f) and G(f)G(f) in a commutative square; in a similar fashion, a dinatural transformation between the above P,QP,Q can be seen as a way to close a certain diagram that testifies a transformation from the arrow action of PP to the arrow action of QQ:

Just as co/limits are defined via suitable transformation to/from a constant, so are co/ends:

  • If Q:C op×CDQ : C^{op}\times C \to D, a wedge for QQ with base xx consists of a dinatural transformation from the constant functor on xDx\in D, i.e. of a family of morphisms α c:xQ(c,c)\alpha_c : x\to Q(c,c) such that for each f:ccf :c\to c' the above hexagon reduces to a commutative square:

  • If P:C op×CDP : C^{op}\times C \to D, a cowedge for PP with tip yy consists of a dinatural transformation to the constant functor on yDy\in D, i.e. of a family of morphisms α c:P(c,c)y\alpha_c : P(c,c) \to y such that for each f:ccf :c\to c' the above hexagon reduces to a commutative square:

    There exists a category Wd(Q)Wd(Q) of wedges, defined with an obvious choice of morphisms between bases; similarly, there is a category of cowedges Cwd(P)Cwd(P).

The end cQ(c,c)\int_c Q(c,c) of QQ is now defined as a terminal object in the category of its wedges; dually, the coend cP(c,c)\int^c P(c,c) of PP is the initial object of the category of its cowedges. Of course, we say “the” end because such an initial object is unique up to unique isomorphism when it exists.

So far, so good. In fact, we didn’t stray much far from plain old category theory, as it is possible to show the following:

Lemma (co/ends are colimits): Given Q:C op×CDQ : C^{op}\times C \to D there exist a category twC\text{tw}\, C and a functor Q τ:twCDQ^\tau : \text{tw}\, C \to D such that cQ(c,c)limQ τ \int_c Q(c,c) \cong \lim \,Q^\tau For those who know: the end of QQ is the weighted colimit of Q:C op×CDQ : C^{op}\times C \to D with the hom C\hom_C functor C op×CSetC^{op}\times C \to Set, and thus the category twC\text{tw}\, C is nothing more, nothing less than the category of elements of hom C\hom_C; this allows for a very explicit presentation of twC\text{tw}\, C:

  • objects: the arrows of CC, f:ccf : c \to c';
  • morphisms: the commutative squares

Corollary (hom commutes with all ends): As a consequence of the fact that cQ\int_c Q is a limit, there is an isomorphism hom C(y, cP(c,c)) chom C(y,P(c,c)) \hom_C\Big(y, \int_c P(c,c)\Big) \cong \int_c \hom_C(y, P(c,c)) natural in yy. Dually, hom C( cP(c,c),y) chom C(P(c,c),y). \hom_C\Big( \int^c P(c,c), y \Big )\cong \int_c \hom_C(P(c,c), y). natural in yy.

(of course, a coend is just an end in the opposite category!)

But why are co/ends denoted as integrals? The notation dates back to Yoneda,

Yoneda, Nobuo. “On Ext and exact sequences.” J. Fac. Sci. Univ. Tokyo Sect. I 8.507-576 (1960): 1960.

(in particular, see §4 but beware that the notation is reversed; a coend is called an integration and denoted a\int_a and an end a *\int_a^\ast is called a cointegration!); all the discussion and terminology is essentially motivated by the fact that an end behaves like an integral:

Theorem (Fubini rule): Let P:C op×C×D op×DEP : C^{op}\times C \times D^{op}\times D \to E be a functor; then c( dP(c,c,d,d)) (c,d)P(c,d,c,d) d( cP(c,c,d,d))(Fub) \int^c\left(\int^d P(c,c,d,d)\right) \cong \int^{(c,d)}P(c,d,c,d) \cong \int^d\left(\int^c P(c,c,d,d)\right) \qquad\qquad{(Fub)} in the sense that if one of the three objects exists, so do the other two, and they are all canonically isomorphic (the category C op×C×D op×DC^{op}\times C \times D^\text{op}\times D is of course equal to (C×D) op×(C×D)(C\times D)^\text{op}\times( C \times D)). Similarly, there is such a rule for ends.

Thus, in category theory integration is “as commutative as it can be”; it can happen in whatever order we desire: given a permutation σ\sigma of the set {1,,n}\{1,\dots,n\}, whenever PP is a functor of 2n2n variables of the form c 1,c 1;c 2,c 2,c n,c nc_1, c_1'; c_2, c_2',\dots c_n, c_n', and the integral c σ1 c σ2 c σnP(c σ1,c σ1,c σ2,c σ2,,c σn,c σn) \int^{c_{\sigma 1}}\int^{c_{\sigma 2}}\cdots \int^{c_{\sigma n}} P(c_{\sigma 1}, c_{\sigma 1}, c_{\sigma 2}, c_{\sigma 2}, \dots, c_{\sigma n}, c_{\sigma n}) exists, then so does (c 1,,c n)P(c 1,c 1,c 2,c 2,,c n,c n) \int^{(c_1,\dots, c_n)} P(c_1, c_1, c_2, c_2, \dots, c_n, c_n) Proof. Sending a functor P:C op×CDP : C^{op}\times C \to D to its coend is a functor C:[C op×C,D]D\int^C : [C^{op}\times C, D] \to D, and it is easy to see that it is a left adjoint (for those who know, C\int^C is a particular kind of weighted colimit, and every such weighted colimit admits a right adjoint expressed in terms of the weight): now it’s easy to prove that these right adjoints R C,R D,R C,DR_C, R_D, R_{C,D} commute, i.e. R CR DR DR CR C,D R_C\circ R_D \cong R_D \circ R_C \cong R_{C,D} thus yielding the Fubini rule by uniqueness of adjoints.

The building blocks of co/end calculus

Here we explore how co/ends allow to rediscover category theory from scratch.

Natural transformations

Theorem (Natural transformations as an end) Let F,G:CDF,G : C \to D be two functors; then, there is an isomorphism Nat(F,G) chom D(Fc,Gc)(nat) Nat(F,G) \cong \int_c \hom_D(F c,G c) \qquad\qquad{(nat)} Proof. There is a natural choice for a wedge ω:Nat(F,G)hom(Fc,Gc)\omega : Nat(F,G) \to \hom(F c,G c), that sends a natural transformation to its cc-component; it remains to show that this is indeed a terminal wedge. Given another wedge α:Ahom(Fc,Gc)\alpha : A \to \hom(F c, G c), the wedge condition translates into the equation

valid for every aAa\in A; but this is only a convoluted way to say that for every aAa\in A the family {α a,c:FcGc} \{\alpha_{a,c} : F c \to G c\} is a natural transformation.

Two important remarks:

  1. In an additive setting, the wedge condition for α\alpha can be easily translated into the fact that natural transformations appear form the kernel of a certain map; the intuition that naturality is a cocycle condition is more or less what led Yoneda to study ends and coends in homological algebra.

  2. Even in a non-additive setting, one can easily see that a natural transformation α:FG\alpha : F \Rightarrow G is a map that equalizes the action of F,GF,G on arrows; this means that the following diagram Nat(F,G) cChom(Fc,Gc)Ff *Gf * cchom(Fc,Gc) Nat(F,G) \to \prod_{c\in C} \hom(F c, G c) \underset{G f_\ast}{\overset{F f^\ast}\rightrightarrows} \prod_{c\to c'} \hom(F c, G c') is an equalizer; there is nothing special here, as for every functor T:C op×CDT : C^{op}\times C \to D there is a similar equalizer diagram cT(c,c) cCT(c,c)Tf *Tf * ccT(c,c) \int_c T(c,c) \to \prod_{c\in C} T(c,c) \underset{T f_\ast}{\overset{T f^\ast}\rightrightarrows} \prod_{c\to c'} T(c, c')

Here’s a discussion on what is the coend of the hom functor; I claim that the following object represents the coend of hom(F,G)\hom(F-,G-), perhaps you know where the same object appears under a different name, and where it is used for some purpose? I find this particularly intriguing in the case of a monoid MM regarded as single-object category:

  • the end of hom M\hom_M is the center of the monoid, i.e. the subset {mMmx=xmxM}\{m\in M\mid mx=xm \forall x\in M\};
  • the coend of hom M\hom_M corresponds to something like the π 0\pi_0 of the monoid.

I didn’t expect these construction to be dual, and yet they are!

Claim (but also: exercise for the reader). Let CC be a small category. The coend chom C(c,c) \int^c \hom_C(c,c) is the set of connected components of the “endo-comma” category whose objects are endomorphisms of CC, and whose morphisms (u:xx)(v:yy)(u : x \to x) \to (v : y \to y) are the f:xyf : x \to y such that fu=vff u = v f. More generally, if F,G:CDF,G: C \to D are functors there is an isomorphism chom(Fc,Gc)π 0((F/G) end) \int^c \hom(F c, G c) \cong \pi_0((F/G)_{end}) where the endomorphism comma is defined similarly.

Compare this example with the following: let AA be an associative algebra, and let us consider it as a category with a single object; then the co/end of its hom functor correspond to the 0-th Hochschild co/homology of AA! People in algebraic geometry, especially the Russian school of DG-categories love this kind of results!

It would be awesome to recover higher homotopy and co/homology of geometric objects as coends: any ideas?

The Yoneda lemma and Kan extensions

On the first day He created the Yoneda lemma, and He saw that it was good:

Theorem (The ninja Yoneda lemma) Let F:C opSetF : C^{op} \to Set; then for every object aCa\in C, Fa cFc×hom C(a,c) cSet(hom C(c,a),Fc) F a\cong \int^c F c \times \hom_C(a,c) \cong \int_c Set(\hom_C(c,a), F c) Proof. The set cSet(hom C(c,a),Fc)\int_c Set(\hom_C(c,a), F c) is the set of natural transformations from hom(,c)\hom(-,c) to FF, and thus the non-ninja Yoneda lemma yields an isomorphism between this set and FaF a. Dually, call FyF\otimes y the functor a xFx×hom C(a,x) a\mapsto \int^x F x\times \hom_C(a,x) Then, we have Nat(Fy,G) aSet(Fx×hom C(a,x),Ga) a xSet(Fx×hom C(a,x),Ga) a xSet(Fx,[hom C(a,x),Ga]) xSet(Fx, a[hom C(a,x),Ga]) xSet(Fx,Nat(y(x),G)) Nat(F,G) \begin{array}{rl} Nat(F\otimes y, G) &\cong\displaystyle \int_a Set(F x\times \hom_C(a,x), G a)\\ &\displaystyle\cong\int_a\int_x Set(F x\times \hom_C(a,x), G a)\\ &\displaystyle\cong\int_a\int_x Set(F x, [\hom_C(a,x), G a])\\ &\displaystyle\cong\int_x Set(F x, \int_a[\hom_C(a,x), G a])\\ &\displaystyle\cong\int_x Set(F x, Nat(y(x), G))\\ &\displaystyle\cong Nat(F, G) \end{array} Each of these steps can be easily justified in light of what we already proved:

  • the fact that the hom functor preserves ends;
  • the Fubini rule for ends;
  • the fact that the set of natural transformations between two functors is an end.

This natural deduction-style kind of proof is half-jokingly called “coend-fu” in my note, soon-ish a book, on coends.

Incidentally, the isomorphism Fa cFc×hom C(a,c)F a\cong \int^c F c \times \hom_C(a,c) is precisely the sense in which “every presheaf is a colimit of representable functors”; the colimiting diagram has domain the category of elements of FF, and the natural functor Σ:El(F)C[C op,Set]\Sigma : El(F) \to C \to [C^{op},Set] has colimit FF.

On the second day, He created Kan extensions, and category theory was complete.

Theorem (Kan extensions are co/ends) Let AGBFCA \xleftarrow{G} B\xrightarrow{F} C be a span of functors; if the coend bhom A(Gb,a)×Fb \int^b \hom_A(G b, a) \times F b exists, then it is the value at aa of the left Kan extension of FF along GG; dually, is the end bFb hom A(a,Gb) \int_b F b ^ {\hom_A(a, G b)} exists, then it is the value at aa of the right Kan extension of FF along GG.

Proof. The proof is another lengthy, but completely straightforward, kata using the coend-fu we already know: Nat(Lan GF,H) ahom(Lan GF(a),Ha) ahom( chom(Gc,a)×Fc,Ha) Fub achom(hom(Gc,a)×Fc,Ha) achom(Fc,[hom(Gc,a),Ha]) ccnt chom(Fc, a[hom(Gc,a),Ha]) nat chom(Fc,Nat(hom(Gc,),H)) nat chom(FC,HGC)=Nat(F,HG) \begin{array}{rl} Nat(\text{Lan}_G F, H) &\textstyle \cong\displaystyle \int_a \hom(\text{Lan}_G F( a ), H a ) \\ & \textstyle \cong\displaystyle \int_a \hom\Big( \int^c \hom(G c, a )\times F c, H a \Big) \\ Fub & \textstyle \cong\displaystyle \int_{ a c} \hom\Big( \hom(G c, a )\times F c, H a \Big) \\ & \textstyle \cong\displaystyle \int_{ a c} \hom\Big( F c,[\hom(G c, a ), H a ] \Big) \\ ccnt & \textstyle \cong\displaystyle \int_c \hom\Big( F c,\int_a [\hom(G c, a ), H a ] \Big) \\ nat & \textstyle \cong\displaystyle \int_c \hom\Big( F c,Nat(\hom(G c,-), H) \Big) \\ nat & \textstyle \cong\displaystyle \int_c \hom\Big( F C,H G C \Big) = Nat(F, H G) \\ \end{array}

Bimodules

The paper that we want to discuss today makes heavy use of the theory of bimodules. Let’s dig deeper into their structure. First of all, let us define a bicategory as follows:

  • objects are (unitary) rings R,S,R,S,\dots
  • 1-cells M:RSM : R \to S are modules SM R{}_S M_R, left over RR and right over SS.
  • 2-cells φ: RM S RN S\varphi : {}_R M_S \to {}_R N_S are RR-SS-linear homomorphisms of modules.

The composition of 1-cells is the tensor product of modules:

  • RM SN T{}_R M \otimes_S N_T is a RR-TT-bimodule for every RR-SSbimodule MM and every SS-TT-bimodule NN (so in particular this is not a strict 2-category);
  • 2-cells are composed horizontally and vertically, using the obvious function composition, and bifunctoriality of the \otimes operation.

So far so good! There is a 2-categorical characterization of modules.

What is it good for? Well: rings are monoids in the category of abelian groups. We could have done the very same thing taking (plain) monoids, i.e. monoids in the category of sets, and defining a category of “bimodules” as sets with a left action of some monoid, and a right action of some other monoid.

But we can also generalize the same construction, with no additional cognitive loading, and take X,Y,ZX,Y,Z\dots to be multi-object monoids (i.e. categories): we define a bicategory ModMod as follows:

  • objects are categories C,D,E,C,D, E,\dots
  • 1-cells P:CDP : C \mathrel{⇸} D are functors P:D op×CSetP : D^{op}\times C \to Set
  • 2-cells are natural transformations between functors.

A functor P:D op×CSetP : D^{op}\times C \to Set is a multiobject module on which the multiobject monoids C,DC,D act.

So categories really are monoids, and are also eager to act on sets.

A bimodule is also called a profunctor, a distributor, a correspondence, a span,… and possibly with many other names; each name comes from a certain intuition behind their nature that leads to the definition of the same bicategory:

  • they are called profunctors because they generalize functors: some profunctors are called representable, and they are the ones of the form hom(b,Fa)\hom(b, F a) for some functor F:ABF : A \to B between categories. A pro-functor thus works “on behalf of a functor”, as well as a relation generalizes a function.
  • …which is why some people prefer to call them relators: just as a func-tion is a special kind of rela-tion, a func-tor is a special kind of rela-tor.
  • they are called distributors: as the nLab says,

    Jean Bénabou, who invented the term and originally used “profunctor”, now prefers “distributor”, which is supposed to carry the intuition that a distributor generalizes a functor in a similar way to how a distribution generalizes a function.

    There’s in fact a beautiful story about this: Lawvere defined a notion of distribution between toposes, such that the points of a topos p:Setp : Set \to \mathcal{E} behave like Dirac delta functions, and such that distributions between presheaf toposes are exactly profunctors.

  • they are called correspondences or spans because of the Grothendieck construction: every presheaf P:D op×CSetP : D^{op}\times C \to Set has a category of elements El(P)El(P) that in this case is a discrete fibration over D op×CD^{op}\times C, and composing with the projections, this is a span D opEl(P)CD^{op} \leftarrow El(P) \to C.

Well… until now we cheated a bit. In order to get a bicategory we need to define a composition law for 1-cells and show that it is bifunctorial, and I didn’t tell you how to do it: but it turns out it is really easy, if you know coend-fu! Indeed, the intuition of a bimodule as a “matrix indexed by its domain” and the rule to compose two relations guide us to find an expression to meaningfully compose Q:AB,P:BCQ : A \mathrel{⇸} B, P : B \mathrel{⇸} C. We can define (PQ)(a,c)= bP(a,b)×Q(b,c) (P \diamond Q) (a,c) = \int^b P(a,b)\times Q(b,c) This boils down, on discrete domains A,BSetA,B\in Set to a “matrix product of sets” like (PQ) ac= bBP ab×Q bc (P \diamond Q)_{a c} = \sum_{b\in B} P_{a b}\times Q_{b c} There is also a connection between the ways in which profunctors compose, and the way in which relations do. Indeed, look how the two concepts closely resemble each other: (x,z)SR yY ((x,y)R) ((y,z)S) (PQ)(x,z) = y Q(x,y) × P(y,z) \begin{array}{cccccc} (x,z)\in S\circ R & \iff & \exists y\in Y & \big((x,y)\in R\big) & \wedge & \big((y,z)\in S\big) \\ (P\diamond Q)(x,z) & = & \int^y & Q(x,y) & \times & P(y,z) \\ \end{array} A final list of remarks, to address the many questions you might have at this point:

  • Yes! The dictionary between relations and profunctors can be extended very far: try to check when a relation is a function; how does this condition translates into the one telling when a profunctor is a functor?
  • Yes, you can make the dictionary a precise theorem by saying that sets are discrete categories, or even more precisely categories enriched over truth values, and that relations are precisely the {0,1}\{0,1\}-enriched version of profunctors, as they are functions A×B{0,1}A\times B \to \{0,1\}!

Doubles for monoidal categories

One of the key results of the paper Doubles for Monoidal Categories is the canonical equivalence of categories:

Tamb(𝒞)[Doub(𝒞),Set] \mathbf{Tamb}(\mathcal{C}) \simeq [\mathbf{Doub}(\mathcal{C}), \mathbf{Set}]

This theorem has since been labelled by some as the “fundamental theorem of optics”, as it provides the link between the category of Tambara modules Tamb(𝒞)\mathbf{Tamb}(\mathcal{C}) and the double Doub(𝒞)\mathbf{Doub}(\mathcal{C}) of the monoidal category 𝒞\mathcal{C}, now also known as the category of optics. To unpack this theorem, we first begin with the definition of a Tambara module.

Tambara modules

The category of (bi)modules Mod\mathbf{Mod} forms a bicategory, however when we choose a particular category 𝒞\mathcal{C} we may instead consider the monoidal category Mod(𝒞)\mathbf{Mod}(\mathcal{C}) whose:

  • objects are endomodules P:𝒞 op×𝒞SetP \colon \mathcal{C}^{op} \times \mathcal{C} \rightarrow \mathbf{Set};
  • morphisms are natural transformations;
  • monoidal product is module composition: (PQ)(X,Y)= ZP(X,Y)×Q(Y,Z) (P \diamond Q) (X,Y) = \int^Z P(X,Y)\times Q(Y,Z) One may ask the question: what if 𝒞\mathcal{C} has the structure of a monoidal category?

Definition: Let 𝒞\mathcal{C} be a monoidal category. A (left) Tambara module on 𝒞\mathcal{C} is a pair (P,τ)(P, \tau) consisting of:

  • a profunctor P:𝒞 op×𝒞SetP \colon \mathcal{C}^{op} \times \mathcal{C} \rightarrow \mathbf{Set};
  • a family of functions τ A(X,Y):P(X,Y)P(AX,AY)\tau_{A}(X,Y) \colon P(X, Y) \rightarrow P(A \otimes X, A \otimes Y) called the Tambara structure maps, which are natural in X,YX, Y and dinatural in AA, satisfying the equations:

The idea is that the structure maps tell you how the profunctor changes under the monoidal action. For example, if we consider the hom-profunctor on the monoidal category (Set,1,×)(\mathbf{Set}, 1, \times), then the Tambara structure would tell you to take a function f:XYf \colon X \rightarrow Y in Set(X,Y)\mathbf{Set}(X, Y) to 1 A×f:A×XA×Y1_{A} \times f \colon A \times X \rightarrow A \times Y in Set(A×X,A×Y)\mathbf{Set}(A \times X, A \times Y) for any set AA.

Tambara modules form the objects of a category Tamb(𝒞)\mathbf{Tamb}(\mathcal{C}), whose morphisms γ:(P,τ)(Q,σ)\gamma \colon (P, \tau) \rightarrow (Q, \sigma) are natural transformations γ:PQ\gamma \colon P \Rightarrow Q such that γτ=σγ\gamma \circ \tau = \sigma \circ \gamma. There is functor to the category of endomodules on 𝒞\mathcal{C}, ι:Tamb(𝒞)Mod(𝒞) \iota \colon \mathbf{Tamb}(\mathcal{C}) \longrightarrow \mathbf{Mod}(\mathcal{C}) which forgets the Tambara structure (this functor is actually strong monoidal, but that won’t be important for what follows).

An adjoint triple for Tambara modules

The forgetful functor ι:Tamb(𝒞)Mod(𝒞)\iota : \mathbf{Tamb}(\mathcal{C}) \longrightarrow \mathbf{Mod}(\mathcal{C}) forms part of an adjoint triple:

This adjoint triple captures almost everything you need to know about Tambara modules in order to derive the category Doub(𝒞)\mathbf{Doub}(\mathcal{C}). For the following, let 𝒞\mathcal{C} be a monoidal category and P:𝒞 op×𝒞SetP \colon \mathcal{C}^{op} \times \mathcal{C} \rightarrow \mathbf{Set} be an endomodule.

The right adjoint θ:Mod(𝒞)Tamb(𝒞)\theta \colon \mathbf{Mod}(\mathcal{C}) \rightarrow \mathbf{Tamb}(\mathcal{C}) outputs the cofree Tambara module consisting of:

  • a profunctor θ P:𝒞 op×𝒞Set\theta_{P} \colon \mathcal{C}^{op} \times \mathcal{C} \rightarrow \mathbf{Set} whose action on objects is given by the end: θ P(X,Y)= CP(CX,CY) \theta_{P} (X, Y) = \int_{C} P(C \otimes X, C \otimes Y)
  • Tambara structure maps θ P(X,Y)θ P(AX,AY)\theta_{P}(X, Y) \rightarrow \theta_{P}(A \otimes X, A \otimes Y) which are induced by the projection functions, pr CA: CP(CX,CY)P(CAX,CAY) \pr_{C \otimes A} \colon \int_{C} P(C \otimes X, C \otimes Y) \rightarrow P(C \otimes A \otimes X, C \otimes A \otimes Y) pr C: CP(CAX,CAY)P(CAX,CAY) \pr_{C} \colon \int_{C} P(C \otimes A \otimes X, C \otimes A \otimes Y) \rightarrow P(C \otimes A \otimes X, C \otimes A \otimes Y) using the universal property of the end.

The left adjoint ϕ:Mod(𝒞)Tamb(𝒞)\phi \colon \mathbf{Mod}(\mathcal{C}) \rightarrow \mathbf{Tamb}(\mathcal{C}) outputs the free Tambara module consisting of:

  • ϕ P:C op×CSet\phi_{P} \colon \C^{\op} \times \C \rightarrow Set has action on objects given by the coend: ϕ P(X,Y)= C,U,VC(X,CU)×C(CV,Y)×P(U,V) \phi_{P}(X, Y) = \int^{C, U, V} \C(X, C \otimes U) \times \C(C \otimes V, Y) \times P(U, V)
  • Tambara structure maps ϕ P(X,Y)ϕ P(AX,AY)\phi_{P}(X, Y) \rightarrow \phi_{P}(A \otimes X, A \otimes Y) which are induced, using the universal property of the coend, by the function (via functorality of the hom-functor),

    composed with the coprojection copr AC,U,V\copr_{A \otimes C, U, V} into ϕ P(AX,AY)\phi_{P}(A \otimes X, A \otimes Y).

The adjunction ιθ\iota \dashv \theta yields a comonad denoted Θ:Mod(𝒞)Mod(𝒞)\Theta \colon \mathbf{\Mod}(\mathcal{C}) \rightarrow \mathbf{\Mod}(\mathcal{C}) and the adjunction ϕι\phi \dashv \iota yields a monad denoted Φ:Mod(𝒞)Mod(𝒞)\Phi \colon \mathbf{\Mod}(\mathcal{C}) \rightarrow \mathbf{\Mod}(\mathcal{C}).

Proposition: The category of Tambara modules Tamb(𝒞)\mathbf{Tamb}(\mathcal{C}) is isomorphic to the category of coalgebras for Θ\Theta and the category of algebras for the monad Φ\Phi.

The proof is a nice exercise in the universal property for (co)ends. For example, a coalgebra for the comonad Θ\Theta consists of:

  • An object of Mod(𝒞)\mathbf{Mod}(\mathcal{C}) given by P:𝒞 op×𝒞SetP \colon \mathcal{C}^{op} \times \mathcal{C} \rightarrow \mathbf{Set}.
  • A struture map given by a morphism τ:Pθ P\tau \colon P \Rightarrow \theta_{P} in Mod(𝒞)\mathbf{Mod}(\mathcal{C}) whose components τ(X,Y):P(X,Y)θ P(X,Y)\tau(X, Y) \colon P(X, Y) \rightarrow \theta_{P}(X, Y) are given by: τ(X,Y):P(X,Y) AP(AX,AY) \tau(X, Y) \colon P(X, Y) \longrightarrow \int_{A} P(A \otimes X, A \otimes Y) However using the universal property of the end, the structure map is determined exactly by a family of morphisms dinatural in AA: τ A(X,Y):P(X,Y)P(AX,AY) \tau_{A}(X, Y) \colon P(X, Y) \longrightarrow P(A \otimes X, A \otimes Y) Therefore the data for a Θ\Theta-coalgebra corresponds to a Tambara module (P,τ)(P, \tau).

The double of a monoidal category

The adjoint triple ϕιθ\phi \dashv \iota \dashv \theta induces an adjunction,

between the resulting monad Φ\Phi and comonad Θ\Theta. A basic result in category theory states that any left adjoint functor between categories of presheaves is equivalent to a profunctor. Therefore recalling that Mod(𝒞)=[𝒞 op×𝒞,Set]\mathbf{Mod}(\mathcal{C}) = [\mathcal{C}^{op} \times \mathcal{C}, \mathbf{Set}] by definition, the left adjoint Φ\Phi above is equivalent to an endomodule Φˇ:(𝒞×𝒞 op) op×(𝒞 op×𝒞)Set\check{\Phi} \colon (\mathcal{C} \times \mathcal{C}^{op})^{op} \times (\mathcal{C}^{op} \times \mathcal{C}) \rightarrow \mathbf{Set} whose action on objects is given by the coend: Φˇ(X,Y,U,V)= C𝒞(X,CU)×𝒞(CV,Y) \check{\Phi}(X, Y, U, V) = \int^{C} \mathcal{C}(X, C \otimes U) \times \mathcal{C}(C \otimes V, Y) This endomodule actually underlies a monad in the bicategory Mod\mathbf{Mod} of modules (also known as a promonad). Furthermore it is known that the bicategory Mod\mathbf{Mod} admits the Kleisli construction for promonads.

Definition: The double Doub(𝒞)\mathbf{Doub}(\mathcal{C}) of a monoidal category 𝒞\mathcal{C} is the Kleisli category for the promonad Φˇ\check{\Phi} on 𝒞 op×𝒞\mathcal{C}^{op} \times \mathcal{C}.

The category Doub(𝒞)\mathbf{Doub}(\mathcal{C}) has the same objects as 𝒞 op×𝒞\mathcal{C}^{op} \times \mathcal{C} and hom-sets given by the previous coend: Doub(𝒞)((X,Y),(U,V))= CC(X,CU)×C(CV,Y) \mathbf{Doub}(\mathcal{C})((X, Y), (U, V)) = \int^{C} \C(X, C \otimes U) \times \C(C \otimes V, Y) While this may seem like a fairly abstract definition, it has concrete applications in describing a variety of optics used in functional programming. Taking the example 𝒞=(Set,1,×)\mathcal{C} = (\mathbf{Set}, 1, \times) again, we see that a morphism in Doub(𝒞)\mathbf{Doub}(\mathcal{C}) from (S,T)(S, T) to (A,B)(A, B) is an element of the set: CSet(S,C×A)×Set(C×B,T)= CSet(S,C)×Set(S,A)×Set(C×B,T)=Set(S,A)×Set(S×B,T) \int^{C} \mathbf{Set}(S, C \times A) \times \mathbf{Set}(C \times B, T) = \int^{C} \mathbf{Set}(S, C) \times \mathbf{Set}(S, A) \times \mathbf{Set}(C \times B, T) = \mathbf{Set}(S, A) \times \mathbf{Set}(S \times B, T) That is, a morphism (S,T)(A,B)(S, T) \nrightarrow (A, B) is a pair of functions SAS \rightarrow A and S×BTS \times B \rightarrow T, which is exactly the data for the optic known as a lens.

We are now ready to state the central theorem of the paper.

Theorem: There is an equivalence of categories: Tamb(𝒞)[Doub(𝒞),Set] \mathbf{Tamb}(\mathcal{C}) \simeq [\mathbf{Doub}(\mathcal{C}), \mathbf{Set}] While the proof is outside the scope of this post, we note it essentially follows from universal property of the Kleisli category for a promonad.

Posted at November 15, 2019 4:59 PM UTC

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/3154

3 Comments & 0 Trackbacks

Re: Doubles for Monoidal Categories

Thanks for the post. I’m just trying to match up your explicit description of the hom-sets Doub(𝒞)((X,Y),(U,V))\mathbf{Doub}(\mathcal{C})((X,Y),(U,V)) with the one in Pastro-Street (top of Sec 6). It’s different. Is something back-to-front? and is it supposed to be what they call 𝒟 l\mathcal{D}_l?

Posted by: Sam Staton on November 15, 2019 9:20 PM | Permalink | Reply to this

Re: Doubles for Monoidal Categories

As far as I understand, it seems to be Doub(𝒞)=𝒟 l op\mathbf{Doub}(\mathcal{C}) = \mathcal{D}_l^{op}. The left-right difference should not be very important because the plan is to generalize from monoidal products to arbitrary monoidal actions anyway. I think the choice of 𝒟 l op\mathcal{D}_l^{op} over 𝒟 l\mathcal{D}_l is due to the fact that the definitions in the post are swapping the (U,V)(U,V) with the (X,Y)(X,Y) of the original definitions.

Posted by: Mario Román on November 19, 2019 8:13 AM | Permalink | Reply to this

Re: Doubles for Monoidal Categories

(First line of the ninja Yoneda proof: a x\int^x is missing. Last line of Kan proof: CC should be cc.)

Posted by: Nasos Evangelou-Oost on November 15, 2020 4:04 AM | Permalink | Reply to this

Post a New Comment