$k[x_1, \dots, x_n]$ is free iff $\mathbb{C}[x_1, \dots, x_n]^G \otimes \text{Harm}(\mathbb{R}^n, G) \to k[x_1, \dots, x_n]$ isomorphism? For any subgroup $G \subset \text{GL}_n(\mathbb{R})$ the set $\mathbb{C}[x_1, \dots, x_n]^G$, of $G$-invariant polynomials, is a graded subalgebra of $\mathbb{C}[x_1, \dots, x_n]$, resp. the set $\text{Harm}(\mathbb{R}^n, G)$ of $G$-harmonic polynomials, is a graded vector subspace of $\mathbb{C}[x_1, \dots, x_n]$.
Assume that the group $G$ is compact. How do I see that $k[x_1, \dots, x_n]$, viewed as an $\mathbb{C}[x_1, \dots, x_n]^G$-module, is free if and only if $$\mathbb{C}[x_1, \dots, x_n]^G  \otimes \text{Harm}(\mathbb{R}^n, G) \to k[x_1, \dots, x_n],$$induced by multiplication in $k[x_1, \dots, x_n]$, is a vector space isomorphism?
Edit. Here is the definition of a $G$-harmonic polynomial.

 A: Let $R:=\mathbb C[x_1,\ldots,x_n]$ and let $\mathfrak m:=R_{>0}$ the polynomials vanishing in $0$. Then $\mathfrak M:=R\mathfrak m^G$, the $R$-ideal generated by the homogeneous $G$-invariants of positive degree, is sometimes called the Hilbert ideal.
Now let $H\subseteq R$ be the space of harmonic functions. Then $H$ is a vector space complement of $\mathfrak M$ in $R$, i.e., $R=H\oplus\mathfrak M$. This fact is well known and I know how to prove it but I don't have a reference right now. In any case, a simple induction by degree argument then shows that
$$
\Phi:H\otimes_{\mathbb C}R^G\to R
$$
is always surjective.
If $\Phi$ is an isomomorphism then clearly $R$ is a free $R^G$-module with basis $H$. So asssume conversely that $R$ is a free $R^G$-module. Then $\Phi$ splits. Let $K:=\ker\Phi$ and observe $R^G/\mathfrak m^G=\mathbb C$. Then applying $*\otimes_{R^G}\mathbb C$ to the split sequence
$$
0\to K\to H\otimes_{\mathbb C}R^G\to R\to0
$$
one gets
$$
0\to K\otimes_{R^G}k\to H\overset\sim \to R/\mathfrak M\to0
$$
Therefore $K/\mathfrak m^GK=K\otimes_{R^G}k=0$ which implies $K=\mathfrak m^G K$. Suppose $K\ne0$. Then let $0\ne r\in K$ be homogeneous of smallest degree. But then $r\not\in\mathfrak m^GK$ since all elements of $\mathfrak m^G$ have positive degree. Thus $K=0$ and $\Phi$ is bijective.
