# Lebesgue's number lemma

In topology, the Lebesgue covering lemma is a useful tool in the study of compact metric spaces.
Given an open cover of a compact metric space, a Lebesgue's number of the cover is a number $\delta >0$ such that every subset of $X$ having diameter less than $\delta$ is contained in some member of the cover.
The existence of Lebesgue's numbers for compact metric spaces is given by the Lebesgue's covering lemma:
    If the metric space $(X,d)$ is compact and an open cover of $X$ is given, then the cover admits some Lebesgue's number $\delta >0$.
The notion of Lebesgue's numbers itself is useful in other applications as well.

## Proof
### Direct Proof

Let ${\mathcal {U}}$ be an open cover of $X$. Since $X$ is compact we can extract a finite subcover $\{A_{1},\dots ,A_{n}\}\subseteq {\mathcal {U}}$. If any one of the $A_{i}$'s equals $X$ then any $\delta >0$ will serve as a Lebesgue's number. Otherwise for each $i\in \{1,\dots ,n\}$, let $C_{i}:=X\smallsetminus A_{i}$, note that $C_{i}$ is not empty, and define a function $f:X\rightarrow \mathbb {R}$ by
    $f(x):={\frac {1}{n}}\sum _{i=1}^{n}d(x,C_{i}).$
Since $f$ is continuous on a compact set, it attains a minimum $\delta$. The key observation is that, since every $x$ is contained in some $A_{i}$, the extreme value theorem shows $\delta >0$. Now we can verify that this $\delta$ is the desired Lebesgue's number. If $Y$ is a subset of $X$ of diameter less than $\delta$, choose $x_{0}$ as any point in $Y$, then by definition of diameter, $Y\subseteq B_{\delta }(x_{0})$, where $B_{\delta }(x_{0})$ denotes the ball of radius $\delta$ centered at $x_{0}$. Since $f(x_{0})\geq \delta$ there must exist at least one $i$ such that $d(x_{0},C_{i})\geq \delta$. But this means that $B_{\delta }(x_{0})\subseteq A_{i}$ and so, in particular, $Y\subseteq A_{i}$.

### Proof by Contradiction

Suppose for contradiction that $X$ is sequentially compact, $\{U_{\alpha }\mid \alpha \in J\}$ is an open cover of $X$, and the Lebesgue number $\delta$ does not exist. That is: for all $\delta >0$, there exists $A\subset X$ with $\operatorname {diam} (A)<\delta$ such that there does not exist $\beta \in J$ with $A\subset U_{\beta }$.
This enables us to perform the following construction:
$\delta _{1}=1,\quad \exists A_{1}\subset X\quad {\text{where}}\quad \operatorname {diam} (A_{1})<\delta _{1}\quad {\text{and}}\quad \neg \exists \beta (A_{1}\subset U_{\beta })$
$\delta _{2}={\frac {1}{2}},\quad \exists A_{2}\subset X\quad {\text{where}}\quad \operatorname {diam} (A_{2})<\delta _{2}\quad {\text{and}}\quad \neg \exists \beta (A_{2}\subset U_{\beta })$
$\vdots$
$\delta _{k}={\frac {1}{k}},\quad \exists A_{k}\subset X\quad {\text{where}}\quad \operatorname {diam} (A_{k})<\delta _{k}\quad {\text{and}}\quad \neg \exists \beta (A_{k}\subset U_{\beta })$
$\vdots$
Note that $A_{n}\neq \emptyset$ for all $n\in \mathbb {Z} ^{+}$, since $A_{n}\not \subset U_{\beta }$. It is therefore possible by the axiom of choice to construct a sequence $(x_{n})$ in which $x_{i}\in A_{i}$ for each $i$. Since $X$ is sequentially compact, there exists a subsequence $\{x_{n_{k}}\}$ (with $k\in \mathbb {Z} _{>0}$) that converges to $x_{0}$.
Because $\{U_{\alpha }\}$ is an open cover, there exists some $\alpha _{0}\in J$ such that $x_{0}\in U_{\alpha _{0}}$. As $U_{\alpha _{0}}$ is open, there exists $r>0$ with $B_{d}(x_{0},r)\subset U_{\alpha _{0}}$. Now we invoke the convergence of the subsequence $\{x_{n_{k}}\}$: there exists $L\in \mathbb {Z} ^{+}$ such that $L\leq k$ implies $x_{n_{k}}\in B_{r/2}(x_{0})$.
Furthermore, there exists $M\in \mathbb {Z} _{>0}$ such that $\delta _{M}={\tfrac {1}{M}}<{\tfrac {r}{2}}$. Hence for all $z\in \mathbb {Z} _{>0}$, we have $M\leq z$ implies $\operatorname {diam} (A_{M})<{\tfrac {r}{2}}$.
Finally, define $q\in \mathbb {Z} _{>0}$ such that $n_{q}\geq M$ and $q\geq L$. For all $x'\in A_{n_{q}}$, notice that:
* $d(x_{n_{q}},x')\leq \operatorname {diam} (A_{n_{q}})<{\frac {r}{2}}$, because $n_{q}\geq M$.
* $d(x_{n_{q}},x_{0})<{\frac {r}{2}}$, because $q\geq L$ entails $x_{n_{q}}\in B_{r/2}\left(x_{0}\right)$.
Hence $d(x_{0},x')<r$ by the triangle inequality, which implies that $A_{n_{q}}\subset U_{\alpha _{0}}$. This yields the desired contradiction.