$\newcommand{\Trans}{\mathrm{Trans}}\newcommand{\H}{\mathrm{H}}\newcommand{\HH}{\mathrm{HH}}\newcommand{\Hom}{\mathrm{Hom}}\newcommand{\Mod}{\mathrm{Mod}}$Recently I noticed that one may regard the co/simplicial set computing the co/limit of a diagram as a (many-object, non-abelian) analogue of the Hochschild co/chain complex of an algebra with coefficients in a module. This should lead to a theory of higher co/limits, but in an orthogonal direction to higher category theory.

-----

**Motivation in the Abelian Case.** Here's what the Hochschild cochain complex $\HH^*(A;M)$ of an $R$-algebra $A$ with coefficients in a bimodule $M$ looks like:
$$M\to \Hom_{\Mod_R}(A,M)\to\Hom_{\Mod_R}(A\otimes_RA,M)\to\Hom_{\Mod_R}(A\otimes_RA\otimes_RA,M)\to\cdots.$$
Now, take a $\Mod_R$-enriched category $\cal C$ and a functor $D\colon\mathcal{C}^{\mathrm{op}}\times\mathcal{C}\to\Mod_R$, and consider the following cosimplicial abelian group, denoted by $\HH^\bullet(\mathcal{C};D)$:

\begin{align*}
\prod_{A\in\cal C}D(A,A) &\rightrightarrows \prod_{A,B\in\cal C}\Hom_{\Mod_R}(\Hom_{\cal C}(A,B),D(A,B))\\
&\underset{\to}{\rightrightarrows}\prod_{A,B,C\in \cal C}\Hom_{\Mod_R}(\Hom_{\cal C}(A,B)\otimes_R\Hom_{\cal C}(B,C),D(A,C))\\
&\underset{\rightrightarrows}{\rightrightarrows}\cdots
\end{align*}

Under the dual Dold–Kan correspondence, $\HH^\bullet(\mathcal{C};D)$ has an associated cochain complex $\mathsf{C}^*(\mathcal{C};D)$, and when $\mathcal{C}$ has only a single object―that is, when it is an $R$-algebra―it recovers precisely the Hochschild cochain complex defined above.

However, we also have the following isomorphisms:
\begin{align*}
\pi_0\HH^\bullet(\mathcal{C};D) &\cong \H^0(\mathsf{C}^*(\mathcal{C};D))\\
                                &\cong \int_{A\in\mathcal{C}}D(A,A);
\end{align*}
that is: this cochain complex computes the end of $D$ as its zeroth cohomology! Similarly, there are complexes computing the co/limit of a presheaf or functor that are analogous to the Hochschild complex of an $R$-algebra with coefficients in a left or right module.

> **Main Question.** _Have the higher cohomology groups of this complex (which may perhaps be thought of as higher versions of limits and ends) been studied before in the literature, apart from the one-object case? Are them of any use in mathematical practice?_

