\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\textwidth = 6.5 in
\textheight = 9 in
\oddsidemargin = 0.0 in
\evensidemargin = 0.0 in
\topmargin = 0.0 in
\headheight = 0.0 in
\headsep = 0.0 in
\parskip = 0.2in
\parindent = 0.0in

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}{Definition}

\begin{document}

\begincenter{}\endcenter






\section{Topology of Metric Spaces}

\subsection{Open Sets}

Recall that a metric space is a set $M$ with a distance function
$d:M\times M\to \R$ satisfying

\begin{enumerate}
\item $d(x,y) \ge 0$ with ``='' iff $x = y$ (\emph{positivity})
\item $d(x,y) = d(y,x)$ (\emph{symmetry})
\item $d(x,z) \le d(x,y) + d(y,z)$ (\emph{triangle inequality})
\end{enumerate}
$\forall\, x,y,z\in M$.

\subsubsection{Examples}
\

1) $\R^n$ with norm $\|x\|_p = \Big(\sum x_i^p\Big)^{1/p}$ or
$\|x\|_\infty = \max\{|x_i|\}$.

2) $C[a,b]$ with norm $\|f\|_p = \Big(\int_a^b |f(x)|^pdx\Big)^{1/p}$
or $\|f\|_\infty = \sup |f(x)|$

