Let $n>1$, and let $f:\mathbb{R}^n \to \mathbb{R}$ be a real-analytic function which is not identically zero.
Does $\dim_{\mathcal H}(f^{-1}(0)) \le n-1$? here $\dim_{\mathcal H}$ refers to the Hausdorff dimension. (I have read this claim in a paper, but there was no reference).
I know that $f^{-1}(0)$ has Lebesgue measure zero.
If this is false, is it true then that $\dim_{\mathcal H}(f^{-1}(0)) < n$?
Any reference would be appreciated.
Yes, this is true and follows, e.g. from Łojasiewicz's stratification theorem: Every real-analytic subset of $R^n$ is a locally finite (hence, countable) union of pairwise disjoint smooth real-analytic submanifolds. Take a look for instance here for references and generalizations:
A. Parusinsky, Lipschitz stratification of subanalytic sets Annales scientifiques de l’É.N.S. 4e série, tome 27, no 6 (1994), p. 661-696