For the unicity of conditional expectation, I don't get the proof. Let $(\Omega ,\mathbb F,\mathbb P)$, and $X$ a r.v. There is a unique r.v. $Z$ s.t. for all $G\in \mathcal G$, $$\int_{G}Zd\mathbb P=\int_G Xd\mathbb P.$$ We denote $Z=\mathbb E[X\mid \mathcal G]$.
For unicity they said that it come from the fact that if $\int_G X=0$ for all $G\in \mathcal G$ then $X=0$. But for example, take $X=\boldsymbol 1_{[0,1]}-\boldsymbol 1_{[-1,0]}$, then $\int_\mathbb R X=0$ but $X\neq 0$. I don't get the point, could someone help ?
$\int_A X=\int _{A^{c}} X=0$ where $A =\{X\geq 0\}$ gives $X=0$. Some details: $\int _{X>1/n} X \geq 1/n P\{X >1/n\}$ so $P\{X >1/n\}=0$ (because the integral on the left is $0$ by hypothesis) for each $n$. Taking union over $n$ we get $P\{X>0\}=0$. Similarly, using the set $\{X<\ -1/n\}$ we get $P\{X<0\}=0$. Combining these two we get $X=0$ almost surely.