Let $(X,\Sigma,\mu)$ be a $\sigma$-finite measure space and let $F,G : X\to X$ be measurable. Assume now that for all $f\in L^1(\mu)$ we have $f(F(x)) = f(G(x))$ for $\mu$-almost every $x\in X$. The claim then is that $F(x) = G(x)$ for $\mu$-almost every $x\in X$.
However, I can embarrassingly not seem to prove this. I can't even prove that $A := \{x : F(x) = G(x)\}\in\Sigma$. My attempt: Let $H : X\to X^2$ be defined as $H(x) = (F(x),G(x))$. Then $A = H^{-1}(B)$, where $B = \{(x,x) : x\in X\}$. Definitely, $H$ is measurable, as $H^{-1}(A_1\times A_2) = F^{-1}(A_1)\cap A_2$, but how can I prove that $B$ is in the product $\sigma$-algebra $\Sigma\otimes\Sigma$?
I guess, this can be proved (how?). Next, one has to show that $X\backslash A = \{x : F(x)\neq G(x)\}$ has measure zero, but I don't have a clue. Maybe with characteristic functions?