Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: learning: questions

Topic: Coend formula for Category of Elements


view this post on Zulip Ruby Khondaker (she/her) (May 20 2026 at 15:14):

This is a continuation of #learning: questions > Graph of a Profunctor cocontinuous?. I realised recently that my argument was missing something rather important.

For context, we have a definition of the two-sided category of elements for a profunctor P:Cop×DSetP : \mathcal{C}^\text{op} \times \mathcal{D} \to \mathbf{Set}, which I'll denote as el(P)\text{el}(P). Its objects are triples (c,d,x)(c, d, x) with xP(c,d)x \in P(c, d). Morphisms (c0,d0,x0)(c1,d1,x1)(c_0, d_0, x_0) \to (c_1, d_1, x_1) consist of pairs of morphisms f:c0c1,g:d0d1f : c_0 \to c_1, g : d_0 \to d_1 with P(idc0,g)(x0)=P(f,idd1)(x1)P(\text{id}_{c_0}, g)(x_0) = P(f, \text{id}_{d_1})(x_1). Composition and identities are then defined componentwise. Morally, you can think of this as a heteromorphic analog of an arrow category, where the objects are now PP-heteromorphisms from cc to dd. Importantly, this comes equipped with a projection functor π:el(P)C×D\pi : \text{el}(P) \to \mathcal{C} \times \mathcal{D}, covariant in both variables.

I've been doing a lengthy calculation to prove the coend formula el(P)c,dP(c,d)×C/c×d/D\text{el}(P) \cong \int^{c, d} P(c, d) \times \mathcal{C} / c \times d / \mathcal{D} - or more precisely, to show that el(P)\text{el}(P) satisfies the universal property expressed by the coend. The description of the universal element is relatively straightforward - any triple (c,d,x)(c, d, x) defines a functor C/c×d/Del(P)\mathcal{C} / c \times d / \mathcal{D} \to \text{el}(P), and one can show this collection of functors behaves coherently under changes of (c,d,x)(c, d, x), so forms an appropriate (weighted) cocone.

The other direction seems a lot more computationally intensive, though, and is what I missed in the original post. Concretely, we have an element of c,d[P(c,d)×C/c×d/D,E]\int_{c, d} [P(c, d) \times \mathcal{C}/c \times d /\mathcal{D}, \mathcal{E}], so a family of functors into E\mathcal{E} behaving coherently under changes of the parameters, and we need to show this defines a (unique) functor el(P)E\text{el}(P) \to \mathcal{E} which factors through the universal element.

I ended up getting down into the weeds of this, carefully checking what precisely it meant to have such a family of functors, explicitly defining a map el(P)E\text{el}(P) \to \mathcal{E}, and then verifying that it indeed formed a functor. It felt like quite a long calculation, but in the end I managed to show all of this.

My question is then - is there a more efficient way to see why this is true? By which I mean, is there a concise description of the map (c,d[P(c,d)×C/c×d/D,E])[el(P),E](\int_{c, d} [P(c, d) \times \mathcal{C}/c \times d/\mathcal{D}, \mathcal{E}]) \to [\text{el}(P), \mathcal{E}]?

view this post on Zulip Matteo Capucci (he/him) (May 20 2026 at 16:18):

I once pondered (almost) the same question, and convinced myself this is the fibered Yoneda lemma. You can find it in Weber's 2-topos paper or in Riehl-Verity's Elements
They don't phrase it in terms of coends but that should follow?

view this post on Zulip Matteo Capucci (he/him) (May 20 2026 at 16:18):

I think I was using the lax coend though

view this post on Zulip Ruby Khondaker (she/her) (May 20 2026 at 16:19):

Woah that’s unexpected, I didn’t realise there was a yoneda connection here! Could you outline how yoneda comes into this?

view this post on Zulip Ruby Khondaker (she/her) (May 20 2026 at 16:24):

I guess if you can show by other means that the category of elements construction is cocontinuous, then this follows from c,dP(c,d)×C/c×d/Dc,dP(c,d)×el(Hom(,c)×Hom(d,))\int^{c, d} P(c, d) \times \mathcal{C}/c \times d/\mathcal{D} \cong \int^{c, d} P(c, d) \times \text{el}(\text{Hom}(-, c) \times \text{Hom}(d, -)), which by cocontinuity is el(c,dP(c,d)×Hom(,c)×Hom(d,))el(P)\text{el}(\int^{c, d} P(c, d) \times \text{Hom}(-, c) \times \text{Hom}(d, -)) \cong \text{el}(P) by density.

