Solution (source code)

= Solution

At each point, use the inverse metric on the cotangent space. It induces an <inner product> on $p$-forms by
$$
\langle\xi_1\wedge\cdots\wedge\xi_p,\eta_1\wedge\cdots\wedge\eta_p\rangle
=\det\bigl(g^{-1}(\xi_i,\eta_j)\bigr).
$$
Equivalently, wedges of distinct members of an orthonormal coframe form an <orthonormal basis>. Choose an <orientation> to define the ordinary global <Hodge star operator> by $\alpha\wedge*\beta=\langle\alpha,\beta\rangle\,d\mathrm{vol}_g$. It maps $p$-forms to $(n-p)$-forms and obeys $*^2=(-1)^{p(n-p)}$. We use real forms; complex forms are obtained by complex-linear extension. Without an <orientation> an ordinary global star is not available without twisting the target, so <orientation> is implicit in this first part.

With the <codifferential> $\delta_p=(-1)^{n(p+1)+1}*d*$ for $p>0$ and $\delta_0=0$, define the <Hodge Laplacian> $\Delta=d\delta+\delta d$. On functions it is the nonnegative-sign <Laplace-Beltrami operator>, $\Delta f=-\operatorname{div}\operatorname{grad}f$. A <harmonic differential form> satisfies $\Delta\alpha=0$.

For $\alpha$ of degree $p$, the displayed sign formula and star square give
$$
d(*\alpha)=(-1)^p*\delta\alpha,\qquad
\delta(*\alpha)=(-1)^{p+1}*d\alpha.
$$
Applying the identities again, at degrees $p-1$ and $p+1$, proves the <Hodge star commutes with the Hodge Laplacian> relation
$$
\boxed{\Delta(*\alpha)=*\Delta\alpha.}
$$
Since star is invertible, $\alpha$ is harmonic if and only if $*\alpha$ is harmonic. This part does not need compactness; zero-degree and top-degree terms are interpreted as zero when their degrees are outside the range.

For the remaining cohomological statements assume a compact oriented manifold without boundary. The <Hodge decomposition theorem> gives the $L^2$-orthogonal decomposition
$$
\Omega^p(M)=\mathcal H^p(M)\oplus d\Omega^{p-1}(M)\oplus\delta\Omega^{p+1}(M),
$$
where $\mathcal H^p=\ker\Delta$ is finite-dimensional and consists of smooth forms. Formal adjointness gives $\langle\Delta\alpha,\alpha\rangle_{L^2}=\|d\alpha\|_{L^2}^2+\|\delta\alpha\|_{L^2}^2$, so <harmonic differential forms> are <closed differential forms> and <coclosed differential forms>.

If $\Delta f\ge0$, formal adjointness and $\Delta1=0$ give $\int_M\Delta f=0$. A continuous nonnegative function with zero integral vanishes, so $\Delta f=0$. Then $\|df\|_{L^2}^2=\langle\Delta f,f\rangle=0$. Thus the <a function with nonnegative Laplacian on a closed manifold is locally constant> assertion is
$$
\boxed{df=0,\qquad f\text{ is constant on each connected component}.}
$$
It is globally constant when $M$ is connected. The PDF does not explicitly include connectedness here; on two disjoint circles one may take different constants, so literal global constancy needs that qualification. Boundaryless is the standard manifold convention in this argument; otherwise boundary conditions are necessary.

For a <closed differential form> $\alpha$, write its Hodge decomposition as $\alpha=h+d\beta+\delta\gamma$. Since $d\alpha=dh=0$, we have $d\delta\gamma=0$. Formal adjointness yields $\|\delta\gamma\|^2=\langle\gamma,d\delta\gamma\rangle=0$, so $\alpha=h+d\beta$. Thus $h$ represents its <de Rham cohomology> class. If two harmonic representatives differ by $d\beta$, their difference $h$ has $\|h\|^2=\langle d\beta,h\rangle=\langle\beta,\delta h\rangle=0$. Therefore
$$
\boxed{\mathcal H^p(M)\cong H^p_{\mathrm{dR}}(M),\quad\text{with a unique harmonic representative in each class}.}
$$

Finally let $h\in G$. A connected <Lie group> admits a smooth path $h_t$ from the identity to $h$. The maps $R_{h_t}$ give a smooth homotopy between the identity and $R_h$. The <homotopy invariance of de Rham cohomology> says their pullbacks agree on cohomology. The maps $R_{h_t}$ preserve <orientation>, since their Jacobian signs cannot change from the identity along the path. As an orientation-preserving isometry, $R_h$ commutes on forms with star, exterior differentiation, codifferentiation and consequently the <Hodge Laplacian>. Hence $R_h^*\alpha$ is harmonic and represents the same cohomology class as a harmonic $\alpha$. Uniqueness now proves the <harmonic forms are fixed by a connected isometric group action> conclusion
$$
\boxed{R_h^*\alpha=\alpha\qquad(h\in G).}
$$
The argument also applies componentwise when $M$ is disconnected.