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 -bimodule, we can think of it as a morphism from the ring to the ring , and we can ‘compose’ these morphisms by tensoring them… but we can also turn them around: any -bimodule can be thought of as an -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 , where a morphism is a function from to . This is a monoidal category with as its tensor product. So, we can talk about monoid objects in .
Puzzle 1: What’s a monoid object in ? It’s something very familiar.
Whenever we have a monoid object we can talk about an ‘action’ of this object on some other object : just a morphism
satisfying the usual equations. An action is sometimes called a ‘module’, since a monoid object in is just a ring , and an action of this is just what people usually call an -module.
Puzzle 2: What’s a module of a monoid object in ? It’s something very familiar.
We can also talk about bimodules.
Puzzle 3: What’s a bimodule of a pair of monoid objects in ? It’s something very familiar.
And, if we’re lucky — and in we are — we can tensor an an -bimodule and a -bimodule and get an an -bimodule!
Puzzle 4: What does tensoring bimodules amount to in ? It’s something very familiar to some of you.
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.