# Piecewise Combination of Measurable Mappings is Measurable

## Theorem

Let $\left({X, \Sigma}\right)$ and $\left({X', \Sigma'}\right)$ be measurable spaces.

### Binary Case

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:

$\forall x \in X: \map h x := \begin{cases} \map f x & : \text {if$x \in E$} \\ \map g x & : \text {if$x \notin E$} \end{cases}$

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

### General Case

Let $\left({E_n}\right)_{n \in \N} \in \Sigma, \displaystyle \bigcup_{n \mathop \in \N} E_n = X$ be a countable cover of $X$ by $\Sigma$-measurable sets.

For each $n \in \N$, let $f_n: E_n \to X'$ be a $\Sigma_{E_n} \, / \, \Sigma'$-measurable mapping.

Here, $\Sigma_{E_n}$ is the trace $\sigma$-algebra of $E_n$ in $\Sigma$.

Suppose that for every $m, n \in \N$, $f_m$ and $f_n$ satisfy:

$(1): \quad f_m \restriction_{E_m \cap E_n} = f_n \restriction_{E_m \cap E_n}$

that is, $f_m$ and $f_n$ coincide whenever both are defined; here $\restriction$ denotes restriction.

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

$\displaystyle \forall n \in \N, x \in E_n: f \left({x}\right) := f_n \left({x}\right)$

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