Let $f \colon \Omega \to \mathbb{R}$ be measurable and positive almost everywhere.
We set $g(t) := \mu(\{f \geq t\})$.
Let $\varepsilon > 0$ and $k \in \mathbb{N}$ and let's suppose $g(t) < \infty$ for all $t > 0$. We set $$g^\varepsilon := \min(g, g(\varepsilon)), $$
$$f^\varepsilon := f \chi_{\{f \geq \varepsilon\}}$$ and $$f_k^\varepsilon := 2^kf^\varepsilon.$$
Consider the sequence $$ a_k^\varepsilon := 2^{-k} \sum_{n=1}^\infty \mu(\{f^\varepsilon \geq n2^{-k}\}).$$
The author of my book states without proof that $$a_k^\varepsilon \overset{k\to \infty}{\to} \int_0^\infty g^\varepsilon(t) dt.$$
I don't see why this should be trivial. Do you know a proof and can share a hint?
Note that $$a_k^\varepsilon = \lim_{i\to \infty}\sum_{n=1}^{2^k i} 2^{-k}g^\varepsilon(n2^{-k})$$ and that these finite sums are right Riemann sums of $g^{\varepsilon}(t)$ corresponding to integral over $[0,i]$ and base length $2^{-k}$. If one is allowed to interchange the limits, then $$\lim_{k\to \infty} a_k^{\varepsilon} = \lim_{i\to \infty} \lim_{k\to \infty}\sum_{n=1}^{2^ki} 2^{-k}g^\varepsilon(n2^{-k}).$$ If the right Riemann sums converge to the Riemann integrals when letting the base length go to zero, we have that $$\lim_{k\to \infty} a_k^{\varepsilon} =\lim_{i\to\infty} \int_0^i g^{\varepsilon}(t) dt = \int_0^\infty g^{\varepsilon}(t) dt.$$