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,$$m=4$, $p_1(x,y)=x^2+y^2,$ $p_2(x,y)=xy,$$p_2(x,y)=xy$, $p_3(x,y)=x+y,$$p_3(x,y)=x+y$, $p_4(x,y)=x+y,$$p_4(x,y)=x+y$, $g_1,g_2,g_3=id_{\mathbb R},$$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.$$h(x,y,z,t)=x\ln(\frac{y}{t})+t$.
Notice that Question 1 seems to be true thankthanks to an argument similar to that in the answeranswer of Qi Zhu in this question
Question 3: does this argument works here?