# Topology/Completeness

Completeness and related ideas inherently assume the notion of 'distance'. Hence, throughout this chapter, we will be dealing only with metric spaces.

### Definition

A sequence $\{x_{n}\}$ is said to be a Cauchy sequence if for any $\varepsilon >0$, there is an $N\in \mathbb {N}$ such that for any $a,b>N$, $d(x_{a},x_{b})<\varepsilon$.

### Theorem

All convergent sequences are Cauchy sequences

#### Proof

A convergent sequence $\{x_{n}\}$ will converge to a limit $x$, implying that there exists an $N$ such that for any $a>N$, that $d(x_{a},x)<{\tfrac {\varepsilon }{2}}$. Thus, for any $a,b>N$, $d(x_{a},x_{b})\leq d(x_{a},x)+d(x_{b},x)<\varepsilon$.

### Definition

A metric space is said to be complete when all Cauchy sequences converge to a limit.
* A subset $A$ of a metric space $X$ is dense in an open set $O$ when $O\subseteq \mathrm {Cl} (A)$.
* A subset $A$ of a metric space $X$ is everywhere dense when it is dense in $X$.
* A subset $A$ of a metric space $X$ is nowhere dense when it is dense in no open set in $X$.
Completeness is obviously not a Topological property, for a homeomorphism exists between the spaces $\mathbb {R}$ and $(0,1)$, although $\mathbb {R}$ is complete while $(0,1)$ being a non-closed subset of $\mathbb {R}$, is not.

### Theorem

A closed subset of a complete space is itself complete.

#### Proof

Consider a complete space $X$ and let $C\subset X$ be closed. Consider any Cauchy sequence within $C$, which is within $X$, so it has a limit. This limit is a point of contact of this sequence, and consequently, is a point of contact of $C$, and so is also within $C$. Thus, $C$ is complete.
For a function from metric space to a complete metric space have a very important theorem called the uniform convergence theorem.

### Theorem (Uniform Convergence Theorem))

Let X be a metric space, and let $f_{n}$ be a sequence of continuous functions from X to a complete metric space Y such that for all $\epsilon >0$, there exists an N such that for all $n_{1},n_{2}$>N, $d(f_{n_{1}}(x),f_{n_{2}}(x))<\epsilon$. Then the sequence of functions converges to a continuous function from X to Y. Note that $\epsilon$ must be independent of x.

#### Proof

