(GTM 259 Exercise 2.5.3.) Show that a measure-preserving system $(X,\mathscr B,\mu, T)$ is ergodic if and only if $A_N(f)=\frac 1N\sum_{n=0}^{N-1}f\circ T^n\to\int fd\mu$ as $N\to\infty$ for all $f$ in a dense subset of $L_\mu^1$.
The "only if " part is clear by Birkhoff, but how to show the "if" part? Also, I have no idea how to do the "only if" part without using Birkhoff's theorem