Proving Borel Cantelli Lemma using Martingales I need a hint for exercise 5.2.1 in the book:
Ergodic Theory: with a view towards Number Theory
 By Manfred Leopold Einsiedler, Thomas Ward.
In the chapter 5 the authors gives the martingale theorems and the exercise tells you to derive the (less trivial) part of Borel Cantelli out of it.
I would appreciate a mild hint (i.e., what sigma algebras to consider...)
Thanks!
 A: We are supposed to use the 

Theorem: Let $(\Omega,\mathcal A,\mu)$,  $(\mathcal F_n,n\geq 1)$ a non-decreasing sequence of $\sigma$-algebras, and $\mathcal F=\sigma\left(\bigcup_n\mathcal F_n\right)$. If $f\in L^1(\mathcal A,\mu)$, then 
  $$\lim_{n\to \infty}\mathbb E[f\mid\mathcal F_n]=\mathbb E[f\mid\mathcal F],$$
  where the convergence is both almost sure and in $L^1$. 

With this in mind, we can prove that if $(A_i)_{i\in \mathbb N}$ is a sequence of (totally) independent events, $\mathcal F_n:=\sigma(A_j,1\leqslant j\leqslant n)$, if $A\in \sigma(A_k,k\geqslant N)$ for each $N$, then $\mu(A)\in \{0,1\}$.
Indeed, let $f:=\chi_A$. For a fixed $n$, the function $f$ is measurable for a $\sigma$-algebra independent of $\mathcal F_n$, hence $\mathbb E[f\mid \mathcal F_n]=\int f\mathrm d\mu=\mu(A)$. By the theorem, $\mathbb E[f\mid\mathcal F_n]\to \mathbb E[f\mid \mathcal F]=f$, hence $\chi_A(\omega)=\mu(A)$ for almost every $\omega\in\Omega$.
Considering now the functions $f_n:=\frac{\sum_{j=1}^n\chi_{A_j}}{\sum_{j=1}^n\mu(A_j)}$, we can prove that $\lVert f_n-1\rVert_{L^2}\to  0$ under the assumption $\sum_i\mu(A_i)=+\infty$. From this, we deduce the Borel-Cantelli lemma:

If $(A_i)_{i\in \mathbb N}$ is a sequence of (totally) independent events, and $\sum_{i=1}^{+\infty}\mu(A_i)=+\infty$, then $\mu(\limsup_i A_i)=1$.

