TITLE: "Descent" of analytic functions along a finite morphism
QUESTION [6 upvotes]: Let $f : X \to Y$ be a finite surjective morphism of smooth affine algebraic varieties over the complex numbers. Is it true that a function on $Y$ whose pullback via $f$ is an analytic function on $X$, is itself analytic?
I ask because I am interested in knowing that, for a reductive complex algebraic group $G$, an analytic $W$-invariant function on a Cartan subalgebra $\mathfrak{h}$ lifts to an analytic $G$-invariant function on the Lie algebra $\mathfrak{g}$. So, if I am not mistaken, it is enough for me to know that an analytic function on $\mathfrak{h}$, invariant under $W$, gives rise to an analytic function on $W \backslash \mathfrak{h}$.
Thanks,
Sasha

REPLY [9 votes]: Let $h:Y\to \mathbb{C}$ be such a function. If $U\subset Y$ is an open subset (for the complex topology) and $s:U\to X$ is an (analytic) local section of $f$ on $U$, then $h=h\circ f\circ s$ on $U$, hence $h_{\vert U}$ is analytic since $h\circ f$ is.  
So, $h$ is analytic on  $Y\smallsetminus B$ where $B\subset Y$ is the branch locus of $f$, which is a proper Zariski closed subset. Since $h$ is continuous on $Y$ by nfdc23's remark, it follows that it is analytic on $Y$.  
[EDIT] It seems plausible that the argument works assuming $Y$ normal. Here is a counterexample where it isn't: take for $Y$ the cuspidal cubic in $\mathbb{C}^2$ (with equation $y^2=x^3$ and for $f:X=\mathbb{C}\to Y$ the normalization (mapping $t$ to $(t^2,t^3)$). Then $f$ is  homeomorphism, so $t$ descends to a continuous function on $Y$, which is not analytic.