> [!definition]
>
> Let $(X, \cm)$ be a [[Measure Space|measurable space]]. A **simple** function $f: X \to \complex$ is a finite [[Linear Combination|linear combination]] of [[Measurable Function|measurable]] [[Indicator Function|indicator functions]] with [[Complex Numbers|complex]] coefficients.
> [!theorem]
>
> Let $(X, \cm)$ be a measurable space. A measurable function $f: X \to \complex$ is simple if and only if its image $f(X)$ is finite.
>
> *Proof*. Suppose that $f$ is a linear combination of $n$ indicator functions, then $f$ produces up to $2^{n}$ distinct values, and its image is finite.
>
> Suppose that $f(X) = \list{x}{n}$ is finite. Let $E_i = f^{-1}(\bracs{x_i})$, then
> $
> f(x) = \sum_{i = 1}^{n}x_i\chi_{E_i}(x)
> $
> as
> $
> f(x) = x_j \Rightarrow \sum_{i = 1}^{n}x_i\chi_{E_i}(x) = x_j\chi_{E_j}(x) = x_j
> $
> The above representation is known as the **standard representation** of $f$.
> [!theorem]
>
> Let $(X, \cm)$ be a measurable space.
> - Let $f: X \to [0, \infty]$ be a measurable function, then there is an ascending sequence $\seq{\phi_j}$ of simple functions such that $\phi_j(x) \upto f(x)$ [[Pointwise Convergence|pointwise]]. If $f$ is bounded in a set, then $\phi_j(x) \upto f(x)$ [[Uniform Convergence|uniformly]] in that set.
> - Let $f: X \to \complex$ be a measurable function, then there is a sequence $\seq{\phi_j}$ of simple functions such that $0 \le |\phi_1| \le \cdots \le |f|$, $\phi_n \to f$ pointwise, and $\phi_n \to f$ uniformly on any set where $f$ is bounded.
>
> *Proof*.
>
> ![[simple_function_limit.png]]
>
> We approximate $f$ by partitioning its image in $[0, 2^{j}]$ into $2^{2j}$ pieces, such that each interval $[k, k + 1]$ is broken into $2^j$ pieces. With each iteration, more of its image get covered, and the finer the approximation becomes.
>
> For $0 \le k < 2^{2j}$, define
> $
> E_{j, k} = f^{-1}((2^{-j} \cdot k, 2^{-j} \cdot (k + 1)])
> $
> and
> $
> F_j = f^{-1}((2^{j}, \infty])
> $
> and take
> $
> \phi_j = \sum_{k = 0}^{2^{2j} - 1}\frac{k \cdot \chi_{E_{j, k}}}{2^{j}} + 2^{j} \cdot \chi_{F_{j}}
> $
>
> Let $x \in X: f(x) = 0$, then $\phi_j(x) = \phi_{j + 1}(x) = 0$ and the inequality is satisfied.
>
> Suppose that $f(x) \in [0, 2^j]$, then $f(x) \in (2^{-j} \cdot k, 2^{-j} \cdot (k + 1)]$ for some $k < 2^{2j}$ implies that $f(x) \in (2^{-(j+1)} \cdot 2k,2^{-(j+1)} \cdot (2k + 1)]$ or $f(x) \in (2^{-(j + 1)} \cdot (2k + 1), 2^{-(j+1)} \cdot (2k+2)]$ where $2k < 2^{2(j + 1)}$, making $E_{j, k} = E_{j + 1, 2k} \cup E_{j + 1, 2k + 1}$. This means that
> $
> \phi_{j+1}(x) = 2^{-j} \cdot 2k \quad \text{or} \quad \phi_{j + 1}(x) = 2^{-j} \cdot (2k + 1)
> $
> in both cases, $\phi_{j + 1}(x) \ge \phi_j(x) = 2^{-j} \cdot k$. Now suppose that $f(x) > 2^j$, then $\phi_j(x) = 2^j$ but
> $
> x \in \bigcup_{k = 2^{2j}}^{2^{2(j+1)}-1}E_{j + 1, k} \cup F_j \Rightarrow \phi_{j+1}(x) \ge 2^{-j} \cdot 2^{2j} = 2^{j}
> $
> so $\phi_{j+1}(x) \ge \phi_j(x) \forall x \in X$.
>
> Let $x \in X: f(x) \in E_{j, k}$, then $f(x) > 2^{-j} \cdot k$ but $\phi_j(x) = 2^{-j} \cdot k$. If $x \in F_j$, then $f(x) > 2^j$ but $\phi_j(x) = 2^j$. If $f(x) = 0$, then $\phi_j(x) = 0$ as well and $f(x) \ge \phi_j(x)$ for all $j \in \nat$.
>
> Let $x \in X: f(x) = 0$, then $\phi_j(x) = 0 \forall j \in \nat$ and $\limv{j}\phi_j(x) = f(x)$.
>
> If $f(x) > 0$, take $\exists J \in \nat: x \le 2^{J}$, then for all $j \ge J$, there exists $k < 2^{2j}: x \in E_{j, k}$. Since
> $
> f(x) \in (2^{-j} \cdot k, 2^{-j} \cdot (k + 1)]
> $
> and $\phi_j(x) = 2^{-j} \cdot k$, $\abs{f(x) - \phi_j(x)} \le 2^{-j} < 2 \cdot 2^{-j}$. So for any $\varepsilon > 0$, $x \in X$, we can find
> $
> J \in \nat: x \le 2^{j}, 2 \cdot 2^{-j} < \varepsilon \quad \forall j > J
> $
> such that $\abs{f(x) - \phi_j(x)} < 2 \cdot 2^{-j} < \varepsilon$. So we have $\limv{j}\phi_j(x) = f(x)$, $\lim_{j \to \infty}\phi_j = f$ pointwise.
>
> Let $E \subseteq X$ such that $f(x) < M$ for all $x \in E$. Take $J \in \nat: M \le 2^{J}$, then $\forall x \in E, \exists k < 2^{2j}: x \in E_{j, k}$. Since
> $
> f(x) \in (f^{-j} \cdot k, 2^{-j} \cdot (k + 1)]
> $
> and $|f(x) - \phi_j(x)| < 2 \cdot 2^{-j} \forall x \in E$. For any $\varepsilon > 0$, we can find
> $
> J \in \nat: M \le 2^{j}, 2 \cdot 2^{-j} < \varepsilon \quad \forall j \in J
> $
> such that $|f(x) - \phi_j(x)| < \varepsilon \forall x \in E$. Therefore $\limv{j \to \infty}\phi_j|_E = f|_E$ uniformly.