\section{The Hahn-Banach Theorem}
\label{section:hahn-banach}

\begin{lemma}
\label{lemma:hahn-banach}
    Let $E$ be a vector space over $\real$, $\rho: E \to \real$ be a sublinear functional, $F \subset E$ be a subspace, $\phi \in \hom(F; \real)$ with $\phi(x) \le \rho(x)$ for all $x \in F$.

    Let $x_0 \in E \setminus F$, $\lambda \in \real$, and define
    \[
    \phi_{x_0, \lambda}: F + \real x_0 \quad (y + tx_0) \mapsto \phi(y) + \lambda t
    \]

    then there exists $\lambda \in \real$ such that $\phi_{x_0, \lambda}(x) \le \rho(x)$ for all $x \in F + \real x_0$.
\end{lemma}
\begin{proof}
    Let $x, y \in F$, then
    \begin{align*}
        \phi(x) + \phi(y) = \phi(x + y) &\le \rho(x + y) \le \rho(x - x_0) + \rho(y + x_0) \\
        \phi(x) - \rho(x - x_0) &\le \rho(y + x_0) - \phi(y) \\
        \sup_{x \in F}[\phi(x) - \rho(x - x_0)] &\le \inf_{x \in F}[\rho(x + x_0) - \phi(x)]
    \end{align*}
    Let
    \[
    \lambda \in \braks{\sup_{x \in F}[\phi(x) - \rho(x - x_0)], \inf_{x \in F}[\rho(x + x_0) - \phi(x)]}
    \]

    then for any $x \in F$ and $t > 0$,
    \begin{align*}
        \phi(x + tx_0) &= \phi(x) + t\lambda = t\braks{\phi(t^{-1}x) + \lambda} \\
        &\le t\braks{\rho(t^{-1}x + x_0) - \phi(t^{-1}x) + \phi(t^{-1}x)} \\
        &= t\rho(t^{-1}x + x_0) = \rho(x + tx_0) \\
        \phi(x - tx_0) &= \phi(x) - t\lambda = t\braks{\phi(t^{-1}x) - \lambda} \\
        &\ge t\braks{\rho(t^{-1}x - x_0) + \phi(t^{-1}x) - \phi(t^{-1}x)} \\
        &= t\rho(t^{-1}x - x_0) = \rho(x - tx_0)
    \end{align*}
\end{proof}

\begin{theorem}[Hahn-Banach, Analytic Form {{\cite[Theorem 5.6, 5.7]{Folland}}}]
\label{theorem:hahn-banach}
    Let $E$ be a vector space over $K \in \RC$, $\rho: E \to \real$ be a sublinear functional, $F \subsetneq E$ be a subspace,
    \begin{enumerate}
        \item For any $\phi \in \hom(F; \real)$ with $\phi \le \rho|_F$, there exists $\Phi \in \hom(E; \real)$ such that $\Phi \le \rho$ and $\Phi|_F = \phi$.
        \item If $\rho$ is a seminorm, then for any $\phi \in \hom(F; \complex)$ with $\abs{\phi} \le \rho|_F$, there exists $\Phi \in \hom(E; \complex)$ such that $\abs{\Phi} \le \rho$ and $\Phi|_F = \phi$.
    \end{enumerate}
