Continuity of inner product and change of limit order First of all, please note that the specific context of ergodic theory could possibly not matter and this could reduce to a simply a question about Hilbert Space.
As a part of a proof i'm working on, I'm trying to compute the limit $\lim_{n\to\infty}\langle \lim_{m\to\infty}U^n_T f_m,\lim_{k\to\infty}g_k\rangle$ (which is the same as $\lim_{n\to\infty}\langle U^n_T \lim_{m\to\infty}f_m,\lim_{k\to\infty}g_k\rangle$ due to measure preserving)  where $f_m, g_k \in L^2(X)$ with $f_m\to f$ and $g_m \to g$ in $L^2$ and $U_T h= h\circ T$ for an invertible measure preserving $T$.
If it helps, you may assume a countable orthonormal basis $h_i$ for $L^2(X)$ such that $f_m=\sum_{i=0}^m \langle f,h_i\rangle h_i$ and likewise for g.
In the first part of my proof I calculated $\lim_{n\to\infty}\langle U_T^n f_m, g_k \rangle=c$ for all $m,k$ (with the same $c\in \mathbb R$ for all!!).
I would obviously like to infer $\lim_{n\to\infty}\langle \lim_{m\to\infty}U^n_T f_m,\lim_{k\to\infty}g_k\rangle=c$.
The first part for me was to take the $\lim_m ,\lim_k$ out of the inner product due to continuity of inner product, and then I would like to change the order of limits. In order to do that I've tried to use some kind of dominated convergence theorem applied to the counting measure on $\mathbb N$, but it didn't get me too far.
 A: Since $f_m\to f$ in $\mathbb L^2$, we have $U_T^nf_m\to U_Tf$ in $\mathbb L^2$ for each $n$. Since the limits in the inner product are understood to be in the $\mathbb L^2$ sense, we have to compute $$l:=\lim_{n\to +\infty}\left\langle U_T^nf,g\right\rangle.$$
To this aim, we use the decomposition 
$$\left\langle U_T^nf,g\right\rangle=\left\langle U_T^n(f-f_m),g\right\rangle+\left\langle U_T^nf_m,g-g_k\right\rangle+\left\langle U_T^nf_m,g_k\right\rangle,$$
and subtracting $c$, taking the absolute value, using the triangular and Cauchy-Bunyakovski-Schwarz inequality (and the fact that $U_T$ preserves the $\mathbb L^2$ norm), we derive the inequality 
$$\left|\left\langle U_T^nf,g\right\rangle-c\right|\leqslant 
\lVert f-f_m\rVert_2\lVert g\rVert_2+\lVert f_m\rVert_2\lVert g-g_k\rVert_2+\left|\left\langle U_T^nf_m,g_k\right\rangle-c\right|.$$
By assumption, since $c$ is the same for all $m$ and $k$, we derive that 
$$\limsup_{n\to +\infty}\left|\left\langle U_T^nf,g\right\rangle-c\right|\leqslant 
\lVert f-f_m\rVert_2\lVert g\rVert_2+\lVert f_m\rVert_2\lVert g-g_k\rVert_2.$$
Since $f_m\to f$ in $\mathbb L^2$, the sequence $\left(\lVert f_m\rVert_2\right)_{m\geqslant 1}$ is bounded and we can conclude that $l=c$.
