Inequality about conditional expectation I am trying to prove the following property about conditional expectation:
Let ($\Omega, \ F,\mathbb{P} )  $ be a probability space, let  $X$ and $Y$ be two integrable random variables and let $G$ be a sub $\sigma$$- algebra$ of $\ F$. Show that if $\mathbb{E}(X \mathbb{1}_{A}) \leq \mathbb{E}(Y \mathbb{1}_{A})$ for any $\ A \in \ G$, then $\mathbb{E}(X| \ G) \leq \mathbb{E}(Y | \ G)$ a.s.
I know that I should use $\ A=\{\mathbb{E}(X| \ G)<0\}\in G $ but I don't really know how to use this.
Could someone give me a hint about how to prove this? Thanks a lot
 A: First, in order to simplify the things, we can only consider the case where $X=0$ a.s. Indeed, if we manage to show that for each integrable random variable $Y$,  $\mathbb E\left[Y\mathbf{1}_A\right]\geqslant 0$ for all $A\in\mathcal G$ implies that $\mathbb E\left[Y\mid\mathcal G\right]\geqslant 0$ a.s., then we can apply this to $Y-X$ can conclude by linearity of the conditional expectation.
So, let $Y$ be an integrable random variable such that $\mathbb E\left[Y\mathbf{1}_A\right]\geqslant 0$ for all $A\in\mathcal G$. Let $A_n=\{\mathbb E\left[Y\mid\mathcal G\right]\leqslant -1/n\}$ where $n$ is a positive integer. We now by assumption and the fact that $A_n\in\mathcal G$ that $\mathbb E\left[Y\mathbf{1}_{A_n}\right]\geqslant 0$. Moreover, by definition of the conditional expectation, $$0\leqslant\mathbb E\left[Y\mathbf{1}_{A_n}\right]=\mathbb E\left[\mathbb E\left[Y\mid \mathcal G\right]\mathbf{1}_{A_n}\right]\leqslant -n^{-1}\mathbb P(A_n).$$ This forces $A_n$ to have probability $0$. This show that $\bigcup_{n\geqslant 1}A_n$ has probability $0$, and this set is $\{\mathbb E\left[Y\mid\mathcal G\right]\lt 0\}$.
