\begin{theorem}[Lebesgue-Radon-Nikodym (Localisable)]
\label{theorem:lebesgue-radon-nikodym-localisable}
    Let $(X, \cm)$ be a measurable space, $\mu, \nu: \cm \to [0, \infty]$ be positive measures, and $\cf \subset \cm$ be an ideal such that:
    \begin{enumerate}[label=(\alph*)]
        \item $(X, \cm, \mu + \nu)$ and $(X, \cm, \mu)$ are localisable. 
        \item $\cf$ is a \hyperref[scaffold]{definition:measure-scaffold} for both $\mu$ and $\nu$. 
    \end{enumerate}
    
    then there exists a unique pair of positive measures $\nu_a, \nu_s: \cm \to [0, \infty]$ such that:
    \begin{enumerate}
        \item $\nu = \nu_a + \nu_s$. 
        \item $\nu_a$ is absolutely continuous with respect to $\mu$. 
        \item $\nu_s$ is mutually singular with $\mu$. 
        \item $\cf$ is a scaffold for $\nu_a$ and $\nu_s$. 
    \end{enumerate}

    The pair $(\nu_a, \nu_s)$ is the \textbf{Lebesgue decomposition} of $\nu$ with respect to $\mu$. Moreover, there exists a unique $\frac{d\nu_a}{d\mu} \in L^+(X, \cm, \mu)$ such that for every $A \in \cm$, 
    \[
    \nu_a(A) = \int_{A} \frac{d\nu_a}{d\mu} d\mu
    \]

    If $\nu \ll \mu$, then $\nu_s = 0$ and $\nu(dx) = \frac{d\nu_a}{d\mu}\mu(dx) = \frac{d\nu_a}{d\mu}\mu(dx)$. In which case, the function $\frac{d\nu}{d\mu}$ is the \textbf{Radon-Nikodym derivative} of $\nu$ with respect to $\mu$.
\end{theorem}
\begin{proof}
    For each $A \in \cf$ and $E \in \cm$, let
    \[
    \mu^A(E) = \mu(A \cap E) \quad \nu^A(E) = \nu(A \cap E)
    \]

    then $\mu^A$ and $\nu^A$ are finite measures on $A$. By the \hyperref[finite case]{theorem:lebesgue-radon-nikodym}, there exists an a.e. unique $f_A \in L^+(A, \mu)$ and $\nu_s^A: \cm \to [0, \infty]$ such that:
    \begin{enumerate}
        \item $d\nu^A = f_A\mu^A + \nu_s^A = f_A\mu + \nu_s^A$. 
        \item $\nu_s^A$ is mutually singular with $\mu$. 
    \end{enumerate}

    The uniqueness given by the finite case implies that for any $A, B \in \cf$, $f_A|_{A \cap B} = f_B|_{A \cap B}$ $\mu$-almost everywhere. By the \hyperref[gluing lemma for measurable functions]{lemma:gluing-measurable}, there exists $f \in L^+(X, \mu)$ such that $f|_A = f_A$ $\mu$-almost everywhere for all $A \in \cf$. 

    By the \hyperref[gluing lemma for measures]{lemma:gluing-measure}, 
    \[
    \nu_s: \cm \to [0, \infty] \quad E \mapsto \sup_{A \in \cf}\nu_s^A(E \cap A)
    \]

    is a measure. 

    (4): By definition, $\cf$ is a scaffold for $\nu_s$. By \autoref{lemma:scaffolded-ac}, it is also a scaffold for $f d\mu$. 

    (1): Let $E \in \cm$, then since $\cf$ is a scaffold for $\nu$, 
    \begin{align*}
    \nu(E) &= \sup_{A \in \cf}\nu(A \cap E) = \sup_{A \in \cf}\nu^A(A \cap E) \\
    &= \sup_{A \in \cf}\braks{\int_{A \cap E}f_A d\mu + \nu_s^A(A \cap E)}
    \end{align*}

    By (S3), for any $A, B \in \cf$, $A \cup B \in \cf$, and
    \begin{align*}
        \int_{A \cap E}f_A d\mu \vee \int_{B \cap E}f_B d\mu &\le \int_{(A \cup B) \cap E}f_{A \cup B} d\mu \\
        \nu_s^A(A \cap E) \vee \nu_s^B(B \cap E) &\le \nu_s^{A \cup B}((A \cup B) \cap E)
    \end{align*}

    Thus the sum and the supremum may be interchanged, so
    \[
    \nu(E) = \sup_{A \in \cf}\int_{A \cap E}f_A d\mu + \sup_{A \in \cf}\nu_s^A(A \cap E)
    \]

    Now, since $\cf$ is a scaffold for $f\mu$, 
    \[
    \sup_{A \in \cf}\int_{A \cap E}f_A d\mu = \int_A f d\mu
    \]

    By definition of $\nu_s$, 
    \[
    \sup_{A \in \cf}\nu_s^A(A \cap E) = \nu_s(E)
    \]

    Therefore $\nu(E) = \int_E f d\mu + \nu_s(E)$, so $\nu(dx) = f(x)\mu(dx) + \nu_s(dx)$. 

    (2): $\nu_a(dx) = f(x)\mu(dx)$. 

    (3): For each $A \in \cf$, $f_A d\mu \perp \nu_s^A$, so there exists $E_A, F_A \in \cm$ such that:
    \begin{enumerate}[label=(\roman*)]
        \item $A = E_A \sqcup F_A$. 
        \item $\mu(F_A) = 0$ and $\nu_s^A(E_A) = 0$. 
    \end{enumerate}

    Let $F$ be an essential supremum of $\bracs{F_A}_{A \in \cf}$ with respect to $(\mu + \nu)$. By \autoref{lemma:gluing-measurable-sets}, for each $A \in \cf$,
    \[
    \mu(F \cap A) = \mu(F \cap E_A) \le (\mu + \nu)(F \cap E_A) = 0
    \]

    Since $\cf$ is a scaffold for $\mu$, $\mu(F) = 0$. On the other hand, for each $A \in \cf$, 
    \begin{align*}
    \nu_s(A \setminus F) &= \nu_s(E_A \setminus F) + \nu_s(F_A \setminus F) \\
    &\le \nu_s(E_A) + (\mu + \nu)(F_A \setminus F) = 0
    \end{align*}

    By definition of $\nu_s$, $\nu(F^c) = 0$. Therefore $\mu \perp \nu_s$. 

    (Uniqueness): By uniqueness of the finite case, the restriction of $(\nu_a, \nu_s)$ to each set in $\cf$ is unique. Since $\cf$ is a scaffold for both measures, they are uniquely determined by their restrictions to each set in $\cf$.  
    
\end{proof}
