TITLE: Show: $ (\mu\otimes\lambda)(A_f)=\int_{\Omega}f\, d\mu=\int_0^{\infty}\mu(\left\{f\geq x\right\})\, d\lambda(x)$
QUESTION [8 upvotes]: Let $(\Omega,\mathcal{A},\mu)$ be a $\sigma$-finite measure space and $\lambda$ be the Lebesgue-measure on $\mathbb{R}$. Moreover let $f\geq 0$ be a measurable numerical function on $\Omega$. Show, that for the set
    $$
A_f:=\left\{(\omega,x)\in\Omega\times\mathbb{R}: 0\leq x\leq f(\omega)\right\}
$$
    it is
    $$
(\mu\otimes\lambda)(A_f)=\int_{\Omega}f\, d\mu=\int_0^{\infty}\mu(\left\{f\geq x\right\})\, d\lambda(x).
$$
    Hint for the proof: First show the assumption for elementar functions and approximate any non-negative measurable function by elementar functions from below.


Hello!
Following the given hint, I first tried to show it for an (non-negative) elementar function, i.e. $f\colon\Omega\to [0,\infty)$ with $f:=\sum_{i=1}^{n}\alpha_i 1_{A_i}$, whereat $A_i, i=1,\ldots,n\in\mathcal{A}$ pairwise disjoint and $\alpha_i\geq 0$.
$$
(\mu\otimes\lambda)(A_f)=\int_{\Omega}\int_{\mathbb{R}}(1_{A_f})_{\omega}(x)\, d\lambda(x)\, d\mu(\omega)=\int_{\Omega}\int_0^{f(\omega)}\, d\lambda(x)\, d\mu(\omega)=\int_{\Omega}\lambda([0,f(\omega)])\, d\mu(\omega)\\=\int_{\Omega}f(\omega)\, d\mu(\omega)=\sum_{i=1}^{n}\alpha_i\mu(A_i)
$$
Now I start from the RHS:
$$
\left\{ f\geq x\right\}=\biguplus_{i=1}^{n}\left\{f=\alpha_i: \alpha_i\geq x\right\}
$$
$$
\implies\int_0^{\infty}\mu(\left\{f\geq x\right\})\, d\lambda(x)=\int_0^{\infty}\sum_{i=1}^{n}\mu(\left\{f=\alpha_i: \alpha_i\geq x\right\})\, d\lambda(x)\\=\sum_{i=1}^{n}\int_{0}^{\infty}\mu(\left\{f=\alpha_i:\alpha_i\geq x\right\})\, d\lambda(x)\\=\sum_{i=1}^{n}\int_0^{\infty}\int_{\Omega}1_{\left\{f=\alpha_i: \alpha_i\geq x\right\}}(\omega)\, d\mu(\omega)\, d\lambda(x)\\=\sum_{i=1}^{n}\int_0^{\infty}\int_{\Omega}1_{\left\{f=\alpha_i\right\}}(\omega)1_{x\leq\alpha_i}(x)\, d\mu(\omega)\, d\lambda(x)\\=\sum_{i=1}^{n}\int_0^{\infty}1_{x\leq\alpha_i}(x)\underbrace{\int_{\Omega}1_{\left\{ f=\alpha_i\right\}}(\omega)}_{=\mu(A_i)}\, d\mu(\omega)\, d\lambda(x)\\=\sum_{i=1}^{n}\mu(A_i)\int_0^{\infty}1_{x\leq\alpha_i}(x)\, d\lambda(x)\\=\sum_{i=1}^{n}\mu(A_i)\underbrace{\int_0^{\alpha_i}\, d\lambda(x)}_{=\lambda([0,\alpha_i])=\alpha_i}\\=\sum_{i=1}^{n}\alpha_i\mu(A_i)
$$
So the assumption is shown for an (non-negative) elementar function.
Now let $f$ be a non-negative, numerical, measurable function. Then there exists a sequence $(f_n)$ of non-negative elementar functions with $f_n\uparrow f$.
Because $A_{f_n}\subset A_{f_{n+1}}$ and $A_{f_n}\uparrow A_f$ it is with the continuity of the measure and Beppo Levi
$$
(\mu\otimes\lambda)(A_f)=\lim_{n\to\infty}(\mu\otimes\lambda)(A_{f_n})=\lim_{n\to\infty}\int_{\Omega}f_n\, d\mu=\int_{\Omega}f\, d\mu.
$$
Furthermore by Beppo Levi it is
$$
\int_{\Omega}f\, d\mu=\lim_{n\to\infty}\int_{\Omega}f_n\, d\mu\\=\lim_{n\to\infty}\int_{0}^{\infty}\mu(\left\{f_n\geq x\right\})\, d\lambda(x)
$$
Now the only thing that remains to show is that
$$
\lim_{n\to\infty}\int_{0}^{\infty}\mu(\left\{f_n\geq x\right\})\, d\lambda(x)=\int_0^{\infty}\mu(\left\{f\geq x\right\})\, d\lambda(x)
$$
Unfortunately, I do not see that.
Can you explain that to me?
With greetings!
math12

REPLY [4 votes]: Another way of showing the result, without taking the route via simple functions, is to use Tonelli's theorem (which applies thanks to $\sigma$-finiteness and positivity of the integrand) and write $$\int_{0}^{\infty}\mu\left\{ f\geq x\right\} d\lambda=\int\int\chi_{\left\{ 0<x\leq f\right\} }d\mu d\lambda\overset{\text{Tonelli}}{=}\int\int\chi_{\left\{ 0<x\leq f\right\} }d\lambda d\mu=\int\int_{0}^{f}d\lambda d\mu=\int fd\mu.$$
This shows equality of the integrals, and note that the second term is exactly the product measure of $A_f$, again by Tonelli's theorem.
Edit: Note that as pointed out in the comments by @triple_sec, this takes for granted the measurability of the involved functions.