Conditional expectation, $X = \varphi (Y)$ Show that if $$\forall \omega \in A \ : \ X(\omega) = \varphi(Y(\omega)),  \ \ A \in \Sigma_Y$$ (that is, the equality is true for $\omega \in A$), then $$\mathbb{E}(X|Y)(\omega) = \varphi(Y(\omega)) \text{ for almost all } \ \ \omega \in A.$$
I thought it would be a good idea to prove it for indicator functions, then for simple and measurable function.
For $Y = 1_C, \ C \in \Sigma_Y$ I get $$X(\omega) = \varphi (1_C(\omega)), \ \ \ X(\omega) = \varphi(0), \omega \in A \setminus C, \ \ \ X(\omega) = \varphi(1), \omega \in C. $$ By definition for all $B \in \Sigma_Y$: $$\int_B \mathbb{E}(X|Y)(\omega) dP = \int_B X dP = \int_{B \cap A \setminus C} \varphi(0) dP + \int_{B \cap  C} \varphi(1) dP = \varphi(0) P(B \cap A \setminus C) + \varphi(1) P(B \cap C)$$
This doesn't seem to lead me anywhere. 
Could you help me prove the statement above?
Do we need to assume that $A$ is measurable?
 A: Apply the definition of conditional expectations. The conditional expectation $\mathbf{E}[X|Y]$ is defined to be any $\sigma (Y)$-measurable function verifying for every $\psi$ (positive measurable function)
\begin{equation}
\mathbf{E}[\psi(Y) X ] = \mathbf{E}[\psi(Y) \mathbf{E}[X|Y]]
\end{equation}
By the definition of $X = \phi(Y)$, we have that $X$ is $\sigma(Y)$ measurable and satisfies
$$\mathbf{E}[X\psi(Y)] = \mathbf{E}[\phi(Y) \psi (Y)]$$
therefore, $\psi(Y)$ is a version of the conditional expectation $\mathbf{E}[\phi(Y)|Y]$.
Note. Usually, the conditional expectation is defined as I stated : for example, if $\mathcal{G}$ is a $\sigma$-algebra, then $\mathbf{E}[X|\mathcal{G}]$ is defined to be any $\mathcal{G}$-measurable random variable $Z$ satisfying, for every $\mathcal{G}$-measurable positive rv $U$ : 
$$\mathbf{E}[XU] = \mathbf{E}[ZU]$$
It is known that instead of taking every positive random variable $U$, you can take every random variable having the form $\mathbf{1}_C$ where $C \in \mathcal{G}$. However, the functional definition is much more easy to handle than the other, as you just saw !
