Problem proving the last steps of Birkhoff's ergodic theorem Birkhoff's ergodic theorem states:
Let $(\Omega, \mathbb{F}, P, T)$ an ergodic system, i.e,  $(\Omega, \mathbb{F}, P)$ is a probability space and and $T:\Omega \to \Omega$ such that: $\forall A \in \mathbb{F}$, $P(T^{-1}(A))=P(A)$. Moreover, $A=T^{1}(A) \implies P(A) \in \{0,1\}$.
Now, let $X \in L^{1}(\Omega,P)$. Then $\frac{1}{n} \sum_{k=0}^{n-1} X \circ T^{k} = \mathbb{E}(X)$ a.s, i.e $P(\{w: \frac{1}{n} \sum_{k=0}^{n-1} X \circ T^{k}(w) = \mathbb{E}(X)\})=1$.
We now define the following: Let $\epsilon>0$ and $f\in L^{1}(\Omega, P)$
$Sn(f)=\sum_{k=0}^{n-1} f \circ T^{k}$
$g_{\epsilon}=X-\mathbb{E}(X)-\epsilon$
$G_{\epsilon} = \limsup \frac{1}{n}Sn(g_{\epsilon})$
We prove this theorem by proving the following steps:


*

*$G_{\epsilon} \circ T = G_{\epsilon}$ and $P(\{G_{\epsilon}>0\}) \in \{0,1\}$

*Let $M_{n}=max\{0,S_{1}(g_{\epsilon}),S_{2}(g_{\epsilon}),...,S_{n}(g_{\epsilon})\}$. We prove can prove that for $w\in \{M_{n}>0\}$, $g_{\epsilon}\geq M_{n}(w)-M_{n}(T(w))$, so we can conclude that $\mathbb{E}(g_{\epsilon}\mathbb{1}_{M_{n}>0})\geq 0$

*Let $A= \bigcup_{n=1}^{\infty} \{S_{n}(g_{\epsilon})>0\}$, then $\mathbb{E}(g_{\epsilon}\mathbb{1}_{A})\geq 0$

*Conclude that $P( \limsup \frac{1}{n}S_{n}(X) \leq \mathbb{E}(X))=1$ for any $X \in L^{1}(\Omega,P)$

*Conclude that $P( \limsup \frac{1}{n}S_{n}(X) = \mathbb{E}(X))=1$ for any $X \in L^{1}(\Omega,P)$
MY PROBLEM:
So far I've proven 1,2,3 using these techniques:


*

*Just manipulating the terms and applying some properties 

*This is Hopf maximal ergodic lemma

*Applying DCT


Now, Im totally lost on how to prove 4 and 5 which is the conclusion. Any help would be enormously appreciated.
Thanks so much for your help <3!
 A: I don't think you can prove (4) based on just (1),(2), and (3). What you want instead of (3) is $\mathbb{E}(g_\epsilon1_B) \ge 0$ for each $T$-invariant $B\subseteq A$. In the below, I assume $\mathbb{E}(X) = 0$ (just replace $X$ with $X-\mathbb{E}(X)$). 
If we have this improved (3), then for any $\beta < \epsilon$, $B_\beta = \{\omega \in \Omega: \limsup_n \frac{1}{n}\sum_{k=0}^{n-1} X(T^k\omega) > \epsilon \text{ and } \liminf_n \frac{1}{n}\sum_{k=0}^{n-1} X(T^k\omega) < \beta\}$, which is certainly $T$-invariant and a subset of $A$. We thus get $\int_{B_\beta} X \ge \epsilon|B_\beta|$. Now, replacing $X$ with $-X$, $\epsilon$ with $-\beta$, and $\beta$ with $-\epsilon$ leaves $B_\beta$ unchanged, and so doing everything for $-X$ gives $\int_{B_\beta} (-X) \le -\beta|B_\beta|$, i.e., $\int_{B_\beta} X \ge \beta|B_\beta|$. Since $\beta < \epsilon$, we conclude $|B_\beta| = 0$. Taking $\beta$ arbitrarily close to $\epsilon$, we see $\mathbb{P}(\{\omega : \Omega : \limsup_n \frac{1}{n}\sum_{k=0}^{n-1} X(T^k\omega) > \epsilon\}) = 0$. Now just take $\epsilon$ arbitrarily close to $0$ to get (4). Doing everything for $-X$ then gives (5).
See Walter's ergodic theory book theorem 1.14 for a more fleshed out proof of Birkhoff.
