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.

January 5, 2014

Ends

Posted by Simon Willerton

The categorical notion of an end is something that several people have requested Catster videos for and Yemon Choi was recently asking if Tom had covered it in his new-born book. Given that I’ve got ends in my head at the moment for two different reasons, I thought I’d write a post on how I think about them.

I feel that seeing an integral sign like
∫c∈𝒞T(c,c)
\int _{c\in \mathcal{C}} T(c,c)
can cause people’s eyes to glaze over, never mind them getting confused as to whether that represents an end or a coend. So I will endeavour to avoid integral signs apart from right at the end.

My experience is that coends roam more freely in the wild than ends do, but I will focus on ends in this post. One reason that people are interested in ends is that natural transformation objects in enriched category theory are expressed as ends, but I will stay away from the enriched setting here.

Having said what I won’t do, maybe I should say what I will do. I will mainly concentrate on a few examples to demonstrate ends as universal wedges.

Functors

The input data for an end is a functor of the form T:𝒞op×𝒞→𝒟T\colon \mathcal{C}^{\mathrm{op}}\times \mathcal{C}\to \mathcal{D}. The only functors that I know people take the ends of are those of the form
T(c,c′)=[F(c),G(c′)]
T(c,c')= [F(c),G(c')]
where F,G:𝒞→ℰF,G\colon \mathcal{C}\to \mathcal{E} are functors and [−,−]:ℰop×ℰ→𝒟[-,-]\colon \mathcal{E}^{\mathrm{op}}\times \mathcal{E}\to \mathcal{D} is some kind of hom functor, i.e. either the usual hom (so 𝒟=Set\mathcal{D}=\text {Set}) or an internal hom (so 𝒟=ℰ\mathcal{D}=\mathcal{E}).

[V,W][V,W] is the internal hom of GG-representations VV and WW, so it is the vector space of linear maps with the GG-action on f:V→Wf\colon V\to W given by (g⋅f)(v)=g⋅f(g−1⋅v)(g\cdot f)(v)=g\cdot f(g^{-1}\cdot v).

The main point of difference between 3 and 4 is that for an arbitrary algebra AA, the category of representations does not have an internal hom, but for a finite group GG it does. Other examples like 4 would involve representation categories of Hopf algebras or quantum groups.

Wedges

An end is a universal wedge, so I’d better say what a wedge is. A wedge for a functor T:𝒞op×𝒞→𝒟T\colon \mathcal{C}^{\mathrm{op}}\times \mathcal{C}\to \mathcal{D} is an object e∈Ob(𝒟)e\in \text {Ob}(\mathcal{D}) with a morphism ωc:e→T(c,c)\omega _{c}\colon e\to T(c,c) for every object c∈Ob(𝒞)c\in \text {Ob}(\mathcal{C}). These morphisms have to satisfy a naturality condition which says that for every morphism f:c→c′f\colon c\to c' in 𝒞\mathcal{C}, the two obvious maps e→T(c,c′)e\to T(c,c') you can make are the same, i.e. the following diagram commutes.
e⟶ωcT(c,c)ωc′↓↓T(1,f)T(c′,c′)⟶T(f,1)T(c,c′)
\begin{matrix} e & \overset{\omega _{c}}{\longrightarrow }& T(c,c) \\ \omega _{c'} \downarrow & &\downarrow T(1,f)\\ T(c',c') &\underset{T(f,1)}{\longrightarrow } & T(c,c') \end{matrix}
We can denote such a wedge by writing e⟶⋅Te\stackrel{\cdot }{\longrightarrow }T.

Let’s have a look a what wedges are in the examples given above.

For T=HomT=\text {Hom}, a wedge is a set ee and a function ωc:e→Hom(c,c)\omega _{c}\colon e\to \text {Hom}(c,c) for each c∈𝒞c\in \mathcal{C}. This means that for each n∈en\in e we get a family of morphisms ωc(n):c→c\omega _{c}(n)\colon c\to c. The naturality condition ensures that these are the components of a natural transformation of the identity functor Id𝒞→Id𝒞\text {Id}_{\mathcal{C}}\to \text {Id}_{\mathcal{C}}. So a wedge is a set ee with a function e→Nat(Id𝒞,Id𝒞)e\to \text {Nat}(\text {Id}_{\mathcal{C}},\text {Id}_{\mathcal{C}}).

