\chapter{Measurable functions}


Now that we understand measure spaces, we would like to explore functions that map measurable sets to measurable sets. More presicely, functions where measurable sets in the image measurable space map to measurable sets in the domain measurable space; this allows data from a measurable space to be considered in a 'similar' measurable spaces.


\begin{definition}[Measurable function]
Let $(X,\Sigma_X), (Y,\Sigma_Y)$ be measurable spaces.
A \emph{measurable function} is a function $f : X \to Y$ such that for any $E in \Sigma_Y$, $f^{-1}(E) \in \Sigma_X$.
\end{definition}

Note that this is analogous to continuous functions in topology; continuous functions maps open sets of the image topology to open sets of the domain topology. Measurable functions map measurable sets of the image measurable space to measurable sets of the domain measurable space. 









\subsection{Borel functions}




One step in Lebesgue integration is partitioning the range into open intervals (which are Borel sets of the Euclidean topology) and use the preimage of the function to determine what subset of the domain is mapped to each interval. Lebesgue integration will require these domain subsets to be measurable to calculate our integral, so our Lebesgue integral will naturally only work on measurable functions.

That said, I've hinted that the Lebesgue integral will only partition its range by means of intervals (which are open sets, assuming we're talking about open intervals for now), which means that we can restrict our attention to what are called \emph{Borel functions} for simplicity. Sure, the Lebesgue integral looses a tiny bit of power by doing this, but the functions that suffer from this downsizing are so pathological that we kind of don't care.


\begin{definition}[Borel function]
Let $(X, \mathcal{T}_X), (Y, \mathcal{T}_Y)$ be topological spaces. A \emph{Borel function} is a measurable function $f : (X,\mathcal{B}(X, \mathcal{T}_X) \to (Y,\mathcal{B}(X, \mathcal{T}_X))$.
\end{definition}

In other words, Borel functions map Borel sets of the image map to measurable sets of the domain, however as it turns out, just mapping open sets to measurable sets is sufficient to obtain a Borel function!

Since open sets of a topology are measurable sets of that topology's Borel $\sigma$-algebra, and we have $f^{-1}(\bigcup_{i \in I} E_i) = \bigcup_{i \in I} f^{-1}(E_i)$ and $f^{-1}(\bigcap_{i \in I} E_i) = \bigcap_{i \in I} f^{-1}(E_i)$, the following can be proven. 

\begin{proposition}[Equivalent formulation of Borel function]
	Let $(X, \mathcal{T}_X), (Y, \mathcal{T}_Y)$ be space and Borel space respectively.
$f : X \to Y$ is a Borel function iff for any open set $U$ of $(Y,\mathcal{T}_Y)$, $f^{-1}(U)$ is $(X,\Sigma)$-measurable.
\end{proposition}

This is a much nicer definition since it depicts Borel functions as a direct connection from measurable spaces to topological spaces. Borel functions of the form $f : (X, \Sigma ,\lambda) \to (\mathbb{R},\mathcal{B}(\mathcal{T}_{\mathbb{R}}))$ where $X \subseteq \mathbb{R}$, $\lambda$ is the Lebesgue measure, and $\mathcal{T}_{\mathbb{R}}$ is the Euclidean topology, are \emph{Lebesgue measurable functions}.



\begin{definition}[Lebesgue measurable function]
A \emph{Lebesgue measurable function} is a measurable function $f : (\mathbb{R},\mathcal{L}) \to (\mathbb{R},\mathcal{B}(\mathbb{R},\mathcal{T}_{\mathbb{R}}))$
\end{definition}


\begin{proposition}[Equivalent definition of a Lebesgue measurable function]
	A \emph{Lebesgue measurable function} is a function $f : X \to (\mathbb{R},\mathcal{B}(\mathbb{R},\mathcal{T}_{\mathbb{R}}))$ such that for any set $U$ open in the Euclidean topology of $\mathbb{R}$, $f^{-1}(U)$ is Lebesgue measurable.

\end{proposition}


Lebesgue measurable functions are defined on Euclidean topology of $\mathbb{R}$ and the Lebesgue measure, both of which being very rich structures. Because of this, we can find even more convenient equivalent definitions for Lebesgue measurable functions that will further simplify the way we can think of Lebesgue integration down the track.


Since the open sets of the Euclidean topology on $\mathbb{R}$ are formed by countable unions of open intervals, the fact that $f^{-1}(\bigcup_{i \in I} E_i) = \bigcup_{i \in I} f^{-1}(E_i)$ means that just mapping open intervals to measurable sets will suffice. Furthermore, any open interval can be represented by countably infinite intersections of the respectively open and closed intervals of the form $(y,\infty)$ and $(-\infty,y]$, and since closed intervals are also Borel sets, one may prove the following.

\begin{proposition}[Equivalent definition of Lebesgue measurable function]
A \emph{Lebesgue measurable function} is a function $f : X \subseteq \mathbb{R} \to \mathbb{R} \cup \{ -\infty, \infty\}$ such that $f^{-1}((y,\infty))$ is Lebesgue measurable for any $y \in \mathbb{R}$.
\end{proposition}

This is the most common (and perhaps insightful) definition of a Lebesgue measurable function.




%This means that Borel functions are defined such that the preimage of any Borel set is a measurable set. Recall that all open sets are Borel sets, so with Borel functions, preimages of open sets are measurable sets.

%Though the converse doesn't hold (Borel sets aren't necessarily open sets), since $f^{-1}(A) \cup f^{-1}(B) = f^{-1}(A \cup B)$ and $f^{-1}(A) \cap f^{-1}(B) = f^{-1}(A \cap B)$ for countable unions and intersections respectively, and Borel sets are indeed countable unions and intersections of open sets, letting open sets map from measurable sets is enough to create an equivalent definition!

