Borel measurable function (Hausdorff dimension) Let $s\geq0$ be a real number and $f:\mathbb{R^n} \to [0,\infty)$ a Borel measurable function.
How to show:
$0<\int_{\mathbb{R^n}}f\ d\mathcal{H^s}<\infty \Rightarrow$ dim$_\mathcal{H}(\mathbb{R^n}$\ $f^{-1}(0))=s$.
To show this implication I tried:
Since $\int_{\mathbb{R^n}}f\ d\mathcal{H^s}$ is finite there is a $A>0$ and for every countable cover  $\mathcal{B}$  of $\mathbb{R}^n$ it's $\text{diam}(A)>\delta\forall A\in\mathcal{B}$.
So: $\sum\limits_{A\in\mathcal{B}}\text{diam}(A)^s=\infty \Rightarrow \dim_\mathcal{H}(\mathbb{R}^n)=0$
I'm not sure if this is correct so far and how to conclude that the Hausdorff Dimension is
dim$_\mathcal{H}(\mathbb{R^n}$\ $f^{-1}(0))=s$ from here.
 A: You'll find it's easier to proceed if you work using general measure theory techniques for this problem, rather than trying to work from first principles. This is especially because we are given some information about $f$ in terms of the $\mathcal{H}^s$ measure, so you want to exploit that.
Recall that for any $A \subset \mathbb R^n,$
$$ \dim_{\mathcal{H}} A = \inf\{s>0 : \mathcal{H}^s(A) = 0 \}. $$
It is known that if $\dim_{\mathcal{H}} A = s,$ then $\mathcal{H}^{s+\varepsilon}(A) = 0$ and $\mathcal{H}^{s-\varepsilon}(A) = +\infty.$ So if it happens that $\mathcal{H}^s(A) \in (0,\infty),$ then we can conclude that $\dim_{\mathcal{H}} A = s.$ This is the key property of the Hausdorff dimension that we will use here.
The lower bound is quite easy, using the fact that the given integral is positve. If we set $A = \mathbb R^n \setminus f^{-1}(0),$ then since $f$ vanishes outside $A$ by definition we get,
$$ \int_A f\,\mathrm{d}\mathcal{H}^s = \int_{\mathbb R^n} f\,\mathrm{d}\mathcal{H}^s  > 0. $$
Then we get that $f$ is not $\mathcal{H}^s$-almost everywhere zero, so we get $\mathcal{H}^s(A) > 0.$ Note that we did not use any special property of the Hausdorff measure; this argument goes through for a general measure $\mu.$ We conclude that $\dim_{\mathcal H} A \geq s.$
The upper bound requires a bit more work. We can first try to estimate the $\mathcal{H}^s$ measure of $A = \mathbb R^n \setminus f^{-1}(0),$ but this might not be finite in general. We can however consider
$$ A_k = \{ x \in \mathbb R^n : f(x) > 1/k \},$$
so then $A = \bigcup_{k \geq 1} A_k.$ By Markov's inequality, for each $k$ we have,
$$ \frac1k\ \mathcal{H}^s(A_k) \leq \int_{\mathbb R^n} f\,\mathrm{d}\mathcal{H}^s < \infty. $$
So $\dim_{\mathcal{H}} A_k \leq s$ for each $k.$ Then for each $\varepsilon > 0,$ we have $\mathcal{H}^{s+\varepsilon}(A_k) = \infty$ so we conclude that each $\mathcal{H}^{s+\varepsilon}(A) = \infty$ by countable subadditivity. Hence $\dim_{\mathcal{H}} A \leq s$ so the result follows.