Obviously the sequence of functions converges pointwise since the sequence $f_{n}(x)$ is obviously a Cauchy sequence which converges to a value $f(x)$. We will now prove that f(x) is continuous.
There exists an N such that for all n>N, $d(f_{n}(x),f(x))<{\frac {\epsilon }{3}}$ for any x within X. Now let n>N, and consider the continuous function $f_{n}$. Since it is continuous, there exists an open ball $B_{\delta }(x)$ in X such that its image is contained in the open ball $B_{\frac {\epsilon }{3}}(f_{n}(x))$.
Now consider any open ball $B_{\epsilon }(f(x))$ around f(x), and any point x' in the open ball $B_{\delta }(x)$. Then $d(f(x'),f(x))\leq d(f(x'),f_{n}(x'))+d(f_{n}(x'),f_{n}(x))+d(f_{n}(x),f(x))<\epsilon$ so the function f(x) is continuous.

### Tietze Extension

Using Urysohn's Lemma and the Uniform Convergence Theorem, we can now prove the following result:
Theorem: Let X be a normal topological space, and let A be a closed subset. Let f be a continuous function from the subspace A to the interval [0,1]. Then there exists a continuous function g from X to the interval [0,1] such that f(x)=g(x) for all points in A.

#### Proof

In order to prove this we first establish the following result:
For any continuous function from a closed subset A of X to the interval [-r,r], there is a continuous function from X to the interval $[-{\frac {r}{3}},{\frac {r}{3}}]$ such that |f(x)-g(x)|<${\frac {2}{3}}r$ for all $x\in A$.
Consider the sets $f^{-1}([-r,-{\frac {1}{3}}r])$ and $f^{-1}([{\frac {1}{3}}r],r)$, which are disjoint sets which, since they are closed in the closed set A, are also closed in X. Now we use Urysohn's lemma to obtain a function $g:X\rightarrow [0,1]$ such that g(x)=0 when $x\in f^{-1}([-r,-{\frac {1}{3}}r])$ and such that g(x)=1 when $x\in f^{-1}([{\frac {1}{3}}r],r)$. Then consider the function h defined by $h(x)={\frac {r}{3}}(2g(x)-1)$ from the set X to the interval $[-{\frac {r}{3}},{\frac {r}{3}}]$ so that $h(x)=-{\frac {r}{3}}$ when $x\in f^{-1}([-r,-{\frac {1}{3}}r])$ and such that $h(x)={\frac {r}{3}}$ when $x\in f^{-1}([{\frac {1}{3}}r],r)$. Then to see that the function h satisfies the inequality |f(x)-h(x)|<${\frac {2}{3}}r$, consider the case when $-r\leq x\leq -{\frac {1}{3}}r$. Then $h(x)=-{\frac {r}{3}}$ so the inequality is satisfied there. Then consider the case when ${\frac {1}{3}}r\leq x\leq r$. Then $h(x)={\frac {r}{3}}$ so the inequality is also satisfied there. Finally, consider the case when $-{\frac {1}{3}}r<x<{\frac {1}{3}}r$. Then $|h(x)|\leq {\frac {1}{3}}r$ so the inequality is also satisfied for this final case.
Now we prove the main result.

### Theorem (Cantor's intersection theorem)

The intersection of every sequence of compact subsets $\{A_{n}\}$ of a metric space $X$ such that $A_{n}\subseteq A_{n-1}$ is non-empty if and only if the metric space is complete.

#### Proof

($\Rightarrow$)Let $\{x_{n}\}$ be a Cauchy sequence in $X$. Define the sequences $\{a_{n}\}$,$s_{n}$ as $a_{n}=d(x_{n+1},x_{n})$, $s_{n}=\displaystyle \sum _{i=1}^{n}a_{n}$ respectively. As $s_{n}$ is a real-valued Cauchy sequence, it is convergent. Hence, we can see that $\{x_{n}\}$ is bounded. Therefore, we can construct a sequence of compact sets $\{A_{n}\}$ satisfying $A_{n}\subseteq A_{n-1}$, such that for each $n$, $x_{n}\in A_{n}$ but $x_{n}\notin A_{n+1}$. If $x\in \bigcap _{i=1}^{\infty }A_{n}$, the sequence $x_{n}$ converges to $x$ implying that $X$ is complete.
($\Leftarrow$)Let $A_{n}$ be a sequence of compact sets satisfying $A_{n}\subseteq A_{n-1}\forall n$. Select a sequence $\{x_{n}\}$ where $x_{n}\in A_{n}$. As $\{x_{n}\}$ is bounded, it has a convergent subsequence $\{y_{n}\}$ with limit $x$. As $A_{n}\subseteq A_{n-1}$, we have $x\in \bigcap _{i=1}^{\infty }A_{n}$.

### Theorem (Nested balls theorem)

The Nested interval theorem is quite similar to the Cantor's intersection theorem. It states that the intersection of a sequence of the closures of balls $A_{n}$ such that $A_{n}\subseteq A_{n-1}$ and such that their sequence of radii $r_{n}$ approaches $0$ is non-empty if and only if the metric space is complete.
An important tool in general topology and functional analysis is the Baire Category Theorem which provides the necessary and sufficient condition for a metric space to be complete. Note that this is often referred to as the First form of Baire's theorem.

### Theorem (Baire Category Theorem)

A complete metric space is not a countable union of nowhere dense subsets.

#### Proof

Let $A=\bigcup _{i=1}^{\infty }K_{i}$ be a complete metric space where each $K_{i}$ is nowhere dense. Let $S_{1}$ be an open ball of radius ${\tfrac {1}{2}}$. Let $S_{n}$, where $n>1$ be an open ball of radius ${\tfrac {1}{2^{n}}}$ contained in $S_{n-1}$ which does not meet $A_{n}$, which is possible because if it always met $A_{n}$, then $A_{1}$ would be dense in $S_{n-1}$. The centers $c_{n}$ of the spheres $S_{n}$ form a Cauchy sequence because when $n_{1},n_{2}>N$ and, then $d(x_{n_{1}},x_{n_{2}})<{\tfrac {1}{2^{N}}}$. Therefore, because the space $A$ is complete, it converges to a limit $c$ within $A$. However, it is not within any $K_{n}$, and so it is not within $A$, a contradiction.

### Theorem (Generalized Heine-Borel Theorem)

A metric space is compact if and only if the metric space is complete and totally bounded.

#### Proof

($\Rightarrow$) Let X be a compact metric space. Then it is countably compact, and hence totally bounded. Also, since it is countably compact, any Cauchy sequence must either be finite, in which case it clearly converges to an element in X since the sequence eventually stabilizes, or it is infinite, in which case it has a limit point in X, and it is clear that the Cauchy sequence converges to this limit point. ($\Leftarrow$) Let {$a_{n}$} be an infinite sequence of points in X, such that they form an infinite set (i. e. at least infinitely many of them are distinct). Now consider a finite 1-net, and consider the set of the closures of the spheres of each point in the 1-net, each of radius 1. The union of these closures of spheres is X. Since there are infinitely many distinct {$a_{n}$}, and only finitely many closures of spheres, at least one of these closures of spheres must contain an infinite subsequence {$a_{n1}$}, and denote this to be $Cl(B_{1}(x_{1}))$. Now consider a finite ${\frac {1}{2}}$-net within this closure of a sphere, and consider the closures of spheres of each point in the ${\frac {1}{2}}$-net, each of radius ${\frac {1}{2}}$. The union of these closures of spheres is the closure of the first sphere. Since there are infinitely many distinct {$a_{n1}$} in $Cl(B_{1}(x_{1}))$, but only finitely many closures of balls, at least one of closures of balls that meets $Cl(B_{1}(x_{1}))$ with $Cl(B_{1}(x_{1}))$ must contain an infinite subsequence {$a_{n2}$}. Continuing this process of obtaining a new closure of ball which contains infinitely many elements of the sequence, and because of completeness, we can use the nested spheres theorem to obtain an element x that is within the intersection of all of the spheres. This x is a limit point of all balls, and thus must also be the limit point of the original sequence {$a_{n}$} since any neighborhood of x must contain some closure of a ball in the aforementioned sequence, which in turn contains infinitely many elements of the sequence {$a_{n}$}. From this, we can conclude that X is countably compact, and thus is compact.

#### Corollary (Bolzano-Weierstrass Theorem)

In a complete metric space X, a set S is relatively compact if and only if it is totally bounded. This is because its closure is obviously totally bounded, and any closed subset of a complete metric space is also complete.
Note: If $X$ is a complete metric space, then every totally bounded sequence $\{a_{n}\}\subset X$ has a convergent subsequence. This is because the sequence will be relatively compact, and since its closure is compact and thus countably compact and thus has a limit point, this sequence will have a limit point x. For this limit point, consider the balls $B_{\frac {1}{n}}(x)$ and then for each ball, choose a point in the sequence within the ball, such that it is in order (i. e. in a way that does not go "backwards" in the sequence). Then this is obviously a subsequence that converges to the limit point.

### Theorem (Arzelà–Ascoli theorem)

Now that we have a result which proves the equivalence between relative compactness and total boundedness in a complete metric space, we now turn to how to establish relative compactness in the metric space of continuous functions in the closed interval [a,b]. First, we have the following definitions.

#### Definitions

* A set of functions F defined on [a,b] is uniformly bounded if there exists an M such that for any function f within F, f(x)<M for all x within [a,b].
* A set of functions F defined on [a,b] is equicontinuous if for all $\epsilon >0$, there exists a $\delta >0$ such that for all $x_{1},x_{2}\in [a,b]$ and for all $f\in F$, $|x_{1}+x_{2}|<\delta \rightarrow |f(x_{1})-f(x_{2})|<\epsilon$.
Now, the following is the statement of the theorem: A set of continuous functions F defined on [a,b] is relatively compact if and only if it is equicontinuous and uniformly bounded.

#### Proof
## Exercises

* Prove that the Euclidean space $\mathbb {R} ^{n}$ is complete.
* Prove that the Hilbert space is complete.
* Explicitly establish the nested balls theorem.