% =================================================================
%  Lecture 6
%  Primary source: handwritten notes (Mathpix mmd, lecs5-13 lines 63-97)
%  Fallback: kashlak.pdf §2.3 (only for OCR/notation/curriculum clarity)
% =================================================================
\section[Lecture 6 -- Integration and Convergence Theorems]{Lecture 6 \textemdash{} Integration and Convergence Theorems}
\label{sec:lec06}

Lecture~5 introduced simple functions and defined their integral
\(\int s\,d\mu=\sum_i x_i\mu(B_i)\). We now extend the integral to
arbitrary measurable \(f\colon\Omega\to[-\infty,\infty]\) by approximation
from below by simple functions, then state the three convergence
theorems\,---\,Monotone Convergence, Fatou's Lemma, Dominated
Convergence\,---\,that justify exchanging limits and integrals.

\subsection{Lebesgue integration for measurable functions}

We work on a measure space \((\Omega,\Fcal,\mu)\) and consider
measurable functions taking values in the \emph{extended real line}
\([-\infty,\infty]\). Allowing \(\pm\infty\) is convenient because then
sets like \(f^{-1}(\infty)\) are well defined and limits of measurable
functions stay measurable.

\begin{definition}{Increasing convergence \texorpdfstring{$f_i\uparrow f$}{f\_i up f}}{up-arrow}
For a sequence of measurable functions \(f_i\colon\Omega\to[-\infty,\infty]\)
and a measurable \(f\), we write \(f_i\uparrow f\) to mean
\[
f_i(\omega)\le f_{i+1}(\omega)\quad\text{for all }\omega\in\Omega,
\qquad\text{and}\qquad
f_i(\omega)\;\longrightarrow\; f(\omega)\quad\text{as }i\to\infty.
\]
The decreasing analogue \(f_i\downarrow f\) is defined symmetrically.
\end{definition}

The next result is the workhorse of the construction: every measurable
function is a monotone limit of simple ones, and the dyadic recipe
\(f_i=2^{-i}\lfloor 2^i f\rfloor\) is concrete enough to use in proofs.

\begin{theorem}{Approximation by simple functions}{simple-approx}
Let \((\Omega,\Fcal)\) be a measurable space and let \(\Acal\) be a
\(\pi\)-system generating \(\Fcal\). Suppose \(\Vcal\) is a linear space
of measurable functions such that
\begin{enumerate}
\item \(\indic_\Omega\in\Vcal\) and \(\indic_A\in\Vcal\) for every \(A\in\Acal\);
\item whenever \(f_i\in\Vcal\) and \(f_i\uparrow f\), one has \(f\in\Vcal\).
\end{enumerate}
Then \(\Vcal\) contains every measurable function. In particular, for
any non-negative measurable \(f\), the simple functions
\[
f_i \;=\; 2^{-i}\bigl\lfloor 2^{i} f\bigr\rfloor
\]
satisfy \(f_i\uparrow f\); a general measurable \(f\) is then handled
via the decomposition \(f=f^+-f^-\) below.
\end{theorem}

\begin{figure}[h]
\centering
\begin{tikzpicture}[scale=1.0,>=Stealth]
  % axes
  \draw[->] (0,0) -- (5.6,0) node[right] {\small \(\omega\)};
  \draw[->] (0,0) -- (0,3.4) node[above] {\small \(f\)};
  % smooth target curve f
  \draw[thick, deepnavy, domain=0:5.2, samples=80]
    plot (\x,{0.55 + 0.45*\x + 0.18*sin(\x*120)});
  \node[deepnavy, right] at (5.2,{0.55 + 0.45*5.2 + 0.18*sin(5.2*120)}) {\small \(f\)};
  % dyadic step approximation f_i = 2^{-i} floor(2^i f), i=2 (step = 1/4)
  \def\step{0.25}
  \foreach \x in {0.0, 0.4, 0.8, 1.2, 1.6, 2.0, 2.4, 2.8, 3.2, 3.6, 4.0, 4.4, 4.8} {
    \pgfmathsetmacro{\yval}{0.55 + 0.45*\x + 0.18*sin(\x*120)}
    \pgfmathsetmacro{\ystep}{\step*floor(\yval/\step)}
    \draw[thick, exampleblue] (\x,\ystep) -- ({\x+0.4},\ystep);
  }
  \node[exampleblue, below right] at (4.6,0.6) {\small \(f_i=2^{-i}\lfloor 2^i f\rfloor\)};
\end{tikzpicture}
\caption{Dyadic simple approximation: rounding \(f\) down to the nearest
multiple of \(2^{-i}\) gives a simple function \(f_i\le f\) with
\(f_i\uparrow f\) pointwise.}
\label{fig:dyadic-approx}
\end{figure}

\begin{definition}{Positive and negative parts}{pos-neg-parts}
For a measurable \(f\colon\Omega\to[-\infty,\infty]\), define
\[
f^+(\omega) \;=\;
\begin{cases} f(\omega) & \text{if } f(\omega)\ge 0,\\ 0 & \text{otherwise,}\end{cases}
\qquad
f^-(\omega) \;=\;
\begin{cases} -f(\omega) & \text{if } f(\omega)\le 0,\\ 0 & \text{otherwise.}\end{cases}
\]
Both \(f^+\) and \(f^-\) are non-negative and measurable, and
\(f=f^+-f^-\), \(\,|f|=f^++f^-\).
\end{definition}

