I am reading Cao and Chen's paper "On Bach-flat gradient shrinking Ricci solitons". A complete Riemannian manifold $(M^n,g_{ij})$ is called a gradient shrinking Ricci soliton if there exists a smooth function $f$ such that the Ricci tensor $R_{ij}$ of the metric $g_{ij}$ satisfies $$R_{ij}+\nabla_i\nabla_j f=\rho g_{ij}$$ for some constant $\rho>0$.
In the proof, it asserts that (P.1164): Suppose $|\nabla f|^2=0$ on some nonempty open set of $M$. Since any gradient shrinking Ricci soliton is analytic in harmonic coordinates, it follows that $|\nabla f|^2=0$ on $M$.
I would like to understand why "any gradient shrinking Ricci soliton is analytic in harmonic coordinates". Also, I don't understand why "any gradient shrinking Ricci soliton is analytic in harmonic coordinates" would imply that $|\nabla f|^2=0$ on $M$. I have asked this question in math.stackexchange before, but I did not get an answer. Thank you very much.