An exercise on conditional expectation of L^1 random variables I'm facing an exercise on conditional expectation, asking to prove/disprove the following:
Let $ X,Y \in L^1(\Omega, \mathcal{H},\mathbb{P}) $. 
If $ E[X|Y] = Y $ and $ E[Y|X] = X $, then $ X=Y $ almost surely.
It is clear to me that the statement is true when $X,Y \in L^2 $. Does this hold even when $X,Y \in L^1 \setminus L^2$?
 A: Yes, this is true. We have $\mathbb{E}[(X-Y)|X]=0$ almost surely. From the definition of conditional expectation it follows that for each $t\in\mathbb{R}$:
$\mathbb{E}[(X-Y)1_{\{{X\leq t\}}}]=\mathbb{E}[\mathbb{E}[(X-Y)|X]\ 1_{\{X\leq t\}}]=0$
So then the following follows:
$\mathbb{E}[(X-Y) 1_{\{X\leq t, Y\leq t\}}]=\mathbb{E}[(X-Y)\ 1_{\{X\leq t\}}]-\mathbb{E}[(X-Y)\ 1_{\{X\leq t,Y>t\}}]=$
$=0-\mathbb{E}[(X-Y)\ 1_{\{X\leq t,Y>t\}}]$
By interchanging the roles of $X$ and $Y$ we can similarly get the following equality:
$\mathbb{E}[(X-Y)\ 1_{\{X\leq t,Y\leq t\}}]=-\mathbb{E}[(X-Y)\ 1_{\{Y\leq t, X>t\}}]$
Combining the results, we get:
$\mathbb{E}[(X-Y)\ 1_{\{X\leq t,\ Y>t\}}]=\mathbb{E}[(X-Y)\ 1_{\{Y\leq t,\ X>t\}}]$
But note that the right hand side is non negative, while the left hand side must be non positive. Since they are equal it follows that both expectations are equal to $0$. So $\mathbb{E}[(X-Y)\ 1_{\{X>t,\ Y\leq t\}}]=0$. A nonnegative random variable with $0$ expectation is $0$ almost surely. Thus $\mathbb{P}(Y\leq t<X)=0$. This is true for every $t\in\mathbb{R}$, so by taking rational values of $t$ we can easily conclude that $\mathbb{P}(Y<X)=0$. And similarly $\mathbb{P}(X<Y)=0$. So the result $\mathbb{P}(X=Y)=1$ follows.
