Theorem 9.6.5 (Hahn-Banach, Second Geometric Form [Theorem 1.7, Bre10]). 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}$.

Proof. Let $C = A - B$, then $C$ is closed by Proposition 8.1.8 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 Theorem 9.6.4, 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}\]
$\square$