However, I don’t know how to show that the category of elements construction is cocontinuous without first showing this universal property!

view this post on Zulip Matteo Capucci (he/him) (May 21 2026 at 13:55):

Ruby Khondaker (she/her) said:

I didn’t realise there was a yoneda connection here!

always expect a Yoneda connection lol

view this post on Zulip Matteo Capucci (he/him) (May 21 2026 at 13:57):

Well the one-sided case of this asks whether the fibration of elements associated to a presheaf can be described as a colimit of representable such fibrations, weighted by the presheaf itself. This is precisely fibred Yoneda.

view this post on Zulip Matteo Capucci (he/him) (May 21 2026 at 13:58):

Ruby Khondaker (she/her) said:

However, I don’t know how to show that the category of elements construction is cocontinuous without first showing this universal property!

I guess elel is cocontinuous because it's an equivalence [Co×D,Set]DFib(C,D)[C^o \times D, Set] \simeq DFib(C, D)?

view this post on Zulip Ruby Khondaker (she/her) (May 21 2026 at 14:09):

Ah but I want to know that it’s cocontinuous as a functor into Cat, not DFib(C, D)

view this post on Zulip Matteo Capucci (he/him) (May 21 2026 at 14:16):

I doubt that then, I would say that el(P+Q)=el(P)+DFibel(Q)el(P)+el(Q)el(P+Q) = el(P) +_{DFib} el(Q) \neq el(P) + el(Q)

view this post on Zulip Matteo Capucci (he/him) (May 21 2026 at 14:17):

But forgetting the fibering of el(P)el(P) is being unfair to it. You wouldn't consider a presheaf as an haphazard collection of sets either.

view this post on Zulip Ruby Khondaker (she/her) (May 21 2026 at 14:17):

I think one can directly verify that it preserves coproducts though, right? For the one-sided case, coproducts in [C^op, Set] are computed pointwise, so we should get el(P + Q) = el(P) + el(Q) for two presheaves

view this post on Zulip Matteo Capucci (he/him) (May 21 2026 at 14:19):

uh maybe you're right

view this post on Zulip Matteo Capucci (he/him) (May 21 2026 at 14:20):

yeah that seems true

view this post on Zulip Matteo Capucci (he/him) (May 21 2026 at 14:20):

it's limits that don't go through, isn't it? el(1)el(1) is CC not 11

view this post on Zulip Ruby Khondaker (she/her) (May 21 2026 at 14:25):

Yes.

I've been thinking about this more today, and I believe I have another strategy for showing this. What we need to do is verify that el:[Cop,Set]Cat\text{el} : [\mathcal{C}^\text{op}, \mathbf{Set}] \to \mathbf{Cat} is a left adjoint, and then cocontinuity will follow.

For this, it seems like explicitly describing the right adjoint and verifying the triangular identities might be the way to go? The right adjoint G:Cat[Cop,Set]G : \mathbf{Cat} \to [\mathcal{C}^\text{op}, \mathbf{Set}] sends a category E\mathcal{E} to the presheaf c[C/c,E]0c \mapsto [\mathcal{C}/c, \mathcal{E}]_0, the collection of functors from the slice category C/c\mathcal{C}/c to E\mathcal{E}.

In this case the unit is a natural isomorphism - this is the statement that [C/c,el(P)]0P(c)[\mathcal{C}/c, \text{el}(P)]_0 \cong P(c). This should simplify demonstrating the triangular identities. The counit is a functor el([C/,E]0)E\text{el}([\mathcal{C}/-, \mathcal{E}]_0) \to \mathcal{E} which you can describe explicitly. It sends an object (c,F)(c, F) to F(cidc)F(c \to^\text{id} c), and once I get some diagrams I can show the action on morphisms.

view this post on Zulip Ruby Khondaker (she/her) (May 21 2026 at 14:28):

Hm, though now that I think about it, you might need to consider these as categories fibred over C\mathcal{C} after all, otherwise I'm not sure if [C/c,el(P)]0P(c)[\mathcal{C}/c, \text{el}(P)]_0 \cong P(c) actually holds...

Well at least there is a natural transformation P[C/,el(P)]0P \Rightarrow [\mathcal{C}/-, \text{el}(P)]_0, so perhaps we still get an adjunction.

