Suppose $\mathcal{A}$ is a Grothendieck abelian category with enough projectives, then $\mathcal{A}$ is tensored and cotensored over $\mathrm{Ab}$ with $\mathbb{Z}^{\oplus S}\otimes X\cong \bigoplus\_S X$ for any set $S$, and for any abelian group $A$, with presentation $\mathbb{Z}^{\oplus R}\xrightarrow{f} \mathbb{Z}^{\oplus G}\to A \to 0$ we define


$$A\otimes X := \mathrm{coker}(\mathbb{Z}^{\oplus G}\otimes X \xrightarrow{f\otimes A} \mathbb{Z}^{\oplus G}\otimes X).$$


Now if we have some $\mathrm{Ab}$-enriched category $Q$ and functors $P:Q^{op}\to \mathrm{Ab}$ and $X:Q\to \mathcal{A}$ we can define the functor tensor product of $P$ and $X$ to be
$$
P\otimes\_Q X:= \int^{p \in Q}P(p)\otimes X(p) \in \mathcal{A}.
$$
This is clearly functorial in both variables. I am wondering does anyone know a balancing result, similarly to balancing Tor. That is is $\mathbb{L}\_i(P\otimes\_Q -)(X)\cong \mathbb{L}\_i(-\otimes\_Q X)(P)$.


In general I would be very interested in any result on these derived functors or their relation to $\mathrm{Ext}$ in $\mathrm{Fun}(Q,\mathcal{A})$.


I am interested in these, as they relate to certain "homology" functors related to $\mathrm{Fun}(Q,\mathcal{A})$.



Derived functor of functor tensor product
The answer is yes if you assume enough things. In particular, the notion of a left flat object of $\mathcal A$ comes up :


**Definition:** An object $L\in\mathcal A$ is left flat if $-\otimes L$ is exact.


My assumption will be that $\mathcal A$ has enough left flat objects. This allows you to even define $\mathbb L(P\otimes\_Q -)$ in terms of left flat resolutions as I will explain below.


(*Note* : Here I'm using a definition of $\mathbb L$ which is slightly more general than "take projective resolutions", namely I'm using the one using "left defomations", see Riehl's book on homotopical algebra. If you want to use projective resolutions, the assumption is that $\mathcal A$ has enough left flat projectives)


*Warning*: Note that if $\mathcal A$ has projectives that are not left flat, then the answer is no even for $Q=\*$, as is easy to convince yourself of. In particular, if $\mathcal A$ has enough projectives (to define $\mathbb L$ in the classical homological algebra sense), the assumption is that enough (equivalently all) projectives are left flat.


In this case, the answer is yes, and basically the proof is the same as in the ordinary case. Let me work in the bounded below case because there are the same subtleties as in the ordinary case for the unbounded case.


In particular, up to shifting, I will work in the connective case.


Let me sketch a proof below (convention : my functor categories are categories of $Ab$-enriched functors, I'm assuming this is what you meant - otherwise, replace $\hom\_Q$ with $\mathbb Z[\hom\_Q]$):


**Definition:** $P$ is right flat if $P\otimes\_Q -$ is exact, and same for $X$ being left flat.


**Lemma:** Projectives in $Fun(Q^{op},Ab)$ are right flat, and there are enough left flats in $Fun(Q,\mathcal A)$.


*Proof*: By the enriched Yoneda lemma and smallness of $Q$, every projective is a summand of $\bigoplus\_i \hom\_Q(-,q\_i)$ for some family of $q\_i$'s. Therefore it suffices to prove it for those ones, because flatness is stable under retracts. Flatness is also stable under direct sums because they are exact ($\mathcal A$ is Grothendieck, in particular AB5), so it suffices to prove it for $\hom\_Q(-,q)$. But now by the enriched Yoneda lemma again (the "canonical colimit of representable presheaves" version), we have $\hom\_Q(-,q)\otimes\_Q X \cong X(q)$, which is manifestly an exact functor.


The dual case is dual, you simply need to allow $\hom\_Q(q,-)\otimes L$ for enough flat objects $L$ of $\mathcal A$.


In particular this lemma tells you that the two things you want to compare are well-defined.


**Corollary:** If $C$ is a chain complex of right flat functors $Q^{op}\to Ab$, $C\otimes\_Q -$ preserves quasi-isomorphisms (where you define $\otimes\_Q$ on chain complexes in the obvious way); and dually.


*Proof* : Let $n\in \mathbb N$, and let $C\_{\leq n}$ denote the so-called stupid truncation of $C$, i.e. $0\to C\_n\to ... \to C\_0$. Because $-\otimes\_Q -$ manifestly preserves filtered colimits in each variable, because filtered colimits are exact ($\mathcal A$ is Grothendieck, in particular AB5), and finally because $C= \mathrm{colim}\_n C\_{\leq n}$, it suffices to prove that each $C\_{\leq n}\otimes\_Q -$ preserves quasi-isomorphisms.


Now we have a short exact sequence $0\to C\_{\leq n-1}\to C\_{\leq n}\to C\_n\to 0$ which is split *as a sequence of graded objects*. Note that the underlying graded object of $A\otimes\_Q B$ only depends on the underlying graded objects of $A,B$ respectively. It follows that this exact sequence remains exact after tensoring (over $Q$) with anything.


In particular, by the long exact sequence in homology, and by induction, we reduce to proving that $C\_n\otimes\_Q-$ preserves quasi-isomorphisms for each $n$. But this is by the assumption that each $C\_n$ is right flat.


The dual case is completely dual.


*Note* : I am implicitly using the fact that $-\otimes -: Ab\times\mathcal A\to\mathcal A$ preserves colimits in each variable. This is an exercise I'll leave to you :)


*Note* : This lemma is essentially what allows you to define $\mathbb L$ using left/right flat resolutions.


*Note*: This lemma is often packaged as a spectral sequence argument, but it's really about the filtration.


**Corollary:** $\mathbb L(P\otimes\_Q -)(X)\simeq \mathbb L(-\otimes\_Q X)(P)$.


*Proof* : Pick a right flat resolution $\tilde P$ of $P$, and a left flat resolution $\tilde X$ of $X$ (those exist by the first lemma).


You have a zigzag $$\mathbb L(P\otimes\_Q -)(X) =P\otimes\_Q \tilde X \to \tilde P\otimes\_Q \tilde X \leftarrow \tilde P\otimes\_Q X = \mathbb L(-\otimes\_Q X)(\tilde P)$$


The extreme equalities are by definition, and the two middle arrows are quasi-isomorphisms by the previous corollary.


*Note* : this quasi-isomorphism can be made as natural as left flat resolutions in $\mathcal A$.


