Cohomology of $G$-invariant differential forms Let $G$ be a Lie group with a left action on a manifold $M$, $\cdot : G \times M \to M$.
Define a $G$-invariant differential form $\alpha \in \Omega^{k}(M)$ as a form satisfying $g^{*}\alpha = \alpha,$ where $g:M \to M$ is the action by $g \in G$. Since pullbacks commute with differentials, the set of all $G$-invariant forms (which I will denote by $\Omega(M)^G$) is a subcomplex of $\Omega(M)$. I found the following theorem in several places:

Theorem: If $G$ is compact and connected, then the inclusion $i: \Omega(M)^{G} \to \Omega(M)$ is induces an isomorphism in de Rham cohomology.

One of the places where I found this is https://planetmath.org/invariantdifferentialform. However, there is no proof there, and I would like to find a proof. Does anyone know a good reference on this subject matter?
 A: Spivak "A comprehensive introduction to Differential Geometry" vol. 5, Look at chapter 13, section 16 pg 308,309.
A: The cochain map $j:\Omega^k_G(M)\longrightarrow\Omega^k(M)$ induces an injective morphism on the cohomological level:
$$j^*:H^k_G(M)\longrightarrow H^k(M)$$
We need to show this $j^*$ is also surjective, which is equivalent to show for any cohomologous $[\beta]\in H^k(M)$, it contains at least one $G-$ invariant form $\alpha\in[\beta]$.
Recall that since $G$ is a connected compact Lie group, it admits a left invariant Haar measure, which allows us to take integral over $G$, so we can define
$$\alpha=\int_G g^*\beta$$
Where the inetgrands is taking for all $g\in G$.
(1). We notice that since $g:M\longrightarrow M$ is a diffeomorphism, it induces isomorphism on the cohomological level, hence $g^*\beta$ still lies in the cohomologous $[\beta]$, which is to say that $g^*\beta-\beta=d\omega_g$ for some $\omega_g\in\Omega^{k-1}(M)$, then we have
$$\alpha-\beta=\int_G d\omega_g=d\int_G\omega_g$$
Thus $\alpha-\beta$ is exact.
(2). $\alpha$ is also closed, thus $\alpha\in[\beta]$, well, indeed, we have
$$d\alpha=\int_G dg^*\beta=\int_G g^*d\beta=0$$
(Recall that the pull-back of a smooth map is a cochain map of de Rham complex)
(3). $\alpha$ is $G-$invariant, in fact, for all $h\in G$, we have
$$h^*\alpha=\int_G(gh)^*\beta=\alpha$$
by the change of some variables, hence $j^*$ is also surjective, which is to say, the Cohomology of $G$-invariant forms coincides with the usual de Rham Cohomology.