view this post on Zulip Ruby Khondaker (she/her) (May 22 2026 at 14:29):

Ok, I am back from doing a lot more calculation! Here is the strategy I have figured out.

To show the coend formula, it suffices to check that el:[Cop×D,Cat]\text{el} : [\mathcal{C}^\text{op} \times \mathcal{D}, \mathbf{Cat}] is cocontinuous, since we have the density formula Pc,dP(c,d)×Hom(,c)×Hom(d,)P \cong \int^{c, d} P(c, d) \times \text{Hom}(-, c) \times \text{Hom}(d, -), and el(Hom(,c)×Hom(d,))=C/c×d/D\text{el}(\text{Hom}(-, c) \times \text{Hom}(d, -)) = \mathcal{C}/c \times d/\mathcal{D}.

To show cocontinuity, it suffices to show it has a right adjoint. In the sequel, we will describe the right adjoint and establish the isomorphism.

The right adjoint is a "nerve" functor N:Cat[Cop×D,Set]N : \mathbf{Cat} \to [\mathcal{C}^\text{op} \times \mathcal{D}, \mathbf{Set}] which sends a category E\mathcal{E} to the profunctor N(E)N(\mathcal{E}) defined as N(E)=[C/×/D,E]0N(\mathcal{E}) = [\mathcal{C}/- \times -/\mathcal{D}, \mathcal{E}]_0. Explicitly, on objects we have N(E)(c,d)=[C/c×d/D,E]0N(\mathcal{E})(c, d) = [\mathcal{C}/c \times d/\mathcal{D}, \mathcal{E}]_0, the set of functors from C/c×d/D\mathcal{C}/c \times d/\mathcal{D} to E\mathcal{E}.

From the calculation I've done, the hardest part is defining the counit of the adjunction. That is, a functor ϵE:el(NE)E\epsilon_\mathcal{E} : \text{el}(N \mathcal{E}) \to \mathcal{E} which is natural in E\mathcal{E}. If you unfold definitions there's essentially only one sensible choice, but it does take a while to verify functoriality.

After this, we can establish the natural isomorphism. Given F:PEF : \int P \to \mathcal{E} we define FT:P[C/×/D,E]0F^T : P \Rightarrow [\mathcal{C}/- \times -/\mathcal{D}, \mathcal{E}]_0 by FT(x)=Fel(x)F^T(x) = F \circ \text{el}(x^\sharp), where xP(c,d)x \in P(c, d) and x:Hom(,c)×Hom(d,)Px^\sharp : \text{Hom}(-, c) \times \text{Hom}(d, -) \Rightarrow P is the natural transformation induced by yoneda. Here we use functoriality of el\text{el} to show that FTF^T is natural.

Conversely, given a natural transformation α:P[C/×/D,E]0\alpha : P \Rightarrow [\mathcal{C}/- \times -/\mathcal{D}, \mathcal{E}]_0, we obtain a functor αT:PE\alpha^T : \int P \to \mathcal{E} defined as αT=ϵEel(α)\alpha^T = \epsilon_\mathcal{E} \circ \text{el}(\alpha). This is manifestly a natural transformation Nat(P,[C/×/D,E]0)[P,E]0\text{Nat}(P, [\mathcal{C}/- \times -/\mathcal{D}, \mathcal{E}]_0) \to [\int P, \mathcal{E}]_0 since el\text{el} is a functor and ϵ\epsilon is a natural transformation. Thus, we just need to verify it's a pointwise isomorphism to establish the adjunction.

For this, it suffices to show (FT)T=F(F^T)^T = F and (αT)T=α(\alpha^T)^T = \alpha. The first equality is true iff ϵEel(FT)=F\epsilon_\mathcal{E} \circ \text{el}( F^T) = F, which can be verified directly.

For the second equality, we need (αT)T(x)=α(x)(\alpha^T)^T(x) = \alpha(x) for every xP(c,d)x \in P(c, d). The LHS is defined to be αTel(x)=ϵEel(α)el(x)\alpha^T \circ \text{el}(x^\sharp) = \epsilon_\mathcal{E} \circ \text{el}(\alpha) \circ \text{el}(x^\sharp), which is ϵEel(αx)=ϵEel(α(x))\epsilon_\mathcal{E} \circ \text{el}(\alpha \circ x^\sharp) = \epsilon_\mathcal{E} \circ \text{el}(\alpha(x)^\sharp).

