Piecewise Combination of Measurable Mappings is Measurable/Binary Case

Theorem
Let $\left({X, \Sigma}\right)$ and $\left({X', \Sigma'}\right)$ be measurable spaces. Let $f,g: X \to X'$ be $\Sigma \, / \, \Sigma'$-measurable mappings.

Let $E \in \Sigma$ be a measurable set.

Define $h: X \to X'$ by:


 * $\displaystyle \forall x \in X: h \left({x}\right) := \begin{cases}

f \left({x}\right) & \text{if $x \in E$}\\ g \left({x}\right) & \text{if $x \notin E$} \end{cases}$

Then $h$ is also a $\Sigma \, / \, \Sigma'$-measurable mapping.