# Math4201 Topology I (Lecture 27)

## Continue on compact spaces

### Compact spaces


#### Heine-Borel theorem

A subset $K\subseteq \mathbb{R}^n$ is compact if and only if it is closed and bounded with respect to the standard metric on $\mathbb{R}^n$.

#### Definition of bounded

$A\subseteq \mathbb{R}^n$ is bounded if there exists $c\in \mathbb{R}^{>0}$ such that $d(x,y)<c$ for all $x,y\in A$.

<details>
<summary>Proof for Heine-Borel theorem</summary>

Suppose $k\subseteq \mathbb{R}^n$ is compact.

Since $\mathbb{R}^n$ is Hausdorff, $K\subseteq \mathbb{R}^n$ is compact, so $K$ is closed subspace of $\mathbb{R}^n$. by Proposition of compact subspaces with Hausdorff property.

To show that $K$ is bounded, consider the open cover with the following balls:
$$
B_1(0), B_2(0), ..., B_n(0), ...
$$

Since $K$ is compact, there are $n_1, ..., n_k\in \mathbb{N}$ such that $K\subseteq \bigcup_{i=1}^k B_{n_i}(0)$. Note that $B_{n_i}(0)$ is bounded, so $K$ is bounded. $\forall x,y\in B_{n_i}(0)$, $d(x,y)<2n_i$. So $K$ is bounded.

---

Suppose $K\subseteq \mathbb{R}^n$ is closed and bounded.

First let $M=[a_1,b_1]\times [a_2,b_2]\times \cdots \times [a_n,b_n]$.

This is compact because it is a product of compact spaces.

Since $K$ is bounded, we can find $[a_i,b_i]$s such that $K\subseteq M$.

Since $K$ is closed subspace of $\mathbb{R}^n$, $K$ is closed in $M$.

Since any closed subspace of a compact space is compact, $K$ is compact.

</details>

> [!WARNING]
>
> This theorem is not true for general topological spaces.
>
> For example, take $X=B_1(0)$ with the standard topology on $\mathbb{R}^n$.
>
> Take $K=B_1(0)$, this is not compact because it is not closed in $\mathbb{R}^n$.

#### Extreme Value Theorem

If $f:X\to \mathbb{R}$ is continuous map with $X$ being compact. Then $f$ attains its minimum and maximum.

<details>
<summary>Proof</summary>

Let $M=\sup\{f(x)\mid x\in X\}$ and $m=\inf\{f(x)\mid x\in X\}$.

We want to show that there are $x_m,x_M\in X$ such that $f(x_m)=m$ and $f(x_M)=M$.

Consider the open covering of $X$ given as

$$
\{U_\alpha\coloneqq f^{-1}((-\infty, \alpha))\}_{\alpha\in \mathbb{R}}
$$

If $X$ doesn't attain its maximum, then this is an open covering of $X$:

1. $U_\alpha$ is open because $f$ is continuous and $(-\infty, \alpha)$ is open in $\mathbb{R}$.
2. $\bigcup_{\alpha\in \mathbb{R}} U_\alpha = X$ because for any $x\in X$, by the assumption there is $x'\in X$ with $f(x)<f(x')$ (otherwise $f(x)$ is the maximum value). Then $x\in U_{f(x')}$.

So there is an open covering of $X$ and hence it's got a finite subcover $\{U_{\alpha_i}\}_{i=1}^n$.

$$
X=\bigcup_{i=1}^n U_{\alpha_i}=\bigcup_{i=1}^n f^{-1}((-\infty, \alpha_i))=f^{-1}(-\infty, \alpha_k)
$$

and $\alpha_1\leq \alpha_2\leq \cdots \leq \alpha_n$. There is $x_i$ such that $\alpha_i=f(x_i)$.

Note that $x_k\notin U_{\alpha_k}$ because $f(x_k)>\alpha_k$. So $x_k\notin X$. This contradicts the assumption that $X$ doesn't attain its maximum.

</details>

#### Theorem of uniform continuity

Let $f:(X,d)\to (X',d')$ be a continuous map between two metric spaces. **Let $X$ be compact**, then for any $\epsilon > 0$, there exists $\delta > 0$ such that for any $x_1,x_2\in X$, if $d(x_1,x_2)<\delta$, then $d'(f(x_1),f(x_2))<\epsilon$.

#### Definition of uniform continuous function

$f$ is uniformly continuous if for any $\epsilon > 0$, there exists $\delta > 0$ such that for any $x_1,x_2\in X$, if $d(x_1,x_2)<\delta$, then $d'(f(x_1),f(x_2))<\epsilon$.

<details>
<summary>Example of uniform continuous function</summary>

Let $f(x)=x^2$ on $\mathbb{R}$.

This is not uniformly continuous because for fixed $\epsilon > 0$, the interval $\delta$ will converge to zero as $x_1,x_2$ goes to infinity.

---

However, if we take $f\mid_{[0,1]}$, this is uniformly continuous because for fixed $\epsilon > 0$, we can choose $\delta = \epsilon$.

</details>

#### Lebesgue number lemma

Let $X$ be a compact metric space and $\{U_\alpha\}_{\alpha\in I}$ be an open cover of $X$. Then there is $\delta>0$ such that for any two points $x_1,x_2\in X$ with $d(x_1,x_2)<\delta$, there is $\alpha\in I$ such that $x_1,x_2\in U_\alpha$.

<details>
<summary>Proof of uniform continuity theorem</summary>

Let $\epsilon > 0$. be given and consider

$$
\{f^{-1}(B_{\epsilon/2}^{d'}((x'))\}_{x'\in X'}
$$

We claim that there is an open covering of $X$.

1. $f^{-1}(B_{\epsilon/2}^{d'}((x')))$ is open because $f$ is continuous and $B_{\epsilon/2}^{d'}((x'))$ is open in $X'$.
2. $X=\bigcup_{x'\in X'} f^{-1}(B_{\epsilon/2}^{d'}((x')))$ because for any $x\in X$, $x\in f^{-1}(B_{\epsilon/2}^{d'}((f(x)))$.

Since $X$ is compact, there is a finite subcover $\{f^{-1}(B_{\epsilon/2}^{d'}((x')))\}_{i=1}^n$.

By Lebesgue number lemma, there is $\delta>0$ such that for any two points $x_1,x_2\in X$ with $d(x_1,x_2)<\delta$, there is $x'\in X'$ such that $x_1,x_2\in f^{-1}(B_{\epsilon/2}^{d'}((x')))$.

So $f(x_1),f(x_2)\in B_{\epsilon/2}^{d'}((x'))$.

Apply the triangle inequality with $d'(x_1,x')$ and $d'(x_2,x')$, we have $d'(f(x_1),f(x_2))<2\epsilon/2=\epsilon$.

</details>