Part of proof of term-by-term integration I want to prove the theorem of term-by-term integration for lebesgue integrable functions (denoted as $L^1$ functions): Suppose $(g_n)$ is a sequence of $L^1$ functions over a measure space $(X,\sigma (X), \mu)$ such that $$\sum_{n=0}^{\infty} \int_X \lvert g_n\rvert \,\text{d}\mu \lt \infty$$. Then $s_n:=\sum_{n=0}^{\infty} g_n$ coverges a.e. to an $L^1$ function $g$ such that $$\int_Xg \,\text{d}\mu=\lim_{n\to\infty} \int_X s_n \,\text{d}\mu$$, or more explicitely, $$\int_X \sum_{j=1}^{\infty} g_j=\sum_{j=1}^{\infty}\int_Xg_j\,\text{d}\mu$$.I already proved the monotone convergence theorem for $L^1$ functions, that is: let $f_n \in L^1$, $f_n$ increases a.e., $\lim_{n\to \infty} \int_X f_n \,\text{d}\mu \lt\infty$, then $f_n$ converges a.e. to an $L^1$ function $f$, and $\int_X f\,\text{d}\mu=\lim_{n \to \infty}f_n(x)$. 
I’m not sure how to prove term-by-term integration for lebesgue integrable functions next. I’m also considering the fact that $g_n=g_n^+-g_n^-$. Could someone help to provide a complete proof please? Thanks.
 A: Let $\gamma_n = |g_1|+\cdots+ |g_n|$. Then
$\int \gamma_n = \sum_{k=0}^n \int |g_k|$ and you are given that
$\lim_n \int \gamma_n < \infty$,
hence the monotone convergence theorem shows that if $\gamma = \lim_n \gamma_n$, then $\int \gamma = \lim_n \int \gamma_n $, and hence
$\gamma$ is in $L^1$. In particular, $\gamma(x) < \infty$ for ae. [$\mu$] $x$,
and so $\sum_{k=0}^n g_k(x)$ is absolutely convergent for ae. [$\mu$] $x$.
Let $E$ be the exceptional set (of $\mu$ measure zero) such that if
$x \notin E$, then $\sum_{k=0}^n g_k(x)$ is absolutely convergent.
For $x \notin E$, let $s_n(x) = \sum_{k=0}^n g_k(x)$, then $|s_n(x) | \le \gamma_n(x) \le \gamma(x)$,
hence if we let 
$s(x) = \lim_n s_n(x)$, we see that $s, s_n$ are integrable, $s$ is finite for ae. [$\mu$] $x$
and $s_n(x) \to s(x)$ for ae. [$\mu$] $x$.
If $x \notin E$, then
$|s(x)-s_n(x)| = |\sum_{k>n} g_k(x)| \le \sum_{k<n} |g_k(x)| = \gamma(x) - \gamma_n(x)$, and so
$| \int s - \int s_n | = |\int (s-s_n)| \le \int |s-s_n| \le \int \gamma - \int \gamma_n $
Consequently, $\lim_n \int s_n = \int s = \int \lim_n s_n$.
