I'm reading Stein's book on singular integrals and there is an identity of the $\mathrm{L}^p$-norm with the distribution function that I don't understand.
For $g$ measurable he first defines the distribution function of $|g|$ as $\lambda(\alpha)=\mu(\{x: |g(x)|>\alpha\})$. Then he claims that for $g\in\mathrm{L}^p$ we have the identity $$\int_{\mathbb{R}^d} |g(x)|^p\, \mathrm{d}x = -\int_0^\infty \alpha^p\, \mathrm{d}\lambda(\alpha).$$
I actually even don't understand what integration with respect to the distribution function means. What wonders me is the minus sign, is this measure with respect to the distribution function a signed one?
The problem is proving the identities $$\int_{\mathbb R^n}|g(x)|^q\, dx= \int_0^\infty qs^{q-1}\lambda(s)\, ds = -\int_0^\infty s^q\, d\lambda(s).$$
The first one is the "layer cake formula", as they call it in Lieb and Loss's book. The second is integration by parts with the Lebesgue-Stieltjes integral: $$ \int_0^\infty qs^{q-1}\lambda(s)\, ds=\int_0^\infty d(s^q)\lambda(s) = - \int_0^\infty s^q d\lambda(s).$$
The minus sign comes from integration by parts. An example can explain why it is necessary: if $g(x)=a\mathbf{1}_B(x)$ with $a>0$, then $$\lambda(s)=\begin{cases} |B|, & s\le a \\ 0, &s>a\end{cases}$$ so $d\lambda(s)=-|B|\delta_a(s)$. (Here $\delta_a$ is a Dirac delta centered at $a$).
Proof of the layer cake formula: $$ \int_{\mathbb R^n} |g(x)|^q\, dx = \iint \mathbf{1}_{[0<t<|g(x)|^q]}\, dtdx = \int_0^\infty \lambda(t^\frac1q)\, dt = \int_0^\infty qs^{q-1}\lambda(s)\, ds.$$