Here are a few comments that might help you a little when it comes to ends, coends and enriched categories.

First, you’ll notice that Kelly’s book discusses ‘ends’ shortly before discussing ‘indexed limits’. This is because the two concepts, while distinct, are interchangeable, in the sense that they’re both special cases of each other.

Kelly tackles ends first, and then indexed limits. You’ll see on page 37 that he says: “… is the limit precisely when … is an end.” Here is reducing the theory of indexed limits to the theory of ends.

Personally I think it’s easier to go the other way: first learn about indexed limits, then, if necessary, learn about ends.

In fact, I prefer to dualize, and think about indexed colimits and coends instead of indexed limits and ends.

The reason is this: **the theory of indexed colimits is a straightforward categorification of the theory of integrals.**

If you’re trying to categorify inner products, path integrals and other integrals, this is good to know!

Here’s how it goes, in a nutshell.

If we have a finite set $X$ we can think of a measure on $X$ as just a map

$w: X \to \mathbb{C}$

assigning to each point its ‘weight’. Suppose $L$ is any vector space. We can integrate any vector-valued function

$f: X \to L$

with respect to the measure $w$ as follows:

$\int_X f d w = \sum_{x \in X} w(x) f(x)$

Kelly’s theory of indexed colimits — usually called the theory of *weighted* colimits — categorifies this idea!

The replacement for our set $X$ is a category $X$.

The replacement for $\mathbb{C}$ is a cocomplete symmetric monoidal category $V$. The colimits of $V$ are the categorified version of ‘addition’, while the tensor product in $V$ is the categorified version of ‘multiplication’.

The replacement for our vector space $L$ is a category $L$ that’s enriched over $V$ and tensored over $V$. ‘Enriched over $V$’ says that given objects $x,y \in L$, we have $hom(x,y) \in V$. ‘Tensored over $V$’ means that given $x \in L$ and $v \in V$, we can define $v \otimes x \in L$. There is of course more to the definitions of these concepts that I’m giving here, but this is enough to get the idea.

The replacement for the vector-valued function we’re integrating is a functor

$f: X \to L$

The replacement for our measure is what Kelly calls an ‘indexing type’, but most people prefer to call a ‘weight’: it’s a functor

$w : X^{op} \to V$

Note the all-important ‘op’!

The weighted colimit, when it exists, is an object

$\int_X f d w \in L$

In the simple case where $X$ is a discrete category (basically just a set), we have

$\int_X f d w = \sum_{x \in X} w(x) \otimes f(x)$

See? **It’s just like what we had before!**

Another simple case is when we use the most boring possible weight

$w : X \to V$

namely the one with

$w(x) = 1$

for every object $x \in X$, and $w(f) = 1_1$ for every morphism $f$ in $X$.

If we use this weight, our weighted colimit reduces to an ordinary colimit:

$\int f d w = colim_{x \in X} f(x)$

So, the theory of weighted colimits generalizes the theory of colimits much as the theory of integrals generalizes the theory of sums.

But, in the simple examples I just gave, we don’t see the need for the ‘op’ in the weight

$w : X^{op} \to V$

If you already know and love coends, you can guess why this ‘op’ shows up. From our weight and our functor

$f: X \to L$

we can form a functor

$X^{op} \times X \stackrel{w \times f}{\to} V \times L \stackrel{\otimes}{\to} L$

where the second arrow uses the fact that $L$ is tensored over $V$.

This kind of functor

$X^{op} \times X \to L$

is precisely the sort of thing we take a coend of, getting an object of $L$!

But, if you don’t already know and love coends, you now see why we need them: precisely to do weighted colimits.

By the way, you might complain my use of the term ‘integral’ is overblown, since the only integrals I’m really considering are weighted sums. That’s a valid complaint. So, you might prefer it if I changed my main message to this:

**The theory of weighted colimits is a straightforward categorification of the theory of weighted sums.**