\begin{definition}{Integral of a measurable function}{integral}
Let \((\Omega,\Fcal,\mu)\) be a measure space.

\noindent\emph{Non-negative case.} For a measurable \(f\colon\Omega\to[0,\infty]\),
\[
\int f\,d\mu
   \;=\; \sup\!\left\{\int s\,d\mu \;:\; s\text{ simple},\; 0\le s\le f\right\}
   \;=\; \sup_{\text{partitions }\{A_i\}\text{ of }\Omega}
        \sum_i\Bigl\{\inf_{\omega\in A_i}f(\omega)\Bigr\}\mu(A_i).
\]

\noindent\emph{General case.} For measurable \(f\colon\Omega\to[-\infty,\infty]\),
\[
\int f\,d\mu \;=\; \int f^+\,d\mu \;-\; \int f^-\,d\mu,
\]
provided not both terms are \(\infty\). When both \(\int f^+d\mu\) and
\(\int f^-d\mu\) are finite we say \(f\) is \emph{integrable}; the
conventions \(0\cdot\infty=0\) and \(c\cdot\infty=\infty\) (\(c>0\))
keep the formula meaningful when \(f\) is supported on a set of infinite
measure.
\end{definition}

\subsection{The three convergence theorems}

The defining feature of the Lebesgue integral is that it interacts
cleanly with limits. The next three theorems\,---\,each a statement
about exchanging \(\lim\) and \(\int\)\,---\,are essentially the reason
the construction is worth the trouble.

\begin{theorem}{Monotone convergence}{mct}
Let \((\Omega,\Fcal,\mu)\) be a measure space and let
\(\{f_i\}_{i=1}^\infty\) be measurable functions with \(f_i\uparrow f\)
almost everywhere and \(\int f_1\,d\mu>-\infty\). Then
\[
\int f_i\,d\mu \;\uparrow\; \int f\,d\mu.
\]
\end{theorem}

\begin{remark}
The non-negativity hypothesis \(f_i\ge 0\) commonly attached to the MCT
is not needed once \(\int f_1\,d\mu>-\infty\): writing
\(h_i=f_i-f_1\ge 0\) reduces the general case to the non-negative one.
Convergence \(f_i\uparrow f\) only needs to hold \(\mu\)-almost
everywhere (the bad set has measure zero and contributes nothing).
\end{remark}

\begin{theorem}{Fatou's lemma}{fatou}
Let \((\Omega,\Fcal,\mu)\) be a measure space and let
\(\{f_i\}_{i=1}^\infty\) be non-negative measurable functions
\(\Omega\to\R\). Then
\[
\int \liminf_{i\to\infty} f_i\,d\mu
   \;\le\; \liminf_{i\to\infty}\int f_i\,d\mu.
\]
\end{theorem}

\begin{remark}
Setting \(g_j=\inf_{i\ge j}f_i\) gives \(g_j\uparrow\liminf_i f_i\)
with \(g_j\le f_i\) for \(i\ge j\); MCT applied to \((g_j)\) and
monotonicity of the integral combine to give the inequality. The
inequality is genuinely one-sided\,---\,the moving-bump example
\(f_i=\indic_{[i,i+1]}\) on \((\R,\Bcal,\lambda)\) has \(\liminf f_i=0\)
yet \(\int f_i\,d\mu=1\) for every \(i\).
\end{remark}

\begin{theorem}{Dominated convergence}{dct}
Let \((\Omega,\Fcal,\mu)\) be a measure space, \(g\) a non-negative
integrable function, and \(\{f_i\}_{i=1}^\infty\) measurable with
\[
|f_i(\omega)|\;\le\; g(\omega)\quad\text{for all }i\text{ and all }\omega\in\Omega,
\qquad
f_i(\omega)\;\longrightarrow\; f(\omega)\quad\text{for each }\omega\in\Omega.
\]
Then \(f\) is integrable and
\[
\int f_i\,d\mu \;\longrightarrow\; \int f\,d\mu.
\]
\end{theorem}

\begin{remark}
The proof sandwiches \(f_i\) between the monotone envelopes
\(f_i^{\wedge}=\inf_{j\ge i}f_j\uparrow f\) and
\(f_i^{\vee}=\sup_{j\ge i}f_j\downarrow f\); MCT applied to
\(f_i^{\wedge}+g\) (increasing) and to \(g-f_i^{\vee}\) (also
increasing) gives
\[
\int f_i^{\wedge}\,d\mu \;\le\; \int f_i\,d\mu \;\le\; \int f_i^{\vee}\,d\mu,
\]
and both outer integrals converge to \(\int f\,d\mu\).
\end{remark}

\begin{remark}
The three theorems form a hierarchy: MCT is the foundation, Fatou is
its immediate corollary via monotone envelopes from below, and DCT
follows from Fatou applied to \(g\pm f_i\). Each weakens the
hypotheses of its predecessor (monotonicity \(\to\) non-negativity
\(\to\) integrable domination) at the cost of requiring more setup.
\end{remark}