%\begin{proposition}
%	Let $(X, \Sigma), (Y, \mathcal{B}(\mathcal{T}_Y))$ be a measurable space and Borel space respectively.
%$f : X \to Y$ is a Borel function iff for any $U$ open in $(Y,\mathcal{T}_Y)$, $f^{-1}(U)$ is measurable.
%\end{proposition}


The Lebesgue integral will consider functions with a codomain of $\mathbb{R}$, so we'll now prove the following proposition that will give us some good intuition for when we study Lebesgue integration.


\begin{proposition}
Let $(X, \Sigma), (\mathbb{R}, \mathcal{B}(\mathcal{T}_{\mathbb{R}}))$ be a measurable space and Borel space on the Euclidean topology of $\mathbb{R}$ respectively.
$f : X \to \mathbb{R}$ is a Borel function iff for any $a \in \mathbb{R}$, $f^{-1}((-\infty,a))$ is measurable.
\end{proposition}


However as it turns out, we don't even require the intervals to be strictly open. Borel spaces contain not only all open sets, but also closed sets and therefore any type of interval! Alternatively, using countable unions and intersections on open sets as a Borel $\sigma$-algebra permits, we can indeed create any type of interval.


\begin{proposition}
Let $(X, \Sigma), (\mathbb{R}, \mathcal{B}(\mathcal{T}_{\mathbb{R}}))$ be a measurable space and Borel space on the Euclidean topology of $\mathbb{R}$ respectively.
$f : X \to \mathbb{R}$ is a Borel function iff for any $a \in \mathbb{R}$, $f^{-1}((-\infty,a))$ is measurable.
\end{proposition}

So in the end, it doesn't even matter if we're using closed, open, or even semi-closed and semi-open intervals; any of these will do!


\subsection{Constructing Borel functions}


When we finish constructing our Lebesgue integral, we'd like to know what class of functions it can work its magic on; I've spoiled that one condition it will require is that the function be Borel. However we currently haven't seen concrete examples of Borel functions; we hope that this class of functions is rich so that our Lebesgue integral isn't a downgrade from the Riemann integral.

Besides, with an intuitive notion of what this new class of function looks like, we could form work arounds. We'll start by examining characteristic functions and simple functions (these will be building blocks in the study of Lebesue integration).

Note that the codomain is taken as the Euclidean topology with its Borel $\sigma$-algebra.
\begin{proposition}
Let $(X,\Sigma)$ be a measurable space.
$\chi_{E} : X \to \{0,1\}$ is a Borel function iff $E$ is measurable.
\end{proposition}


\begin{proposition}
Real continuous functions are Borel functions
\end{proposition}


The property of being measurable is closed under many arithmetic operations.
\begin{proposition}
f+g is measurable
f-g is measurable
fg is measurable
cf is measurable
|f| is measurable
min(f,g) is measurable
max(f,g) is measurable
\end{proposition}

continuous functions are Borel functions 


\section{Sequences of measurable functions}
pointwise convergent sequence of measurable function converges to measurable function


\[ \sup \{ f_1 , \hdots , f_n \} \]
\[ \inf \{ f_1 , \hdots , f_n \} \]
\[ \sup_{n} ( f_n ) \]
\[ \inf_{n} ( f_n ) \]

