Semicontinuous functions and convexity
1 Lattices
If $(A,\le )$ is a partially ordered set and $S$ is a subset of $A$, a supremum of $S$ is an upper bound that is $\le $ any upper bound of $S$, and an infimum of $S$ is a lower bound that is $\ge $ any lower bound of $S$. Because a partial order is antisymmetric, if a supremum exists it is unique, and we denote it by $\bigvee S$, and if an infimum exists it is unique, and we denote it by $\bigwedge S$. If $(A,\le )$ is a lattice, then one proves by induction that both the supremum and the infimum exist for every finite nonempty subset of $A$. Vacuously, every element of a partially ordered set is an upper bound for $\mathrm{\varnothing}$ and a lower bound for $\mathrm{\varnothing}$. Thus, if $\mathrm{\varnothing}$ has a supremum $x$ then $x\le y$ for all $y\in A$, and if $\mathrm{\varnothing}$ has an infimum $x$ then $x\ge y$ for all $y\in A$. That is,
$$\bigvee \mathrm{\varnothing}=\bigwedge A,\bigwedge \mathrm{\varnothing}=\bigvee A.$$ 
If $X$ is a set and $R\subseteq [\mathrm{\infty},\mathrm{\infty}]$, the set ${R}^{X}$ is partially ordered where $f\le g$ if $f(x)\le g(x)$ for all $x\in X$. Moreover, ${R}^{X}$ is a lattice:
$$(f\vee g)(x)=\mathrm{max}\{f(x),g(x)\},(f\wedge g)(x)=\mathrm{min}\{f(x),g(x)\}.$$ 
2 Urysohn’s lemma
A Hausdorff topological space $(X,\tau )$ is said to be normal if for every pair of disjoint closed sets $E,F$ there are disjoint open sets $U,V$ with $E\subset U$ and $F\subset V$. Every metrizable space is a normal topological space, but there are normal topological spaces that are not metrizable. A useful fact about normal topological spaces is Urysohn’s lemma:^{1}^{1} 1 Gert K. Pedersen, Analysis Now, revised printing, p. 24, Theorem 1.5.6. For each pair of disjoint nonempty closed sets $E,F$ there is a continuous function $f:X\to [0,1]$ such that $f(E)=0$ and $f(F)=1$.
A locally compact Hausdorff space need not be normal. For example, the real numbers with the rational sequence topology is Hausdorff and locally compact but is not normal. We say that a topological space is $\sigma $compact if it is the union of countably many compact subsets. The following lemma states that if a locally compact Hausdorff space is $\sigma $compact then it is normal.^{2}^{2} 2 Gert K. Pedersen, Analysis Now, revised printing, p. 39, Proposition 1.7.8.
Lemma 1.
If a locally compact Hausdorff space is $\sigma $compact, then it is normal.
Urysohn’s metrization theorem states that if a topological space is normal and is secondcountable (its topology has a countable basis) then it is metrizable. However, a metric space need not be secondcountable: a metric space is secondcountable precisely when it is separable, and hence the converse of Urysohn’s metrization theorem is false. The following lemma shows that a secondcountable locally compact Hausdorff space is $\sigma $compact, and hence metrizable by Urysohn’s metrization theorem.
Lemma 2.
If a locally compact Hausdorff space is secondcountable, then it is $\sigma $compact.
Proof.
Let $(X,\tau )$ be a secondcountable locally compact Hausdorff space. Because it is secondcountable, there is a countable subset $\mathcal{B}$ of $\tau $ that is a basis for $\tau $. If $x\in X$, then because $X$ is locally compact there is an open set $U$ containing $x$ which is itself contained in a compact set $K$, and then there is some $V\in \mathcal{B}$ such that $x\in V\subseteq U$. The closure $\overline{V}$ of $V$ is contained in $K$ and hence $\overline{V}$ is compact. Defining ${\mathcal{B}}^{\prime}$ to be those $V\in \mathcal{B}$ such that $\overline{V}$ is compact, it follows that ${\mathcal{B}}^{\prime}$ is a basis for $\tau $. The closures of the elements of ${\mathcal{B}}^{\prime}$ are countably many compact sets whose union is equal to $X$, showing that $X$ is $\sigma $compact. ∎
3 Lower semicontinuous functions
If $(X,\tau )$ is a topological space, then $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is said to be lower semicontinuous if $t\in \mathbb{R}$ implies that ${f}^{1}(t,\mathrm{\infty}]\in \tau $. We say that $f$ is finite if $$ for all $x\in X$.
If $A\subseteq X$ and $t\in \mathbb{R}$, then
$$ 
We see that the characteristic function of a set is lower semicontinuous if and only if the set is open.
The following theorem characterizes lower semicontinuous functions in terms of nets.^{3}^{3} 3 Gert K. Pedersen, Analysis Now, revised printing, p. 26, Proposition 1.5.11.
Theorem 3.
If $\mathrm{(}X\mathrm{,}\tau \mathrm{)}$ is a topological space and $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a function, then $f$ is lower semicontinuous if and only if ${\mathrm{(}{x}_{\alpha}\mathrm{)}}_{\alpha \mathrm{\in}I}$ being a convergent net in $X$ implies that
$$f(lim{x}_{\alpha})\le lim\; inff({x}_{\alpha}).$$ 
Proof.
Suppose that $f$ is lower semicontinuous and ${x}_{\alpha}\to x$. Say $$. Because $f$ is lower semicontinuous, ${f}^{1}(t,\mathrm{\infty}]\in \tau $. As $x\in {f}^{1}(t,\mathrm{\infty}]$ and ${x}_{\alpha}\to x$, there is some ${\alpha}_{t}$ such that $\alpha \ge {\alpha}_{t}$ implies ${x}_{\alpha}\in {f}^{1}(t,\mathrm{\infty}]$. That is, if $\alpha \ge {\alpha}_{t}$ then $f({x}_{\alpha})>t$. This implies that $lim\; inff({x}_{\alpha})\ge t$. But this is true for all $$, hence $lim\; inff({x}_{\alpha})\ge f(x)$.
Suppose that ${x}_{\alpha}\to x$ implies that $f(x)\le lim\; inff({x}_{\alpha})$. Let $t\in \mathbb{R}$ and let $F={f}^{1}(\mathrm{\infty},t]$. If $x\in \overline{F}$, then there is a net ${x}_{\alpha}\in F$ with ${x}_{\alpha}\to x$. As ${x}_{\alpha}\to x$, by hypothesis $f(x)\le lim\; inff({x}_{\alpha})$. By definition of $F$ we have $f({x}_{\alpha})\le t$ for each $\alpha $, and hence $f(x)\le t$. This means that $x\in F$, showing that $F$ is closed and so the complement of $F$ is open. But the complement of $F$ is ${f}^{1}(t,\mathrm{\infty}]$, showing that $f$ is lower semicontinuous. ∎
Let $\mathrm{LSC}(X)$ be the set of all lower semicontinuous functions $X\to [\mathrm{\infty},\mathrm{\infty}]$. $\mathrm{LSC}(X)$ is a partially ordered set: $f\le g$ means that $f(x)\le g(x)$ for all $x\in X$. The following theorem shows that $\mathrm{LSC}(X)$ is a lattice that contains the supremum of each of its subsets.^{4}^{4} 4 Gert K. Pedersen, Analysis Now, revised printing, p. 27, Proposition 1.5.12.
Theorem 4.
If $\mathrm{(}X\mathrm{,}\tau \mathrm{)}$ is a topological space, then $\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$ is a lattice, and if $\mathrm{F}\mathrm{\subseteq}\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$ then $g\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ defined by
$$g(x)=\underset{f\in \mathcal{F}}{sup}f(x),x\in X$$ 
belongs to $\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$.
Proof.
If $\mathcal{F}=\mathrm{\varnothing}$, then $g$ is the constant function $x\mapsto \mathrm{\infty}$, which is lower semicontinuous as for any $t\in \mathbb{R}$, the inverse image of $(t,\mathrm{\infty}]$ is $\mathrm{\varnothing}$, which belongs to $\tau $. Otherwise, let $t\in \mathbb{R}$. Saying $x\in {g}^{1}(t,\mathrm{\infty}]$ means that $g(x)>t$, and with $\u03f5=g(x)t$ there is some some $f\in \mathcal{F}$ satisfying $f(x)>g(x)\u03f5=t$. Therefore, if $x\in {g}^{1}(t,\mathrm{\infty}]$ then $x\in {\bigcup}_{f\in \mathcal{F}}{f}^{1}(t,\mathrm{\infty}]$. On the other hand, if $x\in {\bigcup}_{f\in \mathcal{F}}{f}^{1}(t,\mathrm{\infty}]$, then there is some $f\in \mathcal{F}$ with $f(x)>t$, and hence $g(x)>t$. Therefore
$${g}^{1}(t,\mathrm{\infty}]=\bigcup _{f\in \mathcal{F}}{f}^{1}(t,\mathrm{\infty}].$$ 
But each $f\in \mathcal{F}$ is lower semicontinuous so the righthand side is a union of elements of $\tau $, and hence ${g}^{1}(t,\mathrm{\infty}]\in \tau $, showing that $g$ is lower semicontinuous. Therefore every subset of $\mathrm{LSC}(X)$ has a supremum.
Suppose that ${f}_{1},{f}_{2}\in \mathrm{LSC}(X)$, and define $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ by
$$f(x)=\mathrm{min}\{{f}_{1}(x),{f}_{2}(x)\},x\in X.$$ 
For $t\in \mathbb{R}$, it is apparent that
$${f}^{1}(t,\mathrm{\infty}]={f}_{1}^{1}(t,\mathrm{\infty}]\cap {f}_{2}^{1}(t,\mathrm{\infty}].$$ 
As ${f}_{1}$ and ${f}_{2}$ are each lower semicontinuous, these two inverse images are each open sets, and so their intersection is an open set. Therefore $f$ is lower semicontinuous, showing that $\mathrm{LSC}(X)$ is a lattice. ∎
One is sometimes interested in lower semicontinuous functions that do not take the value $\mathrm{\infty}$. As the following theorem shows, the sum of two lower semicontinuous functions that do not take the value $\mathrm{\infty}$ is also a lower semicontinuous function.
Theorem 5.
If $X$ is a topological space, if $f\mathrm{,}g\mathrm{\in}\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$, and if $f\mathrm{,}g\mathrm{>}\mathrm{}\mathrm{\infty}$, then $f\mathrm{+}g\mathrm{\in}\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$, and if $r\mathrm{>}\mathrm{0}$ and $f\mathrm{\in}\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$ then $r\mathit{}f\mathrm{\in}\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$.
Proof.
If ${({x}_{\alpha})}_{\alpha \in I}$ is a net that converges to $x\in X$, then, by Theorem 3,
$$(f+g)(x)\le lim\; inff({x}_{\alpha})+lim\; infg({x}_{\alpha})\le lim\; inff({x}_{\alpha})+g({x}_{\alpha})=lim\; inf(f+g)({x}_{\alpha}),$$ 
and by Theorem 3 this tells us that $f+g$ is lower semicontinuous. As well,
$$(rf)(x)=rf(x)\le rlim\; inff({x}_{\alpha})=lim\; infrf({x}_{\alpha})=lim\; inf(rf)({x}_{\alpha}),$$ 
showing that $rf\in \mathrm{LSC}(X)$. ∎
The following theorem shows that if ${f}_{n}\in \mathrm{LSC}(X)$ are each finite and converge uniformly on $X$ to $f\in {\mathbb{R}}^{X}$, then $f\in \mathrm{LSC}(X)$.^{5}^{5} 5 Gert K. Pedersen, Analysis Now, revised printing, p. 27, Proposition 1.5.12.
Theorem 6.
If $\mathrm{(}X\mathrm{,}\tau \mathrm{)}$ is a topological space, if ${f}_{n}\mathrm{\in}\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$ are finite, and if ${f}_{n}$ converge uniformly in $X$ to $f\mathrm{\in}{\mathrm{R}}^{X}$, then $f\mathrm{\in}\mathrm{LSC}\mathit{}\mathrm{(}X\mathrm{)}$.
Proof.
If $\u03f5>0$, then there is some $N$ such that $n\ge N$ and $x\in X$ imply that $$. Define
$${\delta}_{n}=sup\{{f}_{n}(x)f(x):x\in X\}.$$ 
Thus, for all $\u03f5>0$ there is some $N$ such that $n\ge N$ implies that ${\delta}_{n}\le \u03f5$. If ${({x}_{\alpha})}_{\alpha \in I}$ is a convergent net in $X$, then, for all $n\ge N$,
$f(lim{x}_{\alpha})$  $\le $  ${\delta}_{n}+{f}_{n}(lim{x}_{\alpha})$  
$\le $  ${\delta}_{n}+lim\; inf{f}_{n}({x}_{\alpha})$  
$\le $  $2{\delta}_{n}+lim\; inff({x}_{\alpha})$  
$\le $  $2\u03f5+lim\; inff({x}_{\alpha}).$ 
This is true for all $\u03f5$, so we get
$$f(lim{x}_{\alpha})\le lim\; inff({x}_{\alpha}),$$ 
and therefore $f$ is lower semicontinuous. ∎
The following theorem shows in particular that on a normal topological space $X$, any finite nonnegative lower semicontinuous function is the the supremum of the set of all continuous functions $X\to \mathbb{R}$ that are dominated by it.^{6}^{6} 6 Gert K. Pedersen, Analysis Now, revised printing, p. 27, Proposition 1.5.13. To say that continuous functions $X\to [0,1]$ separate points and closed sets means that if $x\in X$ and $F$ is a disjoint closed set, then there is a continuous function $g:X\to [0,1]$ such that $g(x)=1$ and $g(F)=0$. Urysohn’s lemma states that in a normal topological space continuous functions separate closed sets, so in particular they separate points and closed sets.
Theorem 7.
If $\mathrm{(}X\mathrm{,}\tau \mathrm{)}$ is a topological space such that continuous functions $X\mathrm{\to}\mathrm{[}\mathrm{0}\mathrm{,}\mathrm{1}\mathrm{]}$ separate points and closed sets, and $f\mathrm{\ge}\mathrm{0}$ is a finite lower semicontinuous function on $X$, then $f$ is the supremum of the set of continuous functions $g\mathrm{:}X\mathrm{\to}\mathrm{R}$ such that $g\mathrm{\le}f$.
Proof.
Let $\mathcal{M}(f)$ be the set of all continuous functions $g:X\to \mathbb{R}$ with $g\le f$. As $f\ge 0$ we get $0\in \mathcal{M}(f)$, and so $\mathcal{M}(f)$ is nonempty. If $x\in X$ and $\u03f5>0$, let
$$F={f}^{1}(\mathrm{\infty},f(x)\u03f5].$$ 
$X\setminus F={f}^{1}(f(x)\u03f5,\mathrm{\infty})\in \tau $, so $F$ is closed. It is apparent that $x\notin F$. Therefore there is a continuous function $h:X\to [0,1]$ such that $h(x)=1$ and $h(F)=0$. If $f(x)\u03f5\le 0$ then, as $h\ge 0$ and $f\ge 0$, we have $(f(x)\u03f5)h\le f$. If $f(x)\u03f5>0$ and $y\in X$, then
$$(f(x)\u03f5)h(y)=\{\begin{array}{cc}0\hfill & y\in F\hfill \\ (f(x)\u03f5)h(y)\hfill & y\notin F\hfill \end{array}\le \{\begin{array}{cc}0\hfill & y\in F\hfill \\ f(x)\u03f5\hfill & y\notin F\hfill \end{array}\le f(y).$$ 
Therefore $(f(x)\u03f5)h\le f$, and because the function $(f(x)\u03f5)h$ is continuous we have $(f(x)\u03f5)g\in \mathcal{M}(f)$ Because this is an element of $\mathcal{M}(f)$ we get
$$\left(\bigvee \mathcal{M}(f)\right)(x)\ge (f(x)\u03f5)g(x)=f(x)\u03f5.$$ 
As $\u03f5$ was arbitrary it follows that $\left(\bigvee \mathcal{M}(f)\right)(x)\ge f(x)$, and as $x$ was arbitrary we have $\bigvee \mathcal{M}(f)\ge f$. But $f$ is an upper bound for $\mathcal{M}(f)$, so $\bigvee \mathcal{M}(f)\le f$. Therefore $f=\bigvee \mathcal{M}(f)$. ∎
The following is a formulation of the extreme value theorem for lower semicontinuous functions on a compact topological space.
Theorem 8 (Extreme value theorem).
If $X$ is a compact topological space and if $f$ is a lower semicontinuous function on $X$, then
$$K=\{x\in X:f(x)=\underset{y\in X}{inf}f(y)\}$$ 
is a nonempty closed subset of $X$.
Proof.
Let $C=f(X)\subseteq [\mathrm{\infty},\mathrm{\infty}]$, and for $c\in C$ let ${F}_{c}=\{x\in X:f(x)\le c\}$. Because ${F}_{c}=X\setminus {f}^{1}(c,\mathrm{\infty}]$ and $f$ is lower semicontinuous, ${F}_{c}$ is a closed set. Suppose that ${c}_{1},\mathrm{\dots},{c}_{n}\in C$. Taking $c=\mathrm{min}\{{c}_{k}:1\le k\le n\}\in C$, we have
$$\bigcap _{k=1}^{n}{F}_{{c}_{k}}={F}_{c}\ne \mathrm{\varnothing}.$$ 
This shows that the collection $\{{F}_{c}:c\in C\}$ has the finite intersection property (the intersection of finitely many members of it is nonempty). But a topological space is compact if and only if for every collection of closed subsets with the finite intersection property the intersection of all the members of the collection is nonempty.^{7}^{7} 7 James Munkres, Topology, second ed., p. 169, Theorem 26.9. Applying this theorem, we get that
$$\bigcap _{c\in C}{F}_{c}\ne \mathrm{\varnothing},$$ 
and this intersection is closed because each member is closed.
Let $x\in {\bigcap}_{c\in C}{F}_{c}$. Then for all $c\in C$ we have $f(x)\le c$, and because $C=f(X)$ this means that for all $y\in X$ we have $f(x)\le f(y)$. Therefore $x\in K$. Let $x\in K$. Then for all $y\in X$ we have $f(x)\le f(y)$, hence for all $c\in C$ we have $f(x)\le c$, hence $x\in {\bigcap}_{c\in C}{F}_{c}$. Therefore $K={\bigcap}_{c\in C}{F}_{c}$, which we have shown is nonempty and closed, proving the claim. ∎
4 Upper semicontinuous functions
If $(X,\tau )$ is a topological space, then $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is said to be upper semicontinuous if $t\in \mathbb{R}$ implies that ${f}^{1}[\mathrm{\infty},t)\in \tau $. We denote by $\mathrm{USC}(X)$ the set of upper semicontinuous functions $X\to [\mathrm{\infty},\mathrm{\infty}]$. We say that $f$ is finite if $$ for all $x\in X$.
If $A\subseteq X$ and $t\in \mathbb{R}$, then
$$ 
But ${\chi}_{A}^{1}[t,\mathrm{\infty})$ is closed if and only if ${\chi}_{A}^{1}[\mathrm{\infty},t)$ is open, hence ${\chi}_{A}$ is upper semicontinuous if and only if $A$ is closed.
It is apparent that $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is upper semicontinuous if and only if $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is lower semicontinuous. Because the set of all open intervals are a basis for the topology of $\mathbb{R}$, a function $X\to \mathbb{R}$ is continuous if and only if it is both lower semicontinuous and upper semicontinuous. That is,
$$C(X)={\mathbb{R}}^{X}\cap \mathrm{LSC}(X)\cap \mathrm{USC}(X).$$ 
5 Approximating integrable functions
If $X$ is a Hausdorff space, if $\U0001d510$ is a $\sigma $algebra on $X$ that contains the Borel $\sigma $algebra of $X$ (equivalently, if every open set belongs to $\U0001d510$), and if $\mu $ is a measure on $\U0001d510$, we say that $\mu $ is outer regular on $E\mathrm{\in}\mathrm{M}$ if
$$\mu (E)=inf\{\mu (V):E\subseteq V\text{and}V\text{is open}\},$$ 
and we say that $\mu $ is inner regular on $E$ if
$$\mu (E)=sup\{\mu (K):K\subseteq E\text{and}K\text{is compact}\}.$$ 
We state the following to motivate the conditions in Theorem 9. If $X$ is a locally compact Hausdorff space and $\lambda $ is a positive linear functional on ${C}_{c}(X)$ ($f\ge 0$ implies that $\lambda f\ge 0$), then the RieszMarkov theorem^{8}^{8} 8 Walter Rudin, Real and Complex Analysis, third ed., p. 40, Theorem 2.14. states that there is a $\sigma $algebra $\U0001d510$ on $X$ that contains the Borel $\sigma $algebra of $X$ and there is a unique complete measure $\mu $ on $\U0001d510$ that satisfies:

1.
If $f\in {C}_{c}(X)$ then $\lambda f={\int}_{X}f\mathit{d}\mu $.

2.
If $K$ is compact then $$.

3.
$\mu $ is outer regular on all $E\in \U0001d510$

4.
$\mu $ is inner regular on all open sets and on all sets with finite measure.
The following theorem gives conditions under which we can bound an integrable function above and below by semicontinuous functions that can be chosen as close as we please in ${L}^{1}$ norm.^{9}^{9} 9 Walter Rudin, Real and Complex Analysis, third ed., p. 56, Theorem 2.25.
Theorem 9 (VitaliCarathéodory theorem).
Let $X$ be a locally compact Hausdorff space, let $\mathrm{M}$ be a $\sigma $algebra containing the Borel $\sigma $algebra of $X$, and let $\mu $ be a complete measure on $\mathrm{M}$ that satisfies $$ for compact $K$, that is outer regular on all measurable sets, and that is inner regular on open sets and on sets with finite measure. If $f\mathrm{\in}{L}^{\mathrm{1}}\mathit{}\mathrm{(}\mu \mathrm{)}$ is real valued and if $\u03f5\mathrm{>}\mathrm{0}$, then there is some upper semicontinuous function $u$ that is bounded above and some lower semicontinuous function $v$ that is bounded below such that $u\mathrm{\le}f\mathrm{\le}v$ and such that
$$ 
Proof.
Let $g\in {L}^{1}(\mu )$ be $\ge 0$ and let $\u03f5>0$. There is a nondecreasing sequence of measurable simple functions ${s}_{n}$ such that for all $x\in X$ we have $g(x)={lim}_{n\to \mathrm{\infty}}{s}_{n}(x)$.^{10}^{10} 10 Walter Rudin, Real and Complex Analysis, third ed., p. 15, Theorem 1.17. A simple function is a finite linear combination of characteristic functions, either over $\mathbb{R}$ or $\u2102$. Writing ${s}_{0}=0$ and ${t}_{n}={s}_{n}{s}_{n1}$, each ${t}_{n}$ is a measurable simple function and is $\ge 0$. Then, there are some ${c}_{i}\ge 0$ and measurable sets ${E}_{i}$ such that for all $x\in X$ we have
$$g(x)=\underset{n\to \mathrm{\infty}}{lim}\sum _{i=1}^{n}{t}_{i}(x)=\sum _{i=1}^{\mathrm{\infty}}{t}_{i}(x)=\sum _{i=1}^{\mathrm{\infty}}{c}_{i}{\chi}_{{E}_{i}}(x).$$ 
Integrating this we get^{11}^{11} 11 Walter Rudin, Real and Complex Analysis, third ed., p. 22, Theorem 1.27.
$${\int}_{X}g\mathit{d}\mu =\sum _{i=1}^{\mathrm{\infty}}{\int}_{X}{c}_{i}{\chi}_{{E}_{i}}\mathit{d}\mu =\sum _{i=1}^{\mathrm{\infty}}{c}_{i}\mu ({E}_{i}).$$ 
As $g\in {L}^{1}(\mu )$ the lefthand side is finite and so the righthand side is too, hence there is then some $N$ such that $$.
For each $i$, because $\mu $ is outer regular on ${E}_{i}$ there is an open set ${V}_{i}$ containing ${E}_{i}$ such that $$. Each ${E}_{i}$ has finite measure so $\mu $ is inner regular on ${E}_{i}$, hence there is a compact set ${K}_{i}$ contained in ${E}_{i}$ such that $$. Define
$$v=\sum _{i=1}^{\mathrm{\infty}}{c}_{i}{\chi}_{{V}_{i}},u=\sum _{i=1}^{N}{c}_{i}{\chi}_{{K}_{i}}.$$ 
Each ${V}_{i}$ is open so the characteristic function ${\chi}_{{V}_{i}}$ is lower semicontinuous, and ${c}_{i}\ge 0$ so each of the functions ${\sum}_{i=1}^{n}{c}_{i}{\chi}_{{V}_{i}}$ is a sum of finitely many lower semicontinuous functions and hence is lower semicontinuous. But $v$ is the supremum of the functions ${\sum}_{i=1}^{n}{c}_{i}{\chi}_{{V}_{i}}$, so $v$ is lower semicontinuous. As each ${K}_{i}$ is closed the characteristic function ${\chi}_{{K}_{i}}$ is upper semicontinuous, and ${c}_{i}\ge 0$ so $u$ is a sum of finitely many upper semicontinuous functions and hence is upper semicontinuous. $u$ is a finite sum so is bounded above, and $v$ is a sum of nonnegative terms so is bounded below by $0$.
Because ${K}_{i}\subseteq {E}_{i}\subseteq {V}_{i}$ we have $u\le g\le v$, and
$vu$  $={\displaystyle \sum _{i=1}^{\mathrm{\infty}}}{c}_{i}{\chi}_{{V}_{i}}{\displaystyle \sum _{i=1}^{N}}{c}_{i}{\chi}_{{K}_{i}}$  
$={\displaystyle \sum _{i=1}^{N}}{c}_{i}({\chi}_{{V}_{i}}{\chi}_{{K}_{i}})+{\displaystyle \sum _{i=N+1}^{\mathrm{\infty}}}{c}_{i}{\chi}_{{V}_{i}}$  
$\le {\displaystyle \sum _{i=1}^{\mathrm{\infty}}}{c}_{i}({\chi}_{{V}_{i}}{\chi}_{{K}_{i}})+{\displaystyle \sum _{i=N+1}^{\mathrm{\infty}}}{c}_{i}{\chi}_{{E}_{i}};$ 
the inequality is because ${\chi}_{{V}_{i}}{\chi}_{{K}_{i}}+{\chi}_{{E}_{i}}\ge {\chi}_{{V}_{i}}$. Integrating,
${\int}_{X}}(vu)\mathit{d}\mu $  $\le {\displaystyle \sum _{i=1}^{\mathrm{\infty}}}{c}_{i}\mu ({V}_{i}\setminus {K}_{i})+{\displaystyle \sum _{i=N+1}^{\mathrm{\infty}}}{c}_{i}\mu ({E}_{i})$  
$={\displaystyle \sum _{i=1}^{\mathrm{\infty}}}({c}_{i}\mu ({V}_{i}\setminus {E}_{i})+{c}_{i}\mu ({E}_{i}\setminus {V}_{i}))+{\displaystyle \sum _{i=N+1}^{\mathrm{\infty}}}{c}_{i}\mu ({E}_{i})$  
$\le {\displaystyle \sum _{i=1}^{\mathrm{\infty}}}({2}^{i2}\u03f5+{2}^{i2}\u03f5)+{\displaystyle \frac{\u03f5}{2}}$  
$=\u03f5.$ 
Let $f={f}^{+}{f}^{}$, for ${f}^{+},{f}^{}\in {L}^{1}(\mu )$ with ${f}^{+},{f}^{}\ge 0$, and let $\u03f5>0$. From what we have established above, there is an upper semicontinuous function ${u}_{1}$ that is bounded above and a lower semicontinuous function ${v}_{1}$ that is bounded below satisfying ${u}_{1}\le {f}^{+}\le {v}_{1}$ and
$$ 
and similarly ${u}_{2},{v}_{2}$ with ${u}_{2}\le {f}^{}\le {v}_{2}$ and
$$ 
We have
$${u}_{1}{v}_{2}\le {f}^{+}{f}^{}=f={f}^{+}{f}^{}\le {v}_{1}{u}_{2}.$$ 
That ${v}_{2}$ is lower semicontinuous and bounded below means that ${v}_{2}$ is upper semicontinuous and bounded above, hence ${u}_{1}{v}_{2}$ is upper semicontinuous and bounded above. That ${u}_{2}$ is upper semicontinuous and bounded above means that ${u}_{2}$ is lower semicontinuous and bounded below, so ${v}_{1}{u}_{2}$ is lower semicontinuous and bounded below. Taking $u={u}_{1}{v}_{2}$ and $v={v}_{1}{u}_{2}$, we have $u\le f\le v$, and
$$ 
∎
6 Convex functions
If $X$ is a set and $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is a function, its epigraph is the set
$$\mathrm{epi}f=\{(x,\alpha )\in X\times \mathbb{R}:\alpha \ge f(x)\}.$$ 
When $X$ is a vector space, we say that $f$ is convex if $\mathrm{epi}f$ is a convex subset of the vector space $X\times \mathbb{R}$. The effective domain of a convex function $f$ is the set
$$ 
To say that $x\in \mathrm{dom}f$ is to say that there is some $\alpha \in \mathbb{R}$ such that $(x,\alpha )\in \mathrm{epi}f$, from which it follows that if $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is a convex function then $\mathrm{dom}f$ is a convex subset of $X$. A convex function $f$ is said to be proper if $\mathrm{dom}f\ne \mathrm{\varnothing}$ and $f(x)>\mathrm{\infty}$ for all $x\in X$, i.e. if $f$ does not only take the value $\mathrm{\infty}$ and never takes the value $\mathrm{\infty}$.
If $C$ is a nonempty convex subset of $X$ and $f:C\to \mathbb{R}$ is a function, we extend $f$ to $X$ by defining $f(x)=\mathrm{\infty}$ for $x\notin C$. One checks that this extension is a convex function if and only if
$$ 
and we call $f:C\to \mathbb{R}$ convex if $f:X\to (\mathrm{\infty},\mathrm{\infty}]$ is convex. If this extension is convex, then it has effective domain $C$ and is proper.
The following lemma is straightforward to prove.^{12}^{12} 12 Charalambos D. Aliprantis and Kim C. Border, Infinite Dimensional Analysis: A Hitchhiker’s Guide, third ed., p. 187, Lemma 5.41.
Lemma 10.
If $X$ is a vector space, if $C$ is a convex subset of $X$, if $f\mathrm{:}C\mathrm{\to}\mathrm{R}$ is convex, if $x\mathrm{,}x\mathrm{+}z\mathrm{,}x\mathrm{}z\mathrm{\in}C$, and if $\mathrm{0}\mathrm{\le}\delta \mathrm{\le}\mathrm{1}$, then
$$f(x+\delta z)f(x)\le \delta \mathrm{max}\{f(x+z)f(x),f(xz)f(x)\}.$$ 
The following lemma asserts that a convex function that is bounded above on some neighborhood of an interior point of a convex subset of a topological vector space is continuous at that point.^{13}^{13} 13 Charalambos D. Aliprantis and Kim C. Border, Infinite Dimensional Analysis: A Hitchhiker’s Guide, third ed., p. 188, Theorem 5.42.
Lemma 11.
If $X$ is a topological vector space, if $C$ is a convex subset of $X$, if $f\mathrm{:}C\mathrm{\to}\mathrm{R}$ is convex, if $x$ is in the interior of $C$, and if $f$ is bounded above on some neighborhood of $x$, then $f$ is continuous at $x$.
Proof.
There is some neighborhood of $x$ contained in $C$ on which $f$ is bounded above. Thus, there is some open neighborhood $U$ of the origin such that $x+U\subseteq C$ and such that $f$ is bounded above on $x+U$. Being bounded above means that there is some $M$ such that $y\in x+U$ implies that $f(y)\le M$. Any open neighborhood of $0$ contains a balanced open neighborhood of $0$,^{14}^{14} 14 Walter Rudin, Functional Analysis, second ed., p. 12, Theorem 1.14. For a set $V$ to be balanced means that $\alpha \le 1$ implies that $\alpha V\subseteq V$. so let $V$ be a balanced open neighborhood of $0$ contained in $U$.
Let $\u03f5>0$ and take $\delta >0$ small enough that $$. For $y\in x+\delta V$, there is some $z\in V$ with $y=x+\delta z$, and because $V$ is balanced we have $x+z,xz\in x+V$. Then we can apply Lemma 10 to get
$$ 
But $x+\delta V$ is an open neighborhood of $x$ (because scalar multiplication is continuous), so we have shown that if $\u03f5>0$ then there is some open neighborhood of $x$ such that $y$ being in this neighborhood implies that $$. This means that $f$ is continuous at $x$. ∎
The following theorem shows that properties that by themselves are weaker than continuity on a set are equivalent to it for a convex function on an open convex set.^{15}^{15} 15 Charalambos D. Aliprantis and Kim C. Border, Infinite Dimensional Analysis: A Hitchhiker’s Guide, third ed., p. 188, Theorem 5.43. We prove three of the five implications because two are immediate.
Theorem 12.
If $X$ is a topological vector space, if $C$ is an open convex subset of $X$, and if $f\mathrm{:}C\mathrm{\to}\mathrm{R}$ is convex, then the following are equivalent:

1.
$f$ is continuous on $C$.

2.
$f$ is upper semicontinuous on $C$.

3.
For each $x\in C$ there is some neighborhood of $x$ on which $f$ is bounded above.

4.
There is some $x\in C$ and some neighborhood of $x$ on which $f$ is bounded above.

5.
There is some $x\in C$ at which $f$ is continuous.
Proof.
Suppose that $f$ is upper semicontinuous on $C$, and say $x\in C$. Because $f$ is upper semicontinuous and $C$ is open, the set
$$ 
is open. $x\in U$ because $$, so $U$ is a neighborhood of $x$, and $f$ is bounded on $U$.
Suppose that $x\in C$ and $U$ is a neighborhood of $x$ on which $f$ is bounded above. Lemma 11 states that $f$ is continuous at $x$, showing that $f$ is continuous at some point in $C$.
Suppose that $f$ is continuous at some $x\in C$, and let $y$ be another point in $C$. The function $t\mapsto x+t(yx)$ is continuous $\mathbb{R}\to X$, and because it sends $1$ to $y\in C$ and $C$ is open, there is some $t>1$ such that $x+t(yx)\in C$. (That is, the line segment from $x$ to $y$ remains in $C$ for some length past $y$.) Set $z=x+t(yx)$, i.e. $z=(1t)x+ty$, i.e.
$$y=\left(1\frac{1}{t}\right)x+\frac{1}{t}z,$$ 
or
$$y=\lambda x+(1\lambda )z,$$ 
where $\lambda =1\frac{1}{t}$ satisfies $$. $f$ being continuous at $x$ means that for every $\u03f5>0$ there is some open neighborhood $V$ of $0$ such that $y\in x+V$ implies that $$. Take $x+V\subseteq C$, which we can do because $C$ is open. In particular, there is some $M$ such that $f(w)\le M$ for $w\in x+V$. If $v\in V$, then
$$y+\lambda v=\lambda x+(1\lambda )z+\lambda v=\lambda (x+v)+(1\lambda )z.$$ 
$x+v\in C$ and $z\in C$, and because $C$ is convex this tells us $y+\lambda v\in C$. Therefore $y+\lambda V\subseteq C$. Because $f$ is convex we have
$$f(y+\lambda v)=f(\lambda (x+v)+(1\lambda )z)\le \lambda f(x+v)+(1\lambda )f(z)\le \lambda M+(1\lambda )f(z).$$ 
This holds for every $v\in V$, so $f$ is bounded above by $\lambda M+(1\lambda )f(z)$ on $y+\lambda V$. $y+\lambda V$ is an open neighborhood of $y$ on which $f$ is bounded above, so we can apply Lemma 11, which tells us that $f$ is continuous at $y$. Since $f$ is continuous at each point in $C$, it is continuous on $C$. ∎
7 Convex hulls
If $X$ is a topological vector space over $\mathbb{R}$, let ${X}^{*}$ denote the set of continuous linear maps $X\to \mathbb{R}$. ${X}^{*}$ is called the dual space of $X$ and is a vector space. We call the bilinear map $\u27e8\cdot ,\cdot \u27e9:X\times {X}^{*}\to \mathbb{R}$ defined by
$$\u27e8x,\lambda \u27e9=\lambda x,x\in X,\lambda \in {X}^{*}$$ 
the dual pairing of $X$ and ${X}^{*}$. If $X$ is locally convex, it follows from the HahnBanach separation theorem^{16}^{16} 16 Walter Rudin, Functional Analysis, second ed., p. 59, Theorem 3.4. that for distinct $x,y\in X$ there is some $\lambda \in {X}^{*}$ such that $\lambda x\ne \lambda y$. The weak topology on $X$ is the initial topology for the set of functions ${X}^{*}$, and we denote the vector space $X$ with the weak topology by ${X}_{w}$. ${X}_{w}$ is a locally convex space whose dual space is ${X}^{*}$.^{17}^{17} 17 Walter Rudin, Functional Analysis, second ed., p. 64, Theorem 3.10.
If $X$ is a vector space and $E$ is a subset of $X$, the convex hull of $E$ is the set of all convex combinations of finitely many points in $E$ and is denoted by $\mathrm{co}E$. The convex hull $\mathrm{co}E$ is a convex set, and it is straightforward to prove that $\mathrm{co}E$ is equal to the intersection of all convex sets containing $E$. If $X$ is a topological vector space, the closed convex hull of $E$ is the closure of the convex hull $\mathrm{co}E$ and is denoted by $\overline{\mathrm{co}}E$. One proves that the closed convex hull $\overline{\mathrm{co}}E$ is equal to the intersection of all closed convex sets containing $E$.
A closed halfspace in a locally convex space $X$ over $\mathbb{R}$ is a set of the form $\{x\in X:\u27e8x,\lambda \u27e9\le \beta \}$, for $\beta \in \mathbb{R}$ and $\lambda \in {X}^{*}$ with $\lambda \ne 0$. (If $X$ is merely a topological vector space then it may be the case that ${X}^{*}=\{0\}$, for example ${L}^{p}[0,1]$ for $$.) If $\u27e8x,\lambda \u27e9\le \beta $, $\u27e8y,\lambda \u27e9\le \beta $, and $0\le t\le 1$, then
$$\u27e8(1t)x+ty,\lambda \u27e9=(1t)\u27e8x,\lambda \u27e9+t\u27e8y,\lambda \u27e9\le (1t)\beta +t\beta =\beta ,$$ 
so a closed halfspace is convex.
Lemma 13.
If $X$ is a locally convex space over $\mathrm{R}$ and $E$ is a subset of $X$, then $\overline{\mathrm{co}}\mathit{}E$ is the intersection of all closed halfspaces containing $E$.
Proof.
If $E=\mathrm{\varnothing}$ then $\overline{\mathrm{co}}E=\mathrm{\varnothing}$. But every closed halfspace contains $\mathrm{\varnothing}$ and the intersection of all of these is also $\mathrm{\varnothing}$, so the claim is true in this case. If $\overline{\mathrm{co}}E=X$ then there are no closed halfspaces that contain $E$, and as an intersection over an empty index set is equal to the universe which is $X$ here, so the claim is true in this case also. Otherwise, $\overline{\mathrm{co}}E\ne \mathrm{\varnothing},X$, and let $a\notin \overline{\mathrm{co}}E$. Because $\{a\}$ is a compact convex set and $\overline{\mathrm{co}}E$ is a disjoint nonempty closed convex set, we can apply the HahnBanach separation theorem,^{18}^{18} 18 Walter Rudin, Functional Analysis, second ed., p. 59, Theorem 3.4. which tells us that there is some ${\lambda}_{a}\in {X}^{*}$ and some ${\gamma}_{a}\in \mathbb{R}$ such that
$$ 
$\overline{\mathrm{co}}E$ is contained in the closed halfspace $\{x\in X:\u27e8x,{\lambda}_{a}\u27e9\le {\gamma}_{a}\}$ and $a$ is not. Hence
$$\overline{\mathrm{co}}E=\bigcap _{a\notin \overline{\mathrm{co}}E}\{x\in X:\u27e8x,{\lambda}_{a}\u27e9\le {\gamma}_{a}\}.$$ 
This shows that $\overline{\mathrm{co}}E$ is equal to an intersection of closed halfspaces containing $E$. Since a closed halfspace is closed and convex and $\overline{\mathrm{co}}E$ is the intersection of all closed convex sets containing $E$, it follows that $\overline{\mathrm{co}}E$ is equal to the intersection of all closed halfspaces containing $E$. ∎
If $X$ is a vector convex space and $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is a function, the convex hull of $f$ is the function $\mathrm{co}f:X\to [\mathrm{\infty},\mathrm{\infty}]$ defined by
$$\mathrm{co}f=\bigvee \{g\in {[\mathrm{\infty},\mathrm{\infty}]}^{X}:g\text{is convex and}g\le f\}.$$ 
We have $\mathrm{co}f\le f$. The following lemma shows that the supremum of a set of convex functions is itself a convex function (because an intersection of convex sets is itself a convex set and for a function to be convex means that its epigraph is a convex set), and hence that the convex hull of a function is itself a convex function.
Lemma 14.
If $X$ is a set and $\mathrm{F}\mathrm{\subseteq}{\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}}^{X}$, then $F\mathrm{=}\mathrm{\bigvee}\mathrm{F}$ satisfies
$$\mathrm{epi}F=\bigcap _{f\in \mathcal{F}}\mathrm{epi}f.$$ 
Proof.
If $\mathcal{F}=\mathrm{\varnothing}$, then $\bigvee \mathcal{F}$ is the function $x\mapsto \mathrm{\infty}$, whose epigraph is $X\times \mathbb{R}$. The intersection over the empty set of subsets of $X\times \mathbb{R}$ is equal to the universe $X\times \mathbb{R}$, so the claim holds in this case. Otherwise, let $F=\bigvee \mathcal{F}$, which satisfies
$$F(x)=sup\{f(x):f\in \mathcal{F}\},x\in X.$$ 
Suppose that $(x,\alpha )\in \mathrm{epi}F$. This means that $F(x)\le \alpha $, so $f(x)\le \alpha $ for all $f\in \mathcal{F}$, hence $(x,\alpha )\in \mathrm{epi}f$ for all $f\in \mathcal{F}$, and therefore
$$(x,\alpha )\in \bigcap _{f\in \mathcal{F}}\mathrm{epi}f.$$ 
Suppose that $x\in X$ and $\alpha \in \mathbb{R}$ and that $(x,\alpha )\in \mathrm{epi}f$ for all $f\in \mathcal{F}$. This means that $f(x)\le \alpha $ for all $f\in \mathcal{F}$, hence $F(x)\le \alpha $ and so $(x,\alpha )\in \mathrm{epi}F$. ∎
Lower semicontinuity of a function can also be expressed using the notion of epigraphs.
Lemma 15.
If $X$ is a topological space and $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a function, then $f$ is lower semicontinuous if and only if $\mathrm{epi}\mathit{}f$ is a closed subset of $X\mathrm{\times}\mathrm{R}$.
Proof.
Suppose that $f$ is lower semicontinuous and let $({x}_{i},{\alpha}_{i})\in \mathrm{epi}f$ be a net that converges to $(x,\alpha )\in X\times \mathbb{R}$. Then ${x}_{i}\to x$ and ${\alpha}_{i}\to \alpha $, and Theorem 3 gives us
$$f(x)\le lim\; inff({x}_{i})\le lim\; inf{\alpha}_{i}=lim{\alpha}_{i}=\alpha .$$ 
Hence $f(x)\le \alpha $, which means that $(x,\alpha )\in \mathrm{epi}f$. Therefore $\mathrm{epi}f$ is closed.
Suppose that $\mathrm{epi}f$ is closed and let $t\in \mathbb{R}$. The set
$$\mathrm{epi}f\cap (X\times \{t\})=\{(x,t):x\in X,t\ge f(x)\}$$ 
is a closed subset of $X\times \mathbb{R}$. This implies that ${f}^{1}[\mathrm{\infty},t]$ is a closed subset of $X$, which is equivalent to ${f}^{1}(t,\mathrm{\infty}]$ being an open subset of $X$. This is true for all $t\in \mathbb{R}$, so $f$ is lower semicontinuous. ∎
The following lemma shows that if a convex lower semicontinuous function takes the value $\mathrm{\infty}$ then it is nowhere finite. This means that if there is some point at which a convex lower semicontinuous function takes a finite value then it does not take the value $\mathrm{\infty}$, namely, if a convex lower semicontinuous function takes a finite value at some point then it is proper.
Lemma 16.
If $X$ is a topological vector space, if $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is convex and lower semicontinuous, and if there is some ${x}_{\mathrm{0}}\mathrm{\in}X$ such that $f\mathit{}\mathrm{(}{x}_{\mathrm{0}}\mathrm{)}\mathrm{=}\mathrm{}\mathrm{\infty}$, then $f\mathit{}\mathrm{(}x\mathrm{)}\mathrm{\in}\mathrm{\{}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{\}}$ for all $x\mathrm{\in}X$.
Proof.
Suppose by contradiction that there is some $x\in X$ such that $$. Because $f$ is convex, for every $\lambda \in (0,1]$ we have
$$f((1\lambda )x+\lambda {x}_{0})\le (1\lambda )f(x)+\lambda f({x}_{0})=\text{finite}\mathrm{\infty}=\mathrm{\infty},$$ 
hence $f((1\lambda )x+\lambda {x}_{0})=\mathrm{\infty}$ for all $\lambda \in (0,1]$. Because $f$ is lower semicontinuous,
$$f\left(\underset{\lambda \to 0}{lim}((1\lambda )x+\lambda {x}_{0})\right)\le \underset{\lambda \to 0}{lim\; inf}f((1\lambda )x+\lambda {x}_{0}),$$ 
and hence
$$f(x)\le \mathrm{\infty},$$ 
a contradiction. Therefore there is no $x\in X$ such that $$. ∎
If $X$ is a topological space and $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is a function, the lower semicontinuous hull of $f$ is the function $\mathrm{lsc}f:X\to [\mathrm{\infty},\mathrm{\infty}]$ defined by
$$\mathrm{lsc}f=\bigvee \{g\in \mathrm{LSC}(X):g\le f\}.$$ 
By Theorem 4, $\mathrm{lsc}f\in \mathrm{LSC}(X)$. It is apparent that a function is lower semicontinuous if and only if it is equal to its lower semicontinuous hull. The following lemma shows that the epigraph of the lower semicontinuous hull of a function is equal to the closure of its epigraph.^{19}^{19} 19 JeanPaul Penot, Calculus Without Derivatives, p. 18, Proposition 1.21.
Lemma 17.
If $X$ is a topological space and $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a function, then
$$\mathrm{epi}\mathrm{lsc}f=\overline{\mathrm{epi}f}$$ 
Proof.
Check that $\overline{\mathrm{epi}f}=\mathrm{epi}g$ for $g:X\to [\mathrm{\infty},\mathrm{\infty}]$ defined by^{20}^{20} 20 Let $\mathcal{N}(x)$ be the neighborhood filter at $x$. ${lim\; inf}_{y\to x}f(y)$ is defined to be $$\underset{N\in \mathcal{N}(x)}{sup}\underset{y\in N\setminus \{x\}}{inf}f(y).$$
$$g(x)=\underset{y\to x}{lim\; inf}f(y),x\in X,$$ 
and that $\mathrm{lsc}f=g$.∎
The notion of being a convex function applies to functions on a vector space, and the notion of being lower semicontinuous applies to functions on a topological space. The following theorem shows that the lower semicontinuous hull of a convex function on a topological vector space is convex.^{21}^{21} 21 R. Tyrrell Rockafellar, Conjugate Duality and Optimization, p. 15, Theorem 4.
Theorem 18.
If $X$ is a topological vector space and $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is convex, then $\mathrm{lsc}\mathit{}f$ is convex.
Proof.
For $\mathrm{lsc}f$ to be a convex function means that $\mathrm{epi}\mathrm{lsc}f$ is a convex set. But Lemma 17 tells us that $\mathrm{epi}\mathrm{lsc}f=\overline{\mathrm{lsc}f}$. As $f$ is convex, the epigraph $\mathrm{epi}f$ is convex, and the closure of a convex set is convex.^{22}^{22} 22 Walter Rudin, Functional Analysis, second ed., p. 11, Theorem 1.13. Hence $\mathrm{epi}\mathrm{lsc}f$ is convex, and so $\mathrm{lsc}f$ is a convex function. ∎
8 Extreme points
If $X$ is a vector space and $C$ is a subset of $X$, a nonempty subset of $S$ of $C$ is called an extreme set of $C$ if $$ and $(1t)x+ty\in S$ together imply that $x,y\in S$. An extreme point of $C$ is an element $x$ of $C$ such that the singleton $\{x\}$ is an extreme set of $C$. The set of extreme points of $C$ is denoted by $\mathrm{ext}C$. If $C$ is a convex set and $S$ is an extreme set of $C$ that is itself convex, then $S$ is called a face of $C$.
Lemma 19.
If $X$ is a vector space, if $C$ is a convex subset of $X$, and if $a\mathrm{\in}C$, then $a$ is an extreme point of $C$ if and only if $C\mathrm{\setminus}\mathrm{\{}a\mathrm{\}}$ is a convex set.
Proof.
Suppose that $a$ is an extreme point of $C$ and let $x,y\in C\setminus \{a\}$ and $$. Because $C$ is convex, $(1t)x+ty\in C$. If $(1t)x+ty=a$, then because $a$ is an extreme point of $C$ we would have $x=a$ and $y=a$, contradicting $x,y\in C\setminus \{a\}$. Therefore $(1t)x+ty\in C\setminus \{a\}$.
Suppose that $C\setminus \{a\}$ is a convex set. Suppose that $x,y\in C$, $$, and $(1t)x+ty=a$. Assume by contradiction that $x\ne a$. If $y=a$ then we get $(1t)x+ta=a$, or $(1t)x=(1t)a$, hence $x=a$, a contradiction. If $y\ne a$, then using that $C\setminus \{a\}$ is convex, we have $(1t)x+ty\in C\setminus \{a\}$, contradicting that $(1t)x+ty=a$. Therefore $x=a$. We similarly show that $y=a$. Therefore $a$ an extreme point of $C$. ∎
The following lemma is about the set of maximizers of a convex function, and does not involve a topology on the vector space.^{23}^{23} 23 Charalambos D. Aliprantis and Kim C. Border, Infinite Dimensional Analysis: A Hitchhiker’s Guide, third ed., p. 296, Lemma 7.64.
Lemma 20.
If $X$ is a vector space, if $C$ is a convex susbset of $X$, and if $f\mathrm{:}C\mathrm{\to}\mathrm{R}$ is convex, then
$$F=\{x\in C:f(x)=\underset{y\in C}{sup}f(y)\}$$ 
is either an extreme set of $C$ or is empty.
Proof.
Suppose that there is some ${x}_{0}$ at which $f$ is maximized, i.e. that $F$ is nonempty, and let $M=f({x}_{0})$. Suppose that $x,y\in C$, $$, and $(1t)x+ty\in F$. If at least one of $x,y$ do not belong to $F$, then, as $(1t)x+ty\in F$ and as $f$ is convex,
$$ 
a contradiction. Therefore $x,y\in F$, showing that $F$ is an extreme set of $C$. ∎
Elements of an extreme set need not be extreme points, but the following lemma shows that in a locally convex space if an extreme set is compact then it contains an extreme point.^{24}^{24} 24 Charalambos D. Aliprantis and Kim C. Border, Infinite Dimensional Analysis: A Hitchhiker’s Guide, third ed., p. 296, Lemma 7.65.
Lemma 21.
If $X$ is a real locally convex space, if $C$ is a subset of $X$, and if $F$ is a compact extreme set of $C$, then
$$F\cap \mathrm{ext}C\ne \mathrm{\varnothing}.$$ 
Proof.
Define $\mathcal{F}=\{G\subseteq F:G\text{is a compact extreme set of}C\}$. $F\in \mathcal{F}$ so $\mathcal{F}$ is nonempty. $\mathcal{F}$ is a partially ordered set ordered by set inclusion. If $T$ is a chain in $\mathcal{F}$, then the intersection of finitely many elements of $T$ is equal to the minimum of these elements which is an extreme set and hence is nonempty. Therefore the chain $T$ has the finite intersection property, and because the elements of $T$ are closed subsets of $F$ and $F$ is compact, the intersection of all the elements of $T$ is nonempty.^{25}^{25} 25 James Munkres, Topology, second ed., p. 169, Theorem 26.9. One checks that this intersection belongs to $\mathcal{F}$ (one must verify that it is an extreme set of $C$) and is a lower bound for $T$. We have shown that every chain in $\mathcal{F}$ has a lower bound in $\mathcal{F}$, and applying Zorn’s lemma, there is a minimal element $G$ in $\mathcal{F}$ (if an element of $\mathcal{F}$ is contained in $G$ then it is equal to $G$).
Assume by contradiction that there are $a,b\in G$ with $a\ne b$. Then there is some $\lambda \in {X}^{*}$ such that $\lambda a>\lambda b$. $G$ is compact and $\lambda $ is continuous, so
$${G}_{0}=\{c\in G:\lambda c=\underset{y\in G}{sup}\lambda y\}$$ 
is nonempty and closed. We shall show that ${G}_{0}$ is an extreme set of $G$. Suppose that $x,y\in G$, $$, and $(1t)x+ty\in {G}_{0}$. Let $M={sup}_{y\in G}\lambda y$. If at least one of $x,y$ do not belong to ${G}_{0}$, then
$$ 
a contradiction. Hence $x,y\in {G}_{0}$, showing that ${G}_{0}$ is an extreme set of $G$. Check that ${G}_{0}$ being an extreme set of $G$ implies that ${G}_{0}$ is an extreme set of $C$. Then ${G}_{0}\in \mathcal{F}$, but as $\lambda a>\lambda b$ we have $b\notin {G}_{0}$, so that ${G}_{0}$ is strictly contained in $G$, contradicting that $G$ is a minimal element of $\mathcal{G}$. Therefore $G$ has a single element, as $G$ being an extreme set means that it is nonempty. But $G$ is an extreme set of $C$, and since $G$ is a singleton this means that the single point it contains is an extreme point of $C$. ∎
The following theorem gives conditions under which a function on a set has a maximizer that is an extreme point of the set.^{26}^{26} 26 Charalambos D. Aliprantis and Kim C. Border, Infinite Dimensional Analysis: A Hitchhiker’s Guide, third ed., p. 298, Theorem 7.69.
Theorem 22 (Bauer maximum principle).
If $X$ is a real locally convex space, if $C$ is a compact convex subset of $X$, and if $f\mathrm{:}C\mathrm{\to}\mathrm{R}$ is upper semicontinuous, then there is a maximizer of $f$ that belongs to $\mathrm{ext}\mathit{}C$.
Proof.
Because $f$ is upper semicontinuous and $C$ is compact, it follows from Theorem 8 that
$$F=\{x\in C:f(x)=\underset{y\in C}{sup}f(y)\}$$ 
is a nonempty closed subset of $C$. Since $C$ is convex and $f$ is a convex function, by Lemma 20, $F$ is an extreme set of $C$. $F$ is a closed subset of the compact set $C$, so $F$ is compact. Hence $F$ is a compact extreme set of $C$, and by Lemma 21 there is an extreme point in $F$, which was the claim. ∎
9 Duality
Lemma 23.
A convex function on a real locally convex space is lower semicontinuous if and only if it is weakly lower semicontinuous.
Proof.
Let $X$ be a locally convex space and let ${X}_{w}$ denote this vector space with the weak topology, with which it is a locally convex space. As $\mathbb{R}$ is a locally convex space, the product $X\times \mathbb{R}$ is a locally convex space, and one checks that $X\times \mathbb{R}$ with the weak topology is ${X}_{w}\times \mathbb{R}$. Thus, to say that a subset of $X\times \mathbb{R}$ is weakly closed is equivalent to saying that it is closed in ${X}_{w}\times \mathbb{R}$. Furthermore, the closure of a convex set in a locally convex space is equal to its weak closure.^{27}^{27} 27 Walter Rudin, Functional Analysis, second ed., p. 66, Theorem 3.12. In particular, a convex subset of a locally convex space is closed if and only if it is weakly closed. Therefore, a convex subset of $X\times \mathbb{R}$ is closed if and only if it is closed in ${X}_{w}\times \mathbb{R}$.
By Lemma 15, a function $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is lower semicontinuous if and only if $\mathrm{epi}f$ is a closed subset of $X\times \mathbb{R}$, and is weakly lower semicontinuous if and only if $\mathrm{epi}f$ is a closed subset of ${X}_{w}\times \mathbb{R}$. ∎
A topological vector space is said to have the HeineBorel property if every closed and bounded subset of it is compact. The following theorem gives conditions under which a function is minimized on a set that is not necessarily compact but which is convex, closed, and bounded.
Theorem 24.
If $X$ is a real locally convex space such that ${X}_{w}$ has the HeineBorel property, if $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a lower semicontinuous convex function, and if $C$ is a convex closed bounded subset of $X$, then
$$K=\{x\in C:f(x)=\underset{y\in C}{inf}f(y)\}$$ 
is a nonempty closed subset of $X$.
Proof.
Because $X$ is a locally convex space and $C$ is convex, the fact that $C$ is closed implies that it is weakly closed.^{28}^{28} 28 Walter Rudin, Functional Analysis, second ed., p. 66, Theorem 3.12. It is straightforward to prove that if a subset of a topological vector space is bounded then it is weakly bounded.^{29}^{29} 29 The converse is true in a locally convex space. Walter Rudin, Functional Analysis, second ed., p. 70, Theorem 3.18. Thus, $C$ is weakly closed and weakly bounded, and because ${X}_{w}$ has the HeineBorel property we get that $C$ is weakly compact. In other words, ${C}_{w}$ is compact, where ${C}_{w}$ is the set $C$ with the subspace topology inherited from ${X}_{w}$. By Lemma 23, $f$ is weakly lower semicontinuous, i.e. $f:{X}_{w}\to [\mathrm{\infty},\mathrm{\infty}]$ is lower semicontinuous. Thus, the restriction of $f$ to ${C}_{w}$ is lower semicontinuous. We have established that ${C}_{w}$ is compact and that the restriction of $f$ to ${C}_{w}$ is lower semicontinuous, so we can apply Theorem 8 (the extreme value theorem) to obtain that $K$ is a nonempty closed subset of ${C}_{w}$. Finally, $K$ being a closed subset of ${C}_{w}$ implies that $K$ is a closed subset of $X$. ∎
10 Convex conjugation
If $X$ is a locally convex space and ${X}^{*}$ is its dual space, the strong dual topology on ${X}^{*}$ is the seminorm topology induced by the seminorms $\lambda \mapsto {sup}_{x\in E}\lambda x$, where $E$ are the bounded subsets of $X$. Because these seminorms are a separating family, ${X}^{*}$ with the strong dual topology is a locally convex space. (If $X$ is a normed space then the strong dual topology on ${X}^{*}$ is equal to the operator norm topology on ${X}^{*}$.^{30}^{30} 30 Kôsaku Yosida, Functional Analysis, sixth ed., p. 111, Theorem 1.) A locally convex space is said to be reflexive if the strong dual of its strong dual is isomorphic as a locally convex space to the original space.
If $X$ is a real locally convex space, the convex conjugate^{31}^{31} 31 Also called the Fenchel transform. of a function $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is the function ${f}^{*}:{X}^{*}\to [\mathrm{\infty},\mathrm{\infty}]$ defined by
$${f}^{*}(\lambda )=sup\{\u27e8x,\lambda \u27e9f(x):x\in X\}=sup\{\u27e8x,\lambda \u27e9f(x):x\in \mathrm{dom}f\}.$$ 
The convex biconjugate of $f$ is the function ${f}^{**}:X\to [\mathrm{\infty},\mathrm{\infty}]$ defined by
$${f}^{**}(x)=sup\{\u27e8x,\lambda \u27e9{f}^{*}(\lambda ):\lambda \in {X}^{*}\}=sup\{\u27e8x,\lambda \u27e9{f}^{*}(\lambda ):\lambda \in \mathrm{dom}{f}^{*}\}.$$ 
The convex biconjugate of a function on a real reflexive locally convex space is the convex conjugate of its convex conjugate. From the definition of ${f}^{*}$ it is apparent that for all $x\in X$ and $\lambda \in {X}^{*}$,
$$\u27e8x,\lambda \u27e9\le f(x)+{f}^{*}(\lambda ),$$  (1) 
called Young’s inequality.
The following theorem establishes some properties of the convex conjugates and convex biconjugates of any function from a real locally convex space to $[\mathrm{\infty},\mathrm{\infty}]$.^{32}^{32} 32 Viorel Barbu and Teodor Precupanu, Convexity and Optimization in Banach Spaces, fourth ed., p. 77, Proposition 2.19.
Theorem 25.
If $X$ is a real locally convex space and $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a function, then