For T=Hom(F(−),G(−))T=\text {Hom}(F(-),G(-)), by a similar argument to that above, a wedge is a set ee with a function e→Nat(F,G)e\to \text {Nat}(F,G) to the set of natural transformations.

In this case, where we have a ℂ\mathbb{C}-algebra AA, an end is a vector space ee with a morphism e→Lin(U(V),U(V))e\to \text {Lin}(U(V),U(V)) for every representation VV of AA, in other words a linear map e⊗U(V)→U(V)e\otimes U(V)\to U(V). The naturality condition says that these linear ‘action maps’ must commute with all AA-intertwining maps.

In the case of the internal hom of representations of a finite group, a wedge consists of a representation e∈Rep(G)e\in \text {Rep}(G) together with a natural ‘action’ on every GG-representation: e⊗V→Ve\otimes V\to V. These action maps are intertwiners and must commute with all other intertwiners.

If T(c,c′)T(c,c') is of the form [F(c),F(c′)][F(c),F(c')] as in 1, 3 and 4 above, then we have morphisms e→[F(c),F(c)]e\to [F(c),F(c)] so in some sense ee is acting on F(c)F(c) for every cc.

Ends

An end is a universal wedge. An end for TT consists of a set EE with a morphism Ωc:E→T(c,c)\Omega _{c}\colon E\to T(c,c) for each c∈𝒞c\in \mathcal{C}, satisfying the wedge naturality conditions, such that if e⟶⋅Te\stackrel{\cdot }{\longrightarrow }T is another wedge for TT then there is unique map e→Ee\to E such that the components of ee factor through EE as e→E→T(c,c)e\to E\to T(c,c).

An end is often written as an integral ∫c∈𝒞T(c,c)\int _{c\in \mathcal{C}}T(c,c). Coends, which I’m not talking about here, are written with the limits at the top of the integral sign: in Sheffield we have the mnemonic

“The end of the walking stick is at the bottom.”

I have mixed feelings about this notation. I think that people can be intimidated by it, also people get the impression that it is supposed to be something to do with integration which confuses them (or maybe that’s just me!)

We can look back at our examples and identify the ends.

For T=HomT=\text {Hom}, from what is written above, it should be clear that the end is the set of natural transformations of the identity Nat(Id𝒞,Id𝒞)\text {Nat}(\text {Id}_{\mathcal{C}},\text {Id}_{\mathcal{C}}). This set is sometimes called the Hochschild cohomology of the category.

For T=Hom(F(−),G(−))T=\text {Hom}(F(-),G(-)), similar to the example above, the end is Nat(F,G)\text {Nat}(F,G) the set of natural transformations from FF to GG.

In the case of the representation category of an algebra AA we find that the end is actually (the underlying vector space of) the algebra AA itself. It is pretty obvious that the tautological action on AA-representations A⊗U(V)→U(V)A\otimes U(V)\to U(V) gives rise to a wedge. It is less obvious that it is the universal wedge.

This is the example of the internal hom for the representations of a finite group GG. Whilst we have the tautological action ℂG⊗U(V)→U(V)\mathbb{C}G\otimes U(V)\to U(V) for every representation VV, we can make these into intertwining maps by taking the group algebra with
the adjoint actionℂGad\mathbb{C}G^{\mathrm{ad}}. The resulting morphisms ℂGad⊗V→V\mathbb{C}G^{\mathrm{ad}}\otimes V\to V in Rep(G)\text {Rep}(G) make the group algebra ℂGad\mathbb{C}G^{\mathrm{ad}} into a wedge for the internal hom [−,−][-,-]. In fact it is an end for the internal hom. This is related to the fact that a group algebra is semisimple and that there is an isomorphism of algebras in the representation category
ℂGad≅⨁W[W,W]
\mathbb{C}G^{\mathrm{ad}}\cong \bigoplus _{W} [W,W]
where sum runs over (a set of representatives of the equivalence classes of) the irreducible representations of GG.

Example 3 is the prototypical example of Tannakian reconstruction. We start with the representation category Rep(A)\text {Rep}(A) and the ‘fibre functor’ U:Rep(A)→VectU:\text {Rep}(A)\to \text {Vect}, then reconstruct AA from there. See the nlab page on Tanaka duality for more details.