One can then verify directly that α(x)=α(x)T:Hom(,c)×Hom(d,)[C/×/D,E]0\alpha(x)^\sharp = \alpha(x)^T : \text{Hom}(-, c) \times \text{Hom}(d, -) \Rightarrow [\mathcal{C}/- \times -/\mathcal{D}, \mathcal{E}]_0 by evaluating each at the identity and applying yoneda. So this reduces to ϵEel(α(x)T)=α(x)\epsilon_\mathcal{E} \circ \text{el}(\alpha(x)^T) = \alpha(x) by the first equality.

view this post on Zulip Ruby Khondaker (she/her) (May 22 2026 at 14:33):

I can certainly see lots of yoneda used in the above proof, and perhaps if I was more familiar with fibred category theory I could reduce this to a one-liner? But for now I think I'm happy with this.

I wonder how much this relates to the "true" Grothendieck construction. Does it also have a similar right adjoint "nerve" functor Cat[Cop×D,Cat]\mathbf{Cat} \to [\mathcal{C}^\text{op} \times \mathcal{D}, \mathbf{Cat}] sending E[C/×/D,E]\mathcal{E} \mapsto [\mathcal{C}/- \times -/\mathcal{D}, \mathcal{E}]?

I guess I didn't quite appreciate the sense in which the category of elements and the grothendieck construction seem to fit into a "nerve-realisation" style adjunction. But that's pretty cool!

view this post on Zulip Ruby Khondaker (she/her) (May 22 2026 at 21:27):

Thinking about this a little more, it would have to be more complicated for the true grothendieck construction. If I just look at the coend formula cPc×C/c\int^c Pc \times \mathcal{C}/c where PcPc is now a category, this would produce a “strict” variant of the true grothendieck construction. Instead I’d have to get comfortable with laxity, lax ends and the like, which is firmly higher-categorical and so beyond my reach at the moment.

Thus I guess in summary - the category of elements construction, viewed as a functor into Cat, has a right adjoint given by a “nerve” formula, where one probes arbitrary categories E via the slice categories for C (or slice and coslice for the two-sided case). This establishes cocontinuity and thus the coend formula for the category of elements, whether that be for presheaves, copresheaves or profunctors.

view this post on Zulip Ruby Khondaker (she/her) (May 22 2026 at 21:46):

@Matteo Capucci (he/him) thinking about your comments about how it’s unfair to forget the fibering of el(P)\text{el}(P), I wonder if that’s actually a central part of this story? Namely, there’s a forgetful functor DFib(C×D)Cat\text{DFib}(\mathcal{C} \times \mathcal{D}) \to \mathbf{Cat} which, as you say, forgets the fibering and projection and just takes the domain category.

Perhaps what I’ve done here is implicitly construct a right adjoint to this forgetful functor? It sends a category E\mathcal{E} to the category of elements of the profunctor [C/×/D,E]0[\mathcal{C}/- \times -/\mathcal{D}, \mathcal{E}]_0, viewed as a (two-sided) discrete fibration. So a kind of “cofree” discrete fibration associated to a category. Does that sound reasonable?

This would imply cocontinuity of the forgetful functor, which gives another way to establish this coend formula.

view this post on Zulip Matteo Capucci (he/him) (May 23 2026 at 06:38):

uh that's interesting

view this post on Zulip Matteo Capucci (he/him) (May 23 2026 at 06:42):

I can't intue why that would come up

view this post on Zulip Matteo Capucci (he/him) (May 23 2026 at 06:43):

It does seem like a cofree construction..

view this post on Zulip Ruby Khondaker (she/her) (May 23 2026 at 08:25):

I’m sure I’m not the first person to observe this - do you have any references where I could see this explored in more detail?

view this post on Zulip Matteo Capucci (he/him) (May 25 2026 at 08:59):

I have a vague memory of a paper about cofree fibrations... let me look it up

view this post on Zulip Matteo Capucci (he/him) (May 25 2026 at 09:00):

Here it is! https://arxiv.org/abs/2305.01474

view this post on Zulip Matteo Capucci (he/him) (May 25 2026 at 09:00):

I don't recall how it worked though, you'll have to check it

view this post on Zulip Ruby Khondaker (she/her) (May 25 2026 at 09:32):

Ah thank you! Skimming through the paper, it seems like their construction of GF\mathcal{G}_F is quite similar to [C/,E]0\int [\mathcal{C}/-,\mathcal{E}]_0, just with everything put up a dimension.