Consider random variables $X,Y$ on a probability space $(\Omega,\mathcal F,\Bbb P)$, and let $\mathcal G$ be a sub-$\sigma$-algebra. We say that $\Bbb E[X|\mathcal G]=Y$ (a.s.) if $Y$ is $\mathcal G$-measurable and $\Bbb E[X1_A]=\Bbb E[Y1_A]$ for all $A\in\mathcal G$. Is it true that $\Bbb E[X|\mathcal G]\geq Y$ (a.s.) iff $\Bbb E[X1_A]\geq\Bbb E[Y1_A]$ for all $A\in\mathcal G$?
The forward implication is obvious. If $Y$ is $\mathcal G$-measurable, I can prove the backward implication by considering the set $A_\epsilon=\{\Bbb E[X|\mathcal G]-Y<\epsilon\}\in\mathcal G$, which has positive probability for some $\epsilon>0$ if $\Bbb E[X|\mathcal G]\ngeq Y$. However, I am not sure if $Y$ is not $\mathcal G$-measurable.
What is true is that $$ \mathbb E\left[X\mid\mathcal G\right]\geqslant \mathbb E\left[Y\mid\mathcal G\right]\mbox{ a.s.} $$ which can be shown by the same idea as in the opening post (letting $A_n=\left\{ \mathbb E\left[X\mid\mathcal G\right]-\mathbb E\left[Y\mid\mathcal G\right] <1/n\right\}\in\mathcal G$).
However, the equality $\mathbb E\left[X\mid\mathcal G\right]\geqslant Y$ may fail to hold almost surely: let $X=Y=\mathbf 1_B$, where $B\in\mathbb F$ is independent of $\mathcal G$. Then $\mathbb E\left[X\mid\mathcal G\right]=\mathbb P(B)$ which is not bigger or equal to $Y$ on $B$ if $\mathbb P(B)<1$.