A *symmetric function* is a function $f:\mathbb R^n\to \mathbb R$ such that $f(x\_1,\ldots,x\_n)=f(\sigma(x\_1,\ldots,x\_n))$ for every permutation $\sigma\in S\_n.$

The most commonly encountered symmetric functions are polynomial functions.

**Question 1:** Is it true that, given a symmetric function $f:\mathbb R^n\to \mathbb R,$ there exist symmetric polynomials $p\_1,\ldots,p\_m:\mathbb R^n\to \mathbb R$ and functions $h:\mathbb R^m\to \mathbb R$ and $g\_1,\ldots,g\_n:\mathbb R\to \mathbb R$ such that $f$ can be factorized as $$f(x\_1,\ldots,x\_n)=h(p\_1(g\_1(x\_1),\ldots, g\_1(x\_n)),p\_2(g\_2(x\_1),\ldots, g\_2(x\_n)),\ldots,p\_m(g\_m(x\_1),\ldots, g\_m(x\_n)))?$$

**Question 2:** If $f$ has some regularity, e.g., continuous, $C^\infty$ or analytic, can we find the above $g\_i$ and $h$ to be also regular?

To illustrate the idea behind the question I furnish an example.

If $f:\mathbb R^2\to \mathbb R$ with $$f(x,y)=(x^2+y^2)\ln(\frac{xy}{x+y})+\sin(x)+\sin(y),$$ we have $m=4$, $p\_1(x,y)=x^2+y^2,$ $p\_2(x,y)=xy$, $p\_3(x,y)=x+y$, $p\_4(x,y)=x+y$, $g\_1,g\_2,g\_3=\operatorname{id}\_{\mathbb R}$, $g\_4(x)=\sin(x)$ and $h(x,y,z,t)=x\ln(\frac{y}{t})+t$.

Notice that **Question 1** seems to be true thanks to an argument similar to that in the [answer](https://math.stackexchange.com/a/3800574) of Qi Zhu to [Can every symmetric function be written as some function of a sum?](https://math.stackexchange.com/questions/3800563/can-every-symmetric-function-be-written-as-some-function-of-a-sum).

**Question 3:** does this argument works here?