A question about approximating a continuous function with a $G$-invariant polynomial.

Given $f:\mathbb{R}^n \rightarrow \mathbb{R}$, a finite group $G$ and a compact set $K \subseteq \mathbb{R}^n$, I want to prove that I can approximate $f$ with a $G$-invariant polynomial on $K$.

I think this is trivial, but I'm not 100% sure.

What I would do is the following, by Stone-Weierstrass theorem we can say that there exists a polynomial $p$ such that

$$|f(\textbf{x}) - p(\textbf{x})| < \varepsilon \, \, , \, \forall \textbf{x} \in K .$$

Then I consider the set $K_{sym} = \bigcup_{g \in G} g \cdot K$ and define $q(\textbf{x}) = \frac{1}{|G|}\sum_gp(g \cdot \textbf{x})$. Of course $q$ is $G$-invariant.

Can I conlcude from here, that

$$|f(\textbf{x}) - q(\textbf{x})|<\varepsilon \, \, \forall \textbf{x} \in K \, \, \, \, ?$$

EDIT:

First we consider a symmetrized domain $K_{sym} := \bigcup_{g \in G}g \cdot K$ which is still compact because is the image of the continuous map $(g,\textbf{x}) \mapsto g \cdot \textbf{x}$. So ther exists a polynomial $p$ such that

$$|f(\tilde{x})-p(\tilde{x})| < \varepsilon \, \, , \, \forall \tilde{x} \in K_{sym}.$$

But if $\tilde{x} \in K_{sym} \Rightarrow \exists g \in G$ such that $\tilde{x} = g \cdot \textbf{x}$ for some $\textbf{x} \in K$.

Then we define $q(\textbf{x}):= \frac{1}{|G|}\sum_{g \in G}p(g \cdot \textbf{x})$ and then

$$|f(\textbf{x})-q(\textbf{x})| = |f(g \cdot \textbf{x}) - \frac{1}{|G|}\sum_g p(g \cdot \textbf{x})| \le \frac{1}{|G|}\sum_g|p(g \cdot \textbf{x}) - f(g \cdot \textbf{x})| < \varepsilon.$$

I'm trying to follow the lines explained in this work https://arxiv.org/pdf/1901.09342.pdf (right under Definition 4)


Solution 1:

I am in doubt. Consider $f:\mathbb{R}^2 \to\mathbb{R}$, $f(x,y)=x$, $K=[0,1]^2$ and $G=\{I, (x,y) \mapsto (y,x)\}$. If $p$ is any polynomial, then $$ q(x,y)=\frac{1}{2}(p(x,y)+p(y,x)). $$ Let $\varepsilon = 1/3$. Assume that $|f(x,y)-q(x,y)| < \varepsilon$ on $K$. Then on $K$ $$ |x-q(x,y)| < 1/3, ~ |y-q(y,x)|=|y-q(x,y)|<1/3. $$ For $x=0,y=1$ we get $|q(0,1)|< 1/3$ and $|1-q(0,1)|<1/3$, not possible.

I think this approximation is only possible if $f$ is $G$-invariant on $K':= \cup_{g\in G} gK$, that is $f(x)=f(gx)$ $(x \in K',g \in G)$. Then your argument works.

Solution 2:

No such approximation is possible. Here is a counterexample. Let $\mathbb{Z}_2$ act on $\mathbb{R}$ by negation. The functions invariant under this $\mathbb{Z}^2$ action are the even functions. So, for instance, on $[-1,1]$, no approximation of $f(x) = x$ to within $1$ in $\sup$ norm is possible.