Lebesgue integrable function, convergent series I am trying to solve the following:
Let $(X,\Sigma, \mu)$ be a measurable space, $f:X \to \mathbb R$ measurable and let $A\in \Sigma$. For each $n$ natural number, we define $A_n=\{x \in A: |f(x)| \geq n\}$. 
Prove that if $f$ is integrable on $A$, then $\sum_{n \geq 1}\mu(A_n)<\infty$. Show that if $\mu(A)<\infty$ and $\sum_{n \geq 1} \mu(A_n)<\infty$, then $f$ is integrable on $A$.
I am pretty lost on how should I start. For the first part, maybe I could get a bound for the series. All I could think of is to define $f_n=|f|\mathcal X_{A_n} \searrow  |f|$. Since $f_1$ is integrable, then $\lim_n \int_A f_nd\mu=\int_A  |f|d\mu$, but I don't see how this is related to the series.
As for the other part I am completely lost. Any hints would be greatly appreciated.
 A: Ok, let's first consider the first Proposition:

Proposition 1. $f$ integrable over $A$ $\implies$ $\displaystyle \sum_{n=1}^\infty \mu(A_n) < \infty$

You can consider the function $\phi := \displaystyle \sum_{n=1}^\infty \chi_{A_n}$. Observe that 
$$ \phi(x) = k \quad \Leftrightarrow \quad x \in A_1, \ldots, A_k \, , \; x \not\in A_{k+1} \quad \Leftrightarrow \quad k \leq \vert f(x) \vert < k+1 \; ,$$
so we have $\phi \leq \vert f \vert$. Now set for $m \in \mathbb N^\times$ 
$$\phi_m := \sum_{n=1}^m \chi_{A_n} \leq \phi \leq \vert f \vert \; .$$
Then we have for each $m \in \mathbb N^\times$
$$ \sum_{n=1}^m \mu(A_n) = \sum_{n=1}^m \int_A \chi_{A_n} \, \mathrm d\mu = \int_{A} \underbrace{ \sum_{n=1}^m \chi_{A_n}}_{=\phi_m} \, \mathrm d\mu \leq \int_A \vert f \vert \, \mathrm d\mu < \infty \; ,$$
since $f$ is integrable over $A$. By letting $m \to \infty$, you get the desired result.
The second proposition states:

Propostion 2. $\mu(A) < \infty$ and $\displaystyle\sum_{n=1}^\infty \mu(A_n) < \infty$ $\implies$ $f$ is integrable over $A$.

Here you can set $\phi := \displaystyle \sum_{n=0}^\infty \chi_{A_n}$ and $\phi_m := \displaystyle\sum_{n=0}^m \chi_{A_n}$. Observe, that $A_0 = A$, $\vert f \vert \leq \phi$ and $\phi_m \uparrow \phi$. Now you can calculate using the Monotone Convergence Theorem 
$$ \int_A \vert f \vert \, \mathrm d\mu \leq \int_A \phi \, \mathrm d\mu = \lim_{m \to \infty} \int_A \phi_m \, \mathrm d\mu = \sum_{n=0}^\infty \mu(A_m) = \mu(A) + \sum_{n=1}^\infty \mu(A_n) < \infty \; .$$
I hope, this helps.
A: Let $f$ be integrable, then for almost all $x \in E$, $|f(x)| < \infty$, and hence $\exists n\in \mathbb{N}$ such that
$$
n < |f(x)| \leq n+1 \qquad (\ast)
$$
Hence, $x \in \cup_{k=1}^n A_k$ but $x \notin A_{n+1}$. This proves that
$$
\sum_{n=1}^{\infty} \chi_{A_n} \leq |f| \quad\text{ a.e.}
$$
and integrating proves that $\sum \mu(A_n) < \infty$.
Conversely, if $\sum \mu(A_n) <\infty$, then
by the Borel-Cantelli Lemma,
$$
|f| < \infty \text{ a.e.}
$$
And so by the same logic as in $(\ast)$, we have
$$
|f| \leq \sum_{n=1}^{\infty} \chi_{A_n} + 1
$$
and so integrating proves that $f\in L^1$ since $\mu(A) < \infty$