(As noted below in the comments, the cohomology groups above can be expressed as being the cohomology of certain homotopy coends, but what I'm after here is whether these cohomology groups _themselves_ have been used to study other objects of interest, e.g. taking the limit diagram $D$ of $\mathbb{Z}_p$ and trying to relate $\pi_{\geq1}(\HH(\mathrm{CRing};D))$ with number-theoretical information about $\mathbb{Z}_p$, or taking $D$ to be the Hom of a one-object groupoid associated to a group $G$ and studying the "higher characteristic classes" $\pi_{\geq1}(\HH(\mathrm{Sets};D))$, this time relating them to group-theoretical information about $G$, and so on.)

----

**Example.** One interesting example is that this complex applied to $D=\Hom(F,G)$ gives a cochain complex $\Trans^*(F,G)$ of transformations between functors $F,G\colon\mathcal{C}\to\Mod_R$. It looks like this:

\begin{align*}
\prod_{A\in\cal C}\Hom_{\mathcal{D}}(F(A),G(A)) &\xrightarrow{d^1} \prod_{A,B\in\cal C}\Hom_{\Mod_R}(\Hom_{\cal C}(A,B),\Hom_{\mathcal{D}}(F(A),G(B)))\\
&\xrightarrow{d^2}\prod_{A,B,C\in \cal C}\Hom_{\Mod_R}(\Hom_{\cal C}(A,B)\otimes_R\Hom_{\cal C}(B,C),\Hom_{\mathcal{D}}(F(A),G(C)))\\
&\xrightarrow{d^3}\cdots.
\end{align*}
Now, this already seems like a very interesting object to consider:

- First, $\Trans^0(F,G)$ recovers [unnatural transformations](https://ncatlab.org/nlab/show/unnatural+transformation), and $\H^0(\Trans^0(F,G))$ is isomorphic to $\mathrm{Nat}(F,G)$. 
- Second, $\H^{\geq1}(\Trans^*(F,G))$ seems to provide a notion of higher natural transformation that goes in a completely orthogonal direction to higher category theory (perhaps we might call these "sharp transformations" to avoid confusion?)

For example, in classical Hochschild cohomology, we have isomorphisms

\begin{align*}
\HH^1(A;M) &\cong \mathrm{Der}(A,M)/\mathrm{InnDer}(A,M)\\
           &=     \mathrm{OutDer}(A,M)
\end{align*}

identifying the first Hochschild cohomology of $A$ in $M$ with outer derivations. This should give notions of:

- Derivations from $F$ to $G$, defined as $\mathrm{Ker}(d^2)$; 
- Inner derivations from $F$ to $G$, defined as $\mathrm{Im}(d^1)$;
- Outer derivations from $F$ to $G$, defined as $\H^1(\Trans^*(F,G))$.

Concretely, here's what a derivation from $F$ to $G$ looks like: it is a family
$$\{\alpha_{A,B}\colon\Hom_C(A,B)\to\Hom_D(F_A,G_B)\}$$
of morphisms of $R$-modules such that we have an equality
$$\alpha_{A,C}(g\circ f)=G(g)\circ\alpha_{A,B}(f)+\alpha_{B,C}(g)\circ F(f)$$
for each $A,B,C\in\mathcal{C}$, each $f\in\Hom_{\mathcal{C}}(A,B)$, and each $g\in\Hom_{\mathcal{C}}(B,C)$.

(We could also write the above equation as
$$\alpha_{A,C}(g\circ f)=g\triangleleft\alpha_{A,B}(f)+\alpha_{B,C}(g)\triangleright f$$
with $g\triangleleft-=G(g)\circ -$ and $-\triangleleft f=-\circ F(f)$ the left and right actions of the bimodule $\Hom_{\mathcal{D}}(F,G)$ on $\mathcal{C}$, to emphasize the similarity with the Leibniz rule for derivations.)

Here are the relevant diagrams, which look a bit like two naturality squares for morphisms $f$ and $g$ glued together side to side:

<img src="https://i.sstatic.net/gsxjV.png" width="500">

----
**Remarks on the non-abelian case.** The above story has an analogue for non-enriched categories, with similar co/simplicial sets (see page 2 [here](https://arxiv.org/abs/2008.03758) for a snappy description of these), but there things are quite harder:

- For simplicial sets, we now have to deal with homotopy groups instead of homology, and this is after an application of $\mathrm{Ex}^\infty$, since these will likely fail to be Kan complexes in general. Moreover, it is not even clear that this would be the correct definition; maybe we [should instead just take $\pi_0$ of the iterated loop spaces at a point](https://mathoverflow.net/questions/433860) (which will be just be a set in general, with no group/monoid structure); or maybe we should replace these simplicial sets by $\infty$-categories or $(\infty,2)$-categories and consider their $\pi_1$ and $\pi_2$ monoids, or...
- For cosimplicial sets, we reach a dead end: not only the definition is again unclear, now there isn't even (currently) a [homotopy theory of cosimplicial sets and their "homotopy cogroups"](https://mathoverflow.net/questions/433382/) that we could consider.

Nevertheless, there are two very interesting points here:
- First, assuming the existence of such a homotopy theory for cosimplicial sets, we could talk about things like $\pi_n\Trans^\bullet(\Delta_{(-)},D)$, which would give a second formulation (and perhaps an inequivalent one) of "higher co/limits".
- Second, an immediate group-theoretical application would be a theory of higher centers and higher characteristic classes of groups (defined as the higher co/limits of the $\Hom$ of a group, viewed as groupoid with a single object.)