Characterization of Ergodicity in terms of Koopman Operator

Theorem
Let $\struct {X, \BB, \mu}$ be a probability space.

Let $T: X \to X$ be a measure-preserving transformation.

Let $\map {\LL^2} \mu$ denote the Lebesgue $2$-space.

Then the following are equivalent:
 * $(1):$ $T$ is ergodic
 * $(2):$ For all $\BB$-measurable function $f$:
 * if $\map {f \circ T} x = \map f x$ for all $x \in X$, then $f$ is constant $\mu$-a.e.
 * $(3):$ For all $\BB$-measurable function $f$:
 * if $\map {f \circ T} x = \map f x$ for $\mu$-a.a. $x \in X$, then $f$ is constant $\mu$-a.e.
 * $(4):$ For all $f \in \map {\LL ^2} \mu$:
 * if $\map {f \circ T} x = \map f x$ for all $x \in X$, then $f$ is constant $\mu$-a.e.
 * $(5):$ For all $f \in \map {\LL ^2} \mu$:
 * if $\map {f \circ T} x = \map f x$ for $\mu$-a.a. $x \in X$, then $f$ is constant $\mu$-a.e.