As the title says.
I am asking this question because in Stein's Real Analysis, on page 29, it says that "if $f$ is measurable and finite-valued, and $\Phi$ is continuous, then $\Phi \circ f$ is measurable." It specifically mentioned "finite-valued". I was wondering why it needs to be finite valued.
The way the proof (slightly different from his version) goes is like this: We know that by definition, a function $f$ is measurable iff $f^{-1}(O)$ is measurable for any open set $O$. Then, given any open set $O$ and continuous function $\Phi$, we know that $\Phi^{-1} (O)$ is open. Hence, $(\Phi \circ f)^{-1} (O) = f^{-1} \circ \Phi^{-1} (O)$ is measurable. Hence, $\Phi \circ f$ is a measurable function.
It does not seem that we need to assume that $f$ is finite valued.