Let $X,Y,Z$ be integrable random variables. It is known that $E[X|Y,Z]$ can be written as a measurable function of $Y,Z$ (by the monotone class theorem), i.e, there exists a real measurable function on $\mathbb R^2$, $h_X$, such that $h_X(Y,Z)= E[X|Y,Z]$ almost surely, or $h_X(y,z)= E[X|Y=y,Z=z]$.
Now consider the function $f(X,Y,Z)=X-h_X(Y,Z)$. We see that $f(X,Y,X)=0$.
Is it true that $f(x,Y,x)=0$ almost surely for all $x \in \mathbb R$ ?
The question might seem trivial, but I fear I am missing something when going from random variables to real numbers. I do not think defining $f(X,Y,Z)$ is enough for $f(x,y,z)$ to be well defined for $x,y,z \in \mathbb R$, so I am unsure that I can write something like $f(x,Y,x)$.