I recall that there was a theorem mimicking the change of variables' integral formula. Surprisingly, I can't find it on the Fosco Loregian book. The change of variables formula states that, if $f: E \to B$ is a measurable mapping between measurable spaces and $\mu$ is a measure on $E$, then for all $g: B \to \mathbb{R}$
$$ \int\_E f(g(x)) d \mu(x) = \int\_B g(x) d f\_\* \mu(x) $$
Analogously, I want to understand how to reduce the coend over a big category if the bifunctor depends on a smaller category.


In other words, let $p: E \to B$ be a functor of categories and a bifunctor $\alpha: B \times B^{op} \to D$. Define $p^\*F: E\times E^{op} \to D$ as the composition $F(p \times p^{op})$. In case $p$ has set-fibers and is a surjection, I think one should have
$$ \int^{y \in E} (p^\*F) (y,y) \simeq \int^{x \in B} E\_{x} \cdot F(x,x )$$
where $\cdot$ is the copower and $E\_x$ is the fiber of $E \to B$ in $x$.



> 
> Is there a general formula for $$ \int^{y \in E} (p^\*F) (y,y) $$ and what is a reference to the proof?
> 
> 
> 



Change of coordinates for coends
$\require{AMScd}$First of all, I suspect that "$p$ has set fibers and it is surjective" means that it is a discrete fibration. In that case, $p$ corresponds to a functor $G\_p : C \to Set$ (covariant if $p$ is an opfibration, contravariant if it's a fibration) defined precisely as $Gx = E\_x$. So, a better way to rephrase your question would be the following



> 
> **Conjecture**. Let $F : C^{op}\times C \to D$ a functor with codomain a cocomplete category; let $P : C^{op}\to Set$ be a presheaf. Then
> $$\int^X PX^-\cdot F(X^-,X^+)\cong \int^{W\in Elts(P)} F(\Sigma\_PW,\Sigma\_PW) \tag{$\heartsuit$}$$ where
> 
> 
> * the "sign rule" is a convention on dummy variables that says that all $X^-$ vary simultaneouly, and contravariantly, and all $X^+$ vary
> simultaneously, and covariantly;
> * $Elts(P)$ denotes the category of elements of $P$ and $\Sigma\_P$ is the associated forgetful functor, which is a discrete fibration.
> 
> 
> Without loss of generality, all discrete fibrations are of this form.
> 
> 
> Dually, if $Q : C\to Set$ is a copresheaf, $$\int^X QX^+\cdot
> F(X^-,X^+)\cong \int^{W\in Elts(P)} F(\Sigma\_PW,\Sigma\_PW) $$
> 
> 
> 


But coends have nothing special against ends, and by properly dualising the statement, we get that for a presheaf $P$ and copresheaf $Q$,
$$\begin{gather\*}
\int\_X PX^+\pitchfork F(X^-,X^+)\cong \int\_{W\in Elts(P)} F(\Sigma\_PW,\Sigma\_PW) \\ \int\_X QX^-\pitchfork F(X^-,X^+)\cong \int\_{W\in Elts(P)} F(\Sigma\_PW,\Sigma\_PW)
\end{gather\*}$$ (or probably the opposite of $Elts(P)$?)


This is meant to address the problem that the integral $\int^X PX\cdot F(X,X)$ depends on three variables, and what *exactly* is the coend you're performing?


The precise sense of the conjecture is that for every fibration $p : E\to C$ there is a coequalizer diagram
$$
\sum\_{x\to y} E\_y \cdot F(y,x) \rightrightarrows \sum\_{x\in X} E\_x\cdot F(x,x) \to \textstyle\int p^\*F
$$
or more precisely that $\int p^\*F$ is the coend of the functor
$$\begin{CD}
C^{op}\times C \\
@V\Delta\times C VV\\
C^{op}\times C^{op} \times C\\
@VG\_p\times C^{op}\times C VV\\
Set \times C^{op} \times C\\
@VSet\times FVV\\
Set\times D\\
@V\\_\cdot\\_VV\\
D
\end{CD}$$
In "stupid" examples, this works:


* If $P$ is constant, say $PX\equiv A$ for a set $A$, then $$\int^X PX\cdot F(X,X) \cong A\cdot \int^X F(X,X)$$ which, since $Tw(C\times A)=Tw(C)\times A$ when $A$ is discrete, seems to be precisely the RHS of $(\heartsuit)$.
* If $P$ is representable and $F$ is mute, it reduces to a "Yoneda-like" argument and actually this is enough to say that the conjecture is true for *any* $P$ and $F$ mute, because $\\_\cdot\\_$ is separately cocontinuous in both variables; alternatively, one can argue that the conjecture reduces to the fact that the colimit of $F$ weighted by $P$ is the coend $\int^X PX\cdot FX$. Incidentally, this suggests that if you want to state a similar conjecture in an enriched setting, it will only work for the bases of enrichment that have a meaningful Grothendieck construction, e.g. for the class of categories of [this paper](https://arxiv.org/abs/1804.03829).


**Remark**. By the abovementioned cocontinuity of $\\_\cdot\\_$ it might be sufficient to prove $(\heartsuit)$ in the case where $P$ is representable. But one must then find a way to circumvent the following problem: let's compute with the LHS of $(\heartsuit)$, and get
$$\begin{align\*}
\int^X PX\cdot F(X,X) &= \int^X \big(\text{colim}\_\alpha C(X,A\_\alpha)\big)\cdot F(X,X) \\ 
&= \text{colim}\_\alpha\int^X C(X,A\_\alpha) \cdot F(X,X) \\ 
&=\text{colim}\_\alpha\int^{(X,u) \in C/A\_\alpha} F(\Sigma (X,u),\Sigma (X,u))
\end{align\*}$$ from which it is "evident" (?!) that the sense in which this is just $\int^{W \in Elts(P)} F(\Sigma W, \Sigma W)$ is the same sense in which $Elts(P)\cong \int^X C/X\times PX$. Yet, I don't see a formal manipulation ensuring that this is true, and I find a direct, hands-on proof pretty daunting.


Probably it's a good point to stop and find counterexamples, so that at least we have a clear idea of when the conjecture is false. We're in the same ballpark of [this question](https://mathoverflow.net/questions/356473/category-in-a-coend-depends-on-the-integration-variable-of-an-outer-coend) I asked years ago, so I suspect that a similar condition as the one stated in the comments, to "compute colimits fiberwise" is needed.


A different path that one might take is more belligerent: find a cowedge $F(\Sigma\_P(X,a), \Sigma\_P(X,a)) \to \int^X PX\cdot F(X,X)$ and prove that it is initial. But I don't trust the back-of-the-envelope computation that seems to say $(\heartsuit)$ is true in general.




---


PS: join the [ItaCa](https://progetto-itaca.github.io) gang!


