> [!theorem]- Preimage Preserves Unions, Intersections, and Complements
>
> Let $f: X \to Y$ be a [[Function|function]]. Then $f$ induces a mapping between the [[Power Set|power sets]] $f^{-1}: \pow{Y} \to \pow{X}$ that preserves unions, intersections, and complements.
>
> *Proof*. Let $A, \bracs{A_i} \subseteq \pow{X}$ be a family of subsets of $X$, then
> $
> \begin{align*}
> f^{-1}\paren{\bigcup_{i \in I}A_i} &= \bracs{x \in X: f(x) \in \bigcup_{i \in I}A_i} \\
> &= \bigcup_{i \in I}\bracs{x \in X: f(x) \in A_i} \\
> &= \bigcup_{i \in I}f^{-1}(A_i)
> \end{align*}
> $
> and
> $
> \begin{align*}
> f^{-1}(A^c) &= \bracs{x \in X: f(x) \in A^c} \\
> &= \bracs{x \in X: f(x) \not\in A} \\
> &= X \setminus \bracs{x \in X: f(x) \in A} \\
> &= \paren{f^{-1}(A)}^c
> \end{align*}
> $
> and
> $
> \begin{align*}
> f^{-1}\paren{\bigcap_{i \in I}A_i} &= \bracs{x \in X: f(x) \in A_i \forall i \in I} \\
> &= \bigcap_{i \in I}\bracs{x \in X: f(x) \in A_i} \\
> &= \bigcap_{i \in I}f^{-1}(A_i)
> \end{align*}
> $
> [!definition]
>
> Let $f: X \to Y$ be a function, and $\cm, \cn$ be [[Sigma Algebra|sigma algebras]] over $X$ and $Y$, respectively, so $(X, \cm), (Y, \cn)$ are [[Measure Space|measureable spaces]].
>
> $f$ is $(\cm, \cn)$ **measurable** if $f^{-1}(N) \in \cm$ for any $N \in \cn$.
>
> If $f: X \to \real/\real^d$ is Borel-measurable, then $f \in m(\cm)$, where $m(\cm)$ is the space of Borel-measurable functions.
> [!theorem]
>
> Let $(X, \cm)$, $(Y, \cn)$ be measurable spaces and $f: X \to Y$ be a function. If $\cn = \cm(\ce)$ is generated by $\ce$, then $f$ is measurable if and only if $f^{-1}(E) \in \cm$ for any $E \in \ce$.
>
> *Proof*. Suppose that $f$ is measurable, then $\ce \subseteq \cn \Rightarrow f^{-1}(E) \in \cm$ for any $E \in \ce$.
>
> Suppose that $f^{-1}(E) \in \cm$ for any $E \in \ce$, then the set
> $
> O = \bracs{E \subseteq Y: f^{-1}(E) \in \cm}
> $
> forms a $\sigma$-algebra. $f^{-1}(\emptyset) = \emptyset \in \cm$, $f^{-1}(Y) = X \in \cm$, so $\emptyset, Y \in O$. Let $\seq{E_i}$ be a family of sets in $O$, then
> $
> f^{-1}\paren{\bigcup_{i \in \nat}E_i} = \bigcup_{i \in \nat}f^{-1}(E_i) \in \cm \Rightarrow \bigcup_{i \in \nat}E_i \in O
> $
> and $f^{-1}(E_i^c) = f^{-1}(E_i)^c \in \cm \Rightarrow E_i^c \in O$. Since $O$ is a $\sigma$-algebra containing $\ce$, $O \supseteq \cn = \cm(\ce)$ and $f^{-1}(E) \in \cm \forall E \in \cn$. Therefore $f$ is measurable.
> [!theorem]
>
> Let $(X, \cm)$ and $(Y_i, \cn_i)$ be a family of [[Measure Space|measurable spaces]] indexed by $I$. Take $Y = \prod_{i \in I}Y_i$, $\cn = \bigotimes_{i \in I}\cn_i$ as the [[Product Sigma Algebra|product sigma algebra]], and $\pi_i: Y \to Y_i$ be the projection maps. Then $f: X \to Y$ is $(\cm, \cn)$-measurable if and only if each $f_i = \pi_i \circ f$ is $(\cm, \cn_i)$-measurable for all $i \in I$.
>
> *Proof*.
> $
> \begin{align*}
> f \text{ measurable} &\Leftrightarrow f^{-1}(\pi_i^{-1}(E_i)) \in \cm &\forall E_i \in \cn_i, i \in I \\
> &\Leftrightarrow f_i^{-1}(E_i) \in \cm &\forall E_i \in \cn_i, i \in I \\
> &\Leftrightarrow f_i \text{ measurable} &\forall i \in I
> \end{align*}
> $
> [!theorem]
>
> Let $(X, \topo_X)$ and $(Y, \topo_Y)$ be [[Topological Space|topological spaces]], then every [[Continuity|continuous]] function $f: X \to Y$ is $(\cb_X, \cb_Y)$ measurable with respect to their [[Borel Sigma Algebra|Borel sigma-algebras]].
>
> *Proof*. Since $\cb_X = \cm(\topo_X)$ and $\cb_Y = \cm(\topo_Y)$,
> $
> f^{-1}(U) \in \topo_X \subseteq \cb_X \quad \forall U \in \topo_Y
> $
> implies that $f^{-1}(U)$ is measurable.
> [!definition]
>
> Let $(X, \cm)$ be a measurable space, $f: X \to \mathbb{C}$ or $f: X \to \real$ is $\cm$-measurable if it is $(\cm, \cb_\real)$ or $(\cm, \cb_\mathbb{C})$ measurable.
> [!theorem]
>
> Let $(X, \cm)$ be a [[Measure Space|measurable space]] and $f: X \to \real$ be a function, then the following are equivalent:
> - $f$ is $\cm$-measurable.
> - $f^{-1}((a,\infty)) \in \cm \forall a \in \real$
> - $f^{-1}([a,\infty)) \in \cm \forall a \in \real$
> - $f^{-1}((-\infty, a)) \in \cm \forall a \in \real$
> - $f^{-1}((-\infty,a]) \in \cm \forall a \in \real$
>
> *Proof*. $\cb_\real$ is generated by the above families of sets, and the above sets can be generated by open intervals.
> [!theorem]
>
> Let $(X, \cm)$ be a measurable space. A [[Complex Numbers|complex]]-valued function $f: X \to \complex$ is $\cm$-measurable if and only if $\re f$ and $\im f$ are $\cm$-measurable.
>
> *Proof*. $\cb_\complex = \cb_{\real^2} = \cb_\real \otimes \cb_\real$, because standard metric topology and finite product of separable spaces.
> [!theorem]
>
> $
> X \xrightarrow{F} \complex \times \complex \xrightarrow{\phi|\psi} \complex
> $
> Let $f, g: X \to \complex$ be $\cm$-measurable functions, then $f + g$ and $fg$ are also $\cm$-measurable.
>
> *Proof*. Let $\phi: \complex \times \complex \to \complex$, $(x, y) \mapsto x + y$. Then
> $
> \begin{align*}
> &\forall \varepsilon > 0, \exists \delta = \varepsilon/2: \\
> &d((x_1, y_1), (x_2, y_2)) < \delta \\
> &\Rightarrow d(x_1, x_2) < \delta, d(y_1, y_2) < \delta \\
> &\Rightarrow d((x_1 + y_1), (x_2 + y_2)) < 2\delta = \varepsilon
> \end{align*}
> $
> Let $\psi: \complex \times \complex \to \complex$, $(x, y) \mapsto x + y$, then fixing $x$ yields
> $
> \forall \varepsilon > 0, \exists \delta < \frac{\varepsilon}{3(\abs{x} + 1)}: d(y_1, y_2) < \delta \Rightarrow d(xy_1, xy_2) < \varepsilon
> $
> same for fixing $y$, take the minimum and it works. Since $\phi$ and $\psi$ are [[Continuity|continuous]], they are $(\cb_{\complex \times \complex}, \cb_\complex)$-measurable.
>
> Now, take $F: X \to \complex \times \complex$, $x \mapsto (f(x), g(x))$. Since $\pi_1 \circ F = f(x)$ and $\pi_2 \circ F = g(x)$, $F$ is $(\cm, \cb_{\complex \times \complex})$-measurable. Composing the measurable functions $\phi \circ F = f + g$ and $\psi \circ F = fg$ yields measurable functions.
> [!theorem]
>
> Let $\seq{f_i}$ be a [[Sequence|sequence]] of $\ol\real$-valued measurable functions on $(X, \cm)$. Then the [[Pointwise Convergence|pointwise]] [[Supremum and Infimum|supremum and infimum]]
> $
> s(x) = \sup_{j \in \nat}f_j(x) \quad l_s(x) = \limsup_{j \to \infty}f_j(x)
> $
> and the pointwise [[Limit Superior and Inferior|limit superior and inferior]]
> $
> i(x) = \inf_{j \in \nat}f_j(x) \quad l_i(x) = \liminf_{j \to \infty}f_j(x)
> $
> are also measurable. If $\exists \limv{j}f_j(x) \forall x \in X$, then $\limv{j}f_j$ is also measurable.
>
> *Proof*.
>
> ![[measurable_sup.png|400]]
>
> Let $x \in s^{-1}((a, \infty])$, then $s(x) > a$. Let $\varepsilon = s(x) - a$, then
> $
> \exists j \in \nat: f_j(x) > s(x) - (s(x) - a) = a
> $
> and $s(x) \in f_j^{-1}((a, \infty]) \subseteq \bigcup_{j \in \nat}f_j^{-1}((a, \infty])$.
>
> Let $x \in f_j^{-1}((a, \infty])$, then since $s(x) \ge f_j(x)$, $s(x) \in (a, \infty]$ as well, and $x \in s^{-1}((a, \infty])$. Therefore
> $
> s^{-1}((a, \infty]) = \bigcup_{j \in \nat}f^{-1}_j((a, \infty]) \in \cm
> $
> and $s$ is measurable.
>
> Similarly, $x \in i^{-1}([-\infty, a))$, then $i(x) < a$ and
> $
> \exists j \in \nat: f_j(x) \in [i(x), a), f_j(x) < a
> $
> which gives $i(x) \in f^{-1}_j([-\infty, a)) \subseteq \bigcup_{j \in \nat}f_j^{-1}([-\infty, a))$. For any $x \in f^{-1}_j([-\infty, a))$, $i(x) \le f_j(x) \Rightarrow i(x) \in [-\infty, a)$ and $x \in i^{-1}([-\infty, a))$. Therefore
> $
> i^{-1}([-\infty, a)) = \bigcup_{j \in \nat}f_j^{-1}([-\infty, a)) \in \cm
> $
> and $i$ is measurable.
>
> Since
> $
> l_s(x) = \limsup_{j \to \infty}f_j(x) = \lim_{j \to \infty} \sup_{k \ge j}f_k(x)
> $
> and $\sup_{k \ge j}f_k(x) \downto \limsup_{j \to \infty}f_j(x)$, meaning that $\limsup_{j \to \infty}f_j(x) = \inf_{j \in \nat}\sup_{k \ge j}f_k(x)$. As each $\sup_{k \ge j}f_k$ is measurable, $l_s = \limsup_{j \to \infty}f_j$ is also measurable.
>
> Similarly,
> $
> \liminf_{j \to \infty}f_j = \lim_{j \to \infty}\inf_{k \ge j}f_j
> $
> and $\inf_{k \ge j} \upto \liminf_{j \to \infty}f_j(x)$, meaning that $\liminf_{j \to \infty}f_j(x) = \sup_{j \in \nat}\inf_{k \ge j}f_j(x)$. As each $\inf_{k \ge j}f_k$ is measurable, $l_i = \liminf_{j \to \infty}f_j$ is also measurable.
>
> Suppose that $\exists \limv{j}f_j(x) \forall x$, then
> $
> \limv{j}f_j(x) = \limsup_{j \to \infty}f_j(x) = \liminf_{j \to \infty}f_j(x)
> $
> is also measurable.
> [!theorem]
>
> Let $(X, \cm)$ be a measurable space and let $f, g: X \to \ol\real$ be $\cm$-measurable functions. Then $\max(f, g)$ and $\min(f, g)$ are also measurable.
>
> *Proof*. Take $f_1 = f$ and $f_j = g \forall j > 1$, then
> $
> \max(f, g) = \sup_{j \in \nat}f_j \quad \min(f, g) = \inf_{j \in \nat}f_j
> $
> are both measurable.
> [!theorem]
>
> Let $(X, \cm)$ be a measurable space and let $f_j: X \to \complex$ be $\cm$-measurable functions. If $\exists \limv{j}f_j(x) \forall x \in X$, then $f$ is measurable.
>
> *Proof*.
> $
> \begin{align*}
> f_j \text{ measurable} &\Rightarrow \re{f_j}, \im{f_j} \text{ measurable} \\
> &\Rightarrow \limv{j}\re{f_j}, \limv{j}\im{f_j} \text{ measurable} \\
> &\Rightarrow \re{\limv{j}f_j}, \im{\limv{j}f_j} \text{ measurable} \\
> &\Rightarrow \limv{j}f_j \text{ measurable}
> \end{align*}
> $
> [!theorem]
>
> Let $(X, \cm)$ be a measurable space and $f: X \to \complex$, then the **polar decomposition** of $f$ is
> $
> f = \sgn f \cdot |f|
> $
> where
> $
> \sgn(z) = \begin{cases}
> \frac{z}{|z|} &z \ne 0 \\
> 0 &z = 0
> \end{cases}
> $
> then $\sgn(f)$ is [[Borel Measurable Function|Borel measurable]] if $f$ is $\cm$-measurable.
>
> *Proof*. Since $z/|z|$ is a composition of [[Continuity|continuous]] functions, it is measurable in its domain $\complex \setminus \bracs{0}$. Let $U$ be an [[Open Set|open set]] where $0 \not\in U$, then $\sgn^{-1}(U)$ is also open and therefore is a Borel set. Let $U$ be an open set where $0 \in U$, then $U \setminus \bracs{0}$ is still open as
> $
> \forall x \in U, \exists \varepsilon > 0: B(x, \varepsilon) \subseteq U
> $
> and
> $
> \forall x \in U \setminus \bracs{0}, \exists \delta = \min(\varepsilon, d(x, 0)): B(x, \delta) \subseteq U \setminus \bracs{0}
> $
> meaning that
> $
> \sgn^{-1}(U) = \sgn^{-1}(U \setminus \bracs{0}) \cup \sgn^{-1}(\bracs{0})
> $
> where $\sgn^{-1}(U \setminus \bracs{0})$ is an open set and $\sgn^{-1}(\bracs{0}) = \bracs{0}$, both Borel sets. Therefore $\sgn^{-1}(U) \in \cb_{\complex}$.
>
> [!theorem]- Complete measures are nice
>
> ![[complete-measurable.png|500]]
>
> Let $(X, \cm, \mu)$ be a [[Measure Space|measure space]]. Then the following are true if and only if $\mu$ is [[Complete Measure|complete]]:
> - Let $f: X \to \complex$ be a $\cm$-measurable function, and $g: X \to \complex$. If $f = g$ $\mu$-[[Almost Everywhere|a.e.]], then $g$ is also $\cm$-measurable.
> - Let $\seq{f_j}$ be a sequence of measurable functions such that $\limv{j}f_j = f$ [[Pointwise Convergence|pointwise]] $\mu$-a.e., then $f$ is also measurable.
>
> *Proof*. Let $f: X \to \complex$ be a $\cm$-measurable function, and $g: X \to \complex$ such that $f = g$ $\mu$-almost everywhere. Let $N \supseteq \bracs{x \in X: f(x) \ne g(x)}$ where $\mu(N) = 0$. Take $E \in \cb_\complex$, then
> $
> \begin{align*}
> g^{-1}(E) &= \bracs{x \in X: g(x) \in E} \\
> &= \bracs{x \in X \setminus N: g(x) \in E} \cup \bracs{x \in N: g(x) \in E} \\
> &= \braks{(X \setminus N) \cap f^{-1}(E)} \cup \bracs{x \in N: g(x) \in E} \\
> &= \pb{(f^{-1}(E) \setminus N)} \cup \po{\bracs{x \in N: g(x) \in E}}
> \end{align*}
> $
> where $\pb{f^{-1}(E) \setminus N} \in \cm$ is measurable and $\po{\po{\bracs{x \in N: g(x) \in E}}}$ is small. If $\mu$ is complete, then $\po{\po{\bracs{x \in N: g(x) \in E}}} \in \cm$ and $g^{-1}(E) \in \cm$, $g$ is measurable.
>
> Now suppose that $g$ is measurable whenever $f$ is measurable and $f = g$ $\mu$-almost everywhere. Take $f(x) = 0$, then $f^{-1}(E) = \emptyset$ or $X$ for any $E \in \cb_\complex$ and $f$ is measurable.
>
> Let $N \in \cm: \mu(N) = 0$ and $\po{F} \subseteq N$ be any subset. Let $g(x) = 0$ when $x \not\in F$ and $g(x) = 1$ when $x \in F$. Then $g^{-1}(\bracs{1}) = \po{F}$. If $g$ is $\cm$-measurable, then $\po{F} \in \cm$ and $\mu$ includes all such small sets in its domain. Therefore $\mu$ is complete.
>
> Let $\seq{f_j}$ be a sequence of $\cm$-measurable functions such that $\limv{j}f_j = f$ $\mu$-almost everywhere. Let
> $
> N \in \cm: N \supseteq \bracs{x \in X: \limv{j}f_j(x) \ne f(x)}, \mu(N) = 0
> $
> and take $M = X \setminus N$, then for any $E \in \cb_\complex$,
> $
> f_j|_{M}^{-1}(E) = f_j^{-1}(E) \cap M \in \cm_M
> $
> so each $f_j|_M$ is $\cm_M$-measurable. Since $f|_M = \limv{j}f_j|_M$, $F = \limv{j}f_j|_M$ exists and is also $\cm_M$-measurable. Take $E \in \cb_\complex$, then
> $
> \begin{align*}
> f^{-1}(E) &= \bracs{x \in X: f(x) \in E} \\
> &= \bracs{x \in M: f(x) \in E} \cup \po{\bracs{x \in N: f(x) \in E}} \\
> &= \pb{F^{-1}(E)} \cup \po{\bracs{x \in N: f(x) \in E}}
> \end{align*}
> $
> where $\pb{F^{-1}(E)} \in \cm$ and $\po{\bracs{x \in N: f(x) \in E}} \subseteq N$. When $\mu$ is complete, $\po{\bracs{x \in N: f(x) \in E}} \in \cm$ and $f^{-1}(E) \in \cm$. Therefore $f$ is also measurable.
>
> Now suppose that whenever a sequence of $\cm$-measurable $\seq{f_j}$ converges to $f$ $\mu$-almost everywhere, $f$ is also $\cm$-measurable. Let $N \in \cm: \mu(N) = 0$ and $\po{F} \subseteq N$. Take $f_j: X \to \complex$ with $f_j(x) = 0 \forall x \in X, j \in \nat$, and $f: X \to \complex$ where $f(x) = 0 \forall x \not\in F$ and $f(x) = 1 \forall x \in F$. Then
> $
> \limv{j}f_j(x) = f(x) \quad \forall x \not\in N
> $
> and $f^{-1}(\bracs{1}) = F \in \cm$. Since any null set is in $\cm$, $\mu$ is a complete measure.
> [!theorem]- Completion does not really matter
>
> Let $(X, \cm, \mu)$ be a measure space and let $(X, \ol\cm, \ol\mu)$ be its [[Complete Measure|completion]]. If $f$ is an $\ol\cm$-measurable function on $X$, then there is an $\cm$-measurable function $g$ such that $f = g$ is $\ol\mu$-almost everywhere.
>
> *Proof*. For any $\ol\cm$-measurable [[Indicator Function|indicator function]] $\chi_A$, $A \in \ol\cm$, we can decompose $A = \pb{E} \cup \po{F}$ where $\pb{E} \in \cm$ and $\po{F} \subseteq \po{N} \in \cm$, $\mu(\po{N}) = 0$. Then $\chi_\pb{E}$ is $\cm$-measurable, and $\chi_\pb{E} = \chi_A$ $\mu$-almost everywhere.
>
> For any $\ol\cm$-measurable [[Simple Function|simple function]] $\phi = \sum_{i = 1}^{n}a_i \chi_{A_i}$, we can decompose each $A_i = \pb{E_i} \cup \po{F_i}$ where $\pb{E_i} \in \cm$ and $\po{F_i} \subseteq \po{N_i} \in \cm$, $\mu(\po{N_i}) = 0$. Take $\po{N} = \bigcup_{i = 1}^{n}\po{N_i}$, then $\mu(\po{N}) = \sum_{i = 1}^{n}\mu(\po{N_i}) = 0$, which allows us to trim the null sets off by setting $\pb{B_i} = \pb{E_i} \setminus \po{N}$.
> $
> \psi = \sum_{i = 1}^{n}a_i \chi_{\pb{B_i}}
> $
> Then $\psi$ is $\cm$-measurable and $\phi = \psi$ $\mu$-almost everywhere.
>
> Let $f$ be a $\ol\cm$-measurable function, then there exists a sequence $\seq{\phi_j}$ of $\ol\cm$-measurable simple functions such that $\phi_j \to f$ pointwise. Let $\psi_j$ be a $\cm$-measurable simple function such that $\psi_j = \phi_j$ except in a subset of a null set $\po{N_i}$. Then $\po{N} = \bigcup_{i \in \nat}\po{N_i}$ is also a null set, which allows us to trim all the null sets off with
> $
> g = \limv{j}\chi_{X \setminus \po{N}} \cdot \phi_j
> $
> then each $\chi_{X \setminus \po{N}} \cdot \phi_j$ is $\cm$-measurable, and $g$ is also $\cm$-measurable. Since $g$ can only disagree with $f$ in $\po{N}$, $f = g$ $\mu$-almost everywhere.