Weighted limits, ends, and Day convolution (Part 3)
5th September, 2019
Finally, I find myself with enough motivation to start writing the last part to this series. It’s been a while, but hopefully nobody has actually been waiting… This is where we will finally see some of the exciting applications of (co)ends, including tensor products, geometric realisation, and Day convolution. One reason I’ve got around to writing this post is because coends (or, really, cowedges) appeared to me recently in a tweet about Stokes’ theorem, which I found pretty neat indeed — more details can be found in this post.
For a refresher on all the definitions, you can check out the two previous parts in this series (the links are at the top), because we’re just going to dive right in.
Tensor products
Let and be functors. Then we define their tensor product to be, if it exists, the coend
As before, we have a nonenriched definition: whenever has all coproducts, we can define
where for any set and any object .
Examples

Consider a ring as a oneobject enriched. Then a right module gives an additive functor , and a left module gives an additive functor . Then their tensor product, as enriched functors, coincides with their usual tensor product as modules.
This example is actually really linked to the theory of profunctors, which we will talk about below, but have already talked about in a previous post.

The coYoneda lemma can now just be written as
where is the Yoneda embedding.
This lets us state the powerful adage, that “representable functors generalise free modules”. To see what this might mean, we state the coYoneda lemma applied to a representable functor, as well as a basic theorem about tensor products of free modules, and leave the drawing of connections between the two to the interested reader:

Geometric realisation of a simplicial set can also be expressed as a tensor product. If we write
to mean the functor that sends to the topological simplex, then we can write the geometric realisation of as
Day convolution
As a motivation for the definition of Day convolution, we first recall the classical notion of convolution (albeit phrased in a more categorical language). Consider as a discrete category with addition as a monoidal product. Let be functors, which we can think of as graded sets. Then their convolution is defined by
where the second equality follows from the fact that is discrete. It might seem like an excessively abstract way of writing some Kronecker delta function, but it is exactly the thing that makes this definition easy to abstractify and generalise.
So now let (or whichever other notation you most like that says that and are valued presheaves). Then we define their Day convolution by
or, if you really like tensorproduct notation more than coend notation, by
As I already mentioned in my post about profunctors, there is a notion of Cauchy completion for presheaves. Something that I often heard say is that the presheaf category itself is the ‘free cocompletion’ of the original category. There are a bunch of ways of explaining what this means, but my favourite ‘proof’ is using Day convolution and the coYoneda lemma, to show that the Yoneda embedding is monoidal:
where the first isomorphism is by definition, and the last two are by coYoneda. That is,
That is, the Yoneda embedding is a (strong) monoidal functor
Further, if is small, then there is an internal hom on which makes it closed.
Finally, as a fun little fact, which I used at some point in one of my masters theses,^{1} whenever is small and symmetric, (commutative) monoid objects in the enrichedpresheaf category (with Day convolution) are equivalent to (symmetric) lax monoidal functors from to .
Monoid algebra
Remembering all that we’ve said above about free modules, and how Day convolution is basically the presheaf version of the tensor product from the original category, I would like to repeat some of what Alexander Campbell wrote in response to a question I asked about Day convolution during the writing of my masters thesis.
There is a beautiful formal analogy between Day convolution and monoid algebra, which takes the following form:
monoid algebra  Day convolution 

set  category 
monoid  monoidal category 
ring  monoidally cocomplete category 
module  cocomplete category 
algebra  monoidally cocomplete category 
free module on a set  free cocomplete category on a category 
free module on a monoid with the convolution product  free monoidally cocomplete category on a monoidal category with Day convolution 
where a monoidally cocomplete category is a cocomplete monoidal category such that is cocontinuous in each variable.
Profunctors
Just to have my obligatory “here is something that I don’t understand” that all of my posts seem to have, I wrote down in my notes (only a few weeks ago) the following sentence:
“profunctors! composition is via coends, and this looks like ∃ for composition of relations”
I have a vague idea of what this means: when we compose relations we do it ‘by existence’, in that
and this somehow looks like a coend, but I have no idea (nor, really, the time (nor, really, the skill) to properly think about) how to make this formal. Any ideas?
UPDATE 27/09/19. As always, I asked the lovely people of Twitter whether they could shed any light on what I meant here. As always, I got some great replies:
(the article linked to is this one, and it is, indeed, great.)
Footnotes

§4.1 in Under Spec Z. A reader’s companion.. It’s actually something that I’d love to come back to at some point! ↩