Question
Let $\mathcal{B}$ be the entire Borel set of $\mathbb{R}$. And let $\chi_E$ be the indicator function of the set $E$.
$(X, m, \mu)$; measure space, map $f: X \to \mathbb{R}$; measurable.
For $A \in \mathcal{B}$, we define $$ \lambda(A) = \mu(f^{-1}(A)). $$
When $g = \chi_E$, $E \in \mathcal{B}$, the following equation transformation holds: $$ \int_{\mathbb{R}} \chi_E\ d\lambda = \lambda(E) = \mu(f^{-1}(E)) \overset{?}{=} \int_{X} \chi_E \circ f\ d\mu. $$
Why is the third equal sign valid?
What I know
$\chi_E \circ f = \chi_E(f)$,
$\int_{X} \chi_E \circ f\ d\mu = \mu((\chi_E \circ f) \cap X)$.