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.

August 14, 2008

Bimodules Versus Spans

Posted by John Baez

Bimodules and spans show up a lot in applications of category theory to physics, perhaps because they get along with the ‘reversibility’ we have come to expect. Given an (R,S)(R,S)-bimodule, we can think of it as a morphism from the ring RR to the ring SS, and we can ‘compose’ these morphisms by tensoring them… but we can also turn them around: any (R,S)(R,S)-bimodule can be thought of as an (S op,R op)(S^{op},R^{op})-bimodule, and when our rings are commutative we don’t even need to bother with that ‘op’. Similarly, we can compose spans of sets but also turn them around.

I always thought bimodules and spans should be related, but only recently did I learn exactly how, thanks to Paul-André Melliès. The relation so nice I’ll present it as a series of puzzles. If these puzzles are too easy for you, please let others take a try first.

Let’s work in the category Set opSet^{op}, where a morphism f:STf:S \to T is a function from TT to SS. This is a monoidal category with ×\times as its tensor product. So, we can talk about monoid objects in Set opSet^{op}.

Puzzle 1: What’s a monoid object in Set opSet^{op}? It’s something very familiar.

Whenever we have a monoid object RR we can talk about an ‘action’ of this object on some other object MM: just a morphism

a:RMMa : R \otimes M \to M

satisfying the usual equations. An action is sometimes called a ‘module’, since a monoid object in AbGrpAbGrp is just a ring RR, and an action of this is just what people usually call an RR-module.

Puzzle 2: What’s a module of a monoid object in Set opSet^{op}? It’s something very familiar.

We can also talk about bimodules.

Puzzle 3: What’s a bimodule of a pair of monoid objects in Set opSet^{op}? It’s something very familiar.

And, if we’re lucky — and in Set opSet^{op} we are — we can tensor an an (R,S)(R,S)-bimodule and a (S,T)(S,T)-bimodule and get an an (R,T)(R,T)-bimodule!

Puzzle 4: What does tensoring bimodules amount to in Set opSet^{op}? It’s something very familiar to some of you.

Posted at August 14, 2008 2:10 PM UTC

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

42 Comments & 0 Trackbacks

Re: Bimodules Versus Spans

Okay, here are the answers:

Answer 1: a set.

Answer 2: a function.

Answer 3: a span of sets.

Answer 4: the usual way composing spans of sets.

Posted by: John Baez on August 16, 2008 3:46 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

The trouble with conditions like

If these puzzles are too easy for you, please let others take a try first,

is to know how easy you mean and how long to wait for the others.

Posted by: David Corfield on August 16, 2008 7:16 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Good point. I just got sick of waiting for someone to say something.

I know there are people for whom all four puzzles would be trivial. But personally, I’d known for ages that a comonoid in a cartesian monoidal category is just an object (which answers Puzzle 1), but for some reason had never noticed that a comodule of such a comonoid is just a morphism (which answers Puzzle 2). So, I would have enjoyed Puzzle 2. And hopefully if someone had given me that puzzle, I would have had the sense to invent Puzzles 3 and 4 for myself.

But who knows? There are so many easy ways to put together pieces of knowledge to derive interesting consequences that it seems an endless process.

Anyway: it’s very nice to know that spans are a special case of bimodules. It sheds light on things like open-closed topological string theory, where a string going between two D-branes gets represented as a bimodule of two von Neumann algebras. A ‘string going between two D-branes’ is a kind of cospan, and now we see that this is a kind of bimodule.

Posted by: John Baez on August 16, 2008 11:37 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Sorry, I’ve been away, otherwise I would have chipped in. I too certainly knew the answer to Puzzle 1, and would have enjoyed having a go at the other bits. It’s very much up my street.

Actually I think of spans and bimodules as being related by both being special cases of enriched profunctors(!!). I think that I learnt this off Tom Leinster – that’s to say, if it’s true then I learnt it off Tom and if it’s not then I made it up.

So it ought to work as follows. Pick your favourite monoidal category 𝒱\mathcal{V} to enrich in, which if you’re in an impoverished mood could be Set or Vect. Then you have a bicategory 𝒱\mathcal{V}-MOD whose objects are 𝒱\mathcal{V}-categories, where the morphisms from CC to DD are 𝒱\mathcal{V}-functors C opD𝒱C^{op}\otimes D \to \mathcal{V} and where the 2-morphisms are something appropriate.

Then if you look at the full sub-bicategory of Set-MOD where the objects are Set-categories (ie, categories) with only identity morphisms (ie, sets) then you get the bicategory of spans.

On the other-hand if you look at the full sub-bicategory of Vect-MOD where the objects are Vect-categories with only one object (ie, algebras) then you get the bicategory of bimodules.

While I’m here, does anyone know of a standard reference for 𝒱\mathcal{V}-MOD? Enriched bimodules/profunctors/distributeurs only get a one-sentence mention in Kelly’s book.

Posted by: Simon Willerton on August 21, 2008 11:32 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

I might have chipped in too, but I was also away; in fact this is the first time I’ve seen this post. I believe this material is related to the theory of cartesian bicategories.