Example 4 is a kind of ‘internal reconstruction’. More generally, for a Hopf algebra HH the end of the internal hom is a version of HH inside its category of representations. I believe that this idea is due to Shahn Majid (see Chapter 9 of Foundations of Quantum Group Theory).

Ends as Algebras (or Monoids, if you prefer)

In Examples 1, 3 and 4, the end could actually be given more structure than that of being just a set, a vector space or a representation. In all three examples the end is actually an algebra (or monoid, if you prefer) in the appropriate category. In fact, in Example 4 the end has a Hopf algebra structure, but I won’t go into that here.

Suppose the functor T:𝒞op⊗𝒞→𝒟T\colon \mathcal{C}^{\mathrm{op}}\otimes \mathcal{C}\to \mathcal{D} is of the form [F(−),F(−)][F(-),F(-)] for some functor F:𝒞→ℰF\colon \mathcal{C}\to \mathcal{E} and for [,][,] either internal or external hom then using the composition of the hom, for each c∈𝒞c\in \mathcal{C} we have the composite
E⊗E→[F(c),F(c)]⊗[F(c),F(c)]→[F(c),F(c)]
E\otimes E\to [F(c),F(c)]\otimes [F(c),F(c)]\to [F(c),F(c)]
and you can check that this gives a wedge E⊗E⟶⋅TE\otimes E\stackrel{\cdot }{\longrightarrow }T. Thus by the universal nature of the end we get a canonical map
μ:E⊗E→E.
\mu \colon E\otimes E\to E.
In a similar vein we have an identity morphism for each c∈𝒞c\in \mathcal{C}1→[F(c),F(c)],
1\to [F(c),F(c)],
these give rise to a wedge 1⟶⋅T1\stackrel{\cdot }{\longrightarrow }T so by the universality of EE we get a canonical map
η:1→E.
\eta \colon 1\to E.
You can verify that μ\mu and η\eta make the end EE into an algebra object in 𝒟\mathcal{D}, and the components of the end
E→[F(c),F(c)]
E\to [F(c),F(c)]
are algebra homomorphisms.

Further examples

Just to finish we can have a look at how taking different ends on a similar category give different but related answers. So let’s look at Examples 1, 3 and 4 for the category Rep(G)\text {Rep}(G) of representations of a finite group.

If we use the ordinary hom then we get the centre of the group algebra.
∫V∈Rep(G)Hom(V,V)=Z(ℂG)∈Set
\int _{V\in \text {Rep}(G)} \text {Hom}(V,V) = Z(\mathbb{C}G)\in \text {Set}

If we use the internal hom in Vect\text {Vect} we get the group algebra.
∫V∈Rep(G)Lin(U(V,)U(V))=ℂG∈Vect
\int _{V\in \text {Rep}(G)}\text {Lin}(U(V,)U(V))=\mathbb{C}G\in \text {Vect}

If we use the internal hom then we get the group algebra with the adjoint action.
∫V∈Rep(G)[V,V]=ℂGad∈Rep(G)
\int _{V\in \text {Rep}(G)} [V,V]=\mathbb{C}G^{\mathrm{ad}}\in \text {Rep}(G)

There ends my introduction to ends.

Posted at January 5, 2014 6:07 PM UTC

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

Re: Ends

Re: Ends

Nice!

One thing I don’t think you mentioned (though I confess to reading a bit fast) is that ends generalize limits, and coends generalize colimits. I know you know the following, but perhaps it will be a useful complement to your post.

Take a functor F:𝒞→𝒟F: \mathcal{C} \to \mathcal{D}. In a trivial way, this gives rise to a functor T:𝒞op×𝒞→𝒟T: \mathcal{C}^{op} \times \mathcal{C} \to \mathcal{D}, defined by

