Let $X,Y\in L^1(\Omega,\mathfrak{F}, P)$, where $\mathfrak{F}$ is a $\sigma$-algebra and $P$ is the probability measure on $\Omega$. If $E[X|Y]=Y$ a.s. $E[Y|X]=X$ a.s., then prove that $X=Y$ a.s..
Now I can prove it is true for $X,Y$ are simple function, but I stuck at how to pass it to general measurable functions.