3) Let $M$ be any set and for $x,y \in M$ define
\[ d(x,y) = \left\{\begin{array}{ll}
1 & x \ne y\\
0 & x = y
\end{array}\right. \]
Then $d(x,y)$ clearly satisfies positivity and symmetry and it is not hard
to show that it also satisfies the triangle inequality. This metric is
called the ``discrete metric'' on $M$. The only point that is ``close''
to a given point $x\in M$ is $x$ itself!

\begin{definition} The set $B(x,r) = \{y\in M\ |\ d(x,y)<r\}$ is called
the \emph{open ball} around $x$ with \emph{radius}~$r$.  \end{definition}

Open balls play the same role as open intervals in~$\R$. Many definitions
and theorems for $\R$ carry over to metric spaces by replacing the words
`open interval' with `open ball.'

\begin{definition} A subset $A\subset M$ is \emph{open} if $\forall\, x\in
A$, $\exists\, r>0$ such that $B(x,r)\subset A$.  \end{definition}

An arbitrary open set in a metric spaces does not usually have a structure
that is simple to describe, like an open set in $\R$ (the countable disjoint
union of open intervals).

\begin{definition} A \emph{metric subspace} of $M$ is any subset $M'$
with distance function of $M$ restricted to $M'$. \end{definition}

\begin{theorem}
Let $M'$ be a metric subspace of $M$. Then 
\[ A' \mbox{\ is open in\ } M' \iff
\exists\, A \mbox{\ open in\ } M \mbox{\ such that\ } A' = A\cap M' \]
\end{theorem}

\proof
($\Rightarrow$) If $A'$ is open in $M'$, then $\forall\, x\in A'$, $\exists\,
r>0$ such that
\[ B'(x,r) = \{ y\in M'\ |\ d(x,y) < r\}\subset A' \]
Consider
\[ B(x,r) = \{ y\in M\ |\ d(x,y) < r\} \]
Then $B'(x,r) = B(x,r)\cap M'$. Let
\[ A = \bigcup_{x\in A'} \Big\{ B(x,r)\ |\ B'(x,r)\subset A'\Big\} \]
Then $A$ is open and
\begin{eqnarray*}
A\cap M' &=& \bigcup_{x\in A'} \Big\{ B(x,r)\cap M'\ |\ B'(x,r)\subset
A'\Big\}\\
&=&\bigcup_{x\in A'} \Big\{ B'(x,r)\ |\ B'(x,r)\subset A'\Big\} = A'
\end{eqnarray*}
($\Leftarrow$) Let $A$ be an open subset of $M$ and let $x\in A' =
A\cap M'$. By definition, $\exists\, B(x,r)\subset A$, so
$B'(x,r) = B(x,r)\cap M' \subset A\cap M' = A'$. Therefore, $A'$ is open.
\qed

\begin{corollary}
Suppose $M'$ is open in $M$. Then $A'$ is open in $M'$ $\iff$ $A'$
is open in $M$.
\end{corollary}

\begin{theorem}\label{07:OPEN}
In any metric space:
\begin{enumerate}
\item The union of any number of open sets is open.
\item The intersection of a finite number of open sets is open.
\end{enumerate}
\end{theorem}

\proof  1. Let $x\in\bigcup U_\alpha$ where each $U_\alpha$ is open.
Then $x \in U_\alpha$ for some $\alpha$, so $\exists\, B(x,r)\subset
U_\alpha$. Then $B(x,r)\subset\bigcup U_\alpha$, proving that the union
is open.

2. Let $x\in U_1\cap\dots\cap U_n$ where each $U_i$ is open. For
each $i$ there is a $B(x,r_i)\subset U_i$. Let $r=\min \{r_i\}$. Then
$B(x,r)\subset B(x,r_1)\cap \cdots \cap B(x,r_n)\subset U_1\cap\dots\cap
U_n$, which proves that the intersection is open. \qed

A \emph{topological space} is a set $X$ with a collection of open subsets
(including $\emptyset$ and $X$) that satisfying the two statements of the
theorem. Many of our proofs for metric spaces would also apply more
generally to topological spaces, but we do not need this level of
generality.

\subsection{Closed Sets}

Let $M$ be a metric space with distance function $d(x,y)$.

\begin{definition}
\begin{enumerate}
\item We say that $x\in M$ is the \emph{limit} of a sequence
$\{x_n\}\subset M$, written $x = \lim x_n$, if
\[ \forall\, 1/m, \exists\, N \mbox{\ such that\ } d(x_n,x)<1/m, \forall\,
n\ge N \]
\item We say that $x\in M$ is a \emph{limit point} of a set $A\subset M$ if
$\exists\, \{x_n\}\subset A$ such $x = \lim x_n$.
\end{enumerate}
\end{definition}
Note that an equivalent condition for $x$ to be a limit point of $A$ is
\[ B(x,r)\cap A \ne \emptyset\quad \forall\, r > 0 \]

\begin{definition}
\begin{enumerate}
\item A set $A\subset M$ is \emph{closed} if it contains all
of its limit points.
\item The \emph{closure} of a set $A\subset M$, denoted by $\overline{A}$,
is the union of $A$ and all of its limit points.
\end{enumerate}
\end{definition}

\begin{theorem}\label{07:COMPLEMENTS}
$A\subset M$ is closed $\iff$ $A^c$ is open.
\end{theorem}

\proof ($\Rightarrow$) Let $y\in A^c$. Then $y$ is not a limit point
of $A$ (closed). So $\exists\, B(y,r)\subset A^c$ (otherwise every open
ball around $y$ intersects $A$ which implies $y$ is a limit point of
$A$). Therefore, $A^c$ is open.

($\Leftarrow$) Let $x$ be a limit point of $A$. If $x\in A^c$ then
$\exists\, B(x,r) \subset A^c$ (open). Contradiction! Therefore,
$x\in A$.  \qed

\begin{theorem}
In any metric space:
\begin{enumerate}
\item The union of a finite number of closed sets is closed.
\item The intersection of any number of closed sets is closed.
\end{enumerate}
\end{theorem}

\proof These statements follow from
Theorems~\ref{07:OPEN},~\ref{07:COMPLEMENTS}, and the following
identities:
\[
\big(U_1\cup\dots\cup U_n)^c = U_1^c\cap\dots\cap U_n^c \mbox{\ and\ }
\big(\bigcap U_\alpha\big)^c = \bigcup U_\alpha^c
\]
\qed

\subsection{Completeness}
Let $M$ be a metric space with distance function $d(x,y)$.

\begin{definition} A sequence $\{x_n\}\subset M$ is a \emph{Cauchy}
sequence if $\forall\, 1/m$, $\exists\, N$ such that $d(x_j,x_k)<1/m$,
$\forall\, j,k\ge N$.  \end{definition}


\begin{theorem}
If $\{x_n\}$ converges, then $\{x_n\}$ is Cauchy.
\end{theorem}

\proof Let $x = \lim x_n$. Given $1/m$, $\exists\, N$ such
that $d(x_n,x)<1/(2m)$, $\forall\, n\ge N$.  Therefore, by the
triangle inequality, \[ d(x_j,x_k) \le d(x_j,x) + d(x,x_k) <
\frac{1}{2m}+\frac{1}{2m} = \frac{1}{m}\quad \forall\, j,k \ge N\] \qed

\emph{Example:} The converse is \emph{not} true for a general metric
space. Consider $\Q$ as a metric subspace of $\R$. The sequence \[ x_n
= 1 - \frac{1}{3} + \frac{1}{5} - \cdots + (-1)^n\frac{1}{2n+1} \in \Q
\] converges to $\pi/4\in \R$, so the sequence is Cauchy but does not
converge to a point in~$\Q$.

\begin{definition}
A metric space is \emph{complete} if every Cauchy sequence converges.
\end{definition}

\emph{Example:} $\R^n$ with Euclidean distance is a complete metric space.
If a sequence $x_j = (x_{j1},\dots,x_{jn})\in\R^n$ is Cauchy, then each
coordinate $x_{jk}$ (for fixed $k$) defines a Cauchy sequence in $\R$, and
so converges, $x_{jk}\to a_k$. Thus $x_j \to a = (a_1,\dots,a_n)\in\R^n$.


\begin{theorem}\label{07:C[a,b]}
$C[a,b]$ with the norm $\|f\|_\infty = \sup\{|f(x)|\ |\ x\in[a,b]\}$ is a
complete metric space.
\end{theorem}

\proof Let $\{f_n\}\subset C[a,b]$ be a Cauchy sequence. Given $1/m$,
$\exists\, N$ such that $\|f_j - f_k\|_\infty < 1/m$, $\forall\, j,k \ge N$.
This implies that
\[ |f_j(x) - f_k(x)| < 1/m\quad \forall\, x\in[a,b], \forall\, j,k\ge N \]
Thus, $\{f_n(x)\}$ is a Cauchy sequence in $\R$ and so converges,
say $f_n(x)\to f(x)$.
Letting $k\to\infty$ in the previous inequality, we get
\[ |f_j(x) - f(x)| \le 1/m\quad \forall\, x\in[a,b], \forall\, j\ge N \]
Therefore $f_n$ converges to $f$ uniformly, and
by Theorem~\ref{02:UNIFORMLIMITS}, $f\in C[a,b]$. Hence, $C[a,b]$ is
complete. \qed

\emph{Remarks:}

1) As the proof demonstrates, convergence in the sup-norm, $\|f_n -
f\|_\infty \to 0$, is the same as uniform convergence of functions,
$f_n\to f$.

2) $C[a,b]$ is \emph{not} complete with respect to other norms.  The
example of section 2.1 gives a sequence of continuous functions on $[0,2]$
that converges pointwise to a discontinuous function on~$[0,2]$. These
functions form a Cauchy sequence with respect to the norm $\|f\|_1 =
\int_0^2 |f(x)|dx$ but do not converge to a function in~$C[a,b]$.

\subsection{Compactness}
Let $M$ be a metric space with distance function $d(x,y)$. Our previous
notion of compactness carries over directly to metric spaces.

\begin{definition} A set $A\subset M$ is \emph{compact} if every open
cover of $A$ has a finite subcover.
\end{definition}

If $M$ is a normed vector space then a natural definition for a set $A$
to be \emph{bounded} is that there exists a constant $K$ such that
\[ \|x\| \le K\,\quad \forall x\in A \]
This concept can be extended to general metric spaces by rewriting the
boundedness condition in terms of the metric:
If $\|x\| \le K$, $\forall x\in A$, then $d(x,y) = \|x - y\| \le
\|x\| + \|y\| \le 2K$, $\forall x,y\in A$. Conversely, if $d(x,y) \le
K$, $\forall x,y\in A$, then fix $z \in A$ and let $L = \|z\|$. Then
$\|x\| = \le \|x - z\| + \|z\| \le K + L$, $\forall x\in A$.

\begin{definition}
The \emph{diameter} of a set $A$ is
\[ d(A) = \sup_{x,y\in A} d(x,y) \]
The set $A$ is \emph{bounded} if $d(A) < \infty$.
\end{definition}

\begin{proposition}\label{07:BOUNDED}
If $A \subset M$ is compact, then $A$ is bounded.
\end{proposition}

\proof The open balls $B(a,1)$, for $a\in A$, cover $A$, so there
is a finite number, $a_1,\dots,a_n\in A$, such that $A\subset
B(a_1,1)\cup\cdots\cup B(a_n,1)$. Let $M = \max d(a_i,a_j)$,
$i,j=1,\dots,n$. For any $x,y\in A$ there exist $a_i$ and $a_j$ such that
$x\in B(a_i,1)$ and $y\in B(a_j,1)$. By the triangle inequality,
\[ d(x,y) \le d(x,a_i) + d(a_i,a_j) + d(a_j,y) \le 1 + M + 1 \]
which proves that $d(A) \le M+2$. \qed

For the next proof it is convenient to have a notion of the distance of a
point $x$ to a set $A$:
\[ d(x,A) = \inf_{y\in A} d(x,y) \]

\begin{proposition}\label{07:COUNTABLEDENSE}
Any compact metric space has a countable dense subset.
\end{proposition}

\proof We may assume the metric space $M$ has an infinite number of points
(otherwise $M$ itself is a countable dense subset).

Let $z_1$ be any point in $M$ and define a sequence $\{z_n\}$ inductively
as follows: Let $R_n$ be the maximum possible distance in $M$ from the set
$\{z_1,\dots,z_n\}$.
\[ R_n = \sup_{x\in M}d(x,\{z_1,\dots,z_n\}) \]
Note that $R_n<\infty$ by Proposition~\ref{07:BOUNDED}.
Then choose $z_{n+1}$ to be any point in $M$ satisfying
\[ d(z_{n+1},\{z_1,\dots,z_n\}) \ge R_n/2 \]

As more and more points are added, the maximum possible distance
from those already chosen must decrease. In fact, it is clear that
$d(x,\{z_1,\dots,z_n\}) \ge d(x,\{z_1,\dots,z_{n+1}\})$ so the distances
are monotonic decreasing, $R_n \ge R_{n+1}$, and bounded below by~0. Let
\[ R = \lim_{n\to\infty} R_n \ge 0 \]
Note that
\begin{eqnarray*}
\lefteqn{d(z_{n+1},\{z_1,\dots,z_n\}) \ge R_n/2 \ge R/2\quad \forall\, n}\\
&\Rightarrow&
d(z_{n+1},z_j) \ge R/2\quad \forall\, j < n+1\\
&\Rightarrow&
d(z_k,z_j) \ge R/2\quad \forall\, j\ne k
\end{eqnarray*}
(Since $d(z_k,z_j) = d(z_j,z_k)$ we do not need to assume $j<k$.)

The compactness of $M$ implies that $R=0$. To see why this is true,
suppose $R > 0$. Then the open balls $B(x,R/4)$, $x\in M$, cover
$M$, so a finite number of them cover $M$. But then at least two of the
infinite sequence, say $z_j$ and $z_k$, must lie in the same open ball
of radius $R/4$ and hence $d(z_j,z_k)<R/2$, contradicting the previous
inequality. Therefore, $R = 0$.

Finally, we show that $\{z_n\}$ is dense in~$M$ by showing that if
$x\in M$ is an arbitrary point, there is a subsequence of $\{z_n\}$
that converges to~$x$. Since $\lim R_n = 0$, given any $m\in\N$,
there is some $R_n < 1/m$. By the definition of $R_n$, the distance of
\emph{any} point of $M$ to $\{z_1,\dots,z_n\}$ is $\le R_n$. In particular,
$d(x,\{z_1,\dots,z_n\}) < 1/m$ so $\exists\, z_{k(m)}$ (for some $1 \le k(m)
\le n$) such that $d(x,z_{k(m)}) < 1/m$. The subsequence $\{z_{k(m)}\}$
obviously converges to $x$: Given any $1/m$, $d(x,x_{k(j)}) < 1/j \le 1/m$,
$\forall\, j \ge m$. \qed

The proof of the following theorem closely parallels the proof given for
compact sets of real numbers, Theorem~\ref{01:COMPACTNESS}.

\begin{theorem}\label{07:HEINEBOREL}
A set $A \subset M$ is compact if and only if every sequence
$\{x_n\}\subset A$ has a limit point in $A$, i.e., has a subsequence
that converges to a point in~$A$.  \end{theorem}

\proof ($\Rightarrow$) By contradiction. Assume $\exists\, \{x_n\}\subset A$
that has no limit points in $A$. Let $C_k$ be the closure of the set
$\{x_n\ |\ n\ge k \}$. Then the sets $B_k = M \setminus C_k$
are open and cover $A$, $A = \bigcup B_k$: If $x\in A$, then
$x$ cannot be a limit point of $\{x_n\}$ by assumption. Likewise,
$x \ne x_n$, except for possibly a finite number of $n$, otherwise $x$ would be
a limit point of $\{x_n\}$.  Thus, there is some $N$ such that $x \ne
x_n$, $\forall\, n\ge N$. Therefore $x\notin C_N$, and so $x\in B_N$.

Since $A$ is compact, there is a finite subcover, say $A \subset
B_{k_1}\cup \dots \cup B_{k_t}$. The sets $B_k$ are nested, so
$B_{k_1}\cup \dots \cup B_{k_t} = B_k$ where $k = \max\{k_1,\dots,k_t\}$.
But this means that $x_k, x_{k+1},\dots$ are not in $A$, a contradiction!

($\Leftarrow$) Let $\U = \{U_\alpha\}$ be an open cover of~$A$. We
must show $A$ is contained in a finite union of $U_\alpha$, $A \subset
U_{\alpha_1}\cup\cdots\cup U_{\alpha_t}$.

Let $\{z_n\}$ be a countable dense set of points in $M$, see
Proposition~\ref{07:COUNTABLEDENSE}. We can then find a countable subcover
of $\U$ that still covers $A$ as follows.  Consider the countable number
of open sets $B(z_n,1/m)$, $n,m\in\N$.  For each $B(z_n,1/m)$ choose
\emph{one} $U_\beta\in\U$ that contains $B(z_n,1/m)$, if any. Let $\U'
= \{U_\beta\}$ be the resulting countable subcollection. To see that
$\U'$ still covers $A$, note that $x\in A \Rightarrow x\in U_\alpha$
for some $\alpha$. Since $U_\alpha$ is open, it contains an open ball
around $x$, say $B(x,r)\subset U_\alpha$. Let $1/m < r/2$. Since $\{z_n\}$
is dense in $M$, $\exists\, z_n$ such that $d(z_n,x)<1/m$. But then
$x\in B(z_n,1/m)\subset B(x,r)$, so $\exists\, U_\beta\in \U'$ such that
$x\in U_\beta$ and hence $\U'$ covers~$A$.

We now have a countable subcover, say, $U_1, U_2,\dots$. If we take $n$
large enough, then $U_1, U_2, \dots, U_n$ must already cover~$A$. Suppose
not. Then for each $n$, $\exists\, x_n\in A$ that is not contained in
$U_1,\dots,U_n$. By assumption, the sequence $\{x_n\}$ has a limit
point $x\in A$. Thus $x\in U_k$ for some~$k$. But by construction, $U_k$
does not contain $x_k, x_{k+1},\dots$ contradicting the fact that any
neighborhood of a limit point must contain an infinite number of points
in the sequence.  \qed

\emph{Remarks:}

1) The previous theorem shows that a compact metric space is complete:
a Cauchy sequence can have at most one limit point and the theorem
guarantees at least one limit point, so the sequence converges.
Along with Theorem~\ref{07:BOUNDED}, we have
\begin{center}
\emph{Compact $\Rightarrow$ Complete and Bounded}
\end{center}
The converse of this statement is \emph{not} true (see the example below).