\subsection{Simple functions}

\begin{proposition}
Simple functions are Borel iff all its indicator sets are made from Borel sets.
\end{proposition}

The following is a simple corollary of a more general proposition we have proven. However, it will be a necessary fact down the line.
\begin{corollary}
Convergent sequences of simple functions are Borel.
\end{corollary}




\section{Theorems on measurable functions}


Measurable functions will prove vital when studying Lebesgue integration, so it is necessary to have a working knowledge on the properties they have.

\subsection{Egorov's theorem}


Uniform convergence is especially desirable in real analysis because of it's role in swapping integrals with limits. Measure theory can be used to see just how close pointwise convergence (even pointwise convergence almost everywhere) is to uniform convergence.

We introduce a notion of convergence that is slightly weaker than uniform convergence almost everywhere.

\begin{definition}[$\mu$-Almost uniformly convergent sequence of functions]
Let $\{f_n\}$ be a sequence of functions $f_n : X \to Y$, then $\{f_n\}$ is \emph{$\mu$-almost uniformly convergent} for all $\varepsilon \in (0,\infty)$, $\{f_n\}$ converges uniformly on $X \setminus E$ where $\mu(E) <\varepsilon$
\end{definition}

This isn't uniform convergence almost everywhere, but it's pretty darn close, just slightly weaker.


\begin{theorem}[Egorov's theorem]
Let $(X,\Sigma,\mu)$ be a finite measure space and let $\{f_n\}$ be a sequence of functions $f_n : X \to Y$ that converges pointwise almost everywhere to $f$, then $\{f_n\}$ converges $\mu$-almost uniformly on $X$.
\end{theorem}


\subsection{Luzin's theorem}



\begin{definition}[$\mu$-Almost continuous functions]
Let $(X, \Sigma, \mu)$ be a measure space, a \emph{$\mu$-almost continuous function} is a function $f : X \to Y$ such that for every $\varepsilon \in (0,\infty)$, $f$ is continuous on some $X \setminus E$ where $\mu(E) < \varepsilon$.
\end{definition}

Note that this is slightly weaker than beign a continuous almost everywhere function, however it is still a very useful property.

\begin{theorem}[Luzin's theorem (Euclidean topology)]
Let $f : X \to Y$ be an almost everywhere finite Borel function and $E\subseteq X$ be a set, then for any $\varepsilon >0$, $f$ is continuous on some closed set $F$ where $\mu (E \setminus F ) < \varepsilon$.
\end{theorem}



\begin{theorem}[Luzin's theorem]
Let $(X,\Sigma,\mu)$ be a Radon measure space
Let $(Y,\mathcal{T})$ be a second-countable topological space
Let $f : X \to Y$ be an almost everywhere finite Borel function and $E\subseteq X$ be a measurable set, then $f$ continuous almost everywhere on $E$.
\end{theorem}



\section{Convergence in measure}

Regarding convergence of functions, we are familiar with pointwise convergence, uniform convergence, and now $\mu$-almost uniform convergence.

There is yet another type of convergence.


\[ \mu \mathrm{lim}_{n \to \infty} f_n = f \iff \forall \varepsilon \in (0,\infty) [ \lim_{n \to \infty} \mu (\{x \in X : |f_n (x) - f(x)| \geq \varepsilon \})  = 0 ] \]






\subsection{Cauchy in measure}


\subsection{Pushforward measure}

Given a measure space, a measurable space, and a measurable function between them, there exists a way to "push" the measure space's measure to form a measure for the measurable space too.

We use a measurable function to translate measurable sets from one space to the other, then use the measure


\begin{definition}
\[ (X_1, \Sigma_1 , \mu) \]
\[ (X_2, \Sigma_2) \]
\[ f: (X_1,\Sigma_1) \to (X_2, \Sigma_2) \text{ is a measurable function}\]
\[ \implies (X_2 ,\Sigma_2 , \mu \circ f^{-1}) \text{ is a measure space}\]
\end{definition}

It is routine to check that this $\mu \circ f^{-1}$ is indeed a measure on $(X_2 , \Sigma_2)$.

Measures constructed in this neat way of using a measurable function are called \emph{pushforward measure}
\begin{definition}[Pushforward measure]
\[ (X_1, \Sigma_1 , \mu) \]
\[ (X_2, \Sigma_2) \]
\[\mu \circ f^{-1}   \]
\end{definition}

