Suppose $G$ is a Lie group, with $\pi\_0(G)$ **not necessarily finite**, but might as well assume $G\_0$, the connected component of the identity, is compact.


In the case that $\pi\_0(G)$ *is* finite, then we know that there is an injection $H^\*(BG,\mathbb{Q})\to H^\*(BG\_0,\mathbb{Q})$, and this can apparently be seen via a spectral sequence argument, using the fact that the rational cohomology of $B\pi\_0(G)$ is concentrated in degree zero. So this is some kind of Leray–Serre spectral sequence argument on either $\pi\_0(G)\to BG\_0\to BG$ or $BG\_0\to BG\to B\pi\_0(G)$ (and I suspect the latter), probably using the degeneration and some kind of "edge homomorphism is injective" argument.


I suspect that in the case that we know something strong about the rational cohomology of $B\pi\_0(G)$, then we might be able to say something in the case where $\pi\_0(G)$ is not finite.


Unfortunately my spectral sequence knowledge is limited, and I can't find a treatment of spectral sequences that seems general enough to deal with this setup **in general** (namely non-simply-connected base, and possibly non-connected fibre, plus non-finiteness issues, depending on which fibration is used).


Is my intuition correct, that $H^\*(B\pi\_0(G),\mathbb{Q}) = H^0(B\pi\_0(G),\mathbb{Q})$ can let us conclude something about how the cohomology of $BG$ relates to that of $BG\_0$?


Also, what would be a good reference that covers a general-enough version of the relevant spectral sequence?



Cohomology of BG, G non-connected Lie group, and spectral sequence relating to classifying space of connected component of the identity
Think about the case where $\pi\_0(G)=\mathbb{Z}$, so $B(\pi\_0(G))=S^1$, so we have a fibre bundle $BG\_0\to BG\to S^1$. In this case $G$ is always a semidirect product formed using an automorphism $\alpha$ of $G\_0$. By considering the preimages of the the complements of two points in $S^1$, we can express $BG$ as $U\cup V$, where $U$ and $V$ are each open and homotopy equivalent to $BG\_0$, and $U\cap V$ is homotopy equivalent to $BG\_0\amalg BG\_0$. This gives a Mayer-Vietoris sequence. If we set up the identifications carefully we find that $\alpha^\*$ appears in one of the Mayer-Vietoris maps, and we deduce that there is a short exact sequence $C^{\*-1}\to H^\*(BG)\to K^\*$, where $K^\*$ and $C^\*$ are respectively the kernel and cokernel of $\alpha^\*-1\colon H^\*(BG\_0)\to H^\*(BG\_0)$. All this is valid integrally as well as rationally.


For more general $\pi\_0(G)$, we have a spectral sequence
$$ H^p(\pi\_0(G);H^q(BG\_0)) \Longrightarrow H^{p+q}(BG). $$
Note that the $E\_2$ term involves group cohomology of the group $\pi\_0(G)$ with coefficients in the module $H^\*(BG\_0)$, which typically has nontrivial action of $\pi\_0(G)$. This is the same as the cohomology of the space $B\pi\_0(G)$ with coefficients in a local system that typically has nontrivial twisting.


In the case $\pi\_0(G)=\mathbb{Z}$ the only group cohomology groups are $E\_2^{0q}=K^q$ and $E\_2^{1q}=C^q$. The differentials are like $d\_r\colon E\_r^{pq}\to E\_r^{p+r,q-r+1}$ so there is no room for them to be nonzero. Thus $E\_\infty=E\_2$ and we recover the picture in the first paragraph above.


On the other hand, if $\pi\_0(G)$ is finite and we use rational coefficients then $H^p(\pi\_0(G);H^q(BG\_0))=0$ for $p>0$ and the spectral sequence collapses to an isomorphism $H^n(BG)=H^n(BG\_0)^{\pi\_0(G)}$.


Note also that $G$ could just be $G\_0\times\Gamma$ for an arbitrary discrete group $\Gamma=\pi\_0(G)$. In this case $BG=BG\_0\times B\Gamma$, and the Kan-Thurston Theorem tells us that $H^\*(B\Gamma)$ can be essentially anything.