T(c′,c)=F(c).
T(c', c) = F(c).

When you unwind the definitions, you see that an end of TT is precisely a limit of FF. So, it’s reasonable to use

∫cF(c)
\int_c F(c)

to mean the limit of FF (as an alternative to limF\lim F or whatever notation you’re used to).

Of course, the same goes for coends and colimits. Thus, we can reasonably denote the colimit of FF by ∫cF(c)\int^c F(c).

Re: Ends

Incidentally, I think the connection to colimits also makes the integral notation seem more appealing.

Let’s call coproducts “sums” and denote them by ∑\sum (a practice I wish was more widespread). A colimit ∫c∈𝒞F(c)\int^{c \in \mathcal{C}} F(c) is a kind of context-sensitive sum. If 𝒞\mathcal{C} was a discrete category then it would just be the sum ∑cF(c)\sum_c F(c). But the actual colimit takes into account the more complex nature of the category 𝒞\mathcal{C}.

Similarly, an integral ∫Xf\int_X f is a kind of context-sensitive sum. If the domain XX was a finite or countable set with counting measure then it would just be the sum ∑xf(x)\sum_x f(x). But the actual integral takes into account the more complex nature of the measure space XX.

Re: Ends

Sums are to integrals as products are to… what? There’s some obscure movement for giving a name and a symbol to the missing concept (but I don’t remember what name or symbol they advocate). I suppose the normal thing to do is to call it exp∫log\exp \int \log, effectively. If there was an established symbol, it would be natural to use it for ends.

Walking sticks aside, I don’t know why we put ends at the bottom of the integral sign and coends at the top. Perhaps there’s some reason to do with covariance and contravariance. Years ago, André Joyal told me he thought it was the wrong way round. I can’t remember his reasons.

Re: Ends

Re: Ends

What does “walking sticks aside” mean? Is that a Britishism?

Indeed, when a tweed-attired British gentleman would walk the boundary of his estate, he would occasionally meet a neighbour, another gentleman, coming in the opposite direction. In order, to show that they posed no threat and were not intending to strike each other they would hold their walking sticks vertically upright and out to their right hand side as they passed each other on the left.

Now when we are discussing things but possibly coming at an argument from different directions, to show that no malice is intended we say “walking sticks aside”.

Erm, actually that’s cobblers(*), but it seemed like an almost plausible etymology.

Tom was just referring to the Sheffield mnemonic for remembering that ends have the limit at the bottom (see the second paragraph of the section on Ends in the post).

I reinvented them in high school. I decided that since an integral sign ∫\int is a long smooth sort of letter S (just as a summation sign ∑\sum is a kind of ancient Greek piecewise-linear approximation to a letter S), the product integral should be denoted with a long smooth sort of letter P (just as a product sign ∏\prod is a kind of ancient Greek piecewise-linear approximation to a letter P).

Others have had this idea, but the best I’ve seen them do is this:

You can get this symbol in TeX, but frankly it’s a bit pathetic, because it’s clearly more of a curly ∏\prod than a P, while an integral sign is really a long smooth S, not just a ∑\sum with pretensions.

Until the correct sort of long smooth P symbol exists in TeX, I’m going to find ends less clear than coends.

Re: Ends

Ha! I didn’t realise that had an official name. I also “invented” that in high school. When the “integrand” has a commutative multiplication it’s easy to write as an ordinary integral. When the integrand has a non-commutative multiplication it has its own interesting flavour and you get all that time-ordering stuff if you try to write it as an ordinary integral.

Re: Ends

IMHO Joyal is right. The coend is more like an integral than an end. It’s tradition to write the domain of integration at the bottom of the integral sign. The way I remember it is to think “the notation is the wrong way round, so if the ‘domain’ is at the bottom, it must be the product thing, not the sum thing”. Of course, sometimes I forget the “wrong way round” bit.

Re: Ends

so I don’t see why the notation for product integrals wouldn’t put the domain at the bottom

Yes, but you said “wouldn’t”, not “doesn’t”. There isn’t any such commonly established notation so it becomes an opportunity to establish a new convention.

Regardless of what Joyal actually intended, my mnemonic is now “Joyal says the current notation is wrong so if I make my integral sign look like a conventional integral it must be the thing that functions like a product, not a sum”. Combined with the walking stick thing I’m reading these quite fluently now :-)

Not sure if the contra/covariant tensor notion helps here. I only know how to make sense of coends through the tensor picture because it’s the summation convention.

Re: Ends

Well, ends in CC are just coends in CopC^{op}, so the notation should be the same, with just something to indicate the switch in variance. It’s common to use super/sub scripts for this, e.g. f*f^\ast for pullback and f*f_\ast for pushforward.

