Solution (source code)

= Solution

Let $T$ be a <measure-preserving transformation> of $(X,\mathcal F,\mu)$ and let $f\in L^1(\mu)$. The <Birkhoff ergodic theorem> states that
$$
A_nf:=\frac1n\sum_{j=0}^{n-1}f\circ T^j
\longrightarrow
f^*:=\mathbb E[f\mid\mathcal I]
$$
almost everywhere, where $\mathcal I$ is the <invariant sigma-algebra>. The limit is $T$-invariant and
$$
\int_Xf^*,d\mu=\int_Xf,d\mu.
$$

Assume now that $\mu(X)=1$. For $M>0$, let
$$
f_M=(-M)\vee(f\wedge M)
$$
be the bounded truncation of $f$, and let $f_M^*$ be its Birkhoff limit. Since $|A_nf_M-f_M^*|\leq2M$ on a <finite measure> space, the <dominated convergence theorem> gives
$$
\|A_nf_M-f_M^*\|_1\longrightarrow0.
$$
Measure preservation and the <triangle inequality> give the $L^1$ contraction
$$
\|A_nh\|_1
\leq\frac1n\sum_{j=0}^{n-1}\|h\circ T^j\|_1
=\|h\|_1.
$$
Moreover, the almost-everywhere convergence and <Fatou lemma> imply
$$
\|f^*-f_M^*\|_1
\leq\liminf_{n\to\infty}\|A_n(f-f_M)\|_1
\leq\|f-f_M\|_1.
$$
Consequently
$$
\limsup_{n\to\infty}\|A_nf-f^*\|_1
\leq2\|f-f_M\|_1.
$$
Since $f_M\to f$ in $L^1$, letting $M\to\infty$ proves the <L1 convergence in the Birkhoff ergodic theorem on a finite measure space>:
$$
\boxed{A_nf\longrightarrow f^*\quad\hbox{in }L^1(\mu).}
$$