I want to find analog of following two statements.


1. Let $G$ be a discrete group, $M$ is representation of $G$. Local systems on $BG$ are the same as $G$ representations (because $\pi\_1 (BG) =G$). Let $\mathscr{M}$ be a local system corresponding to $M$. 
$$ H^{\bullet}\_{Grp} (G, M) = H^{\bullet} (BG, \mathscr{M})$$
2. Let $G$ be compact connected Lie group. $\mathfrak{g}$ is corresponding Lie algebra. $\mathbb{R}$ - trivial representation of $\mathfrak{g}$.
$$ H^{\bullet}\_{Lie} (\mathfrak{g}, \mathbb{R}) = H\_{dR}^{\bullet} (G)$$


**Question:** How to express $H^{\bullet}\_{Lie} (\mathfrak{g}, M)$ geometrically? Here $M$ is a finite dimensional representation of $\mathfrak{g}$ (if you wish you can assume that it is integrated to Lie group representation).


*Comment 1* :
I am even not sure which geometric object corresponds to representation of $\mathfrak{g}$. Is it bi-D-module (bimodule over differential operators)? Is it $G \times G$ equivariant bundle on $G$?


*Comment 2*:
I want to say in other words what I want. I want a geometric structure on group $G$ considered as a manifold, which counts $H^{\bullet}\_{Lie} (\mathfrak{g}, M)$ . It can be sheaf, D-module, whatever. The point is that I want to forget that $G$ is a group. I want just $G$ considered as a manifold with extra geometric structure. And the way to get my cohomology back.



What are cohomology of Lie algebra with coefficients geometrically?
We assume $G$ is a compact connected Lie group with Lie algebra $\mathfrak{g}$. Let $\rho:\mathfrak{g}\to \mathrm{End}(E)$ is a finite representation.


We denote by $\underline{E}=G\times E$ the trivial bundle over $G$. Take $U\in \mathfrak{g}$, then $U$ define a left-invariant vector field $X\_U$ on $G$. 


For $s\in C^\infty(G,\underline{E})$, we define the $G$ action by,
$(g\cdot s)(x)=s(g^{-1}x)$. Take $e\in E$, then $e$ define a $G$-invariant section $s\_e$ of $\underline{E}$, that is 
$s\_e(x)=e.$


We define a connection on $\underline{E}$ by 
$$\nabla\_{X\_U}s\_e=s\_{\rho(U)e}.$$
This is a flat connection. The $G$-invariant part of the de Rham cohomology associated to this flat bundle $(\underline{E},\nabla)$ is what you are looking for in comment 2, i.e.,
$$\Big(H^\cdot\_{dR}(G,\underline{E})\Big)^G=H^\cdot(\mathfrak{g},E).$$


To show this, we identify $\Omega^\cdot(G,\underline{E})^G$ the left-G-invariant differential form with coefficients in $\underline{E}$, with $\mathrm{Hom}(\Lambda^\cdot(\mathfrak{g}),E)$. Under this identification, The de Rham differential operator $d$ become the differential of the complex $\mathrm{Hom}(\Lambda^\cdot(\mathfrak{g}),E)$. This means
$$H^\cdot(\Omega^\cdot(G,\underline{E})^G,d)=H^\cdot(\mathfrak{g},E).$$


We apply the Hodge theorem. We denote by $\Box$ the Hodge Laplacian, we get
$$\Omega(G,\underline{E})=H\_{dR}^\cdot(G,\underline{E})\oplus \mathrm{im}(\Box)$$
Since $\Box$ commut with $G$, we have
$$\Omega(G,\underline{E})^G=H\_{dR}^\cdot(G,\underline{E})^G\oplus \mathrm{im}(\Box)^G.$$ From last equation, we get
$$H\_{dR}^\cdot(G,\underline{E})^G=H^\cdot(\Omega^\cdot(G,\underline{E})^G,d).$$


