I learned that the Hochschild cohomology of an associative algebra $A$ with a bimodule $M$ is defined using the cochain \begin{align*} \cdots \rightarrow C^n(A,M) \stackrel{d^n}{\longrightarrow} C^{n+1}(A,M) \rightarrow \cdots, \end{align*} where $C^n(A,M)=\mathrm{Hom}(A^n,M)$ and $$d^nf(x_1, \ldots, x_{n+1})=x_1 f(x_2,\ldots, x_{n+1})+ \sum \limits_{i=1}^n(-1)^if(x_1, \ldots, x_{i-1},x_i x_{i+1}, \ldots, x_{n+1})+(-1)^{n+1} f(x_1, \ldots, x_n)x_{n+1}.$$ I also learned that the cohomology theory of other algebraic structures are studied, for example the Chevalley-Eilenberg cohomology of Lie algebras, the cohomology of 3-Lie algebras, the cohomology of Leibniz algebras and so on. I find that the cochains $C^n(A,M)$ and the differential $d^n$ are quite different for different algebraic structures. So I want to know whether there are some rules when consider the cohomology of an algebra? For example, given an algebra (associative, Lie, Leibniz,...) and a representation $M$ of the algebra, how should we define $C^n(A,M)$ and how should we define $d^n$ to give an appropriate cohomology of the algebra?

## 1 Answer

There is a tremendous amount of abstract formalism answering this question in various levels of generality depending on what you want to do. I'll pick one in the middle: the machinery of derived functors is, roughly speaking, an abstract formalism allowing you to recover a notion of cohomology $H^n$ starting from, say, a left exact functor $H^0$ between abelian categories (more general setups are also possible). So to find interesting notions of cohomology we can look for such functors. All of the functors I discuss below are actually representable so their derived functors are "derived homs."

You can think of group cohomology, where $H^0(G, M)$ is the functor $M^G$ of invariants, and Lie algebra cohomology, where $H^0(\mathfrak{g}, M)$ is again the functor of invariants, as motivating examples; here cohomology is "derived invariants." Hochschild cohomology can also be interpreted this way, where $H^0(A, M)$ is the functor of invariants in the sense $\{ m \in M : \forall a \in A, am = ma \}$. This is maybe a bit more mysterious but at least it's easier to understand than the entire Hochschild complex.

The phrasing of your question actually invites the following question: what is the cohomology of a *module* (as opposed to a bimodule) $M$ over an algebra $A$? And our derived functor setup encourages us to ask: well, what left exact functors take as input such a module? As mentioned, the three examples we considered above are all actually representable functors $M \mapsto \text{Hom}(N, M)$ where $N$ was a special module (the trivial module of $G$ resp. $\mathfrak{g}$ in the group and Lie algebra case, and $A$ as a bimodule over itself in the Hochschild case). If we just consider (say, left) modules over an algebra $A$ the only special module in sight is $A$ itself, but the corresponding functor $\text{Hom}_A(A, M)$ just spits out $M$ again; in particular it's not only left exact but exact so doesn't have any interesting derived functors. In this setting we should just consider an arbitrary hom $\text{Hom}_A(N, M)$ and we recover Ext.

So, given some algebraic structure $A$, you can first ask whether it has some abelian category of modules $M$ over it in some sense, and you can second ask whether there are any "special" modules $N$, then consider the derived functors of $\text{Hom}(N, -)$. That'll recover some notion of cohomology.

To get a specific complex computing this thing you pick a specific resolution of $N$; e.g. for group cohomology the usual complex computing it comes from taking a free resolution of the trivial module called the bar resolution. Thinking in terms of derived functors gives you the flexibility to choose other resolutions as appropriate, or to not choose resolutions at all and just do computations using long exact sequences or spectral sequences etc.

Algebraic Operads(Fresse, Loday--Vallette) and similar references, which define the cohomology theory you want even if the operad is not Koszul. If it is, you just want to consider a complex of the form $ C^*(V) = \hom(P^{\rm{dual}}(V),V)$ which is twisted "twice" using the canonical twisting cochain of a Koszul operad. $\endgroup$