2) ``Completeness'' in some sense plays the role of being ``closed''
in the abstract setting where being closed may have little meaning (e.g.,
example, any metric space is itself closed). The connection
between completeness and being closed is best described in the following
statement whose proof is left as an exercise for the reader:
\begin{quote}
\emph{Let $M$ be a complete metric space. A subspace $A\subset M$ is
complete if and only if it is closed.}
\end{quote}

3) We know that $\R^n$ is complete, so closed subsets are the same as
complete subsets.  We also know that a subset of $\R$ is compact if and
only if it is closed and bounded. It is not hard to derive from this
that a subset of $\R^n$ is compact if and only if it is closed (complete)
and bounded.

\emph{Example:} The complete metric space C[a,b] with the sup-norm
distance function
\[ d(f,g) = \sup_{x\in[a,b]}|f(x) - g(x)| \]
contains subspaces that are closed (complete) and bounded, yet are not
compact. Let $A = \{ f_n(x) \}\subset C[0,2]$ where
\[ f_n(x) = \left\{ \begin{array}{ll}
0 & 0 \le x < 1 - \frac{1}{n}\\
\frac{n}{2}(x-1) + \frac{1}{2} & 1 - \frac{1}{n} \le x < 1 + \frac{1}{n}\\
1 & 1 + \frac{1}{n} \le x \le 2
\end{array} \right. \]
(see the example and illustration in section~2.1).  The set $A$ is
closed because it has no limit points in $C[0,2]$: The sequence $f_n$
converges pointwise to a discontinuous function, so the convergence is not
uniform, and therefore does not converge with respect to the sup-norm.
The set $A$ is also bounded because it has finite diameter
\[ d(A) = \sup d(f_n,f_m) = 1/2 \]
But $A$ is not compact for the same reason it is ``closed.'' The sequence
$\{f_n\}$ has no convergent subsequence in $A$ (or in $C[0,2]$).

We now give an interpretation of the Arzela-Ascoli
Theorem~\ref{05:ASCOLI} in terms of compactness in~$C[a,b]$.

\begin{theorem}
Let $A$ be a subspace of the complete metric space $C[a,b]$ with sup-norm
distance function. Then $A$ is compact if and only if
$A$ is closed, bounded, and uniformly equicontinuous.
\end{theorem}

\proof
($\Rightarrow$) Since $C[a,b]$ is complete, we know $A$ is closed by
Remark~2 above. It is bounded by Theorem~\ref{07:BOUNDED}. To show
that $A$ is uniformly equicontinuous we need to show that given any
$1/m$, $\exists\, 1/n$ such that $|x-y|<1/n\Rightarrow|f(x) - f(y)| <
1/m$, $\forall\, f\in A$. Since $A$ is covered by the open balls
$B(f,1/(3m))$ for $f\in A$, a finite number cover $A$, say $A\subset
B(f_1,1/(3m))\cup\dots B(f_t,1/(3m))$. For each $i=1,\dots,t$,
$\exists\, 1/n_i$ such that $|f_i(x) - f_i(y)|<1/(3m)$ whenever
$|x-y|<1/n_i$ (see Theorem~\ref{01:UNIFORMCONTINUITY}). Let $n =
\max\{n_1,\dots,n_t\}$. Assume $|x-y|<1/n$ and let $f\in A$ be
arbitrary. Then $f\in B(f_i,1/(3m))$ for some $i$, so
$|f(x_i)-f(x)|<1/(3m)$, $\forall\, x\in[a,b]$. Therefore,
\begin{eqnarray*}
|f(x) - f(y)| &\le& |f(x)-f_i(x)| + |f_i(x) - f_i(y)| + |f_i(y) - f(y)|\\
&<& \frac{1}{3m} + \frac{1}{3m} + \frac{1}{3m} = \frac{1}{m}
\end{eqnarray*}
 
($\Leftarrow$) By Theorem~\ref{07:HEINEBOREL}, we must show that
any sequence of functions $\{f_n\}\subset A$ has a convergent
subsequence.  Since $A$ is bounded, $\exists\, K$ such that $\|f_n\| =
\sup_{x\in[a,b]} |f_n(x)| \le K$, $\forall n$, so $\{f_n\}$ is uniformly
bounded. The sequence is uniformly equicontinuous by assumption, so
by Theorem~\ref{05:ASCOLI}, there is a subsequence, $\{f_{n'}\}$ that
converges uniformly to $f\in C[a,b]$. In particular, $\|f_n-f\|_\infty\to
0$. Because $A$ is closed, $f\in A$. \qed

 \end{document}
