TITLE: Poincare Recurrence by Mean Ergodic Theorem
QUESTION [5 upvotes]: I have a question regarding a confusion from reading the Princeton Companion to Mathematics on the topic of Ergodics Theorems. It is about proving a stronger version of Poincare Recurrence Theorem using Neumann's Mean Ergodic Theorem. I apologize if this question is too easy for this site.
Let $A$ be a subset of positive measure, $T$ a measure preserving transformation and $U$ a unitary operator defined by $Uf(x):=f(Tx)$. Define the ergodic average $A_{N,M}$ to be
$$
A_{N,M}(f):=\frac 1{N-M}\sum_{n=M}^{N-1}U^nf.
$$
It is not hard to verify that for $f:=1_A$, $\langle f,U^nf\rangle = \mu(A\cap T^{-n}A)$. Here's the passage that confuses me:

It follows that
  $$
\langle f,A_{N,M}(f)\rangle = \frac 1{N-M}\sum_{n=M}^{N-1}\mu(A\cap T^{-n}A). 
$$
  If we let $N − M$ tend to infinity, then $A_{N,M}f$ tends to a $U$-invariant function $g$. Since $g$ is $U$-invariant, $\langle f,g\rangle = \langle U^nf,g\rangle$ for every $n$ and therefore $\langle f,g\rangle=\langle A_{N,M}(f),g\rangle$ for every $N$ and $M$ and finally $\langle f,g\rangle=\langle g,g\rangle$. By the Cauchy–Schwarz inequality, this is at least
  $$
\left(\int g(x)d\mu\right)^2 = \left(\int f(x)d\mu\right)^2=\mu(A)^2.
$$
  Therefore we deduce 
  $$
\lim_{N-M\to\infty}\frac 1{N-M}\sum_{n=M}^{N-1}\mu(A\cap T^{-n}A)\ge \mu(A)^2.
$$

How does one arrive at the final result from Cauchy–Schwarz inequality? 
I understand everything prior to the statement "By the Cauchy-Schwarz ..." but not after that. Using Cauchy–Schwarz I could deduce $||g||\le ||f||$ and get
$$
\lim_{N-M\to\infty}\frac 1{N-M}\sum_{n=M}^{N-1}\mu(A\cap T^{-n}A)\le \mu(A)^2.
$$
which is the complete opposite of what was stated. 
Here is the link to the same question posted on MSE with no answer.
Edit: As pointed out by John Griesmer, the inequality I derived should read
$$
\lim_{N-M\to\infty}\frac 1{N-M}\sum_{n=M}^{N-1}\mu(A\cap T^{-n}A)\le ||f||^2 = \mu(A).
$$
instead. A silly mistake there by me.

REPLY [5 votes]: $A_{N,M}(f)$ converges to some $U$-invariant function $g$ that satisfies $\langle g, f\rangle$ = $\langle g, g\rangle$. 
We also have $\langle g, 1\rangle = \lim \langle A_{N,M}(f), 1\rangle = \langle f, 1\rangle$ since $\langle A_{N,M}(f), 1\rangle = \langle f, 1\rangle$ for all $N, M$.
So we have $\lim \ \langle A_{N,M}(f) , f \rangle = \langle g, f \rangle \  =\langle g, g \rangle = \langle g, g \rangle \langle 1, 1 \rangle \geq \langle g , 1 \rangle^2$
the last inequality following from the Cauchy-Schwarz inequality. For $f = {\bf 1}_A$, we have $\langle f, 1 \rangle = \int {\bf 1}_A d\mu = \mu(A).$