\end{theorem}
\begin{proof}
    (1): Let $x_0 \in E \setminus F$, then by \autoref{lemma:hahn-banach}, there exists $\lambda \in \real$ such that if
    \[
    \phi_{x_0, \lambda}: F + \real x_0 \to \real \quad (x + tx_0) \mapsto x + \lambda t
    \]

    then $\phi_{x_0, \lambda}(x) \le \rho(x)$ for all $x \in F + \real x_0$. Thus for any $F \subsetneq E$, $\phi$ admits an extension to a subspace that strictly contains $F$.

    Let
    \[
    \mathbf{F} = \bracs{\Phi \in \hom(F'; \real)|F' \supset F, \Phi|_F = \phi, \Phi \le \rho|_{F'}}
    \]

    For any $\Phi, \Phi' \in \mathbf{F}$, define $\Phi \le \Phi'$ if $\Phi'$ is an extension of $\Phi$. Let $\cf \subset \mathbf{F}$ be a chain. For any $\Phi \in \cf$, let $\cd(\Phi)$ be its domain. Since $\bigcup_{\phi \in \cf}\cd(\Phi)$ is a subspace and $\cf$ is a chain, by \autoref{lemma:glue-linear}, there exists $\Phi \in \hom\paren{\bigcup_{\Phi' \in \cf}\cd(\Phi'); \real}$ such that $\Phi|_{\cd(\Phi')} = \Phi'$ for all $\Phi' \in \cf$. Thus $\Phi \in \mathbf{F}$ is an upper bound of $\cf$.

    By Zorn's lemma, $\mathbf{F}$ admits a maximal element $\Phi$. If $\cd(\Phi) \subsetneq E$, then $\Phi$ is not maximal by the preceding discussion. Therefore $\cd(\Phi) = E$ and $\Phi$ is a desired extension.

    (2): Given that $\rho$ is a seminorm, for any $u \in \hom(E; \real)$, $u \le \rho$ if and only if $\abs{u} \le \rho$.

    Let $u = \re{\phi}$, then $u \in \hom(E; \real)$ by \autoref{proposition:polarisation-linear}. By (1), there exists $U \in \hom(E; \real)$ such that $\abs{U} \le \rho$ and $U|_F = u$. For each $x \in E$, let $\Phi(x) = U(x) - iU(ix)$, then $\Phi \in \hom(E; \complex)$ and $\Phi|_F = \phi$ by \autoref{proposition:polarisation-linear}. In addition, for any $x \in E$, if $\alpha = \overline{\sgn(\Phi(x))}$, then
    \[
    |\Phi(x)| = \alpha\Phi(x) = \Phi(\alpha x) = U(\alpha x) \le \rho(\alpha x) = \rho(x)
    \]

    so $\abs{\Phi} \le \rho$.
\end{proof}

\begin{lemma}[Separation of Point and Convex Set]
\label{lemma:hahn-banach-separation}
    Let $E$ be a TVS over $\real$, $A \subset E$ be a non-empty open convex set, and $x \in E \setminus A$, then there exists $\phi \in E^*$ and $\alpha \in \real$ such that $\dpb{x, \phi}{E} = \alpha$ and $A \subset \bracs{\phi < \alpha}$
\end{lemma}
\begin{proof}
    By translation, assume without loss of generality that $0 \in A$. In which case, $A \in \cn^o(0)$ is convex.

    Let $[\cdot]_A: E \to [0, \infty)$ be the \hyperref[gaugeg]{definition:gauge} of $A$, then $[\cdot]_A$ is a sublinear functional on $E$. For any $y, z \in E$ and $t > 0$ with $y, z \in tA$,
    \[
    \abs{[y]_A - [z]_A} \le [y - z]_A \le t
    \]

    Hence $[\cdot]_A$ is continuous on $E$.

    Let $\phi_0: \real x \to \real$ be defined by $\lambda x \mapsto \lambda$. Since $x \not\in A$, $[x]_A > 1$. Hence $\phi_0|_{Kx} \le [\cdot]_A|_{Kx}$. By the \hyperref[Hahn-Banach Theorem]{theorem:hahn-banach}, there exists $\phi \in \hom(E; \real)$ such that $\phi|_{\real x} = \phi_0$ and $\phi(y) \le [y]_A$ for all $y \in E$.

    For any $y \in A \cap (-A)$,
    \[
    \dpb{y, \phi}{E} \le [y]_A < 1 \quad -\dpb{y, \phi}{E} \le [-y]_A < 1
    \]

    so $\phi \in E^*$.

    Finally, let $y \in A$, then $\dpb{y, \phi}{E} \le [y]_A < 1 = \dpb{x, \phi}{E}$.
\end{proof}

\begin{theorem}[Hahn-Banach, First Geometric Form {{\cite[Theorem 1.6]{Brezis}}}]
\label{theorem:hahn-banach-geometric-1}
    Let $E$ be a TVS over $\real$, $A, B \subset E$ be non-empty convex sets, such that $A \cap B = \emptyset$ and $A$ is open, then there exists $\phi \in E^* \setminus \bracs{0}$ and $\alpha \in \real$ with $A \subset \bracs{\phi \le \alpha}$ and $B \subset \bracs{\phi \ge \alpha}$.
\end{theorem}
\begin{proof}
    Let $C = A - B$, then $C \subset E$ is an open convex set by \autoref{lemma:convex-gymnastics}. Since $A \cap B = \emptyset$, $0 \not\in C$.

    By \autoref{lemma:hahn-banach-separation}, there exists $\phi \in E^*$ such that $C \subset \bracs{\phi < 0}$. In which case, for any $a \in A$ and $b \in B$, $\dpb{a - b, \phi}{E} < 0$ implies that $\dpb{a, \phi}{E} < \dpb{b, \phi}{E}$. Let $\alpha \in [\sup_{a \in A}\dpb{a, \phi}{E}, \inf_{b \in B}\dpb{b, \phi}{E}]$, then $A \subset \bracs{\phi \le \alpha}$ and $B \subset \bracs{\phi \ge \alpha}$.
\end{proof}

\begin{theorem}[Hahn-Banach, Second Geometric Form {{\cite[Theorem 1.7]{Brezis}}}]
\label{theorem:hahn-banach-geometric-2}
    Let $E$ be a locally convex space over $\real$, $A, B \subset E$ be non-empty convex sets such that $A \cap B = \emptyset$, $A$ is closed, and $B$ is compact, then there exists $\phi \in E^* \setminus \bracs{0}$, $\alpha \in \real$, and $r > 0$ with $A \subset \bracs{\phi \le \alpha - r}$ and $B \subset \bracs{\phi \ge \alpha + r}$.
\end{theorem}
\begin{proof}
    Let $C = A - B$, then $C$ is closed by \autoref{proposition:tvs-set-operations} with $0 \not\in C$. Since $E$ is locally convex, there exists $U \in \cn^o(0)$ convex such that $U \cap C \ne \emptyset$.

    By \autoref{theorem:hahn-banach-geometric-1}, there exists $\phi \in E^* \setminus \bracs{0}$ and $\alpha \in \real$ such that $U \subset \bracs{f \le \alpha}$ and $C \subset \bracs{f \ge \alpha}$. In which case, for any $u \in U$, $a \in A$, and $b \in B$,
    \begin{align*}
    \dpb{u, \phi}{E} &\le \dpb{a, \phi}{E} - \dpb{b, \phi}{E} \\
    \dpb{b, \phi}{E} + \dpb{u, \phi}{E} &\le \dpb{a, \phi}{E}
    \end{align*}
    As $\phi \ne 0$ and $U \in \cn^o(0)$, $r = \sup_{u \in U}\dpb{u, \phi}{E} > 0$. Thus
    \[
    \sup_{b \in B}\dpb{b, \phi}{E} + r \le \inf_{a \in A}\dpb{a, \phi}{E}
    \]

\end{proof}


\begin{proposition}[{{\cite[Theorem 5.8]{Folland}}}]
\label{proposition:hahn-banach-utility}
    Let $E$ be a locally convex space over $K \in \RC$, then
    \begin{enumerate}
        \item For any subspace $M \subset E$, $x \in M \setminus E$, and continuous seminorm $\rho: E \to [0, \infty)$, there exists $\phi \in E^*$ such that
        \begin{enumerate}
            \item $|\phi| \le \rho$.
            \item $\dpb{x, \phi}{E} = \inf_{y \in M}\rho(x + y)$.
        \end{enumerate}
        \item For any $x \in E$ and continuous seminorm $\rho: E \to [0, \infty)$, there exists $\phi \in E^*$ with $|\phi| \le \rho$ and $\dpb{x, \phi}{E} = \rho(x)$.
        \item If $E$ is Hausdorff, then for any $x, y \in E$, there exists $\phi \in E^*$ with $\dpb{x, \phi}{E} \ne \dpb{y, \phi}{E}$.
    \end{enumerate}
\end{proposition}
\begin{proof}
    (1): Let $\rho_M: E \to [0, \infty)$ be the quotient of $\rho$ by $M$, then $\rho_M \le \rho$ is a continuous seminorm on $E$ by \autoref{definition:quotient-norm}. Let $\phi_0: Kx \to K$ be defined by $\lambda x \mapsto \lambda \rho_M(x)$. By the \hyperref[Hahn-Banach theorem]{theorem:hahn-banach}, there exists $\phi \in \hom{E; K}$ such that $\dpb{x, \phi}{E} = \rho_M(x)$ and $|\phi| \le \rho_M \le \rho$.

    (2): By (1) applied to $M = \bracs{0}$.

    (3): By (2) applied to $x - y$.
\end{proof}

\begin{proposition}
\label{proposition:seminorm-lsc}
    Let $E$ be a locally convex space and $\rho: E \to [0, \infty)$ be a continuous seminorm, then $\rho: E_w \to [0, \infty)$ is lower semicontinuous and Borel measurable. 
\end{proposition}
\begin{proof}
    Let $x \in E$, then there exists $\phi_x \in E^*$ such that $\dpn{x, \phi_x}{E} = \rho(x)$ and $|\phi_x| \le \rho$. Thus
    \[
    \rho(x) = \sup_{y \in E}\dpn{x, \phi_y}{E}
    \]

    is lower semicontinuous and Borel measurable by \autoref{proposition:semicontinuous-properties}. 
\end{proof}