•
${f}^{*}$ is convex and weak* lower semicontinuous,

•
${f}^{**}$ is convex and weakly lower semicontinuous,

•
${f}^{**}\le f$.
If ${f}_{\mathrm{1}}\mathrm{,}{f}_{\mathrm{2}}\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ are functions satisfying ${f}_{\mathrm{1}}\mathrm{\le}{f}_{\mathrm{2}}$, then ${f}_{\mathrm{1}}^{\mathrm{*}}\mathrm{\ge}{f}_{\mathrm{2}}^{\mathrm{*}}$.
Proof.
For each $x\in X$, it is apparent that the function $\lambda \mapsto \u27e8x,\lambda \u27e9$ is convex and weak* continuous, and a fortiori is weak* lower semicontinuous. Whether $f(x)$ is finite or infinite, the function $\lambda \mapsto \u27e8x,\lambda \u27e9$ is weak* lower semicontinuous. By Lemma 14, the supremum of a collection of convex functions is a convex function, and by Theorem 4 the supremum of a collection of lower semicontinuous functions is a lower semicontinuous function. ${f}^{*}$ is the supremum of this set of functions, and therefore is convex and weak* lower semicontinuous.
For each $\lambda \in {X}^{*}$, the function $x\mapsto \u27e8x,\lambda \u27e9{f}^{*}(\lambda )$ is convex and is weakly semicontinuous, and a fortiori is weakly lower semicontinuous. As ${f}^{**}$ is the supremum of this set of functions, ${f}^{**}$ is convex and weakly lower semicontinuous.
For every $x\in X$ and $\lambda \in {X}^{*}$ we have by Young’s inequality (1),
$$\u27e8x,\lambda \u27e9{f}^{*}(\lambda )\le f(x),$$ 
and hence for every $x\in X$,
$${f}^{**}(x)=\underset{\lambda \in {X}^{*}}{sup}(\u27e8x,\lambda \u27e9{f}^{*}(\lambda ))\le f(x),$$ 
and this means that ${f}^{**}\le f$.
For $\lambda \in {X}^{*}$, because ${f}_{1}\le {f}_{2}$,
$${f}_{2}^{*}(\lambda )=\underset{x\in X}{sup}(\u27e8x,\lambda \u27e9{f}_{2}(x))\le \underset{x\in X}{sup}(\u27e8x,\lambda \u27e9{f}_{1}(x))={f}_{1}^{*}(\lambda ),$$ 
which means that ${f}_{1}^{*}\ge {f}_{2}^{*}$. ∎
We remind ourselves that to say that a convex function is proper means that at some point it takes a value other than $\mathrm{\infty}$, and that it nowhere takes the value $\mathrm{\infty}$. The following lemma shows that any lower semicontinuous proper convex function on a real locally convex space is bounded below by a continuous affine functional.
Lemma 26.
If $X$ is a real locally convex space and $f\mathrm{:}X\mathrm{\to}\mathrm{(}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a lower semicontinuous proper convex function, then there is some $\mu \mathrm{\in}{X}^{\mathrm{*}}$ and some $c\mathrm{\in}\mathrm{R}$ such that $f\mathrm{\ge}\mu \mathrm{+}c$.
Proof.
The fact that $f$ is a convex function tells us that $\mathrm{epi}f$ is a convex subset of $X\times \mathbb{R}$, and as $f$ is proper, $\mathrm{dom}f\ne \mathrm{\varnothing}$ and ${x}_{0}\in \mathrm{dom}f$ satisfies $f({x}_{0})>\mathrm{\infty}$. The fact that $f$ is lower semicontinuous tells us that $\mathrm{epi}f$ is a closed subset of $X\times \mathbb{R}$. Let ${x}_{0}\in \mathrm{dom}f$. We have $({x}_{0},f({x}_{0})1)\notin \mathrm{epi}f$. The singleton $\{({x}_{0},f({x}_{0})1)\}$ is a compact convex set and $\mathrm{epi}f$ is a disjoint closed convex set, so we can apply the HahnBanach separation theorem to obtain that there is some $\mathrm{\Lambda}\in {(X\times \mathbb{R})}^{*}$ and some $\gamma \in \mathbb{R}$ satisfying
$$ 
There is some $\lambda \in {X}^{*}$ and some $\beta \in {\mathbb{R}}^{*}=\mathbb{R}$ such that $\mathrm{\Lambda}(x,\alpha )=\lambda x+\beta \alpha $ for all $(x,\alpha )\in X\times \mathbb{R}$. So we have
$$ 
And $({x}_{0},f({x}_{0}))\in \mathrm{epi}f$, so
$$ 
hence $$. If $x\in \mathrm{dom}f$ then $(x,f(x))\in \mathrm{epi}f$ and
$$ 
Rearranging, and as $$,
$$f(x)>\frac{1}{\beta}\lambda x+\frac{1}{\beta}\lambda {x}_{0}+f({x}_{0})1,x\in \mathrm{dom}f.$$ 
If $x\notin \mathrm{dom}f$ then $f(x)=\mathrm{\infty}$, for which the above inequality also holds. ∎
We proved in Theorem 25 that the conjugate of any function is convex and weak* lower semicontinuous, which a fortiori gives that it is lower semicontinuous. In the following lemma we show that a convex lower semicontinuous function is proper if and only if its convex conjugate is proper.^{33}^{33} 33 Viorel Barbu and Teodor Precupanu, Convexity and Optimization in Banach Spaces, fourth ed., p. 78, Corollary 2.21.
Lemma 27.
If $X$ is a locally convex space and $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a lower semicontinuous convex function, then $f$ is proper if and only if ${f}^{\mathrm{*}}$ is proper.
Proof.
Suppose that $f$ is proper. By Lemma 26 there is some $\mu \in {X}^{*}$ and some $c\in \mathbb{R}$ such that $f(x)\ge \mu x+c$ for all $x\in X$. For any $\lambda \in {X}^{*}$ we have
$${f}^{*}(\lambda )=\underset{x\in X}{sup}(\lambda xf(x))\le \underset{x\in X}{sup}(\lambda x\mu xc),$$ 
thus $$, so $\mathrm{dom}{f}^{*}\ne \mathrm{\varnothing}$. And there is some ${x}_{0}\in X$ such that $f({x}_{0})\ne \mathrm{\infty}$, giving ${sup}_{x\in X}(\lambda xf(x))\ge \lambda {x}_{0}f({x}_{0})>\mathrm{\infty}$, showing that ${f}^{*}(\lambda )>\mathrm{\infty}$ for all $\lambda \in {X}^{*}$. Therefore ${f}^{*}$ is proper.
Suppose that ${f}^{*}$ is proper. If $f$ took only the value $\mathrm{\infty}$ then ${f}^{*}$ would take only the value $\mathrm{\infty}$, and ${f}^{*}$ being proper means that it in fact never takes the value $\mathrm{\infty}$. Let $x\in X$. As ${f}^{*}$ is proper there is some $\lambda \in {X}^{*}$ for which $$, and using Young’s inequality (1) we get
$$f(x)\ge {f}^{*}(\lambda )+\u27e8x,\lambda \u27e9>\mathrm{\infty}.$$ 
Thus, for every $x\in X$ we have $f(x)>\mathrm{\infty}$, so we have verified that $f$ is proper. ∎
The following theorem is called the FenchelMoreau theorem, and gives necessary and sufficient conditions for a function to equal its convex biconjugate.^{34}^{34} 34 Viorel Barbu and Teodor Precupanu, Convexity and Optimization in Banach Spaces, fourth ed., p. 79, Theorem 2.22.
Theorem 28 (FenchelMoreau theorem).
If $X$ is a real locally convex space and $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a function, then $f\mathrm{=}{f}^{\mathrm{*}\mathrm{*}}$ if and only if one of the following three conditions holds:

1.
$f$ is a proper convex lower semicontinuous function

2.
$f$ is the constant function $\mathrm{\infty}$

3.
$f$ is the constant function $\mathrm{\infty}$
Proof.
Suppose that $f$ is a proper convex lower semicontinuous function. From Lemma 27, its convex conjugate ${f}^{*}$ is a proper convex function. As ${f}^{*}$ does not take only the value $\mathrm{\infty}$ we get from the definition of ${f}^{**}$ that ${f}^{**}(x)>\mathrm{\infty}$ for every $x\in X$. Theorem 25 tells us that ${f}^{**}\le f$, and suppose by contradiction that there is some ${x}_{0}\in X$ for which $$. For this ${x}_{0}$ we have $({x}_{0},{f}^{**}({x}_{0}))\notin \mathrm{epi}f$, so we can apply the HahnBanach separation theorem to the sets $\{({x}_{0},{f}^{**}({x}_{0}))\}$ and $\mathrm{epi}f$ to get that there is some $\mathrm{\Lambda}\in {(X\times \mathbb{R})}^{*}$ and some $\gamma \in \mathbb{R}$ for which
$$ 
But $\mathrm{\Lambda}(x,\alpha )$ can be written as $\lambda x+\beta \alpha $ for some $\lambda \in {X}^{*}$ and some $\beta \in {\mathbb{R}}^{*}=\mathbb{R}$, so
$$  (2) 
If $\beta $ were $>0$ then the lefthand side of (2) would be $\mathrm{\infty}$, because for $x\in \mathrm{dom}f$ there are arbitrarily large $\alpha $ such that $(x,\alpha )\in \mathrm{epi}f$. But the lefthand side is upper bounded by the constant righthand side, so $\beta \le 0$. Either $$ or $f({x}_{0})=\mathrm{\infty}$. In the first case, $({x}_{0},f({x}_{0}))\in \mathrm{epi}f$, and applying (2) gives $$. The assumption that $$ then implies that $$. In the case that $f({x}_{0})=\mathrm{\infty}$, assume by contradiction that $\beta =0$. Then (2) becomes
$$  (3) 
Let $\mu \in \mathrm{dom}{f}^{*}$; ${f}^{*}$ is proper so $\mathrm{dom}{f}^{*}\ne \mathrm{\varnothing}$. For all $h>0$ we have
${f}^{*}(\mu +h\lambda )$  $=sup\{\u27e8x,\mu +h\lambda \u27e9f(x):x\in X\}$  
$=sup\{\u27e8x,\mu +h\lambda \u27e9f(x):x\in \mathrm{dom}f\}$  
$\le sup\{\u27e8x,\mu \u27e9f(x):x\in \mathrm{dom}f\}+hsup\{\u27e8x,\lambda \u27e9:x\in \mathrm{dom}f\}$  
$={f}^{*}(\mu )+hsup\{\u27e8x,\lambda \u27e9:x\in \mathrm{dom}f\}.$ 
But using the definition of ${f}^{**}$ we have ${f}^{**}({x}_{0})\ge \u27e8{x}_{0},\mu +h\lambda \u27e9{f}^{*}(\mu +h\lambda )$, so
${f}^{**}({x}_{0})$  $\ge \u27e8{x}_{0},\mu \u27e9+h\u27e8{x}_{0},\lambda \u27e9{f}^{*}(\mu +h\lambda )$  
$\ge \u27e8{x}_{0},\mu \u27e9+h\u27e8{x}_{0},\lambda \u27e9{f}^{*}(\mu )hsup\{\u27e8x,\lambda \u27e9:x\in \mathrm{dom}f\}$  
$=\u27e8{x}_{0},\mu \u27e9{f}^{*}(\mu )+h(\u27e8{x}_{0},\lambda \u27e9sup\{\u27e8x,\lambda \u27e9:x\in \mathrm{dom}f\}).$ 
But (3) tells us that $\u27e8{x}_{0},\lambda \u27e9sup\{\u27e8x,\lambda \u27e9:x\in \mathrm{dom}f\}>0$, and since the above inequality holds for arbitrarily large $h$ we get ${f}^{**}({x}_{0})=\mathrm{\infty}$, contradicting that $$. Therefore, $$, and then we can divide (2) by $\beta $ to obtain
$$\frac{1}{\beta}\lambda x+\alpha >\frac{\gamma}{\beta}>\frac{1}{\beta}\lambda {x}_{0}+{f}^{**}({x}_{0}),(x,\alpha )\in \mathrm{epi}f,$$ 
hence
$\lambda \left({\displaystyle \frac{{x}_{0}}{\beta}}\right){f}^{**}({x}_{0})$  $>sup\{{\displaystyle \frac{1}{\beta}}\lambda x\alpha :(x,\alpha )\in \mathrm{epi}f\}$  
$=sup\{{\displaystyle \frac{1}{\beta}}\lambda xf(x):x\in \mathrm{dom}f\}$  
$={f}^{*}\left({\displaystyle \frac{1}{\beta}}\lambda \right).$ 
From the definition of ${f}^{**}$ we have
$${f}^{**}({x}_{0})\ge \u27e8{x}_{0},\frac{1}{\beta}\lambda \u27e9{f}^{*}\left(\frac{1}{\beta}\lambda \right),$$ 
and this and the above give
$$\lambda \left(\frac{{x}_{0}}{\beta}\right){f}^{*}\left(\frac{1}{\beta}\lambda \right)>\u27e8{x}_{0},\frac{1}{\beta}\lambda \u27e9{f}^{*}\left(\frac{1}{\beta}\lambda \right),$$ 
but the two sides are equal, a contradiction. Therefore, ${f}^{**}({x}_{0})=f({x}_{0})$.
Suppose that $f$ is the constant function $\mathrm{\infty}$. Then ${f}^{*}$ is the constant function $\mathrm{\infty}$, and this means that ${f}^{**}$ is the constant function $\mathrm{\infty}$, giving $f={f}^{**}$.
Suppose that $f$ is the constant function $\mathrm{\infty}$. This implies that ${f}^{*}$ is the constant function $\mathrm{\infty}$, and so ${f}^{**}$ is the constant function $\mathrm{\infty}$, giving $f={f}^{**}$.
Suppose that $f={f}^{**}$. By Theorem 25, ${f}^{**}$ is convex and weakly lower semicontinuous, so a fortiori it is lower semicontinuous, hence $f$ is convex and lower semicontinuous. Suppose that $f$ is neither the constant function $\mathrm{\infty}$ nor the constant function $\mathrm{\infty}$. If $f$ took the value $\mathrm{\infty}$ then ${f}^{*}$ would take only the value $\mathrm{\infty}$, and then ${f}^{**}$ would take only the value $\mathrm{\infty}$, contradicting that $f={f}^{**}$ is not the constant function $\mathrm{\infty}$. Therefore, if $f={f}^{**}$ then either $f$ is the constant function $\mathrm{\infty}$, or $f$ is the constant function $\mathrm{\infty}$, or $f$ is a proper convex lower semicontinuous function. ∎
If $X$ is a topological space and $f:X\to [\mathrm{\infty},\mathrm{\infty}]$ is a function, the closure of $f$ is the function $\mathrm{cl}f:X\to [\mathrm{\infty},\mathrm{\infty}]$ that is defined to be $\mathrm{lsc}f$ if $(\mathrm{lsc}f)(x)>\mathrm{\infty}$ for all $x\in X$, and defined to be the constant function $\mathrm{\infty}$ if there is some $x\in X$ such that $(\mathrm{lsc}f)(x)=\mathrm{\infty}$. We say that a function is closed if it is equal to its closure, and thus to say that a function is closed is to say that it is lower semicontinuous, and either does not take the value $\mathrm{\infty}$ or only takes the value $\mathrm{\infty}$. One checks that ${(\mathrm{cl}f)}^{*}={f}^{*}$, and combined with the FenchelMoreau theorem one can obtain the following.
Corollary 29.
If $X$ is a real locally convex space and $f\mathrm{:}X\mathrm{\to}\mathrm{[}\mathrm{}\mathrm{\infty}\mathrm{,}\mathrm{\infty}\mathrm{]}$ is a convex function, then ${f}^{\mathrm{*}\mathrm{*}}\mathrm{=}\mathrm{cl}\mathit{}f$.