What is the conditional expectation of $\mathbb{E}(X\mid\sin(X))$ if $X$ is uniformly distributed on $[0,\pi]$?
Intuitively I expect that it is constant and equal to $\frac{\pi}{2}$, since the Borel set generated by $\sin(X)$ is symmetric around $\frac{\pi}{2}$.
Is that true? What would be the formal proof?
Yes it is.
A formal proof would be to show that $\mathbb E(Xu(\sin X))=\frac\pi2\mathbb E(u(\sin X))$ for every bounded measurable function $u$.
Recall that in full generality, $\mathbb E(Y\mid Z)$ may be defined as the only $Z$-measurable random variable $T$ such that $\mathbb E(Yu(Z))=\mathbb E(Tu(Z))$ for every bounded measurable function $u$. Use this for $Y=X$, $Z=\sin X$ and $T=\frac\pi2$.
A painless way to show that $\mathbb E(Xu(\sin X))=\frac\pi2\mathbb E(u(\sin X))$ is to start with the fact that $\pi-X$ and $X$ are identically distributed hence $(\pi-X,\sin(\pi-X))=(\pi-X,\sin X)$ and $(X,\sin X)$ are identically distributed. Thus, $(*)=\mathbb E(Xu(\sin X))$ solves the identity $$ (*)=\mathbb E((\pi-X)u(\sin(X)))=\pi\mathbb E(u(\sin X))-(*), $$ and the proof is complete.