Question
Assume that for integrable random variables $X$ and $Y$ we have $E(X|Y)=Y$ and $E(Y|X)=X$.
Show that for $x\in \mathbb{R}$ we have
$0\leq E[(X-Y)1(Y\leq x< X)]=E[(Y-X)1(X>x,Y>x)]$ $0\geq E[(X-Y)1(X\leq x< Y)]=E[(Y-X)1(X>x,Y>x)]$
Conclude that $X=Y$ a.s.
PS: 1 stands for indicator variable
Attempt Pick $x\in \mathbb{R}$
\begin{align} E[(X-Y)1(Y\leq x\leq X)]&=E[X1(Y\leq x<X)]-E[Y1(Y\leq x<X)]\\ &=E[X1(Y\leq x<X)]-E[Y1(Y\leq x<X)]\\ &=E[X1(X>x)]-E[Y1(Y\leq x)]\\ &=E[X1(X>x)]+E[Y1(Y>x)]\\ &=E[X1(X>x)]+E[Y1(Y>x)]\\ &=E[(X+Y)1(X>x,Y>y)] \end{align}
Clearly i did something wrong? Any thoughts/hints? I don't even understand where i could use the assumptions..
Edit
In the post Show that $X = Y$ almost surely he show how to prove $X=Y$ a.s. from our assumptions.