Re: Ends

If we start from that convention (asterisk at top means contravariant, asterisk at bottom means covariant), then it sort of makes sense to me to have the notation as it is.

The idea is that all limits and colimits in categories are reduced to limits in SetSet (or whatever the base of enrichment is taken to be). For example, the coproduct in a category CC is based on products in SetSet via the formula

and that’s practically a definition of coproduct when you take naturality into account.

Note that in that example, or any colimit example, the colimit occurs in the contravariant argument, which we associate with the upper or superscript asterisk. So a coend should similarly be indicated by a superscript. (Not that I take this super-seriously.)

Re: Ends

I like that; thanks.

A different potential explanation occurred to me, but unfortunately, when I worked through the details, it seems to support the opposite convention. Suppose we have a category A\mathbf{A} (with all the limits and colimits we might like) and a map in CAT/A\mathbf{CAT}/\mathbf{A}. In other words, we have categories and functors

Re: Ends

Your notation and terminology (“context-sensitive sum”) makes me free associate a bit. Since the HoTT crowd is here and didn’t say anything about it, I assume that I’m totally off base, but is there any sense in which ends are related to the dependent sums of type theory?

Re: Ends

They are! In pre-homotopy type theory where types are like sets, dependent sums are basically just coproducts. And in homotopy type theory, dependent sums are basically homotopy colimits, where the indexing category is an ∞\infty-groupoid (the type being summed over).

Re: Ends

I didn’t say anything about ends generalizing limits as I’ve not really thought about them in that way!

There are many other things I didn’t say about ends as I wanted to stop at some point: for instance, I didn’t say anything about expressing an end as an equalizer in many nice cases. Clearly the comments here are a good place for people to add their favourite thoughts on ends.

Re: Ends

I will endeavour to avoid integral signs apart from right at the end.

No pun intended, I guess :)

Awesome post, I had something similar I mind since I began understanding how ends and coends are pervasive. There are thousands of possible paths one can take from where you stopped: a neat definition of composition of profunctors can be obtained using coends (in such a way to resemble a matrix product); Kelly’s “formal” theory of operads relies substantially on a monoidal structure on Fun(C, V) alternative (but linked to) Day convolution, and both are written in coends form. In suitably nice (but frequent) situations, Lan, Ran, and any weighted limit can be written as a coend… The list is endless (pun intended)!

Re: Ends

The present note is a recollection of the most striking and useful applications of co/end calculus. We put a considerable effort in making arguments and constructions rather explicit: after having given a series of preliminary definitions, we characterize co/ends as particular co/limits; then we derive a number of results directly from this characterization. The last sections discuss the most interesting examples where co/end calculus serves as a powerful abstract way to do explicit computations in diverse fields like Algebra, Algebraic Topology and Category Theory. The appendices serve to sketch a number of results in theories heavily relying on co/end calculus; the reader who dares to arrive at this point, being completely introduced to the mysteries of co/end fu, can regard basically every statement as a guided exercise.

Re: Ends

Re: Ends

Thank you for your attention! Unfortunately in the next two-three days I’ll be too busy to correct the (many) errors that several people spotted. I owe my deepest gratitude to all of you, but especially to mr Trimble, who suggested how to polish the first sections.

Again unfortunately, these errors survived the fast revision process I have been forced to, since I’ve been compressed between the desire to go on arXiv with a better work, and the necessity to produce at least two submitted-papers for a qualifying exam.

Re: Ends

Thanks for the post! I am a bit late to the party, but your definition of wedges does not type check, since the opposite is attached to the wrong category in the product (just as it is in the examples preceding the definition).

Re: Ends

Thanks. It’s odd that that didn’t get spotted before. I’ve switched the “op” in the first line of the definition of wedge. Was that the only problem, or were you saying something else was wrong as well? I couldn’t see anything else obviously problematic.

Re: Ends

You’re welcome! I did not see anything else, but I now notice that my wording did not really express that. What I meant to say is that it was correct in the examples preceding the definition.

I guess that the examples are one reason why nobody spotted it – implicitly, the concept had already been established. I only spotted it because I took notes and used your definition as a starting point for mine.

By the way, this is a very well written introduction to ends. It benefits greatly from not mentioning extranatural transformations (which look scary). Thanks again for writing it!