The Hausdorff dimension of the zero set of a real analytic function 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.
 A: I would like to propose an elementary approach based on the implicit function theorem.
Consider $F_0=f^{-1}(0)$. By the implicit function theorem if $\nabla f(x)\neq 0$ for some $x\in F_0$ then $F_0$ is a graph locally around $x$ and thus of dimension $n-1$ (actually a smooth submanifold).
Consider then the exceptional set $F_1=\{x:f(x)=0\wedge \nabla f(x)=0\}$. If $\nabla^2 f(x)\neq 0$ for some $x\in F_1$ then in particular $\nabla (\partial_i f)(x)\neq 0$ for some $i\in \{1,\ldots ,n\}$ and thus $F_1\subset \{x:\partial_if(x)=0\}$ which is a graph locally around $x$ and thus of dimension $n-1$.
The exceptional set is now $F_2=\{x:f(x)=0\wedge \nabla f(x)=0\wedge \nabla^2 f(x)=0\}$. Continuing this way the exceptional set $F_k$ where all derivatives up to order $k$ vanish is contained in a smooth submanifold of dimension $n-1$. What remains is the set of those points where all derivatives of all orders vanish, which is empty by assumption (otherwise by analyticity the function is identically zero).
A: 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
A: Having problems typing today, I'm going to write $Z=f^{-1}(0)$.
The answer is yes if $n=1$, since then $Z$ is discrete.
Hence in general $Z\cap L$ has dimension  $0$ for every line $L$. Does that imply $\dim(Z)\le n-1$? Surely that implication is well known if true --  I  can imagine it could  follow from Frostman's  lemma maybe...
