Ergodic Law of Large Numbers From jacob-Protter: Ergodic Strong Law of Large Numbers

Let $\tau$ be a one-to-one measure preserving transformation of $\Omega$ onto itself. Assume the only $\tau$-invariant sets are sets of probability $0$ or $1$. If $X \in L^1$ then
\begin{equation*}
   \lim_{n \to \infty} \frac{1}{n} \sum_{j=1}^n X(\tau^j(\omega)) = E\{X\}
  \end{equation*}
a.s. and in $L^1$.

It is said there that it is a consequence of the Birkhoff ergodic theorem.
Birkhoff Ergodic Theorem from 'Probability Theory A Comprehensive Course (Universitext) (Klenke, Achim)' :

Let $f = X_0 \in L^1(P)$. Then
$$\frac{1}{n} \sum_{k=0}^{n-1} X_k = \frac{1}{n} \sum_{k=0}^{n-1} f \circ \tau^k \to E\{X_0|\mathcal{I}\} ~~ P-a.s. $$

In showing the ergodic strong law of large numbers, we only have to show that $E\{X_0|\mathcal{I}\} = E\{X_0\}$. Can you please show how prove this.
 A: Denote by $Y$ the random variable $E\{X_0|\mathcal{I}\}$. We know that $Y$ is $\mathcal I$-measurable, hence for each $t$, the set $\{Y\leqslant t\}$ has probability zero or one. Therefore, we only need the following:

If $Y$ is a random variable such that for each $t\in\mathbb R$, $\mathbb P\{Y\leqslant t\}\in\{0,1\}$, then $Y$ is almost surely equal to a constant random variable.

To see this, let $t_0:=\inf\left\{t\in\mathbb R, \mathbb P\{Y\leqslant t\}=1\right\}$. Note that $t_0$ is finite because $\mathbb P\{Y\leqslant t\}=1$ for $t$ large enough. Also, $\mathbb P\{Y\leqslant t_0+1/n\}=1$ by definition of supremum hence $\mathbb P\{Y\leqslant t_0\}=1$. Moreover, $\mathbb P\{Y\leqslant t_0-1/n\}=0$ for each $n$ hence $\mathbb P\{Y\lt t_0\}=0$/
A: You should have defined $\mathcal{I}$. I guess it is the $\sigma$-algebra of invariant sets.
The hypothesis say that the sets in $\mathcal{I}$ all have measure $0$ or $1$.
You want to pove that $E(X_0|\mathcal{I}) = E(X_0)$ ALMOST EVERYWHERE.
You need the fact that $g = E(X_0|\mathcal{I})$ is $\mathcal{I}$-measurable.

Claim: $g$ is almost everywhere constant.
Partition $\mathbb{R}$ in intervals of length $1/n$. One of those, let us call it $I_n$ is such that $g^{-1}(I_n)$ has measure $1$, because $g$ is $\mathcal{I}$-measurable. Therefore,
\begin{equation*}
  \tau \left(g^{-1}\left(\bigcap_{n=1}^\infty I_n\right)\right) =
  \tau\left(\bigcap_{n=1}^\infty g^{-1}(I_n)\right) = 1.
\end{equation*}
In particular, $\bigcap I_n$ is non-empty. And therefore, unitary:
\begin{equation*}
\{a\} =
\bigcap I_n.
\end{equation*}
So, $g$ is almost everywhere equal to $a$, because
\begin{equation*}
\tau(g^{-1}(a)) = 1.
\end{equation*}

Now, you need to know that $E(E(X_0|\mathcal{I})) = E(X_0)$. This way,
\begin{equation*}
  a = E(g) = E(X_0).
\end{equation*}
