Let $(X,\mathcal{A},\mu)$ be a measure space and $(Y,\mathcal{B})$ be a measurable space. Furthermore let $\varphi: X \to Y$ be $\mathcal{A}$-$\mathcal{B}$-measurable and $f:Y \to \mathbb{R}$ be measurable. If we have $E \in \mathcal{B}$, show that $$\chi_E \circ \varphi = \chi_{\varphi^{-1}(E)}$$
I know this is a very obvious question, but somehow I do not quite see how I should prove this formally. But I came up with an idea. I show that $$(\chi_E\circ \varphi)^{-1}(\{1\}) = \chi^{-1}_{\varphi^{-1}(E)}(\{1\}) = \varphi^{-1}(E)$$ Assume $x \in X$ belongs to the righthandside. Then $\chi_E(\varphi(x)) = 1$ which means $\varphi(x) \in E$ and thus $x \in \varphi^{-1}(E)$. Conversly, assume $x \in \varphi^{-1}(E)$. Then $\varphi(x) \in E$ and thus $x$ belongs to the righthandside. Is that correct? Is there a more elegant proof?