## Re: Day on RCFTs

Here are a few comments that might help you a little when it comes to ends, coends and enriched categories.

First, you’ll notice that Kelly’s book discusses ‘ends’ shortly before discussing ‘indexed limits’. This is because the two concepts, while distinct, are interchangeable, in the sense that they’re both special cases of each other.

Kelly tackles ends first, and then indexed limits. You’ll see on page 37 that he says: “… is the limit precisely when … is an end.” Here is reducing the theory of indexed limits to the theory of ends.

Personally I think it’s easier to go the other way: first learn about indexed limits, then, if necessary, learn about ends.

In fact, I prefer to dualize, and think about indexed colimits and coends instead of indexed limits and ends.

The reason is this:

the theory of indexed colimits is a straightforward categorification of the theory of integrals.If you’re trying to categorify inner products, path integrals and other integrals, this is good to know!

Here’s how it goes, in a nutshell.

If we have a finite set $X$ we can think of a measure on $X$ as just a map

$w: X \to \mathbb{C}$

assigning to each point its ‘weight’. Suppose $L$ is any vector space. We can integrate any vector-valued function

$f: X \to L$

with respect to the measure $w$ as follows:

$\int_X f d w = \sum_{x \in X} w(x) f(x)$

Kelly’s theory of indexed colimits — usually called the theory of

weightedcolimits — categorifies this idea!The replacement for our set $X$ is a category $X$.

The replacement for $\mathbb{C}$ is a cocomplete symmetric monoidal category $V$. The colimits of $V$ are the categorified version of ‘addition’, while the tensor product in $V$ is the categorified version of ‘multiplication’.

The replacement for our vector space $L$ is a category $L$ that’s enriched over $V$ and tensored over $V$. ‘Enriched over $V$’ says that given objects $x,y \in L$, we have $hom(x,y) \in V$. ‘Tensored over $V$’ means that given $x \in L$ and $v \in V$, we can define $v \otimes x \in L$. There is of course more to the definitions of these concepts that I’m giving here, but this is enough to get the idea.

The replacement for the vector-valued function we’re integrating is a functor

$f: X \to L$

The replacement for our measure is what Kelly calls an ‘indexing type’, but most people prefer to call a ‘weight’: it’s a functor

$w : X^{op} \to V$

Note the all-important ‘op’!

The weighted colimit, when it exists, is an object

$\int_X f d w \in L$

In the simple case where $X$ is a discrete category (basically just a set), we have

$\int_X f d w = \sum_{x \in X} w(x) \otimes f(x)$

See?

It’s just like what we had before!Another simple case is when we use the most boring possible weight

$w : X \to V$

namely the one with

$w(x) = 1$

for every object $x \in X$, and $w(f) = 1_1$ for every morphism $f$ in $X$.

If we use this weight, our weighted colimit reduces to an ordinary colimit:

$\int f d w = colim_{x \in X} f(x)$

So, the theory of weighted colimits generalizes the theory of colimits much as the theory of integrals generalizes the theory of sums.

But, in the simple examples I just gave, we don’t see the need for the ‘op’ in the weight

$w : X^{op} \to V$

If you already know and love coends, you can guess why this ‘op’ shows up. From our weight and our functor

$f: X \to L$

we can form a functor

$X^{op} \times X \stackrel{w \times f}{\to} V \times L \stackrel{\otimes}{\to} L$

where the second arrow uses the fact that $L$ is tensored over $V$.

This kind of functor

$X^{op} \times X \to L$

is precisely the sort of thing we take a coend of, getting an object of $L$!

But, if you don’t already know and love coends, you now see why we need them: precisely to do weighted colimits.

By the way, you might complain my use of the term ‘integral’ is overblown, since the only integrals I’m really considering are weighted sums. That’s a valid complaint. So, you might prefer it if I changed my main message to this:

The theory of weighted colimits is a straightforward categorification of the theory of weighted sums.