If $f(x) \le f(Tx)$ then $f(x)=f(Tx)$ almost everywhere ( $T$ is $\mu$-invariant )
Let $X$ be a probability space with probability $\mu$. Let $T:X\to X$ be a measurable and $\mu$-invariant transformation, i.e $\mu \left(T^{-1}A \right) =\mu A. $ for each measurable subset $A\subset X$.
Let $f:X \to \mathbb R$ be a measurable and integrable function such that $f(x) \le f(Tx)$ for all $x\in X$. Prove that $f(x)$ and $f(Tx)$ are equal almost everywhere.
This is what I did:
For each $\alpha \in \mathbb R$ let $A_{\alpha}= \{x\in X : f(x) \le \alpha \}$. Note that $T^{-1} A_{\alpha} \subset A_{\alpha}$. The $T$-invariance of $\mu$ implies that $\mu \left( A_{\alpha} \setminus T^{-1}A_{\alpha} \right) = 0$.
I want to show that the set $E=\{x\in X : f(x) < f(Tx) \}$ has measure $0$. I wan't to write this set using the sets $A_{\alpha}$ and maybe a countable union of this sets but I don't know if it's possible. Please help =(
Firstly you can get rid of $f$ and $T$ to state the problem: you have two random variables $Y$ and $Z$ defined by $Y(x)=f(x)$ and $Z(x)=f(T(x))$ which have the same law because of the invariance and which satisfy $Y \leq Z$ by assumption.
If $Y$ (and a fortiori $Z$) is bounded then you can deal with the expectations: $E(|Z-Y|)=E(Z-Y)=E(Z)-E(Y)=0$ and this implies $Z=Y$.
If $Y$ and $Z$ are not bounded then you can apply the bounded case to $\tan^{-1}(Y)$ and $\tan^{-1}(Z)$.