Let $X\in L^2(\Omega, \mathcal{A}, P)$ and let $\mathcal{G}\subset\mathcal{A}$ be a sub $\sigma$-algebra. Assume that $X\stackrel{d}{=}E[X|\mathcal{G}].$ Prove that $X=E[X|\mathcal{G}]$ a.s.
I have posted and solved a similar question here but I cannot figure out how to make the necessary changes from the assumption that $E[X|\mathcal{G}]\le X$ a.s. to the assumption that $X\stackrel{d}{=}E[X|\mathcal{G}]$ in order to alter this proof to make it work. Any help with that or a full blown new proof would be greatly appreciated.