I first learned about VV-Mod (not by that name) through Lawvere’s seminal paper on metric spaces, which I continue to think is one of the greatest papers he’s ever written. It’s had a huge influence on my thinking.

Posted by: Todd Trimble on August 22, 2008 12:01 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

Yes, the Lawvere metric spaces paper really had a big impact on me as well. It is a wonderful paper.

Posted by: Simon Willerton on August 22, 2008 12:25 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

Last summer we had this interesting discussion to which everybody involved (except John of course) came late. So here I am in good company with this reply late by a handful of months.

It just occurred to me that this relation between

- VV-functors C opDVC^op \otimes D \to V

and

- spans of VV-objects

which Simon Willerton amplified above should be an example of generalized universal bundles (\to nnLab) in action.

For suppose the category VV in question is equipped with a point ptVpt \to V (an object) and take I={ab}I = \{a \to b\} to be the standard interval object in CatCat.

Then there is the “universal VV-bundle” with respect to that choice of point and interval object E ptVVE_{pt} V \to V and given a functor

g:C opDV g : C^{op}\otimes D \to V

we cann pull this back to a category over C opDC^\op \otimes D

g *E ptV E ptV C opD g V. \array{ g^* \mathbf{E}_{pt} V &\to& \mathbf{E}_{pt} V \\ \downarrow && \downarrow \\ C^{op} \otimes D &\stackrel{g}{\to}& V } \,.

Now, if the tensor product \otimes happens to be the cartesian product then the morphism on the left is equivalently a span

g *E ptV C op D. \array{ && g^* \mathbf{E}_{pt}V \\ & \swarrow && \searrow \\ C^{op} &&&& D } \,.

This “explains” for instance the example of spans of sets: for V=SetV = Set with the canonical point (the singleton set) we have E ptSet=Set *E_{pt} Set = Set_*, the category of pointed sets and then for CC and DD discrete categories with |C||C| and |D||D| many objects the functor

g *:C op×DSet g^* : C^{op} \times D \to Set

is just a |C|×|D||C| \times |D|-matrix of sets and g *Set *g^* Set_* is the discrete category with collection of objects isomorphic to the disjoint union of all these

g *Set *Disc( cC,dDg(c,d)) g^* Set_* \simeq Disc(\sqcup_{c \in C, d \in D} g(c,d))

which indeed comes equipped with the canonical projections to C op=CC^{op} = C and DD as expected.

In general, if CC and DD are not discrete, the pulled back bundle g *E ptVg^* \mathbf{E}_{pt} V may not be the span one expects to see here, but rather the corresponding action groupoid (or rather its VV-category analog), of CC and DD acting on the summit object of the span. The expected span itself might then rather be the fiber of the pulled back bundle, namely the top object of the pullback of

Disc(Obj(E ptV)) E ptV V. \array{ Disc(Obj(\mathbf{E}_{pt}V)) \\ \downarrow \\ \mathbf{E}_{pt}V \\ \downarrow \\ V } \,.

I guess depending on what exactly one wants to see here one can vary this theme a bit, for instance by varying the choice of point of VV etc. But the general idea that the span-like structure over C opDC^{op}\otimes D comes from pulling back a “generalized universal bundle” along the profunctor seems to be a way to understand the situation here.

Posted by: Urs Schreiber on January 27, 2009 7:02 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

bundle? would submersion do?

Posted by: jim stasheff on January 28, 2009 12:41 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

bundle?

Ah, good that you ask: in the above I used the word “bundle” in the most loose sense possible: without any further input the PXP \to X I called bundles above are just morphisms.

However, in many concrete cases they will be fibrations in a suitable model structure in the game.

In particular, in the example V=SetV = Set the functor Set *SetSet_* \to Set should be a fibration, the “universal fibration” indeed.

Another general statement is: the “generalized universal bundle” E ptBB\mathbf{E}_{pt} B \to B defined by the pullback

E ptB pt B I d 0 B d 1 B \array{ \mathbf{E}_{pt} B &\to& pt \\ \downarrow && \downarrow \\ B^I &\stackrel{d_0}{\to}& B \\ \downarrow^{d_1} \\ B }

is a fibration when when this lives in a category of fibrant objects and B IB^I is a path object for BB.

Posted by: Urs Schreiber on January 28, 2009 7:48 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

Urs wrote:

Ah, good that you ask: in the above I used the word `bundle’ in the most loose sense possible: without any further input the P –> X I called bundles above are just morphisms.

abuse de language! at least say something like what your wrote here

will there be a universal even if the morphism is not onto?

Posted by: jim stasheff on January 28, 2009 1:25 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

It’s nice to be getting some comments now. I’d thought there was a sharp divide between people for whom this stuff was incomprehensible, and people for whom it was trivial. I didn’t know everyone was ‘away’.

(How can you be ‘away’ from the internet? It’s everywhere! Except of course my mom’s house. Were you all visiting my mom?)

I don’t know a reference on VV-Mod, but Australians currently look with bemused pity on anyone who doesn’t do category theory in the context of enriched profunctors, so presumably one of them has written a secret little manual for Australians to learn this stuff.

Is Steve Lack reading this? He might know.

By the way, Todd, now that you’re back you might take pity on me and explain some stuff about Frobenius pseudomonoids and the relation they set up between logic and weak 2d TQFTs.

Posted by: John Baez on August 22, 2008 2:20 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

There’s also a dual version of this, where you work in Set with the disjoint union, that is to say, you use the categorical coproduct as the monoidal structure.

1. What’s a monoid object in (Set,,)(Set, \sqcup, \empty)?
A set.

2. What’s a module of a monoid object in (Set,,)(Set, \sqcup, \empty)?
A module over SS is a set MM and a map SMS\to M (so it goes the other way to the Set opSet^op case).

3. What’s a bimodule of a pair of monoid objects in (Set,,)(Set, \sqcup, \empty)?
An R,SR,S-bimodule, for sets RR and SS, is a set MM and a map RSMR\sqcup S\to M; in other words, it’s a cospan.

4. What does tensoring bimodules amount to in (Set,,)(Set, \sqcup, \empty)?
It’s the usual composition of cospans.

Posted by: Simon Willerton on August 22, 2008 1:20 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Why would the answer to Q1 still be set when working in this dual of Simon’s (with the disjoint union and the empty set)?

The unit requires a map from the empty set to your monoid object, which is only possible if the monoid object is also the empty set!

This comment confused me most. Would like help.

Posted by: PleaseHelpWithThisTrivialQuestion on February 15, 2023 10:31 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

The unit requires a map from the empty set to your monoid object, which is only possible if the monoid object is also the empty set!

No. There’s always a unique map from the empty set to any set. The empty set is the initial object.

Posted by: David Corfield on February 15, 2023 3:06 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

A comment from a mathematician who knows little category theory! This post (and the answer: I came to it late) initially mystified me for two reasons:

i) I looked up Monoidal Category on Wikipedia. I’m still not 100% sure I understand what the bifunctor standing in for the tensor product is. However, we also need an identity object: I think this has to be a privileged set with one element.

ii) John asks in question 1 what a monoid object is. Again, I turn to Wikipedia, and see that this is a triple, consisting of an object and two maps. The answer John gives is “A set”. But how is this a triple??? What can this possibly mean??? After five minutes of pen-and-paper work, I see that what is meant is that for each set, there are two uniquely defined (and with hindsight, rather obvious) maps: the diagonal embedding, and the trivial map from the set to our identity.

I guess this is why I find this sort of category theory discuss difficult: to me, a lot of details are ignored. With hindsight, I see why the details are ignored (they are not important), but it makes it very hard to follow what is going on, because, to the beginner, the details do matter, don’t they?

Posted by: Doormat on August 25, 2008 11:13 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

Doormat, (!?)

(i) John said of Set opSet^op: “This is a monoidal category with × as its tensor product.” So the bifunctor we use is the usual cartesian product of sets. As you observed, the unit object for this tensor product is a one element set (let’s say it’s {*}\{*\}).

(ii) You are right: a monoid object is a triple. If John had been slightly more precise he might have said:

“A monoid object in (Set op,×,{*})(Set^{op},\times,\{*\}) is a triple (R,μ:R×RR,η:{*}R)(R, \mu : R\times R\to R, \eta: \{*\}\to R) where RR is a set, μ\mu is the opposite of the diagonal map r(r,r)r\mapsto (r,r) and η\eta is the opposite of the terminal map r*r\mapsto *. So there is a canonical bijection between monoid objects in (Set op,×,{*})(Set^{op},\times, \{*\}) and sets.”

I find it easier to think of comonoids in (Set,×,{*})(Set,\times, \{*\}), rather than monoids in (Set op,× op,{*})(Set^{op},\times^{op},\{*\}) – it means the same thing – as I then have set maps going in the right direction.

A comonoid in (Set,×,{*})(Set,\times, \{*\}) will then be a set RR with a map Δ:RR×R\Delta: R\to R \times R and a map ϵ:R{*}\epsilon: R\to \{*\}, satisfying the counit and coassociativity axioms. Now the unit object {*}\{*\} is terminal which means that there is precisely one map R{*}R\to \{*\} so that must be the counit.

Knowing that, if you try to verify the counit axioms, then you are forced to deduce that Δ\Delta is the diagonal map r(r,r)r\mapsto (r,r), and you can see straight away that this satisfies the coassociativity condition.

Actually all we are using here is the fact that ×\times is a categorical product in SetSet, so if you have a category CC with product \sqcap and terminal object 11 then the comonoid objects in the monoidal category (C,,1)(C, \sqcap, 1) are in canonical bijection with the objects of CC.

If you find all of this ‘opposite’ and ‘co’ type of thing a little confusing you might try starting with the dual result that a monoid object in (Set,,)(Set, \sqcup, \empty), the category of sets with the disjoint union as monoidal product, is a triple (R,:RRR,R)(R, \nabla:R\sqcup R\to R, \empty\to R) where RR is a set, \nabla is the canonical ‘fold’ map and R\empty\to R is the canonical initial map.

Posted by: Simon Willerton on August 26, 2008 6:02 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Whoops – can I nominate myself for Patronizing Post of the Day? It seems that Doormat had already figured it out for themselves but that I didn’t read the comment properly. My pathetic excuse is that I’d just been on a train for 4 hours.

Posted by: Simon Willerton on August 26, 2008 7:25 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Simon, No worries! Yes, I did wonder why your post went into so much detail: but it’s nice to have my calculations confirmed, and it’ll aid anyone else reading.

Having had some private conversations with people more into category theory than myself, it seems that leaving out the details is pretty common (especially if there is only “one way” to add extra structure, as in this case). I wrote the following in an email to someone yesterday, and I cannot improve upon it now:

It’s not that category theory is particularly confusing, but in other areas of maths (except maybe geometry?) we are very careful with definitions, and then, at least for “easy” or “elementary” examples, we’re very careful to check how our examples really fit into our definitions.

What I found odd about John’s original post is that he seemed to be aimed for an “easy” or “elementary” example, but at the same time (at least for me) dropped so many details that it was very hard to follow…

Anyway, I think now it’s me who is getting patronising, so I’ll shut up.

Posted by: Doormat on August 27, 2008 9:47 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

Doormat wrote:

in other areas of maths (except maybe geometry?) we are very careful with definitions, and then, at least for “easy” or “elementary” examples, we’re very careful to check how our examples really fit into our definitions.

The implication here — that less care is exercised by category theorists — is unfair, I think. My perception is that category theorists are just as careful as practitioners of other subjects. That is to say, in all subjects there are some who are careful and some who are careless; and I don’t think the distribution in category theory is very different from that in other subjects.

I suspect you’re being thrown by the way that people trained in category theory write. (Along with John, I wonder if the categorical use of “is” caused you trouble.) Every academic speciality uses language in a slightly different way. Recently I’ve been trying to read a book on conformal field theory, which is totally new territory for me, and I’m really thrown by how they write. It’s not that I lack the background: it’s that I don’t understand how the authors are using language.

To give another example, I sometimes have problems communicating with applied mathematicians who use functional notation differently from me (coming down ultimately to the distinction between ‘ff’ and ‘f(x)f(x)’). It’s not that I’m right and they’re wrong, or vice versa: it’s just a difference in local conventions.

And I bet that if I tried to learn your subject (what is it?), I’d sooner or later be puzzled by the use of language too.

Posted by: Tom Leinster on August 28, 2008 1:39 AM | Permalink | Reply to this

Re: Bimodules Versus Spans…

… or How I Learned to Stop Worrying and Love f(x)f(x):

When I was a beginning undergrad, I liked writing f(x)f(x) for functions and didn’t like writing just ff. (What am I supposed to take ff of?) Then at some point, I got the point, and then thought that writing ff was better than f(x)f(x), and might have even secretly looked down on people who did it the high-school way. But then much later, I realized that if you just declare that xx denotes the identity function, then you have f=f o x=f(x)f=f\text{ o } x = f(x). (The o is supposed to denote composition, but I couldn’t get it to display right.) So you can say, “Consider the functions ff and x 2+1x^2+1 and their composition f(x 2+1)f(x^2+1),” with no worries about inconsistency in notation.

On the other hand, then you can’t ever let xx be a real number.

Posted by: James on August 29, 2008 6:36 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

James wrote:

On the other hand, then you can’t ever let xx be a real number.

“A foolish consistency is the hobgoblin of little minds…”

Back when I was seriously into the philosophical conundra that arise from obsessive attempts at mathematical rigor, I used to wonder: when we write down x=5x = 5 on the blackboard, how long is this equation good for? Until the next paragraph? Until the end of class? We “set xx equal to 5”, but we never seem to un-set it later, to free it up for future use! We just hope the audience will be sensible enough to not derive a contradiction when we later change our minds and say that x=6x = 6.

Of course, computer scientists have real reason to worry about these issues, since computers are too dumb to forget things unless told! That’s why computer scientists need to talk about ‘global variables’ versus ‘local variables’.

Anyway: if we work hard enough, we can surely figure out a way to make standard practice count as mathematically rigorous. For example, instead of taking xx to be the identity map from \mathbb{R} to \mathbb{R}, how about letting it be a variable which is allowed to stand for any set to \mathbb{R}? Then when we set x=6x = 6 we are declaring that it’s the map from the 1-point set to \mathbb{R} sending the one point to 66.

The identity map from \mathbb{R} to \mathbb{R} is just nice because it’s the terminal object in the category of functions taking values in \mathbb{R}: any other function taking values in \mathbb{R} factors through this one. So, it’s a way of remaining ‘maximally uncommitted’ about xx.

Of course, this is the idea behind the Yoneda embedding.

Posted by: John Baez on August 29, 2008 7:08 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

John said, “A foolish consistency is the hobgoblin of little minds…”.

Thanks for not asserting the converse and allowing me an escape. :)

Posted by: James on August 29, 2008 10:25 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

John said:

For example, instead of taking xx to be the identity map from \mathbb{R} to \mathbb{R}, how about letting it be a variable which is allowed to stand for any set to \mathbb{R}?

That’s what I understood from the Kripke-Joyal semantics of the Mitchell-Bénabou language for topoi (e.g., in MacLane and Moerdijk’s “Sheaves in Geometry and Logic”).

Am I wrong?

Posted by: Tom Hirschowitz on August 29, 2008 12:23 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Tom H. wrote:

That’s what I understood from the Kripke–Joyal semantics of the Mitchell–Bénabou language for topoi (e.g., in MacLane and Moerdijk’s “Sheaves in Geometry and Logic”).

Am I wrong?

That sounds right, though I’m really not an expert on this stuff. McLarty’s Elementary Categories, Elementary Toposes gives another introduction to the Kripke–Joyal semantics.

Posted by: John Baez on August 29, 2008 4:40 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

I certainly didn’t wish to suggest that catgeory theorists are less carefully, although, looking back, I did seem to write this. Sorry.

I think all I’m trying to say is that I was confused by John’s answer “A Set”. Something like “A Set, with the obvious and unique maps to form a Monodial Object” would have been more enlightening. However, John says in a comment below that he didn’t mean this to be an easy or elementary example, so fair enough.

Btw, I’m a, I guess, Operator Algebraist, but one with interests ranging from Banach spaces to Topological Quantum Groups.

Posted by: Doormat on August 29, 2008 4:17 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Tom wrote:

The implication here — that less care is exercised by category theorists — is unfair, I think. My perception is that category theorists are just as careful as practitioners of other subjects. That is to say, in all subjects there are some who are careful and some who are careless; and I don’t think the distribution in category theory is very different from that in other subjects.

Yeah, it’s funny – I’m tempted to take it further and say that I think category theorists are, by the nature of their profession, forced to be on the whole more careful than mathematicians in many other fields. A rough reason why is that the great generality achieved by category theory must be compensated by a tremendous and sometimes almost fanatical precision and care with language. In fact, this is one thing I find deeply attractive about category theory: the high level of linguistic precision and control. This is especially visible to me in categorical logic.

By way of contrast, let me quote something (perhaps tendentiously, but without the slightest intent to ‘diss’ another field) from the book Stratified Morse Theory, by Goresky and MacPherson (section 1.8: Remarks on Geometry and Rigor):

As is shown by the above history of Morse theory or by the history of stratification theory, there is often a creative tension between geometry and rigor. Rigor follows the initial conception with a much greater time delay in geometry than it does in algebra. Also, when it comes, true geometers often feel its language misses the essential geometric ideas. Language is not well adapted to describing geometry, as the facilities for language and geometry live on opposite sides of the human brain. This perhaps accounts for the presence in the current literature on singularities of expressions like “using the isotopy lemma, it can be shown” without the forty pages of geometric constructions and estimates needed to apply the isotopy lemma.

But that’s just the mathematical side. It looks like Doormat (and maybe Tom) are referring more to the sociological aspects of ordinary mathematical discourse. Here I would side with Tom, that there is probably no difference on average in the degree of sloppiness (or pedantry) between category theorists and other mathematicians – how much rigor is given or needed is all in the context.

For example, even if we formally define a group as an ordered quadruple, does that mean we think, when we talk with someone at the blackboard, of an ordered quadruple when he says ‘group’? Generally not – for anyone used to it, the notion of ‘group’ is a kind of gestalt where we don’t necessarily itemize the individual structures, unless we really need to.

I can imagine several social reasons why John didn’t mention the comonoid structure on a set: (1) he wanted to create a kind of snappy effect; (2) he wanted to say no more about it, to give people a chance to chew on it a bit more; (3) he momentarily forgot or didn’t realize that there might be people who would be confused by what he was saying; (4) he was in a hurry, etc. Whereas in addressing a class, he might have found it more appropriate to add for clarity’s sake words like “where the comultiplication is…, and where the counit is…”

Discussions on blogs are often pretty loose anyway, maybe closer to coffeehouse conversations than papers, depending on who’s doing the “talking”.

Posted by: Todd Trimble on August 29, 2008 4:50 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Hm, I might not have said all of that had I seen that Doormat already responded before I posted. Just ignore any stuff I said that seems patronizing – sorry.

Posted by: Todd Trimble on August 29, 2008 4:59 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

I can only speculate about why John gave Answer 1 as just “A set” without giving the comonoidal structure. However, I can say for sure why I would have given the answer in exactly that way - because that is the punch line. That is exactly what is cool about this result: the fact that a comonoid in Set is nothing more than just a set! It is surprising, perhaps counterintuitive, and tells us something very interesting about the supposedly familiar category of sets.

This is exactly what makes John such a great expositor - he tells us things that are cool. To tell this story otherwise would have been like explaining an optical illusion before showing it. I don’t think it had anything to do with the carelessness or otherwise of category theory.

Posted by: Eugenia Cheng on September 1, 2008 12:28 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

Doormat wrote:

With hindsight, I see why the details are ignored (they are not important), but it makes it very hard to follow what is going on, because, to the beginner, the details do matter, don’t they?

Yes, the details matter a lot! But I was just giving the answers to a puzzle that nobody seemed to care about. I wasn’t trying to explain the answers.

There are lots of reasons you might have found my answers mysterious. One is that in category theory, we use words like ‘is’ and ‘the’ differently than we do in set theory.

In set theory, we say one element of a set ‘is’ another if they are equal. In category theory, we say some entity ‘is’ another if they are the same in a suitable sense. The suitable sense depends on the kind of entity we’re discussing.

It’s still true in category theory that two elements of a set count as the same if they’re equal. But two objects in a category count as the same if they are isomorphic. Two functors between categories count as the same if they are naturally isomorphic. Two categories count as the same if they are equivalent. And so on.

So, if my puzzle had been “What is 2+3?”, I would have been asking for a nice name for some element of the set of integers that’s equal to 2+3. Namely, “5”.

But my first puzzle was “What is a monoid object in Set opSet^{op}?” Here I’m clearly not asking for a nice name for an element of some set. There is a category of monoid objects in Set opSet^{op}, and I’m asking for a nice name for some category equivalent to this one.

The category of monoid objects in Set opSet^{op} is equivalent to Set opSet^{op}. Why? It’s because any monoid object in Set opSet^{op} has an underlying set, but also there’s a unique way to take any set and make it into a monoid in Set opSet^{op}. These two functors going back and forth give an equivalence of categories.

So, speaking rather tersely, we can say that the category of monoids in Set opSet^{op} ‘is’ Set opSet^{op}. Here ‘is’ refers to equivalence of categories.

But even this is too long-winded for professional category theorists. Using something like metonymy, we say simply “a monoid in Set opSet^{op} is a set”.

In other words: 1) given a monoid in Set opSet^{op}, there is a functorial way of getting a set, 2) given a set, there is a functorial way of getting a monoid in Set opSet^{op}, and 3) these two functors yield an equivalence of categories.

You may be rightly annoyed by all these tricky ways of talking, but actually what I find annoying is that I’m using ‘set’ here as shorthand for ‘object of Set opSet^{op}’ instead of ‘object of SetSet’. So, if I were talking to myself, I would actually say “A comonoid object in Set is a set”.

What I found odd about John’s original post is that he seemed to be aimed for an “easy” or “elementary” example, but at the same time (at least for me) dropped so many details that it was very hard to follow…

It wasn’t supposed to be easy or elementary — not for beginners, anyway. It was something I just learned, and I thought it would be a fun puzzle for people who are already comfortable with category theory.

But, I’m also glad to discuss why certain ways of talking can be confusing and mysterious to people who are just learning category theory.

Posted by: John Baez on August 27, 2008 11:53 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

If you have two objects, which are isomorphic like “a set” and “a set with an unique extra structure” (i.e. if they are the same in your sense, if I understood correctly) and if you want to make use only of the set without the extra structure then how do you express this in category theory?

The function in the answer to puzzle 2 is a function from where to where? Is this function supposed to be the identity on the factor M?

Posted by: stub on August 28, 2008 9:03 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

stub asked:

The function in the answer to puzzle 2 is a function from where to where? Is this function supposed to be the identity on the factor M?

I don’t want to take away the pleasure of discovery from you, so I’ll just ask if you’ve written out what the underlying map in the definition of a module is and if you’ve figured out what the unit axiom is.

If you’re after hints, it’s helpful if you say how far you’ve actually got.

Posted by: Simon Willerton on August 28, 2008 1:33 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

stub wrote:

If you have two objects, which are isomorphic like ‘a set’ and ‘a set with an unique extra structure’ (i.e. if they are the same in your sense, if I understood correctly) and if you want to make use only of the set without the extra structure then how do you express this in category theory?

First of all, it’s very odd wanting to make use ‘only of the set without the extra structure’ in this case — because if there’s a unique way to put on this extra structure, then there’s no real way to tell when you’re using it to do something!

But here’s a way to think about this sort of stuff. Let SetSet be the category of sets and let CC be the category of sets equipped with some extra structure. Then there’s a functor

F:CSetF : C \to Set

which forgets that extra structure.

If we have a construction that systematically takes a set with extra structure and builds an object of some other category DD, then we have a functor

G:CDG : C \to D

If we have a construction that does not use the extra structure, just the underlying set, then we have a functor

H:SetDH : Set \to D

Given a construction of the first sort, we can wonder if it makes essential use of the extra structure. Maybe the structure wasn’t really necessary for what we did.

And the nice thing is that there’s a way to make this question precise! We say the construction G:CDG : C \to D does not make essential use of the extra structure if we can find some functor H:SetDH : Set \to D such that

GHF G \cong H \circ F

In other words: doing GG is naturally isomorphic to first forgetting the extra structure and then doing HH.

Now, if there always exists a unique way to put the extra structure on any set, FF is an equivalence of categories. So, it has a weak inverse F 1F^{-1}. So, we can choose

H=GF 1H = G \circ F^{-1}

So, in this case no construction G:CDG: C \to D makes essential use of the extra structure: we can always accomplish the same effect by first forgetting the structure and then doing HH.

And the point is, these are questions that can be settled by computation in examples! It’s not just talk, it’s math.

Posted by: John Baez on August 28, 2008 8:51 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Stub wrote:

The function in the answer to puzzle 2 is a function from where to where?

Like Simon, I don’t want to rob you of the pleasure of discovering the answer for yourself… even if it kills you.

So, I’ll just emphasize that I meant what I said: functions are the same as modules of monoid objects in Set opSet^{op}.

Posted by: John Baez on August 28, 2008 8:58 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Simon Willerton wrote:

I don’t want to take away the pleasure of discovery from you, so I’ll just ask if you’ve written out what the underlying map in the definition of a module is and if you’ve figured out what the unit axiom is.

If you’re after hints, it’s helpful if you say how far you’ve actually got.

I just want to understand the terminology of category theory.

What I understood so far is: an action of a monoid object TT in Set opSet^{op} on an object SS in the category Set opSet^{op} is a morphism a:T×SS a: T \times S \rightarrow S which is the opposite of the map between the sets: ST×S S \rightarrow T \times S Is this right? Is this the “underlying map” you are talking about? What are the —as John put it— “usual equations” for a morphism being an action? I looked up Wikipedia for the definition of a module but there is no category theoretic definition. There is a unit axiom for a monoid.

John Baez wrote:

Like Simon, I don’t want to rob you of the pleasure of discovering the answer for yourself… even if it kills you.

Let’s first see your answer on the above.

Posted by: stub on August 29, 2008 9:59 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

stub wrote:

What are the -as John put it- “usual equations” for a morphism being an action?

Suppose MM is a monoid object in some monoidal category, with multiplication

m:MMMm : M \otimes M \to M

and identity

i:IMi: I \to M

where II is the unit object of our monoidal category.

Then an action of MM consists of an object XX together with a morphism

a:MXXa : M \otimes X \to X

such that

(MM)Xm1 XMXaX (M \otimes M) \otimes X \stackrel{m \otimes 1_X}{\to} M \otimes X \stackrel{a}{\to} X

equals

(MM)XM(MX)1 MaMXaX(M \otimes M) \otimes X \stackrel{\sim}{\to} M \otimes (M \otimes X) \stackrel{1_M \otimes a}{\to} M \otimes X \stackrel{a}{\to} X

and

XIXi1 XMXaX X \stackrel{\sim}{\to} I \otimes X \stackrel{i \otimes 1_X}{\to} M \otimes X \stackrel{a}{\to} X

equals

X1 XX X \stackrel{1_X}{\to} X

In the category of sets with =×\otimes = \times, we often write a(m,x)a(m,x) simply as mxm x and write the image of ii as 1M1 \in M. Then the two equations above say

(m 1m 2)x=m 1(m 2x)(m_1 m_2)x = m_1 (m_2 x)

and

1x=x1 x = x

These are the usual equations for an action of a monoid on a set.

Please, someone: teach Wikipedia this stuff!

Posted by: John Baez on August 29, 2008 4:58 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

thanks very much for the explanation! It is very helpful to get such hints, when feeling somewhat lost.

John Baez wrote:

>Please, someone: teach Wikipedia this stuff!

Good point. There is also no category-theoretic entry on bimodules in Wikipedia! However currently I definitely won’t edit Wikipedia myself - this should obviously be done by an expert. (Apart from this I have a very bad web connection).

Since there is no Wikipedia entry on bimodules, I tried to make sense of them, by “guessing” the corresponding diagrams, which are probably the ones you gave above for a left module plus the corresponding for a right module plus a compatibility condition corresponding to the bimodule definition on abelian groups. Or is there more?

In order to make my previous question more precise: your last diagram in the left module definition implies that there exists a function f Y:XYf_Y: X \rightarrow Y s.th. b Y=(f Y×id X)m Xb_Y = (f_Y \times id_X) \circ m_X

where b Yb_Y is the opposite map in SetSet of the left action a Y:Y×XX a_Y: Y \times X \rightarrow X

in Set opSet^{op} and \circ the composition of maps in SetSet and m Xm_X the diagonal action map (see above discussion) belonging to the monoid object XX in Set opSet^{op} and id Xid_X is the identity map on X. So -do you mean by “function” the function f Yf_Y or the function b Yb_Y -or are you identifying them again, because they are isomorphic, i.e. again a kind of “optical illusion” as Eugenia Cheng described it above?

Concerning answer 3: As I understand taking a triple (Y,X,S)(Y, X ,S) (corresponding to a (Y,S) X(Y,S)_X -bimodule) and the above function f Yf_Y for the left action of Y and and a corresponding function g Sg_S (for the right action of S) defines a span in Set. Then if the above mentioned compatibility condition for a bimodule was guessed rightly then this compatibility condition is another way of saying that there exists a pullback in Set. Is that correct? Wether or why this should be a universal pullback is not clear to me.

Concerning answer 4: By “tensoring two bimodules” (Y,S) X 1(Y,S)_{X_1} and (S,T) X 2(S,T)_{X_2} one would (?) guess that you mean by that to take the tensor product of two objects X 1X 2X_1 \otimes X_2 and tensor products of all morphisms on them? But then you would have “actions” on X 1X 2X_1 \otimes X_2 which you obtain by tensoring the respective actions on each X iX_i:

1) (YX 1)(SX 2)X 1X 2(Y \otimes X_1) \otimes (S \otimes X_2) \rightarrow X_1 \otimes X_2

2) (YX 1)(X 2T)X 1X 2(Y \otimes X_1) \otimes (X_2 \otimes T) \rightarrow X_1 \otimes X_2

and so on. But how does one get a (Y,T) X 1X 2(Y,T)_{X_1 \otimes X_2}-bimodule action from this?

So next “guess” would be to assume that with your sentence

“get an an (R,T)-bimodule”

you may want to pick just a special action like e.g. the above action in 2). By associativity this would be a (Y,T)- bimodule, which you can interpret as a composition of spans in Set by:


YX 11Y \leftarrow X_1 \rightarrow 1 composed with 1X 2T1 \leftarrow X_2 \rightarrow T


where 1 is the one element set. But that seems not to be that what you seem to have in mind. Or in other words: In order to get an arbitrary composition of spans one would rather need an action (written in Set opSet^{op}): (YX 1S)(SX 2T)X 1X 2(Y \otimes X_1 \otimes S) \otimes (S \otimes X_2 \otimes T) \rightarrow X_1 \otimes X_2 subject to the constraint g S(X 1)=f S(X 2)g_S(X_1)=f_S(X_2) (as functions in Set).???

Are these guesses going in the right direction or am I already completely off the track?

Posted by: stub on September 10, 2008 8:48 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

John said

So, speaking rather tersely, we can say that the category of monoids in Set opSet^{op} ‘is’ Set opSet^{op}. Here ‘is’ refers to equivalence of categories.

Actually, in this case don’t we get an isomorphism of categories? Set opMon(Set op,× op,{*});S(S,Δ op,ϵ op)Set^{op}\stackrel{\sim}\rightarrow Mon(Set^{op},\times^{op},\{*\});\quad S\mapsto(S, \Delta^{op}, \epsilon^{op}) Here the inverse is just the forgetful functor.

I am, of course, getting the feeling that I must have overlooked something as you so rarely get an isomorphism of categories.

Posted by: Simon Willerton on August 28, 2008 12:20 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Simon wrote:

Actually, in this case don’t we get an isomorphism of categories?

Yes it’s an isomorphism of categories, because it’s an equivalence that’s bijective on objects.

Posted by: John Baez on August 28, 2008 8:23 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

I just ran across this great old posting - I realized something like this should be true, and thought “where might I read about it?” and soon came to the obvious conclusion, here!

Which begs the question, where can I read about it? I realize this must be standard, but where are there references for this construction, say in more general Cartesian symmetric monoidal categories than Set? What are we using about Set? (I’d like the \infty-version but I don’t think that’s the essential issue).

While we’re here let me point out that this exercise has a natural sequel (that probably everyone who’s thought about such things knows, and maybe is even in the n-lab already?). A space (or set) is an E E_\infty (commutative) monoid in the opposite category, but the above construction of the 2-category of spans only uses the E 1E_1 (associative) structure of this monoid. By thinking of it as E 2E_2 for example we can consider not just bimodules but algebra objects in bimodules and their morphisms, getting the 3-category of spans of spans. Likewise considering the space as an E nE_n algebra we get an (,n+1)(\infty,n+1)-category of E n1E_{n-1}-objects in bimodules etc etc, which turns out to be spans of spans of spans of…

in other words iterated span categories are a special case of the (n+1)(n+1)-category of E nE_n algebras (I think Lurie calls this Alg(Alg(Alg...(C)))))Alg(Alg(Alg...(C))))) for a symmetric monoidal CC).

Again I ask if there’s a standard reference for this higher version of John’s question? Both the iterated span categories and the higher categories of E nE_n algebras appear in Lurie’s survey on TFT, but not AFAIK the link between them (which I’m told is well known). Thanks!

Posted by: David Ben-Zvi on January 16, 2013 12:32 AM | Permalink | Reply to this

Re: Bimodules Versus Spans

I wonder if the argument you want may be found in

Higher Segal spaces I by Tobias Dyckerhoff and Mikhail Kapranov http://arxiv.org/abs/1212.3563v1

Posted by: Eugene on January 16, 2013 2:43 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

Eugene - thanks! that’s a great suggestion, and indeed has an \infty-categorical discussion of spans and bispans, but as far as I can tell it doesn’t discuss this simple perspective/construction of span categories as Morita categories of algebras. Maybe I missed it though, it is a 220 page paper!

Posted by: David Ben-Zvi on January 17, 2013 4:04 PM | Permalink | Reply to this

Re: Bimodules Versus Spans

… and then they were two! I just so happened to come across this issue and was very glad when I saw that everything was explained here.

I would be very interested to know if you could find a proper reference for this construction in the meantime.

Also regarding your mentioning of Lurie’s overview on TFTs. I found the section (4.1.11) regarding the bimodule category construction where Lurie constructs functors Alg{(n)} which eat En-monoidal (\infty,1)-categories and spit out (\infty,n+1)-categories with no further structure. However you seemed to imply in your posting that Alg{(n)} is just the n-fold iteration of Alg{(1)}. Is that really true? To me it seems that objects of Alg{(1)}(Alg{(1)}(…(C)…) are something more general than objects of Alg_{(n)}.

Posted by: Nicolas Schmidt on August 8, 2014 3:02 PM | Permalink | Reply to this

Post a New Comment