# Topology/Compactness

The notion of Compactness appears in a wide variety of contexts. In particular, compactness is a "tameness property" that tells you that the objects you are dealing with are in some sense well-behaved.

## Definition

Let $X$ be a topological space and let $S\subseteq X$
A collection ${\mathcal {G}}$ of open sets $\{G_{\alpha }\}$ is said to be an Open Cover of $S$ if $S\subseteq \displaystyle \bigcup _{\mathcal {G}}G_{\alpha }$
$S$ is said to be Compact if and only if every open cover of $S$ has a finite subcover. More formally, $S$ is compact iff for every open cover ${\mathcal {G}}$ of $S$, there exists a finite subset $\{G_{\alpha _{1}},G_{\alpha _{2}},\ldots ,G_{\alpha _{n}}\}$ of ${\mathcal {G}}$ that is also an open cover of $S$.
If the set $X$ itself is compact, we say that $X$ is a Compact Topological Space.
Compactness of topological spaces can also be expressed by one of the following equivalent characterisations:
* Every filter on $X$ containing a filter basis of closed sets has a nonempty intersection.
* Every ultrafilter on $X$ converges.

## Important Properties

* Every closed subset of a compact set is compact Proof: Let $S\subseteq X$ be a compact set, and let $K$ be a closed subset of $S$. Consider any open cover ${\mathcal {G}}$ of $K$. Observe that $X\setminus K$ being open, the collection of open sets ${\mathcal {G}}\cup \{X\setminus K\}$is an open cover of $S$. As $S$ is compact, this open cover has a finite subcover ${\mathcal {G}}'$. Now, consider the collection ${\mathcal {G}}'\setminus \left(X\setminus K\right)$. This collection is obviously finite and is also a subcover of ${\mathcal {G}}$. Hence, it is a finite subcover of $K$
* Every compact subset of a Hausdorff space is closed. Proof: Let $K$ be compact. If the complement $K^{c}$ is empty, then $K$ is the same as the space; thus closed. Suppose not; that is, there is a point $x\in K^{c}$. Then for each $y\in K$, by the Hausdorff separation axiom we can find $U_{y}$ and $V_{y}$ disjoint, open and such that $x\in U_{y}$ and $y\in V_{y}$. Since $K$ is compact and the collection $\{V_{y};y\in K\}$ covers $K$, we can find a finite number of points $y_{1},y_{2},...y_{n}$ in $K$ such that: $K\subseteq V_{y_{1}}\cup V_{y_{2}}\cup \ldots \cup V_{y_{n}}$ It then follows that: $x\in U_{y_{1}}\cap U_{y_{2}}\cap \ldots \cap U_{y_{n}}=U_{x}$. Hence, every $x\in X$ has an open neighbourhood $U_{x}$. As $K^{c}$ can be represented as the union of open sets $U_{x}$, $K^{c}$ is open and $K$ is closed.
* Every compact set in a metric space is bounded. Proof: Let $X$ be a metric space and let $K\subset X$ be compact. Consider the collection of open balls ${\mathcal {G}}=\{B_{r}(p)|r\in \mathbb {R} ^{+}\}$ for some (fixed) $p\in X$. We see that ${\mathcal {G}}$ is an open cover of $K$. As $K$ is compact, it has a finite subcover, say $\{B_{r_{1}}(p),B_{r_{2}}(p),\ldots ,B_{r_{n}}(p)\}$. Let $r_{0}=\sup\{r_{1},r_{2},\ldots ,r_{n}\}$. We see that $K\subset B_{r_{0}}(p)$, and hence, $K$ is bounded.
* Heine-Borel Theorem: For any interval $[a,b]$, and for any open cover ${\mathcal {G}}$ of that interval, there exists a finite subcover of ${\mathcal {G}}$. Proof: Let $S$ be the set of all $a\leq x\leq b$ such that $[a,x]$ has a finite subcover of ${\mathcal {G}}$. $S$ is non-empty because $a$ is within the set. Define $c=\sup S$. Assume if possible, $c<b$. Then there is a finite cover of sets within ${\mathcal {G}}$ for $[a,c]$. $c$ is within a set $A$ within the cover ${\mathcal {G}}$. Thus, there exists a $\varepsilon >0$ such that $(c-\varepsilon ,c+\varepsilon )\subseteq A$. Then $c+{\tfrac {\varepsilon }{2}}$ is also within $S$, contradicting the definition of $c$. Thus, $c\geq b$. Therefore, ${\mathcal {G}}$ has a finite subcover.
Sources differ as to what exactly should be called the 'Heine-Borel Theorem'. It seems that Emile Borel proved the most relevant result, dealing with compact subsets of a Euclidean Space. However, we provide the simpler case, for reals.
* Let $X,Y$ be topological spaces. If $f:X\to Y$ is continuous, and $A\subset X$ is compact, then the image of $A$, $f(A)$, is compact. Proof: Let ${\mathcal {G}}$ be any open cover of $f(A)$. Consider the inverses $\{f^{-1}(B)\}$ where $B\in {\mathcal {G}}$. These inverses are open because $f$ is continuous. This covers $A$, and thus there is a finite subcover of $A$, $\{B_{i}\}$. Then the images $\{f(B_{i})\}$ is a finite subcover of $f(A)$.
* If a set is compact and Hausdorff, then it is normal. Proof: Let $X$ be compact and Hausdorff. Consider two closed subsets $A$ and $B$ which are themselves compact by theorem 1 above. For every $a\in A$ and $b\in B$, there exist two disjoint sets $O_{a,b,1}$ and $O_{a,b,2}$ such that $a\in O_{a,b,1}$ and $b\in O_{a,b,2}$. The union of all such $O_{a,b,2}$ for a fixed $a$ is a cover for $B$, and thus it has a finite subcover, say, ${\mathcal {O}}_{a,2}$ and let $O'_{a,2}$ be the union of its members. Let $B_{a}=\{b|O_{a,b,2}\in {\mathcal {O}}_{a,2}\}$, and let $O_{a,1}=\displaystyle \bigcap _{b\in B_{a}}O_{a,b,1}$. Observe that $B_{a}$ being finite, $O_{a,1}$ is open. The union $\displaystyle \bigcup _{a\in A}O_{a,1}$ covers $A$, and therefore it has a finite subcover ${\mathcal {O}}_{a,1}$. Let $U$ be the union of all members of this subcover. Let $A'$ denote the set of all elements $a\in A$ such that $O_{a,1}\in {\mathcal {O}}_{a,1}$. Take the intersection $V=\displaystyle \bigcap _{a\in A'}O'_{a,2}$, which is open. Then $U$ is an open superset of $A$, $V$ is an open superset of $B$, and they are disjoint. Thus, $X$ is normal.
* In a compact metric space X, a function from X to Y is uniformly continuous if and only if it is continuous. Proof:
* If two topological spaces are compact, then their product space is also compact. Proof: Let X$_1$ and X$_2$ be two compact spaces. Let S be a cover of X$_1$×X$_2$. Let x be an element of X$_1$. Consider the sets A$_{x,y}$ within S that contain (x,y) for each y in X$_2$. $\pi _{2}:(A_{x,y))$ forms a cover for X$_2$, with a finite subcover {A$_{x,yi}$}. Let B$_x$ be the intersection of $\pi _{1}:(A_{y})$ within {A$_{yi}$}, which is open. Thus, {B$_x$} forms an open cover, which has a finite subcover, {B$_{xi}$}. The corresponding sets {A$_{xi,yi}$} is finite, and forms an open subcover of the set.
* All closed and bounded sets in the Euclidean Space are compact. Proof: Let S by any bounded closed set in $R^{n}$. Then since S is bounded, it is contained in some "box" of the products of closed intervals of R. Since those closed intervals are compact, their product is also compact. Therefore, S is a closed set in a compact set, and is therefore also compact.

### Tychonoff's Theorem

The more general result on the compactness of product spaces is called Tychonoff's Theorem. Unlike the compactness of the product of two spaces, however, Tychonoff's Theorem requires Zorn's Lemma. (In fact, it is equivalent to Axiom of Choice.)
Theorem: Let $X=\prod _{i\in I}X_{i}$, and let each $X_{i}$ be compact. Then the X is also compact.
Proof: The proof is in terms of nets. Recall the following facts:
Lemma 1 - A net $(x_{\alpha })_{\alpha \in {\mathcal {A}}}$ in $\prod _{i\in I}X_{i}$ converges to $x\in \prod _{i\in I}X_{i}$ if and only if each coordinate $(x_{\alpha }^{i})_{\alpha \in {\mathcal {A}}}$ converges to $x^{i}\in X_{i}$.
Lemma 2 - A topological space $X$ is compact if and only if every net in $X$ has a convergent subnet.
Lemma 3 - Every net has a universal subnet.
Lemma 4 - A universal net $(x_{\alpha })_{\alpha \in {\mathcal {A}}}$ in a compact space $X$ is convergent.
We now prove Tychonoff's theorem.
Let $(x_{\alpha })_{\alpha \in {\mathcal {A}}}$ be a net in $\prod _{i\in I}X_{i}$.
Using Lemma 3 we can find a universal subnet $(y_{\beta })_{\beta \in {\mathcal {B}}}$ of $(x_{\alpha })_{\alpha \in {\mathcal {A}}}$.
It is easily seen that each coordinate net $(y_{\beta }^{i})_{\beta \in {\mathcal {B}}}$ is a universal net in $X_{i}$.
Using Lemma 4 we see that each coordinate net converges, because $X_{i}$ is compact.
Using Lemma 1 we see that the whole net $(y_{\beta })_{\beta \in {\mathcal {B}}}$ converges in $\prod _{i\in I}X_{i}$.
We conclude that every net in $\prod _{i\in I}X_{i}$ has a convergent subnet, so, by Lemma 2, $\prod _{i\in I}X_{i}$ must be compact. $\square$

## Relative Compactness

Relative compactness is another property of interest.
Definition: A subset S of a topological space X is relative compact when the closure Cl(x) is compact.
Note that relative compactness does not carry over to topological subspaces. For example, the open interval (0,1) is relatively compact in R with the usual topology, but is not relatively compact in itself.

## Local Compactness

The idea of local compactness is based on the idea of relative compactness.
If, in a topological space X, every element has a neighborhood that is relatively compact, then X is locally compact.
It can be shown that all compact sets are locally compact, but not conversely.

## Exercises

* It is not true in general for a metric space that a closed and bounded set is compact. Take the following metric on a set X:
$d(x,y)={\begin{cases}1&{\rm {if}}\,x\neq y\\0&{\rm {if}}\,x=y\end{cases}}$
a) Show that this is a metric
b) Which subspaces of X are compact
c) Show that if Y is a subspace of X and Y is compact, then Y is closed and bounded
d) Show that for any metric space, compact sets are always closed and bounded
e) Show that with this particular metric, closed and bounded sets need not be compact