\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,amsxtra,amsthm,amssymb,makeidx,graphics}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{question}[theorem]{Question}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{example}[theorem]{Example}
\newtheorem{definition}[theorem]{Definition}
\newtheoremstyle{citing}{3pt}{3pt}{\itshape}{0pt}{\bfseries}%
{.}{ }{\thmnote{#3}}\theoremstyle{citing}\newtheorem*{varthm}{}
\DeclareMathOperator{\card}{card}
\DeclareMathOperator{\Cl}{Cl}
\DeclareMathOperator{\Int}{Int}
\renewcommand{\emptyset}{\varnothing}
\begin{document}
\title{Metric and Topological Spaces}
\author{T.~W.~K\"{o}rner}
\maketitle
\begin{footnotesize}
{\bf Small print} The syllabus for the course is defined by
the Faculty Board Schedules (which are minimal for lecturing
and maximal for examining). What is presented here contains
some results which
it would not, in my opinion, be
fair to set as book-work although they could well appear
as problems. In addition, I have included a small
amount of material which appears in other 1B courses.
I should {\bf very much} appreciate being told
of any corrections or possible improvements
and might even part with a small reward to the
first finder of particular errors.
These notes are written in
\LaTeXe\ and should be available
in tex, ps, pdf and dvi format
from my home page
\begin{center}
{\bf http://www.dpmms.cam.ac.uk/\~{}twk/}
\end{center}
I can send some notes on the exercises in
Sections~\ref{S;exercises one} and~\ref{S;exercises two}
to supervisors by e-mail.
\end{footnotesize}
\tableofcontents
\section{Preface} Within the last sixty years, the material
in this course has been taught at Cambridge
in the fourth (postgraduate), third, second and first years
or left to students to pick up for themselves.
Under present arrangements, students may take the course
either at the end of their first year
(before they have met metric spaces in analysis)
or at the end of their second year
(after they have met metric spaces).
Because of this, the first third of the course presents
a rapid overview of metric spaces (either as revision
or a first glimpse) to set the scene for the main
topic of topological spaces.
The first part of these notes states and discusses the
main results of the course. Usually,
each statement is followed by
directions to a proof in the final part of these notes.
Whilst I do not expect the reader to find all the
proofs by herself,
I do ask that she \emph{tries} to give a proof herself
before looking one up. Some of the more difficult theorems
have been provided with hints as well as proofs.
In my opinion, the two sections on compactness are
the deepest part of the course and the reader who has
mastered the proofs of the results therein is well on
the way to mastering the whole course.
May I repeat that, as I said in the small print,
I welcome corrections and comments.
The reader should be acquainted with the convention
that, if we have a function $f:X\rightarrow Y$, then
$f$ is associated with two further \emph{set-valued}
functions
\[f:{\mathcal P}(X)\rightarrow{\mathcal P}(Y)
\ \text{and}
\ f^{-1}:{\mathcal P}(Y)\rightarrow{\mathcal P}(X)\]
(here ${\mathcal P}(Z)$ denotes the collection of subsets
of $Z$) given by
\[f(A)=\{f(a)\,:\,a\in A\}
\ \text{and}
\ f^{-1}(B)=\{x\in X\,:\ f(x)\in B\}.\]
We shall mainly be interested in $f^{-1}$ since
this is better behaved as a set-valued function than $f$.
\begin{exercise}\label{E;set functions}
We use the notation just introduced.
(i) Let $X=Y=\{1,\,2,\,3,\,4\}$
and $f(1)=1$, $f(2)=1$, $f(3)=4$, $f(4)=3$. Identify
\[f^{-1}(\{1\}),\ f^{-1}(\{2\})
\ \text{and}\ f^{-1}(\{3,\,4\}).\]
(ii) If $U_{\theta}\subseteq Y$ for all $\theta\in\Theta$, show that
\[f^{-1}\left(\bigcup_{\theta\in\Theta}U_{\theta}\right)
=\bigcup_{\theta\in\Theta}f^{-1}(U_{\theta})
\ \text{and}
\ f^{-1}\left(\bigcap_{\theta\in\Theta}U_{\theta}\right)
=\bigcap_{\theta\in\Theta}f^{-1}(U_{\theta}).\]
Show also that $f^{-1}(Y)=X$, $f^{-1}(\emptyset)=\emptyset$
and that, if $U\subseteq Y$,
\[f^{-1}(Y\setminus U)=X\setminus f^{-1}(U).\]
(iii) If $V_{\theta}\subseteq X$ for all $\theta\in\Theta$, show that
\[f\left(\bigcup_{\theta\in\Theta}V_{\theta}\right)
=\bigcup_{\theta\in\Theta}f(V_{\theta})\]
and observe that $f(\emptyset)=\emptyset$.
(iv) By finding appropriate
$X$, $Y$, $f$ and $V,\,V_{1},\,V_{2}\subseteq X$,
show that
we may have
\[f(V_{1}\cap V_{2})\neq f(V_{1})\cap f(V_{2}),
\ f(X)\neq Y\ \text{and}
\ f(X\setminus V)\neq Y\setminus f(V).\]
\end{exercise}
\begin{proof}[Solution] The reader should not have much difficulty
with this, but if necessary, she can consult
page~\pageref{P;set functions}.
\end{proof}
\section{What is a metric?} If I wish to travel from
Cambridge to Edinburgh, then I may be interested in
one or more of the following numbers.
(1) The distance, in kilometres, from Cambridge to Edinburgh
`as the crow flies'.
(2) The distance, in kilometres, from Cambridge to Edinburgh by road.
(3) The time, in minutes, of the shortest journey from Cambridge to Edinburgh
by rail.
(4) The cost, in pounds, of the cheapest journey from Cambridge to Edinburgh
by rail.
Each of these numbers is of interest to someone
and none of them is easily obtained from another.
However, they do have certain properties in common
which we try to isolate in the following definition.
\begin{definition}\label{D;metric} Let $X$ be a
set\footnote{We thus allow $X=\emptyset$.
This is purely a question of taste. If we did not
allow this possibility, then, every time we
defined a metric
space $(X,d)$, we would need to prove that $X$ was non-empty.
If we do allow this possibility, and we prefer
to reason about non-empty spaces, then we can begin our proof
with the words `If $X$ is empty, then the result is
vacuously true, so we may assume that $X$ is non-empty.'
(Of course, the result may be false for $X=\emptyset$,
in which case the statement of the theorem must include
the condition $X\neq\emptyset$.)} and
$d:X^{2}\rightarrow{\mathbb R}$ a function with the
following properties:
(i) $d(x,y)\geq 0$ for all $x,\,y\in X$.
(ii) $d(x,y)=0$ if and only if $x=y$.
(iii) $d(x,y)=d(y,x)$ for all $x,\,y\in X$.
(iv) $d(x,y)+d(y,z)\geq d(x,z)$ for all $x,\,y,\,z\in X$.
(This is called the \emph{triangle inequality} after the
result in Euclidean geometry that the sum of the lengths
of two sides of a triangle is at least as great as the
length of the third side.)
Then we say that $d$ is a \emph{metric} on $X$ and that $(X,d)$
is a \emph{metric space}.
\end{definition}
You should imagine the author muttering under his breath
`(i) Distances are always positive.
(ii) Two points are zero distance apart if and only
if they are the same point.
(iii) The distance from $A$ to $B$ is the same
as the distance from $B$ to $A$.
(iv) The distance from $A$ to $B$ via $C$
is at least as great as the distance from $A$ to $B$
directly.'
\begin{exercise}\label{E;distance positive}
If $d:X^{2}\rightarrow{\mathbb R}$ is a function with the
following properties:
(ii) $d(x,y)=0$ if and only if $x=y$,
(iii) $d(x,y)=d(y,x)$ for all $x,\,y\in X$,
(iv) $d(x,y)+d(y,z)\geq d(x,z)$ for all $x,\,y,\,z\in X$,
\noindent show that $d$ is a metric on $X$.
\noindent$[$Thus condition~(i)
of the definition is redundant.$]$
\end{exercise}
\begin{proof}[Solution]
See page~\pageref{P;distance positive}
for a solution.
\end{proof}
\begin{exercise} Let $X$ be the set of towns on the British
railway system. Consider the $d$ corresponding to
the examples~(1) to~(4) and discuss informally whether
conditions~(i) to~(iv) apply.
\noindent$[$An open ended question
like this will be more useful if tackled in a spirit of
good will.$]$
\end{exercise}
\begin{exercise}\label{E;not metric}
Let $X=\{a,\,b,\,c\}$ with $a$, $b$ and $c$
distinct. Write down functions $d_{j}:X^{2}\rightarrow{\mathbb R}$
satisfying condition~(i) of Definition~\ref{D;metric}
such that:
(1) $d_{1}$ satisfies conditions~(ii) and~(iii) but not~(iv).
(2) $d_{2}$ satisfies conditions~(iii) and~(iv) and
$d_{2}(x,y)=0$ implies $x=y$,
but it is not
true that $x=y$ implies $d_{2}(x,y)=0$.
(3) $d_{3}$ satisfies conditions~(iii) and~(iv)
and $x=y$ implies $d_{3}(x,y)=0$.
but it is not
true that $d_{3}(x,y)=0$ implies $x=y$.
(4) $d_{4}$ satisfies conditions~(ii) and~(iv) but not~(iii).
You should verify your statements.
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;not metric}.
\end{proof}
Other axiom grubbing exercises
are given as Exercise~\ref{E;axiom grubbing}
and~\ref{E;apocryphal}.
\begin{exercise} Let $X$ be a set and
$\rho:X^{2}\rightarrow{\mathbb R}$ a function with the
following properties.
(i) $\rho(x,y)\geq 0$ for all $x,\,y\in X$.
(ii) $\rho(x,y)=0$ if and only if $x=y$.
(iv) $\rho(x,y)+\rho(y,z)\geq \rho(x,z)$ for all $x,\,y,\,z\in X$.
\noindent Show that, if we set $d(x,y)=\rho(x,y)+\rho(y,x)$,
then $(X,d)$ is a metric space.
\end{exercise}
\section{Examples of metric spaces}
We now look at some examples.
The material from Definition~\ref{D;norm} to
Theorem~\ref{T;three norms} inclusive
is covered in detail in Analysis~II.
You have met (or you will meet) the concept of a normed
vector space both in algebra and analysis courses.
\begin{definition}\label{D;norm}
Let $V$ be a vector space over ${\mathbb F}$
(with ${\mathbb F}={\mathbb R}$ or
${\mathbb F}={\mathbb C}$) and $N:V\rightarrow{\mathbb R}$ a map such that,
writing $N({\mathbf u})=\|{\mathbf u}\|$, the following results
hold.
(i) $\|{\mathbf u}\|\geq 0$ for all ${\mathbf u}\in V$.
(ii) If $\|{\mathbf u}\|=0$, then ${\mathbf u}={\boldsymbol 0}$.
(iii) If $\lambda\in{\mathbb F}$ and ${\mathbf u}\in V$,
then $\|\lambda{\mathbf u}\|=|\lambda| \|{\mathbf u}\|$.
(iv) $[$Triangle law.$]$
If ${\mathbf u},\,{\mathbf v}\in V$, then
$\|{\mathbf u}\|+\|{\mathbf v}\|\geq \|{\mathbf u}+{\mathbf v}\|$.
\noindent Then we call $\|\ \|$ a \emph{norm} and say that
$(V,\|\ \|)$ is a \emph{normed vector space}.
\end{definition}
\begin{exercise} By putting $\lambda=0$ in Definition~\ref{D;norm}~(iii),
show that $\|{\boldsymbol 0}\|=0$.
\end{exercise}
Any normed vector space can be made into a metric space in a natural way.
\begin{lemma}\label{L;norm to metric}
If $(V,\|\ \|)$ is a normed vector space,
then the condition
\[d({\mathbf u},{\mathbf v})=\|{\mathbf u}-{\mathbf v}\|\]
defines a metric $d$ on $V$.
\end{lemma}
\begin{proof} The easy proof is given on page~\pageref{P;norm to metric}.
\end{proof}
The concept of an inner product occurs both in algebra and
in many physics courses.
\begin{definition}\label{D;inner product}
Let $V$ be a vector space over ${\mathbb R}$
and $M:V\times V\rightarrow{\mathbb R}$ a map such that,
writing $M({\mathbf u},{\mathbf v})
=\langle{\mathbf u},{\mathbf v}\rangle$,
the following results
hold for ${\mathbf u},\,{\mathbf v},\,{\mathbf w}\in V$,
$\lambda\in{\mathbb R}$.
(i) $\langle{\mathbf u},{\mathbf u}\rangle\geq 0$.
(ii) If $\langle{\mathbf u},{\mathbf u}\rangle=0$, then
${\mathbf u}={\boldsymbol 0}$.
(iii) $\langle{\mathbf u},{\mathbf v}\rangle
=\langle{\mathbf v},{\mathbf u}\rangle$.
(iv) $\langle{\mathbf u}+{\mathbf w},{\mathbf v}\rangle
=\langle{\mathbf u},{\mathbf v}\rangle
+\langle{\mathbf w},{\mathbf v}\rangle$.
(v) $\langle\lambda {\mathbf u},{\mathbf v}\rangle
=\lambda\langle{\mathbf u},{\mathbf v}\rangle$.
\noindent Then we call $\langle\ ,\ \rangle$ an
\emph{inner product} and say that
$(V,\langle\ ,\ \rangle)$ is an \emph{inner product space}.
\end{definition}
\begin{lemma}\label{L;inner product to norm}
Let $(V,\langle\ ,\ \rangle)$ be an
inner product space. If we write
$\|{\mathbf u}\|=\langle{\mathbf u},{\mathbf u}\rangle^{1/2}$
(taking the positive root), then the following results
hold.
(i) (The Cauchy--Schwarz inequality) If
${\mathbf u},\,{\mathbf v}\in V$, then
\[\|{\mathbf u}\|\|{\mathbf v}\|\geq
|\langle{\mathbf u},{\mathbf v}\rangle|.\]
(ii) $(V,\|\ \|)$ is a normed vector space.
\end{lemma}
\begin{proof} The standard
proofs are given on page~\pageref{P;inner product to norm}.
\end{proof}
\begin{lemma} If we work on ${\mathbb R}^{n}$
made into a vector space in the usual way,
then
\[\langle{\mathbf x},{\mathbf y}\rangle=\sum_{j=1}^{n}x_{j}y_{j}\]
is an inner product.
\end{lemma}
\begin{proof} Direct verification.
\end{proof}
We call the norm
\[\|{\mathbf x}\|_{2}=\left(\sum_{j=1}^{n}x_{j}^{2}\right)^{1/2},\]
derived from this inner product
the \emph{Euclidean norm} (or sometimes just `the usual norm').
Although several very important norms are derived from
inner products most are not.
\begin{lemma} (The parallelogram law)
Using the hypotheses and notation of
Lemma~\ref{L;inner product to norm},
we have
\[\|{\mathbf u}+{\mathbf v}\|^{2}+\|{\mathbf u}-{\mathbf v}\|^{2}
=2\|{\mathbf u}\|^{2}+2\|{\mathbf v}\|^{2}.\]
\end{lemma}
\begin{proof} Direct computation .
\end{proof}
We need one more result before we can unveil a
collection of interesting norms.
\begin{lemma}\label{L;positive vanish}
Suppose that $a**0$,
we can find a $\delta(t,\epsilon)>0$ such that
\[|f(t)-f(s)|<\epsilon\ \text{whenever $|t-s|<\delta(t,\epsilon)$}.\]
\end{definition}
It is not hard to extend this definition to our new, wider context.
\begin{definition}{\bf [New definition.]}\label{D;metric continuity}
Let $(X,d)$ and $(Y,\rho)$ be metric spaces.
A function $f:X\rightarrow Y$
is called \emph{continuous} if, given $t\in X$ and $\epsilon>0$,
we can find a $\delta(t,\epsilon)>0$ such that
\[\rho(f(t),f(s))<\epsilon\ \text{whenever $d(t,s)<\delta(t,\epsilon)$}.\]
\end{definition}
It may help you grasp this definition
if you read `$\rho(f(t),f(s))$' as `the distance from $f(t)$ to $f(s)$
in $Y$'
and `$d(t,s)$' as `the distance from $t$ to $s$ in $X$'.
\begin{lemma}{\bf [The composition law.]}\label{L;composition metric}
If $(X,d)$ and $(Y,\rho)$
and $(Z,\sigma)$ are metric spaces and $g:X\rightarrow Y$, $f:Y\rightarrow Z$
are continuous, then so is the composition $fg$.
\end{lemma}
\begin{proof} This is identical to the one we met in classical analysis.
If needed, details are given on page~\pageref{P;composition metric}.
\end{proof}
\begin{exercise}\label{E;exercise composition}
Let ${\mathbb R}$ and ${\mathbb R}^{2}$ have their usual (Euclidean) metric.
(i) Suppose that $f:{\mathbb R}\rightarrow{\mathbb R}$ and
$g:{\mathbb R}\rightarrow{\mathbb R}$ are continuous. Show that
the map $(f,g):{\mathbb R}^{2}\rightarrow{\mathbb R}^{2}$
is continuous.
(ii) Show that the map $M:{\mathbb R}^{2}\rightarrow{\mathbb R}$
given by $M(x,y)=xy$ is continuous.
(iii) Use the composition law to show that the map
$m:{\mathbb R}^{2}\rightarrow{\mathbb R}$
given by $m(x,y)=f(x)g(y)$ is continuous.
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;exercise composition}.
\end{proof}
Exercise~\ref{E;exercise composition} may look perverse
at first sight, but, in fact, we usually show functions
to be continuous by considering them as compositions
of simpler functions rather than using the definition directly.
Think about
\[x\mapsto \log\left(2+\sin\frac{1}{1+x^{2}}\right).\]
If you are interested, we continue the chain of thought
in Exercise~\ref{E;extend composition}. If you are not interested
or are mildly confused by all this,
just ignore this paragraph.
Just as there are `well behaved' and `badly behaved' functions
between spaces,
so there are `well behaved' and `badly behaved' subsets
of spaces. In classical analysis and analysis on metric spaces,
the notion of continuous function is sufficiently wide
to give us a large collection of interesting functions
and sufficiently narrow to ensure reasonable
behaviour\footnote{Sentences like this are not mathematical
statements, but many mathematicians find them useful.}.
In introductory analysis we work on ${\mathbb R}$ with
the Euclidean metric and only consider subsets in the
form of intervals. Once we move to ${\mathbb R}^{2}$ with
the Euclidean metric, it becomes clear that there is
no appropriate analogue to intervals. (We want appropriate rectangles
to be well behaved, but we also want to talk about discs and
triangles and blobs.)
Cantor identified two particular classes of `well behaved'
sets. We start with open sets.
\begin{definition}\label{D;metric open set}
Let $(X,d)$ be a metric space.
We say that a subset $E$ is \emph{open} in $X$ if, whenever
$e\in E$, we can find a $\delta>0$ (depending on $e$)
such that
\[x\in E\ \text{whenever}\ d(x,e)<\delta.\]
\end{definition}
Suppose we work in ${\mathbb R}^{2}$ with the Euclidean
metric. If $E$ is an open set then any point ${\mathbf e}$ in $E$
is the centre of a disc of strictly positive radius
all of whose points lie in $E$. If we are sufficiently
short sighted, every point that we can see from ${\mathbf e}$
lies in $E$. This property turns out to be a key to
many proofs in classical analysis (remember that in the
proof of Rolle's theorem it was vital that the maximum
did not lie at an end point) and complex analysis
(where we examine functions analytic \emph{on an open set}).
Here are a couple of simple examples of an open set
and a simple example
of a set which is not open.
\begin{example}\label{E;Open ball open}
(i) Let $(X,d)$ be a metric space.
If $r>0$, then
\[B(x,r)=\{y\,:\,d(x,y)0$,
we can find an integer $N\geq 1$ (depending on $\epsilon$)
such that
\[d(x_{n},x)<\epsilon\ \text{for all $n\geq N$},\]
then we say that $x_{n}\rightarrow x$ as $n\rightarrow\infty$
and that $x$ is the \emph{limit} of the sequence $x_{n}$.
\end{definition}
\begin{lemma}\label{L;limit unique}
Consider a metric space $(X,d)$. If
a sequence $x_{n}$ has a limit, then that limit is unique.
\end{lemma}
\begin{proof} The simple proof is given on
page~\pageref{P;limit unique}. Just as in the
next exercise, it suffices to follow the
`first course in analysis' proof with minimal
changes.
\end{proof}
\begin{exercise}\label{E;sequence continuous}
Consider two metric spaces $(X,d)$ and $(Y,\rho)$.
Show that a function $f:X\rightarrow Y$ is continuous
if and only if, whenever $x_{n}\in X$ and $x_{n}\rightarrow x$
as $n\rightarrow\infty$, we have $f(x_{n})\rightarrow f(x)$
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;sequence continuous},
if necessary.
\end{proof}
\begin{exercise}\label{E;identity difference}
In this exercise we consider the
identity map between a space and itself when we equip
the space with \emph{different} metrics. We look
at the three norms (and their associated metrics)
defined on $C([0,1])$ in Theorem~\ref{T;three norms}.
Define $j_{\alpha,\beta}:\big(C([0,1]),\|\ \|_{\alpha}\big)\rightarrow
\big(C([0,1]),\|\ \|_{\beta}\big)$ by $j_{\alpha,\beta}(f)=f$.
(i) Show that $j_{\infty,1}$ and $j_{\infty,2}$ are
continuous but $j_{1,\infty}$ and $j_{2,\infty}$
are not.
(ii) By using the Cauchy--Schwarz inequality
$|\langle f,g\rangle|\leq\|f\|_{2}\|g\|_{2}$
with $g=1$, or otherwise, show that
$j_{2,1}$ is continuous. Show that
$j_{1,2}$ is not.
\noindent$[$Hint:
Consider functions of the form
$f_{R,K}(x)=K\max\{0,1-Rx\}$.$]$
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;identity difference},
if necessary.
\end{proof}
\begin{definition}\label{D;metric closed set}
Let $(X,d)$ be a metric space. A set $F$ in $X$
is said to be \emph{closed} if, whenever $x_{n}\in F$ and
$x_{n}\rightarrow x$ as $n\rightarrow\infty$,
it follows that $x\in F$.
\end{definition}
The following exercises are easy, but instructive.
\begin{exercise} (i) If $(X,d)$ is any metric space,
then $X$ and $\emptyset$ are both open and closed.
(ii) If we consider ${\mathbb R}$ with the usual metric
and take $b>a$, then $[a,b]$ is closed but not open,
$(a,b)$ is open but not closed and $[a,b)$ is neither
open nor closed.
\end{exercise}
\begin{exercise}\label{E;better discrete}
(i) If $(X,d)$ is
a metric space with discrete metric $d$, then
all subsets of $X$ are both open and closed.
(ii) If $V$ is a vector space over ${\mathbb R}$
and $\rho$ is a metric derived from a norm, show that the
one point sets $\{{\mathbf x}\}$ are not open
in this metric.
(iii) Deduce that the discrete metric $d$ on
the vector space $V$ cannot be derived from a norm on $V$.
\end{exercise}
It is easy to see why closed sets will be useful in
those parts of analysis which involve taking limits.
The reader will recall theorems in elementary analysis
(for example the boundedness of continuous functions)
which were true for closed intervals, but not for
other types of intervals.
Life is made much easier by the very close link between
the notions of closed and open sets given by our next theorem.
\begin{theorem}\label{T;closed complements open}
Let $(X,d)$ be a metric space. A set $F$ in $X$
is closed if and only if its complement is open.
\end{theorem}
\begin{proof} There is a proof on page~\pageref{P;closed complements open}.
\end{proof}
We can now deduce properties of closed
sets from properties of open sets
by complementation.
In particular, we have the following
complementary versions of Theorems~\ref{T;properties metric open}
and~\ref{T;metric continuous open}
\begin{theorem}\label{T;properties metric closed}
If $(X,d)$ is a metric space,
then the following statements are true.
(i) The empty set $\emptyset$ and the space $X$ are closed.
(ii) If $F_{\alpha}$ is closed for all $\alpha\in A$, then
$\bigcap_{\alpha\in A} F_{\alpha}$ is closed. (In other words
the intersection of closed sets is closed.)
(iii) If $F_{j}$ is closed for all $1\leq j\leq n$, then
$\bigcup_{j=1}^{n} F_{j}$ is closed.
\end{theorem}
\begin{proof} See page~\pageref{P;properties metric closed}.
\end{proof}
\begin{theorem}\label{T;metric continuous closed}
Let $(X,d)$ and $(Y,\rho)$ be metric spaces.
A function $f:X\rightarrow Y$ is continuous if and only
if $f^{-1}(F)$ is closed in $X$ whenever $F$ is closed in $Y$.
\end{theorem}
\begin{proof} See page~\pageref{P;metric continuous closed}.
\end{proof}
\section{Topological spaces} We now investigate general
objects which have the structure described by
Theorem~\ref{T;properties metric open}.
\begin{definition}\label{D;topology}
Let $X$ be a set and $\tau$ a collection of subsets of $X$
with the following properties.
(i) The empty set $\emptyset\in \tau$ and the space $X\in\tau$.
(ii) If $U_{\alpha}\in\tau$ for all $\alpha\in A$, then
$\bigcup_{\alpha\in A} U_{\alpha}\in\tau$.
(iii) If $U_{j}\in\tau$ for all $1\leq j\leq n$, then
$\bigcap_{j=1}^{n} U_{j}\in\tau$.
Then we say that $\tau$ is a \emph{topology} on $X$ and
that $(X,\tau)$ is a \emph{topological space}.
\end{definition}
\begin{theorem}\label{T;metric topology}
If $(X,d)$ is a metric space, then the collection
of open sets forms a topology.
\end{theorem}
\begin{proof} This is Theorem~\ref{T;properties metric open}.
\end{proof}
If $(X,d)$ is a metric space we call the collection of
open sets the topology \emph{induced} by the metric.
If $(X,\tau)$ is a topological space we extend the notion of
open set by calling the members of $\tau$ \emph{open sets}.
The discussion above ensures what computer scientists call
`downward compatibility'.
Just as group theory deals with a collection of
objects together with an operation of `multiplication'
which follows certain rules, so we might say that
topology deals with
a collection $\tau$ of objects (subsets of $X$)
under the two operations of `union' and `intersection'
following certain rules. A remarkable application of this
philosophy is provided by Exercise~\ref{E;Furstenberg}.
However, many mathematicians simply
use topology as a language
which emphasises certain aspects of ${\mathbb R}^{n}$
and other metric spaces.
\begin{exercise} If $(X,d)$ is a metric space with the
discrete metric, show that the induced topology consists
of all the subsets of $X$.
\end{exercise}
We call the topology consisting of all subsets of $X$
the \emph{discrete} topology on $X$.
\begin{exercise}\label{E;indiscrete}
If $X$ is a set and $\tau=\{\emptyset,X\}$,
then $\tau$ is a topology.
\end{exercise}
We call $\{\emptyset,X\}$ the
\emph{indiscrete} topology on $X$.
\begin{exercise} (i) If $F$ is a finite set
and $(F,d)$ is a metric space, show that the induced
topology is the discrete topology.
(ii) If $F$ is a finite set with more than one point,
show that the indiscrete topology is not induced by any
metric.
\end{exercise}
You should test any putative theorems on topological spaces
on the discrete topology and the indiscrete topology,
${\mathbb R}^{n}$ with the topology derived from
the Euclidean metric and
$[0,1]$ with the topology derived from
the Euclidean metric.
The following exercise is tedious but instructive
(the tediousness is the instruction).
\begin{exercise}\label{E;silly count}
Write ${\mathcal P}(Y)$ for the collection
of subsets of $Y$. If $X$ has three elements, how many
elements does ${\mathcal P}\big({\mathcal P}(X)\big)$
have?
How many topologies are there on $X$?
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;silly count}.\end{proof}
The idea of downward compatibility suggests `turning
Theorem~\ref{T;metric continuous open} in a definition'.
\begin{definition}\label{D;topological continuity}
Let $(X,\tau)$ and $(Y,\sigma)$ be topological spaces.
A function $f:X\rightarrow Y$ is said to be
\emph{continuous} if and only
if $f^{-1}(U)$ is open in $X$ whenever $U$ is open in $Y$.
\end{definition}
Theorem~\ref{T;metric continuous open} tells us that,
if $(X,d)$ and $(Y,\rho)$ are metric spaces, the notion
of a continuous function $f:X\rightarrow Y$ is the same
whether we consider the metrics or the topologies derived from
them.
The proof of Theorem~\ref{L;composition metric}
given on page~\pageref{New proof composition}
carries over unchanged to give the following generalisation.
\begin{theorem}
If $(X,\tau)$, $(Y,\sigma)$,
$(Z,\mu)$ are topological spaces and
$g:X\rightarrow Y$, $f:Y\rightarrow Z$
are continuous, then so is the composition $fg$.
\end{theorem}
Downward compatibility suggests the definition of a closed
set for a topological space based on
Theorem~\ref{T;closed complements open}.
\begin{definition}\label{D;closed topologically}
Let $(X,\tau)$ be a topological space. A set $F$ in $X$
is said to be \emph{closed} if its complement is open.
\end{definition}
Theorem~\ref{T;closed complements open} tells us that
if $(X,d)$ is a metric space the notion
of a closed set is the same
whether we consider the metric or the topology derived
from it.
Just as in the metric case, we can
deduce properties of closed sets from properties of open sets
by complementation. In particular, the same proofs as we
gave in the metric case give the following extensions of
Theorems~\ref{T;properties metric closed}
and~\ref{T;metric continuous closed}
\begin{theorem}
If $(X,\tau)$ is a topological space,
then the following statements are true.
(i) The empty set $\emptyset$ and the space $X$ are closed.
(ii) If $F_{\alpha}$ is closed for all $\alpha\in A$, then
$\bigcap_{\alpha\in A} F_{\alpha}$ is closed. (In other words,
the intersection of closed sets is closed.)
(iii) If $F_{j}$ is closed for all $1\leq j\leq n$, then
$\bigcup_{j=1}^{n} F_{j}$ is closed.
\end{theorem}
\begin{theorem}
Let $(X,\tau)$ and $(Y,\sigma)$
be topological spaces.
A function $f:X\rightarrow Y$ is continuous if and only
if $f^{-1}(F)$ is closed in $X$ whenever $F$ is closed in $Y$.
\end{theorem}
\section{Interior and closure}\label{S;interior}
The next section is short, not because
the ideas are unimportant, but because they are so useful that
the reader will meet them over and over again in other courses.
\begin{definition}\label{D;interior}
Let $(X,\tau)$ be a topological space and
$A$ a subset of $X$. We write
\[\Int A=\bigcup\{U\in\tau\,:\,U\subseteq A\}
\ \text{and}
\ \Cl A=\bigcap\{F\ \text{closed}\,:\,F\supseteq A\}\]
and call $\Cl A$ the \emph{closure} of $A$ and
$\Int A$ the \emph{interior} of $A$.
\end{definition}
Simple complementation, which I leave to the reader,
shows how closely the two notions of closure and interior
are related. (Recall that $A^{c}=X\setminus A$,
the complement of $A$.)
\begin{lemma} With the notation of Definition~\ref{D;interior}
\[(\Cl A^{c})^{c}=\Int A
\ \text{and}
\ (\Int A^{c})^{c}=\Cl A.\]
\end{lemma}
There are other useful ways of viewing $\Int A$ and $\Cl A$.
\begin{lemma}\label{L;other interiors}
Let $(X,\tau)$ be a topological space and
$A$ a subset of $X$.
(i) $\Int A=\{x\in A\,:\,\exists\ U\in\tau\ \text{with}
\ x\in U\subseteq A\}$.
(ii) $\Int A$ is the unique $V\in\tau$ such that
$V\subseteq A$ and, if $W\in\tau$ and $V\subseteq W\subseteq A$,
then $V=W$. (Informally, $\Int A$ is the largest open set
contained in $A$.)
\end{lemma}
\begin{proof} The easy proof is given on
page~\pageref{P;other interiors}.
\end{proof}
\begin{exercise}\label{E;no largest}
Consider ${\mathbb R}$ with its usual topology
(i.e. the one derived from the Euclidean norm). We look
at the open interval $I=(0,1)$. Show that
if $F$ is closed and $F\subseteq (0,1)$, there is a closed $G$
with $F\subseteq G\subseteq (0,1)$ and $G\neq F$.
(Thus there is no largest closed set contained in $(0,1)$.)
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;no largest}
if necessary.
\end{proof}
Simple complementation, which I leave to the reader,
gives the corresponding results for closure.
\begin{lemma}\label{L;other closures}
Let $(X,\tau)$ be a topological space and
$A$ a subset of $X$.
(i) $\Cl A=\{x\in X:\forall U\in\tau\ \text{with $x\in U$,
we have}
\ A\cap U\neq\emptyset\}$.
(ii) $\Cl A$ is the unique closed set $G$ such that
$G\supseteq A$ and, if $F$ is closed with
$G\supseteq F\supseteq A$,
then $F=G$. (Informally, $\Cl A$ is the smallest closed set
containing $A$.)
\end{lemma}
\begin{exercise} Prove Lemma~\ref{L;other closures}
directly without using Lemma~\ref{L;other interiors}.
\end{exercise}
Sometimes, when touring an ancient college, you may be shown
a 14th century wall which still plays an important
part in holding up the building. The next lemma
goes back to Cantor and the very beginnings of topology.
(It would then have been a definition rather than
a lemma.)
\begin{lemma}\label{L;back to the future} Let
$(X,d)$ be a metric space and $A$ a subset of $X$.
Then $\Cl A$ consists of all those $x$ such
that we can find $x_{n}\in A$ with $d(x,x_{n})\rightarrow 0$.
(In old fashioned terminology, the closure of $A$
is its set of \emph{closure points}\footnote{I strongly
advise caution in employing terms like `limit point', `accumulation
point', `adherent point' and `closure point' since both the literature
and your lecturer are confused about what they mean. If an
author uses one of these terms, check what definition
they are using. If you wish to use these terms,
define them explicitly.}.)
\end{lemma}
\begin{proof} The easy proof is given on
page~\pageref{P;back to the future}.
\end{proof}
The idea of closure is strongly linked to the idea
of a dense subset.
\begin{definition}\label{D;dense}
Let $(X,\tau)$ be a topological
space and $F$ a closed subset of $X$. We say
that $A\subseteq X$ is a \emph{dense} subset of $F$
if $\Cl A=F$.
\end{definition}
In some sense $A$ is a `skeleton' of $F$ and we may
hope to prove results about $F$ by first proving them
on the dense subset $A$ and then extending the result
by `density'. Sometimes this idea works
(see, for example, part~(ii) of Exercise~\ref{E;call me dense})
and sometimes it does not
(see, for example, part~(iii) of Exercise~\ref{E;call me dense}).
When it does work, this is very powerful technique.
\begin{exercise}\label{E;call me dense}
(i) Let $(X,\tau)$ be a topological space
and $(Y,d)$ a
metric space. If $f,\,g:X\rightarrow Y$ are continuous show that
the set
\[\{x\in X\,:\,f(x)=g(x)\}\]
is closed.
(ii) Let $(X,\tau)$ be a topological space
and $(Y,d)$ a
metric space\footnote{Exercise~\ref{E;call me Hausdorff}
gives an improvement of parts (i) and (ii).}.
If $f,\,g:X\rightarrow Y$ are continuous and $f(x)=g(x)$
for all $x\in A$, where $A$ is dense in $X$, show that
$f(x)=g(x)$ for all $x\in X$.
(iii) Consider the unit interval $[0,1]$ with the
Euclidean metric and $A=[0,1]\cap{\mathbb Q}$
with the inherited metric. Exhibit,
with proof, a continuous map
$f:A\rightarrow{\mathbb R}$
(where ${\mathbb R}$ has the standard metric)
such that there does not exist
a continuous map
$\tilde{f}:[0,1]\rightarrow{\mathbb R}$
with $\tilde{f}(x)=f(x)$ for all $x\in A$.
\end{exercise}
\begin{proof}[Solution] There is a solution
on Page~\pageref{P;call me dense}.
\end{proof}
\section{More on topological structures} Two groups
are the same for the
purposes of group theory if they are (group) isomorphic.
Two vector spaces are the same for the purposes of
linear algebra if they are (vector space) isomorphic.
When are two topological spaces $(X,\tau)$
and $(Y,\sigma)$ the same for
the purposes of topology? In other words, when
does there exist a bijection between $X$ and $Y$
for which open sets correspond to open sets,
and the grammar of topology (things like union and inclusion)
is preserved? A little reflection shows that the
next definition provides the answer we
want.
\begin{definition}\label{D;homeomorphisms}
We say that two topological spaces
$(X,\tau)$ and $(Y,\sigma)$ are \emph{homeomorphic} if there
exists a bijection
$\theta:X\rightarrow Y$ such that $\theta$ and $\theta^{-1}$
are continuous. We call $\theta$ a \emph{homeomorphism}.
\end{definition}
The following exercise acts as useful revision of concepts
learnt last year.
\begin{exercise} Show that homeomorphism is an equivalence
relation on topological spaces.
\end{exercise}
Homeomorphism implies
equivalence\label{R;topological properties}
\emph{for the purposes of topology}.
\begin{exercise} Suppose that $(X,d)$ and $(Y,\rho)$ are
metric spaces and $f:X\rightarrow Y$ is a homeomorphism.
Show that
\[d(x_{n},x)\rightarrow 0\Leftrightarrow \rho(f(x_{n}),f(x))\rightarrow 0.\]
\end{exercise}
Thus the limit structure of a metric space is a topological property.
To give an interesting example of a property which
is not preserved by homeomorphism,
we introduce a couple of related ideas which are
fundamental to analysis on metric spaces, but which will
only be referred to occasionally in this course.
\begin{definition}\label{D;completeness}
(i) If $(X,d)$ is a metric space,
we say that a sequence $x_{n}$ in $X$ is \emph{Cauchy} if, given
$\epsilon>0$, we can find an $N_{0}(\epsilon)$ with
\[d(x_{n},x_{m})<\epsilon\ \text{whenever $n,\,m\geq N_{0}(\epsilon)$}.\]
(ii) We say that a metric space $(X,d)$ is \emph{complete}
if every Cauchy sequence converges.
\end{definition}
\begin{example}\label{E;Cauchy not topological}
Let $X={\mathbb R}$ and let $d$ be the usual metric on ${\mathbb R}$.
Let $Y=(0,1)$ (the open interval with end points $0$ and $1$)
and let $\rho$ be the usual metric on $(0,1)$. Then
$(X,d)$ and $(Y,\rho)$ are homeomorphic as topological spaces,
but $(X,d)$ is complete and $(Y,\rho)$ is not.
\end{example}
\begin{proof} See page~\pageref{P;Cauchy not topological}.
\end{proof}
We say that `completeness is not a topological property'.
Exercise~\ref{E;forever incomplete} shows that
there exist metric spaces which are not homeomorphic
to any complete metric space.
In group theory, we usually prove that two groups are isomorphic
by constructing an explicit isomorphism and that two groups
are not isomorphic by finding a group property
exhibited by one but not by the other. Similarly, in
topology, we usually prove that two topological spaces
are homeomorphic
by constructing an explicit homeomorphism and that two
topological spaces
are not homeomorphic by finding a topological property
exhibited by one but not by the other. Later in this course
we will meet some topological properties like being
Hausdorff and compactness and you will be able to
tackle Exercise~\ref{E;homeomorphic, non-homeomorphic}.
We also want to be able to construct new topological
spaces from old. To do this we we make use of a simple,
but useful, lemma.
\begin{lemma}\label{L;coarsest topology}
Let $X$ be a space and let ${\mathcal H}$ be a
collection of subsets of $X$. Then there exists a unique topology
$\tau_{{\mathcal H}}$ such that
(i) $\tau_{{\mathcal H}}\supseteq{\mathcal H}$, and
(ii) if $\tau$ is a topology with $\tau\supseteq {\mathcal H}$,
then $\tau\supseteq \tau_{{\mathcal H}}$.
\end{lemma}
\begin{proof} The proof, which follows the standard pattern
for such things, is given on page~\pageref{P;coarsest topology}.
\end{proof}
We call $\tau_{\mathcal H}$ the smallest (or coarsest) topology
containing ${\mathcal H}$.
\begin{lemma}\label{L;smallest continuous}
Suppose that $A$ is non-empty, the
spaces $(X_{\alpha},\tau_{\alpha})$
are topological spaces and we have maps
$f_{\alpha}:X\rightarrow X_{\alpha}$ $[\alpha\in A]$.
Then there is a smallest topology $\tau$ on $X$ for which
the maps $f_{\alpha}$ are continuous.
\end{lemma}
\begin{proof} A topology $\sigma$ on $X$ makes all the $f_{\alpha}$
continuous if and only if it contains
\[{\mathcal H}=\{f_{\alpha}^{-1}(U)\,:\,
U\in\tau_{\alpha},\ \alpha\in A\}.\]
Now apply Lemma~\ref{L;coarsest topology}.
\end{proof}
Recall that, if $Y\subseteq X$, then the inclusion map $j:Y\rightarrow X$
is defined by $j(y)=y$ for all $y\in Y$.
\begin{definition}\label{D;subspace topology}
If $(X,\tau)$ is a topological space
and $Y\subseteq X$,
then the \emph{subspace topology} $\tau_{Y}$ on $Y$
\emph{induced} by $\tau$ is the smallest topology on $Y$ for which the
inclusion map is continuous.
\end{definition}
\begin{lemma}\label{L;subspace topology}
If $(X,\tau)$ is a topological space
and $Y\subseteq X$, then the subspace topology $\tau_{Y}$ on $Y$
is the collection of sets $Y\cap U$ with $U\in\tau$.
\end{lemma}
\begin{proof} The very easy proof is given on
page~\pageref{P;subspace topology}.
\end{proof}
\begin{exercise}
(i) If $(X,\tau)$ is a topological space
and $Y\subseteq X$ is open,
show that the subspace topology $\tau_{Y}$ on $Y$
is the collection of sets $U\in\tau$ with $U\subseteq Y$.
(ii) Consider ${\mathbb R}$ with the usual topology $\tau$
(that is, the topology derived from the Euclidean metric).
If $Y=[0,1]$, show that $[0,1/2)\in\tau_{Y}$ but $[0,1/2)\notin\tau$.
\end{exercise}
\begin{exercise}
Let $(X,d)$ be a metric space, $Y$ a subset
of $X$ and $d_{Y}$ the metric $d$ restricted to $Y$
(formally, $d_{Y}:Y^{2}\rightarrow{\mathbb R}$ is given by
$d_{Y}(x,y)=d(x,y)$ for $x,\,y\in Y$). Then if we
give $X$ the topology induced by $d$, the subspace
topology on $Y$ is identical with the topology induced by $d_{Y}$.
\noindent$[$This is an exercise in stating the obvious.$]$
\end{exercise}
Next recall that if $X$ and $Y$ are sets
the projection maps $\pi_{X}:X\times Y\rightarrow X$ and
$\pi_{Y}:X\times Y\rightarrow Y$
are given by
\begin{align*}
\pi_{X}(x,y)&=x,\\
\pi_{Y}(x,y)&=y.
\end{align*}
\begin{definition}\label{D;product topology}
If $(X,\tau)$ and $(Y,\sigma)$
are topological spaces, then the \emph{product topology}
$\mu$ on $X\times Y$ is
the smallest topology on $X\times Y$ for which the
projection maps $\pi_{X}$ and $\pi_{Y}$ are continuous.
\end{definition}
\begin{lemma}\label{L;product topology}
Let $(X,\tau)$ and $(Y,\sigma)$
be topological spaces and $\lambda$ the product topology
on $X\times Y$.
Then $O\in\lambda$ if and only if, given $(x,y)\in O$,
we can find $U\in \tau$ and $V\in \sigma$ such that
\[(x,y)\in U\times V\subseteq O.\]
\end{lemma}
\begin{proof} See page~\pageref{P;product topology}.
\end{proof}
Exercise~\ref{E;products via basis}
gives a very slightly different treatment of the matter.
\begin{exercise}\label{E;product cut}
Suppose that $(X,\tau)$ and $(Y,\sigma)$
are topological spaces and we give $X\times Y$
the product topology $\mu$. Now fix $x\in X$
and give $E=\{x\}\times Y$ the subspace topology $\mu_{E}$.
Show that the map
$k:(Y,\sigma)\rightarrow(E,\mu_{E})$ given
by $k(y)=(x,y)$ is a homeomorphism.
\end{exercise}
\begin{proof}[Solution] The proof is a direct application
of Lemma~\ref{L;product topology}.
See page~\pageref{P;product cut} if necessary.
\end{proof}
The next remark is useful for proving results
like those in Exercise~\ref{E;metric product}.
\begin{lemma}\label{L;same topology}
Let $\tau_{1}$ and $\tau_{2}$ be two topologies
on the same space $X$.
(i) We have $\tau_{1}\subseteq\tau_{2}$
if and only if, given $x\in U\in\tau_{1}$, we can find
$V\in\tau_{2}$ such that $x\in V\subseteq U$.
(ii)We have $\tau_{1}=\tau_{2}$
if and only if, given $x\in U\in\tau_{1}$, we can find
$V\in\tau_{2}$ such that $x\in V\subseteq U$
and, given $x\in U\in\tau_{2}$, we can find
$V\in\tau_{1}$ such that $x\in V\subseteq U$.
\end{lemma}
\begin{proof} The easy proof is given on Page~\pageref{P;same topology}
\end{proof}
\begin{exercise}\label{E;metric product}
Let $(X_{1},d_{1})$ and $(X_{2},d_{2})$ be metric
spaces. Let $\tau$ be the product topology on $X_{1}\times X_{2}$
where $X_{j}$ is given the topology induced by $d_{j}$ $[j=1,2]$.
Define $\rho_{k}:(X_{1}\times X_{2})^{2}\rightarrow {\mathbb R}$
by
\begin{align*}
\rho_{1}((x,y),(u,v))&=d_{1}(x,u),\\
\rho_{2}((x,y),(u,v))&=d_{1}(x,u)+d_{2}(y,v),\\
\rho_{3}((x,y),(u,v))&=\max(d_{1}(x,u),d_{2}(y,v)),\\
\rho_{4}((x,y),(u,v))&=(d_{1}(x,u)^{2}+d_{2}(y,v)^{2})^{1/2}.
\end{align*}
Establish that $\rho_{1}$ is not a metric
and that $\rho_{2}$, $\rho_{3}$ and $\rho_{4}$ are.
Show that each of the $\rho_{j}$ with $2\leq j\leq 4$ induces the
product topology $\tau$ on $X_{1}\times X_{2}$.
\end{exercise}
It is easy to extend our definitions and results to
any finite product of topological spaces\footnote{Once you
are confident with the material you may wish to look
at Exercise~\ref{E;every which way}, but this exercise
is confusing for the beginner and trivial to the
expert.}. In fact,
it is not difficult to extend our definition
to the product of an infinite collection
of topological spaces, but I feel
that it is important for the reader to concentrate on
first thoroughly
understanding the finite product case and I have relegated the
infinite case to an exercise (Exercise~\ref{E;Infinite product}).
We conclude this section by looking briefly at the
quotient topology. This will not play a major part in
our course and the reader should not worry too much about it.
If $\sim$ is an equivalence relation on a
set $X$,
then we know from previous courses that it gives
rise to equivalence classes
\[[x]=\{y\in X\,:\,y\sim x\}.\]
There is a natural map $q$ from $X$ to the space $X/\negthinspace\sim$
of equivalence classes given by $q(x)=[x]$. When
we defined the subspace and product topologies,
we used natural maps from the new spaces to the
old spaces. Here, we have a natural map from
the old space to the new, so our definition
has to take a different form.
\begin{exercise} Let $X=\{1,2,3\}$ and
$\theta=\{\emptyset,\{1\},\{2\},X\}$.
Check that there does not exist a topology $\tau_{1}\subseteq \theta$
such that, if $\tau\subseteq \theta$ is a topology, then
$\tau\subseteq\tau_{1}$. (Thus there does not exist
a largest topology contained in $\theta$.)
\end{exercise}
However, since intersection and union behave well under
inverse mappings, it is
easy to check the following statement.
\begin{lemma}\label{L;wrong way} Let $(X,\tau)$ be a topological space
and $Y$ a set. If $f:X\rightarrow Y$ is a map
and we write
\[\sigma=\{U\subseteq Y\,:\,f^{-1}(U)\in\tau\},\]
then $\sigma$ is a topology on $Y$ such that
(i) $f:(X,\tau)\rightarrow(Y,\sigma)$ is continuous
and
(ii) if $\theta$ is a topology on $Y$
with $f:(X,\tau)\rightarrow(Y,\theta)$ continuous,
then $\theta\subseteq\sigma$.
\end{lemma}
Lemma~\ref{L;wrong way} allows us to make the following definition.
\begin{definition}\label{D;quotient}
Let $(X,\tau)$ be a topological space
and $\sim$ an equivalence relation on $X$.
Write $q$ for the map from $X$ to the
quotient space $X/\negthinspace\sim$
given by $q(x)=[x]$. Then we call the largest topology
$\sigma$ on $X/\negthinspace\sim$ for which $q$ is continuous
that is to say
\[\sigma=\{U\subseteq X/\negthinspace\sim\,:\,q^{-1}(U)\in\tau\}\]
the quotient topology
\end{definition}
The following is just a restatement of the definition.
\begin{lemma} Under the assumptions and with the notation
of Definition~\ref{D;quotient}, the quotient topology
consists of the sets $U$ such that
\[\bigcup_{[x]\in U}[x]\in\tau.\]
\end{lemma}
Later we shall give an example (Exercise~\ref{E;circle as quotient})
of a nice quotient topology.
Exercise~\ref{E;nasty line}, which requires
ideas from later in the course, is an example of really
nasty quotient topology.
In general, the quotient topology can be extremely
unpleasant (basically because equivalence relations
form a very wide class) and although nice equivalence
relations sometimes give very useful quotient topologies,
you should always think before using one.
Exercise~\ref{E;quotient non Hausdorff}
gives some
further information.
\section{Hausdorff spaces}\label{S;Hausdorff spaces}
When we work in a metric space, we make
repeated use of the fact that, if $d(x,y)=0$, then $x=y$.
The metric is `powerful enough to separate points'.
The indiscrete topology, on the other hand, clearly
cannot separate points.
When Hausdorff first crystallised the modern idea
of a topological space, he included an extra condition
to ensure `separation of points'. It was later
discovered that topologies without this extra condition
could be useful, so it is now considered separately.
\begin{definition} A topological space $(X,\tau)$ is called
\emph{Hausdorff} if, whenever $x,\,y\in X$ and $x\neq y$, we can
find $U,\,V\in\tau$ such that $x\in U$, $y\in V$ and
$U\cap V=\emptyset$.
\end{definition}
In the English educational system, it is traditional
to draw $U$ and $V$ as little huts containing $x$ and $y$
and to say that $x$ and $y$ are `housed off from each other'.
The next exercise requires a one line answer, but you should
write that line down.
\begin{exercise} Show that,
if $(X,d)$ is a metric space, then the
derived topology is Hausdorff.
\end{exercise}
Although we defer the discussion of neighbourhoods
in general to towards the end of the course, it is natural
to introduce the following locution here.
\begin{definition}\label{D;open neighbourhood}
If $(X,\tau)$ is a topological space and $x\in U\in\tau$,
we call $U$ an \emph{open neighbourhood} of $x$.
\end{definition}
\begin{exercise}\label{E;open via neighbourhood}
If $(X,\tau)$ is a topological space, then
a subset $A$ of $X$ is open if and only if every
point of $A$ has an open neighbourhood $U\subseteq A$.
\end{exercise}
\begin{proof} The easy proof is given on
page~\pageref{P;open via neighbourhood}.
\end{proof}
\begin{lemma}\label{L;Hausdorff point}
If $(X,\tau)$ is a Hausdorff space, then the one
point sets $\{x\}$ are closed.
\end{lemma}
\begin{proof} The easy proof is given on
page~\pageref{P;Hausdorff point}.
\end{proof}
The following exercise shows that the converse
to Lemma~\ref{L;Hausdorff point} is false
and that, if we are to acquire any intuition about
topological spaces, we will need to study a wide range
of examples.
\begin{exercise}\label{E;finite complement}
Let $X$ be infinite (we could take $X={\mathbb Z}$
or $X={\mathbb R}$).
We say that a subset $E$ of $X$ lies in $\tau$ if
either $E=\emptyset$ or $X\setminus E$ is finite.
Show that $\tau$ is a topology
and that every one
point set $\{x\}$ is closed, but that $(X,\tau)$
is not Hausdorff.
What happens if $X$ is finite?
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;finite complement}.
\end{proof}
\begin{exercise}\label{E;call me Hausdorff}
Prove
Exercise~\ref{E;call me dense}~(i) and~(ii)
with `$(Y,d)$ a metric space' replaced by
`$(Y,\sigma)$ a Hausdorff topological space'.
\end{exercise}
It is easy to give examples of topologies which are not
derived from metrics. It is somewhat harder to give examples
of Hausdorff topologies which are not derived from metrics.
An important
example is given in Exercise~\ref{E;Hausdorff not metric}.
The next two lemmas are very useful.
\begin{lemma}\label{L;inherit Hausdoff subspace}
If $(X,\tau)$ is a Hausdorff topological space
and $Y\subseteq X$, then $Y$ with the subspace topology
is also Hausdorff.
\end{lemma}
\begin{proof} The easy proof is given on
page~\pageref{P;inherit Hausdoff subspace}.
\end{proof}
\begin{lemma}\label{L;inherit Hausdoff product}
If $(X,\tau)$ and $(Y,\sigma)$ are Hausdorff topological spaces,
then $X\times Y$ with the product topology
is also Hausdorff.
\end{lemma}
\begin{proof} The proof is easy (but there is one place where
you can make a silly mistake). See
page~\pageref{P;inherit Hausdoff product}.
\end{proof}
Exercise~\ref{E;quotient non Hausdorff} shows that, even when
the original topology is Hausdorff, the resulting quotient
topology need not be.
\section{Compactness} Halmos says somewhere that if
an idea is used once it is a trick, if used twice it
is a method, if used three times a theorem but if used
four times it becomes an axiom.
Several important theorems in analysis
hold for closed bounded intervals. Heine
used a particular idea to prove one of
these. Borel isolated the idea as a theorem
(the Heine--Borel theorem), essentially
Theorem~\ref{T;Heine--Borel} below.
Many treatments of analysis (for example,
Hardy's \emph{Pure Mathematics}) use the
Heine--Borel theorem as a basic tool.
The notion of compactness represents the last stage
in the Halmos progression.
\begin{definition}\label{D;compact}
A topological space $(X,\tau)$
is called \emph{compact} if, whenever we have a collection
$U_{\alpha}$ of open sets $[\alpha\in A]$
with $\bigcup_{\alpha\in A}U_{\alpha}=X$, we can find a
finite subcollection $U_{\alpha(1)}$,
$U_{\alpha(2)}$, \ldots, $U_{\alpha(n)}$
with $\alpha(j)\in A$ $[1\leq j\leq n]$
such that $\bigcup_{j=1}^{n}U_{\alpha(j)}=X$.
\end{definition}
\begin{definition} If $(X,\tau)$ is a topological space,
then a subset $Y$ is called \emph{compact} if the subspace topology
on $Y$ is compact.
\end{definition}
The reader should have no difficulty in combining
these two definitions to come up with the
following restatement,
\begin{lemma}\label{L;compact equivalence} If $(X,\tau)$
is a topological space,
then a subset $Y$ is compact if, whenever we have a collection
$U_{\alpha}$ of open sets $[\alpha\in A]$
with $\bigcup_{\alpha}U_{\alpha}\supseteq Y$, we can find a
finite subcollection $U_{\alpha(1)}$,
$U_{\alpha(2)}$, \ldots, $U_{\alpha(n)}$
with $\alpha(j)\in A$ $[1\leq j\leq n]$
such that $\bigcup_{j=1}^{n}U_{\alpha(j)}\supseteq Y$.
\end{lemma}
In other words, `a set is compact if any cover by
open sets has a finite subcover'.
The reader is warned that compactness is a subtle
property which requires time and energy
to master\footnote{My generation only reached compactness
after a long exposure to the classical Heine--Borel
theorem.}.
(At the simplest level, a substantial minority
of examinees fail to get the definition correct.)
Up to this point most of the proofs in this course
have been simple deductions from
definitions. Several of our theorems
on compactness go much deeper and have quite intricate proofs.
Here are some simple examples of compactness and non-compactness.
\begin{exercise}\label{E;simple compact examples}
(i) Show that, if $X$ is finite, every
topology on $X$ is compact.
(ii) Show that the discrete topology on a set $X$ is
compact if and only if $X$ is finite.
(iii) Show that the indiscrete topology is always compact.
(iv) Show that the topology described in
Exercise~\ref{E;finite complement} is compact.
(v) Let $X$ be uncountable (we could take
$X={\mathbb R}$).
We say that a subset $A$ of $X$ lies in $\tau$ if
either $A=\emptyset$ or $X\setminus A$ is countable.
Show that $\tau$ is a topology
but that $(X,\tau)$
is not compact.
\end{exercise}
\begin{proof}[Solution] There is a partial solution for
parts~(iv) and~(v) on page~\pageref{P;simple compact examples}.
\end{proof}
The next lemma will serve as a simple exercise on compactness
but is also important in its own right.
\begin{lemma}\label{L;separable metric} Suppose that
$(X,d)$ is a compact metric space
(that is to say, the topology induced by the metric is compact).
(i) Given any $\delta>0$, we can find a finite set of points $E$
such that $X=\bigcup_{e\in E}B(e,\delta)$.
(ii) $X$ has a countable dense subset.
\end{lemma}
\begin{proof} See~\pageref{P;separable metric}.
\end{proof}
Observe that ${\mathbb R}$ with the usual metric has
a countable dense subset but is not compact.
We now come to our first major
theorem.
\begin{theorem}{\bf [The Heine--Borel Theorem.]}%
\label{T;Heine--Borel}
Let ${\mathbb R}$ be given its usual
topology (that is to say the topology derived
from the usual Euclidean metric). Then the closed bounded interval
$[a,b]$ is compact.
\end{theorem}
\begin{proof} I give a hint on page~\pageref{H;Heine--Borel}
and a proof on ~\pageref{P;Heine--Borel}.
An alternative proof, which is much less instructive,
is given on page~\pageref{Alternative Heine--Borel}.
\end{proof}
Lemma~\ref{L;compact equivalence} gives the following
equivalent statement.
\begin{theorem}\label{T;closed interval compact}
Let $[a,b]$ be given its usual topology
(that is to say the topology derived
from the usual Euclidean metric).
Then the derived topology is compact.
\end{theorem}
We now have a couple of very useful
results.
\begin{theorem}\label{T;closed subset compact}
A closed subset of a compact set is compact.
$[$More precisely, if $E$ is compact and $F$ closed
in a given topology, then, if $F\subseteq E$, it follows that
$F$ is compact.$]$
\end{theorem}
\begin{proof} This is easy if you look at it the right way.
See page~\pageref{P;closed subset compact}.
\end{proof}
\begin{theorem}\label{T;compact closed}
If $(X,\tau)$ is Hausdorff, then every compact set is closed.
\end{theorem}
\begin{proof} This is harder, though it becomes easier if you realise
that you must use the fact that $\tau$ is Hausdorff
(see Example~\ref{E;compact not closed} below).
There is a hint on page~\pageref{H;compact closed}
and a proof on page~\pageref{P;compact closed}.
\end{proof}
\begin{exercise} Why does Theorem~\ref{T;compact closed}
give an immediate proof of Lemma~\ref{L;Hausdorff point}?
\end{exercise}
\begin{example}\label{E;compact not closed}
Give an example of a topological space $(X,\tau)$
and a compact set in $X$ which is not closed.
\end{example}
\begin{proof} There is a topological space with two points
which will do. See page~\pageref{P;compact not closed}.
\end{proof}
Combining the Heine--Borel theorem with
Theorems~\ref{T;closed subset compact}
and~\ref{T;compact closed} and a little thought,
we get a complete characterisation of the compact subsets
of ${\mathbb R}$ (with the standard topology).
\begin{theorem}~\label{T;closed bounded}
Consider $({\mathbb R},\tau)$ with the standard
(Euclidean) topology. A set $E$ is compact if and
only if it is closed and bounded
(that is to say, there exists a
$M$ such that $|x|\leq M$ for all $x\in E$).
\end{theorem}
\begin{proof} The easy proof is given
on page~\pageref{P;closed bounded}.
\end{proof}
In Example~\ref{E;open not continuous} we saw that the
continuous image of an open set need not be open.
It also easy to see that the
continuous image of a closed set need not be closed.
\begin{exercise} Let ${\mathbb R}$ have the usual metric.
Give an example of a continuous injective function
$f:{\mathbb R}\rightarrow{\mathbb R}$ such that
$f({\mathbb R})$ is not closed.
\end{exercise}
\begin{proof}[Hint] Look at the solution
of Example~\ref{E;Cauchy not topological}
if you need a hint.
\end{proof}
However, the continuous image of a compact set
is always compact.
\begin{theorem}\label{T;compact image}
Let $(X,\tau)$ and $(Y,\sigma)$
be topological spaces and $f:X\rightarrow Y$ a continuous
function. If $K$ is a compact subset of $X$,
then $f(K)$ is a compact subset of $Y$.
\end{theorem}
\begin{proof} This is easy if you look at it the right way.
See page~\pageref{P;compact image}.
\end{proof}
This result has many delightful consequences.
Recall, for example, that the quotient topology
$X/\negthinspace\sim$ is defined in such a way that the
quotient map $q:X\rightarrow X/\negthinspace\sim$ is continuous.
Since $q(X)=X/\negthinspace\sim$,
Theorem~\ref{T;compact image} gives us
a positive property of the quotient topology.
\begin{theorem}\label{T;quotient compact}
Let $(X,\tau)$ be a compact topological space
and $\sim$ an equivalence relation on $X$.
Then the quotient topology on $X/\negthinspace\sim$ is compact.
\end{theorem}
The next result follows at once from our
characterisation of compact sets for the real
line with the usual topology.
\begin{theorem}
Let ${\mathbb R}$ have the usual metric.
If $K$ is a closed and bounded subset of ${\mathbb R}$
and $f:K\rightarrow{\mathbb R}$ is continuous,
then $f(K)$ is closed and bounded.
\end{theorem}
This gives a striking extension of one of the
crowning glories of a first course in analysis.
\begin{theorem}\label{T;attains bounds}
Let ${\mathbb R}$ have the usual metric.
If $K$ is a
closed and bounded subset of ${\mathbb R}$
and $f:K\rightarrow{\mathbb R}$ is continuous,
then $f$ is bounded and attains its bounds.
\end{theorem}
\begin{proof} The straightforward proof
is given on
page~\pageref{P;attains bounds}.
\end{proof}
Theorem~\ref{T;attains bounds} is complemented
by the following observation.
\begin{exercise}\label{E;converse attains bounds}
Let ${\mathbb R}$ have the usual metric.
(i) If $K$ is subset of ${\mathbb R}$ with the property
that, whenever $f:K\rightarrow{\mathbb R}$ is continuous,
$f$ is bounded, show that
that $K$ is closed and bounded.
(ii) If $K$ is subset of ${\mathbb R}$ with the property
that, whenever $f:K\rightarrow{\mathbb R}$ is continuous
and bounded, then $f$ attains its bounds show that
$K$ is closed and bounded.
\end{exercise}
\begin{proof} See page~\pageref{P;converse attains bounds}.
\end{proof}
Exercise~\ref{E;stronger bounds} gives a stronger
result, but will be easier to tackle when the
reader has done the section on sequential compactness
(Section~\ref{S;sequential}).
Theorem~\ref{T;attains bounds}
has the following straightforward generalisation
whose proof is left to the reader.
\begin{theorem}\label{T;compact attains bounds}
If $K$ is a compact space
and $f:K\rightarrow{\mathbb R}$ is continuous
then $f$ is bounded and attains its bounds.
\end{theorem}
We also have the following useful result.
\begin{theorem}\label{T;bijection compact}
Let $(X,\tau)$ be a compact and $(Y,\sigma)$
a Hausdorff topological space. If $f:X\rightarrow Y$
is a continuous bijection, then it is a homeomorphism.
\end{theorem}
\begin{proof} There is a hint on page~\pageref{H;bijection compact}
and a proof on page~\pageref{P;bijection compact}.
\end{proof}
Theorem~\ref{T;bijection compact} is illuminated by the following
almost trivial remark.
\begin{lemma} Let $\tau_{1}$ and $\tau_{2}$ be topologies
on the same space $X$. The identity map
\[\iota:(X,\tau_{1})\rightarrow(X,\tau_{2})\]
from $X$ with topology $\tau_{1}$ to
$X$ with topology $\tau_{2}$ given by $\iota(x)=x$
is continuous if and only if $\tau_{1}\supseteq\tau_{2}$.
\end{lemma}
\begin{theorem}\label{T;compare topologies}
Let $\tau_{1}$ and $\tau_{2}$ be topologies
on the same space $X$.
(i) If $\tau_{1}\supseteq \tau_{2}$ and $\tau_{1}$ is compact,
then so is $\tau_{2}$.
(ii) If $\tau_{1}\supseteq \tau_{2}$ and $\tau_{2}$ is Hausdorff,
then so is $\tau_{1}$.
(iii) If $\tau_{1}\supseteq \tau_{2}$, $\tau_{1}$ is compact
and $\tau_{2}$ is Hausdorff, then $\tau_{1}=\tau_{2}$.
\end{theorem}
\begin{proof} The routine proof is given
on page~\pageref{P;compare topologies}.
\end{proof}
The reader may care to
recall that `Little Bear's porridge was neither too hot nor
too cold but just right'.
With the hint given by the previous theorem it should
be fairly easy to do do the next exercise.
\begin{exercise}\label{E;too hot}
(i) Give an example of a Hausdorff space $(X,\tau)$ and
a compact Hausdorff space $(Y,\sigma)$
together with a continuous bijection $f:X\rightarrow Y$
which is not a homeomorphism.
(ii) Give an example of a compact Hausdorff space $(X,\tau)$ and
a compact space $(Y,\sigma)$
together with a continuous bijection $f:X\rightarrow Y$
which is not a homeomorphism.
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;too hot}.
\end{proof}
We shall give a (not terribly convincing) example
of the use of Theorem~\ref{T;bijection compact}
in our proof of Exercise~\ref{E;circle as quotient}.
The reader may have gained the impression that
compact Hausdorff spaces form an ideal backdrop
for continuous functions to the reals.
Later work shows that the impression is
absolutely correct,
but it must be remembered that many important
spaces (including the real line with the usual topology)
are not compact.
\section{Products of compact spaces} The course contains one
further major theorem on compactness.
\begin{theorem}\label{T;product compact}
The product of two compact spaces is compact.
(More formally, if $(X,\tau)$ and $(Y,\sigma)$ are compact
topological spaces and $\lambda$ is the product topology,
then $(X\times Y,\lambda)$ is compact.)
\end{theorem}
\begin{proof} There is a very substantial hint on
page~\pageref{H;product compact} and a proof on
page~\pageref{P;product compact}.
\end{proof}
Tychonov showed that
the general product of compact spaces
is compact (see the note to Exercise~\ref{E;Infinite product})
so Theorem~\ref{T;product compact} is often
referred to as Tychonov's theorem.
The same proof, or the remark that the subspace topology
of a product topology is the product topology of the subspace
topologies (see Exercise~\ref{E;Product subspace}),
gives the closely related result.
\begin{theorem}\label{T;product subspace compact}
Let $(X,\tau)$ and $(Y,\sigma)$ be topological spaces
and let $\lambda$ be the product topology.
If $K$ is a compact subset of $X$ and
$L$ is a compact subset of $Y$, then $K\times L$
is a compact in $\lambda$.
\end{theorem}
We know (see Exercise~\ref{E;metric product}) that the topology
on ${\mathbb R}^{2}$ derived from the Euclidean metric
is the same as the product topology when we
give ${\mathbb R}$ the topology derived from the Euclidean metric.
Theorem~\ref{T;closed interval compact} thus has the following
corollary.
\begin{theorem}
$[a,b]\times[c,d]$ with its usual (Euclidean)
topology is compact.
\end{theorem}
The arguments of the previous section carry over to give
results like the following\footnote{Stated more poetically by Conway.
\begin{verse}
If $E$'s closed and bounded, says Heine--Borel,\\
And also Euclidean, then we can tell\\
That, if it we smother\\
With a large open cover,\\
There's a finite refinement as well.
\end{verse}
}.
\begin{theorem}
Consider ${\mathbb R}^{2}$ with the standard
(Euclidean) topology. A set $E$ is compact if and
only if it is closed and bounded
(that is to say, there exists a
$M$ such that $\|{\mathbf x}\|\leq M$ for all ${\mathbf x}\in E$).
\end{theorem}
\begin{theorem}\label{T;compact Euclidean}
Let ${\mathbb R}^{2}$ have the usual metric.
If $K$ is a
closed and bounded subset of ${\mathbb R}^{2}$
and $f:K\rightarrow{\mathbb R}$ is continuous,
then $f$ is bounded and attains its bounds.
\end{theorem}
\begin{exercise}
Let ${\mathbb R}^{2}$ have the usual metric.
If $K$ is a subset of ${\mathbb R}^{2}$ with the property
that, whenever $f:K\rightarrow{\mathbb R}$ is continuous,
then $f$ is bounded, show
that $K$ is closed and bounded.
Let ${\mathbb R}^{2}$ have the usual metric.
If $K$ is a subset of ${\mathbb R}^{2}$ with the property
that, whenever $f:K\rightarrow{\mathbb R}$ is continuous,
and bounded, then $f$ attains its bounds, show
that $K$ is closed and bounded.
\end{exercise}
The generalisation to ${\mathbb R}^{n}$ is left to the reader.
The next exercise brings together many of the themes of this course.
The reader should observe that we \emph{know} what we want
the circle to look like. This exercise \emph{checks} that
defining the circle via quotient maps gives us what we want.
\begin{exercise}\label{E;circle as quotient}
Consider the complex plane with its usual metric.
Let
\[{\partial}D=\{z\in{\mathbb C}\,:\,|z|=1\}\]
and give ${\partial}D$ the subspace topology $\tau$.
Give ${\mathbb R}$ its usual topology and define
an equivalence relation $\sim$ by $x\sim y$ if $x-y\in{\mathbb Z}$.
We write ${\mathbb R}/\negthinspace\sim={\mathbb T}$ and give ${\mathbb T}$
the quotient topology. The object of this exercise
is to show that ${\partial}D$ and ${\mathbb T}$ are homeomorphic.
(i) Verify that $\sim$ is indeed an equivalence relation.
(ii) Show that, if we define
$f:{\mathbb R}\rightarrow {\partial}D$
by $f(x)=\exp(2\pi ix)$, then $f(U)$ is
open whenever $U$ is open.
(iii) If $q:{\mathbb R}\rightarrow {\mathbb T}$ is the quotient map
$q(x)=[x]$ show that $q(x)=q(y)$ if and only if $f(x)=f(y)$.
Deduce that $q\big(f^{-1}(\{\exp(2\pi ix)\})\big)=[x]$
and that the equation $F(\exp(2\pi ix))=[x]$ gives a well
defined bijection $F:{\partial}D\rightarrow{\mathbb T}$.
(iv) Show that $F^{-1}(V)=f\big(q^{-1}(V)\big)$ and deduce
that $F$ is continuous.
(v) Show that ${\mathbb T}$ is Hausdorff and explain why
${\partial}D$ is compact. Deduce that $F$ is a homeomorphism.
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;circle as quotient}.
\end{proof}
\section{Compactness in metric spaces}\label{S;sequential}
When we work in ${\mathbb R}$
(or, indeed, in ${\mathbb R}^{n}$) with the usual metric,
we often use the theorem of Bolzano--Weierstrass that every
sequence in a bounded closed set has a subsequence with a limit
in that set. It is also easy to see that closed bounded
sets are the only subsets of ${\mathbb R}^{n}$ which have the
property that every sequence in the set
has a subsequence with a limit in that set. This suggests
a series of possible theorems some of which turn out to be false.
\begin{example}\label{E;bounded not convergent}
Give an example of a metric space
$(X,d)$ which is bounded (in the sense that there exists an $M$
with $d(x,y)\leq M$ for all $x,\,y\in X$) but
for which there exist sequences with no convergent subsequence.
\end{example}
\begin{proof}[Solution] We can find such a space within our standard
family of examples. See page~\pageref{P;bounded not convergent}.
\end{proof}
Fortunately we do have a very neat and useful true theorem.
\begin{definition}\label{D;sequential compactness}
A metric space $(X,d)$ is said to be
\emph{sequentially compact} if every sequence in $X$ has a
convergent subsequence.
\end{definition}
\begin{theorem}\label{T;sequence same}
A metric space is sequentially compact if and only if it
is compact.
\end{theorem}
We prove the if and only if parts separately.
The proof of the if part is quite simple when you see how.
\begin{theorem}\label{T;compact implies sequence}
If the metric space $(X,d)$ is compact,
then it is sequentially compact.
\end{theorem}
\begin{proof} There is a hint on page~\pageref{H;compact implies sequence}
and a proof on page~\pageref{P;compact implies sequence}
\end{proof}
Here is a simple but important consequence.
\begin{theorem}\label{T;compact complete}
If the metric space $(X,d)$ is compact,
then $d$ is complete.
\end{theorem}
\begin{proof} The easy proof is given on page~\pageref{P;compact complete}.
It uses a remark of independent interest given
below as Lemma~\ref{L;one out}.
\end{proof}
\begin{lemma}\label{L;one out}
Let $(X,d)$ be a metric space. If a subsequence
of a Cauchy sequences converges, then the series converges.
\end{lemma}
\begin{proof} The easy proof is given on page~\pageref{P;one out}.
\end{proof}
Observe that ${\mathbb R}$ with the usual Euclidean metric
is complete but not compact.
The only if part of Theorem~\ref{T;sequence same}
is more difficult to prove (but also,
in my opinion, less important).
We start by proving a result of independent interest.
\begin{lemma}\label{L;Lebesgue}
Suppose that $(X,d)$ is a sequentially compact
metric space and that the collection $U_{\alpha}$
with $\alpha\in A$ is an open cover of $X$.
Then there exists a $\delta>0$ such that, given any
$x\in X$, there exists an $\alpha(x)\in A$
such that the open ball $B(x,\delta)\subseteq U_{\alpha(x)}$.
\end{lemma}
\begin{proof} There is a hint on page~\pageref{H;Lebesgue}
and a proof on page~\pageref{P;Lebesgue}.
\end{proof}
We now prove the required result.
\begin{theorem}\label{T;sequence implies compact}
If the metric space $(X,d)$ is sequentially
compact, it is compact.
\end{theorem}
\begin{proof} There is a hint on page~\pageref{H;sequence implies compact}
and a proof on page~\pageref{P;sequence implies compact}.
\end{proof}
This gives an alternative, but less instructive,
proof of the theorem of Heine--Borel.
\begin{proof}[Alternative proof of Theorem~\ref{T;Heine--Borel}]%
\label{Alternative Heine--Borel}
By the Bolzano--Weierstrass theorem, $[a,b]$ is
sequentially compact. Since we are in a metric space,
it follows that $[a,b]$ is compact.
\end{proof}
If you prove a theorem on metric spaces using
sequential compactness it is good practice to
try and prove it directly by compactness.
(See, for example,
Exercise~\ref{E;uniform continuity}.)
The reader will hardly need to be warned that this section
dealt only with metric spaces. Naive generalisations
to general topological spaces are likely to be meaningless
or false.
\section{Connectedness}\label{S;connected}
This section deals with a problem
which the reader will meet (or has met) in her first
complex variable course. Here is a similar problem that
occurs on the real line. Suppose that $U$ is an open
subset of ${\mathbb R}$ (in the usual topology)
and $f:U\rightarrow {\mathbb R}$ is a differentiable function
with $f'(u)=0$ for all $u\in U$. We would like to
conclude that $f$ is constant, but the example
$U=(-2,-1)\cup (1,2)$, $f(u)=1$ if $u>0$,
$f(u)=-1$ if $u<0$ shows that the general result
is false. What extra condition should we put on $U$
to make the result true?
After some experimentation, mathematicians have come up
with the following idea.
\begin{definition}\label{D;disconnected}
A topological space $(Y,\sigma)$ is
said to be \emph{disconnected} if we can find non-empty
open sets $U$ and $V$ such that $U\cup V=Y$
and $U\cap V=\emptyset$. A space which is not
disconnected is called \emph{connected}.
\end{definition}
\begin{definition} If $E$ is a subset of a topological
space $(X,\tau)$, then $E$ is called \emph{connected} (respectively
\emph{disconnected}) if the subspace topology on $E$ is
connected (respectively
disconnected).
\end{definition}
The definition of a subspace topology gives the following
alternative characterisation which the reader may prefer.
\begin{lemma} If $E$ is a subset of a topological
space $(X,\tau)$, then $E$ is disconnected if
and only if we can find
open sets $U$ and $V$ such that $U\cup V\supseteq E$,
$U\cap V\cap E=\emptyset$, $U\cap E\neq\emptyset$
and $V\cap E\neq\emptyset$
\end{lemma}
We now look at another characterisation
of connectedness which is very useful
but requires a little preliminary work
\begin{lemma}\label{L;locally constant}
Let $(X,\tau)$ be a topological space
and $A$ a set. Let $\Delta$ be the discrete
topology on $A$. The following statements about
a function $f:X\rightarrow A$ are equivalent.
(i) If $x\in X$ we can find a $U\in\tau$ with $x\in U$
such that $f$ is constant on $U$.
(ii) If $x\in A$, $f^{-1}(\{x\})\in\tau$
(iii) The map $f:(X,\tau)\rightarrow(A,\Delta)$
is continuous.
\end{lemma}
\begin{proof} Immediate.
\end{proof}
If the conditions of Lemma~\ref{L;locally constant}
apply, we say that $f$ is \emph{locally constant}.
\begin{theorem}\label{T;locally constant} If $A$
contains at least two points,
then a topological space $(X,\tau)$ is connected if and only if
every locally constant function $f:X\rightarrow A$
is constant.
\end{theorem}
\begin{proof} The proof given
on page~\pageref{P;locally constant} shows how
easy it is to use connectedness.
\end{proof}
We have answered the question which began this section.
Since ${\mathbb Z}$ and $\{0,1\}$ have the discrete
topology when considered as subspaces of ${\mathbb R}$
with the usual topology, we have the following
corollary.
\begin{lemma}\label{L;connected via integer}
(i) A topological space $(X,\tau)$ is connected
if and only if every continuous integer valued
function $f:X\rightarrow{\mathbb R}$ (where
${\mathbb R}$ has its usual topology) is
constant.
(ii) A topological space $(X,\tau)$ is connected
if and only if every continuous
function $f:X\rightarrow{\mathbb R}$ (where
${\mathbb R}$ has its usual topology)
which only takes the values $0$ or $1$ is
constant.
\end{lemma}
The following deep result is now easy to prove.
\begin{theorem}
If we give ${\mathbb R}$ the usual topology,
then the intervals $[a,b]$ are connected.
\end{theorem}
\begin{proof} Observe that if $f:[a,b]\rightarrow{\mathbb R}$
is continuous then if $f(x)=1$ and $f(y)=0$ the intermediate value theorem
tells us that there is some $z$ between $x$ and $y$ such that
$f(z)=1/2$. (For a more direct alternative see
Exercise~\ref{E;connected Heine}.)
\end{proof}
The reader will find it instructive to
use Lemma~\ref{L;connected via integer}~(ii)
to prove parts~(i) and~(iii) of the next exercise.
\begin{exercise}\label{E;quotient connected}
Prove the following results.
(i) If $(X,\tau)$ and $(Y,\sigma)$ are topological spaces,
$E$ is a connected subset of $X$ and $g:E\rightarrow Y$
is continuous, then $g(E)$ is connected.
(More briefly, the continuous image of a connected
set is connected.)
(ii) If $(X,\tau)$ is a connected topological space
and $\sim$ is an equivalence relation on $X$,
then $X/\negthinspace\sim$
with the quotient topology is connected.
(iii) If $(X,\tau)$ and $(Y,\sigma)$ are
connected topological spaces, then $X\times Y$
with the product topology is connected.
(iv) If $(X,\tau)$ is a
connected topological space and $E$ is a subset of $X$,
then
it does not follow that $E$ with the subspace topology is connected.
\end{exercise}
\begin{proof}[Solution]
See page~\pageref{P;quotient connected}.\end{proof}
The next lemma will be required shortly.
\begin{lemma}\label{L;closure connected}
Let $E$ be a subset of a topological space
$(X,\tau)$. If $E$ is connected so is $\Cl E$.
\end{lemma}
\begin{proof} See page~\pageref{P;closure connected}.
\end{proof}
The following lemma outlines a very natural development.
\begin{lemma}\label{L;connected components}
We work in a topological space $(X,\tau)$.
(i) Let $x_{0}\in X$. If $x_{0}\in E_{\alpha}$
and $E_{\alpha}$ is connected for all $\alpha\in A$,
then $\bigcup_{\alpha\in A}E_{\alpha}$ is connected.
(ii) Write $x\sim y$ if there exists a connected set $E$
with $x,\,y\in E$. Then $\sim$ is an equivalence relation.
(iii) The equivalence classes $[x]$ are connected.
(iv) If $F$ is connected and $F\supseteq [x]$, then $F=[x]$.
\end{lemma}
\begin{proof} If you need more details,
see page~\pageref{P;connected components}.
\end{proof}
The sets $[x]$ are known as the \emph{connected components}
of $(X,\tau)$.
Applying Lemma~\ref{L;closure connected} with $E=[x]$
we get the following result.
\begin{lemma} The connected components of a topological
space are closed. If there are only finitely many
components then they are open.
\end{lemma}
Exercise~\ref{E;Cantor} provides an important example
of a topological space in which the connected components
consist of single points. These components are not open.
Connectedness is related to another, older, concept.
\begin{definition}\label{D;path-connected}
Let $(X,\tau)$ be a topological space.
We say that $x,\,y\in X$ are \emph{path-connected} if
(when $[0,1]$ is given its standard Euclidean topology)
there exists a continuous
function $\gamma:[0,1]\rightarrow X$ with
$\gamma(0)=x$ and $\gamma(1)=y$.
\end{definition}
Of course, $\gamma$ is referred to as a \emph{path}
from $x$ to $y$.
\begin{lemma}\label{L;path-connected equivalence}
If $(X,\tau)$ is a topological space and
we write $x\sim y$ if $x$ is path-connected
to $y$, then $\sim$ is an equivalence relation.
\end{lemma}
\begin{proof} This just a question of getting the
notation under control. There is a proof
on page~\pageref{P;path-connected equivalence}.
\end{proof}
We say that a topological space is \emph{path-connected} if every two
points in the space are path-connected.
The following theorem is often useful.
\begin{theorem}\label{T;path-connected to connected}
If a topological space is path-connected, then it
is connected.
\end{theorem}
\begin{proof} This is not hard. There is a proof on
page~\pageref{P;path-connected to connected}.
\end{proof}
\begin{exercise}\label{E;bounded connected}
Show that the bounded connected subsets
of ${\mathbb R}$ (with the usual topology)
are the intervals. (By intervals we mean
sets of the form $[a,b]$, $[a,b)$, $(a,b]$ and $(a,b)$
with $a\leq b$.
Note that $[a,a]=\{a\}$, $(a,a)=\emptyset$.)
Describe, without proof, all the connected subsets of ${\mathbb R}$.
\end{exercise}
\begin{proof}[Solution] See page~\pageref{P;bounded connected}.
\end{proof}
The converse of Theorem~\ref{T;path-connected to connected}
is false (see Example~\ref{E;connected not path-connected}
below) but there is one very important case where connectedness
implies path-connectedness.
\begin{theorem}\label{T;connected to path}
If we give ${\mathbb R}^{n}$ the usual topology,
then any open set $\Omega$ which is connected is path-connected.
\end{theorem}
\begin{proof} There is a hint on page~\pageref{H;connected to path}
and a proof on page~\pageref{P;connected to path}.
\end{proof}
The following example shows that, even in ${\mathbb R}^{2}$,
we cannot remove the condition $\Omega$ open.
\begin{example}\label{E;connected not path-connected}
We work in ${\mathbb R}^{2}$ with the usual topology.
Let
\[E_{1}=\{(0,y)\,:\,|y|\leq 1\}
\ \text{and}
\ E_{2}=\{(x,\sin 1/x)\,:\,00$ such that the open ball
$B(x,\epsilon)\subseteq N$.
(ii) Consider ${\mathbb R}$ with the usual topology.
Give an example of a neighbourhood which is
not an open neighbourhood. Give an example of
an unbounded neighbourhood. Give an example of
a neighbourhood which is not connected.
\end{exercise}
Here is another related way of looking at topologies
which we have not used explicitly, but which can
be useful.
\begin{definition}\label{D;basis}
Let $X$ be a set. A collection ${\mathcal B}$
of subsets is called a \emph{basis} if
the following conditions hold.
(i) $\bigcup_{B\in{\mathcal B}}B=X$.
(ii) If $B_{1},\,B_{2}\in{\mathcal B}$ and
$x\in B_{1}\cap B_{2}$ we can find a
$B_{3}\in{\mathcal B}$ such that
$x\in B_{3}\subseteq B_{1}\cap B_{2}$
\end{definition}
\begin{lemma}\label{L;basis works} Let $X$ be a set
and ${\mathcal B}$ a collection
of subsets of $X$. Let $\tau_{\mathcal B}$
be the collection of sets $U$ such that,
whenever $x\in U$ we can find a $B\in{\mathcal B}$
such that $x\in B\subset U$.
Then $\tau_{\mathcal B}$ is a topology if and
only if ${\mathcal B}$ is a basis.
\end{lemma}
\begin{proof} The routine proof is given
on
page~\pageref{P;basis works}.
\end{proof}
\begin{definition} If ${\mathcal B}$ is a basis
and $\tau_{\mathcal B}$ is as in
Lemma~\ref{L;basis works}, we say that ${\mathcal B}$
is a \emph{basis}\footnote{Since ${\mathcal B}\subseteq \tau_{B}$
we sometimes call ${\mathcal B}$ a `basis of open neighbourhoods'.}
for $\tau_{B}$.
\end{definition}
\begin{exercise} Consider ${\mathbb R}^{2}$ with
the Euclidean norm. Show that the open discs
\[B({\mathbf q},1/n)
=\{{\mathbf x}\,:\,\|{\mathbf x}-{\mathbf q}\|<1/n\}\]
with ${\mathbf q}\in{\mathbb Q}^{2}$ and $n\geq 1$,
$n\in{\mathbb Z}$ form a countable basis ${\mathcal B}$
for the Euclidean topology. Is it true that
the intersection of two elements of ${\mathcal B}$
lies in ${\mathcal B}$? Give reasons.
\end{exercise}
\begin{exercise}\label{E;products via basis}
Let $(X,\tau)$ and $(Y,\sigma)$
be topological spaces. Show that
\[{\mathcal B}=\{U\times V\,:\,U\in\tau,\,V\in\sigma\}\]
is a basis and check, using Lemma~\ref{L;product topology},
that it generates the product topology.
\end{exercise}
We end the course with a warning. Just as it is
possible to define continuous functions in terms
of neighbourhoods so it is possible to define convergence
in terms of neighbourhoods.
This works well in metric spaces.
\begin{lemma}\label{L;convergence, neighbourhood, metric}
If $(X,d)$ is a metric space, then $x_{n}\rightarrow x$,
if and only if
given $N$ a neighbourhood of $x$, we can find an
$n_{0}$ (depending on $N$) such that $x_{n}\in N$
for all $n\geq n_{0}$.
\end{lemma}
\begin{proof} Immediate.
\end{proof}
However, things are not as simple in general topological spaces.
\begin{definition}{\bf [WARNING. Do not use this definition
without reading the commentary that follows.]}%
\label{R;treacherous}
Let $(X,\tau)$ be a topological space. If $x_{n}\in X$
and $x\in X$ then we say $x_{n}\rightarrow x$
if, given $N$ a neighbourhood of $x$ we can find
$n_{0}$ (depending on $N$) such that $x_{n}\in N$
for all $n\geq n_{0}$.
\end{definition}
Any hopes that limits of sequences
will behave as well in general topological spaces
are dashed by the following example.
\begin{example} Let $X=\{a,\,b\}$ with $a\neq b$.
If we give $X$ the indiscrete topology, then,
if we set $x_{n}=a$ for all $n$, we have
$x_{n}\rightarrow a$ and $x_{n}\rightarrow b$.
\end{example}
Thus limits need not be unique.
Of course, it is possible to persist in
spite of this initial shock, but the reader
will find that she cannot prove the links
between limits of sequences and topology
that we would wish to be true. This failure
is not the reader's fault. Deeper investigations
into set theory reveal that sequences are
inadequate tools for the study of topologies
which have neighbourhood systems which are `large
in the set theoretic sense'. (Exercise~\ref{E;large set}
represents an attempt to show what this means.)
It turns out that the deeper study of set theory
reveals not only the true nature of the problem
but also solutions via \emph{nets} (a kind of generalised sequence)
or \emph{filters} (preferred by the majority of mathematicians).
\section{Final remarks and books}
Because the notion of a topological space is so general
it applies to vast collection of objects. Many
useful results apply only to some subcollection
and this means that the subject contains many
counterexamples to show that such and such a
condition is required for a certain theorem to be true.
To the generality of mankind,
the longer and more complicated a
piece of mathematics appears
to be, the more impressive it is.
Mathematicians know that the simpler a
proof or a counterexample is, the easier it
is to check, understand and use.
Just as it is worth taking time
to see if a proof can be made simpler, so
it is worth taking time to see
if there is a simpler counterexample
for the purpose in hand.
When searching for a counterexample
we may start by looking at ${\mathbb R}$
and ${\mathbb R}^{n}$ with the standard
metrics and subspaces like ${\mathbb Q}$, $[a,b]$, $(a,b)$
and $[a,b)$. Then we might look at
the discrete and indiscrete topologies
on a space. It is often worth looking
at possible topologies on spaces with a small number
of points (typically $3$).
As her experience grows, the reader will have a much wider
range of spaces to think about. Some like those of
Exercises~\ref{E;new metrics},~\ref{E;little elk},
and~\ref{E;Cantor} are very useful in their own right.
Some, like that of Exercise~\ref{E;scatter},
merely provide object lessons in how
strange topologies can be,
If the reader looks at a very old book on \emph{general}
(or \emph{analytic})
topology, she may find both the language and the contents
rather different from what she is used to. In 1955, Kelley
wrote a book \emph{General Topology}~\cite{Kelley}
which stabilised the content and notation which
might be expected in advanced course on the subject.
Texts like~\cite{Mendelson} (now in a very
cheap Dover reprint\footnote{October, 2012.})
and~\cite{Mansfield} (out of print)
which extracted a natural elementary
course quickly appeared and later texts followed the
established pattern. Both~\cite{Mendelson}
and~\cite{Mansfield} are short and sweet.
With luck, they should be in your college library.
The book of Sutherland~\cite{Sutherland}
has the possible advantage of being written for a British audience
and the certain advantage of being in print.
Many books on Functional Analysis, Advanced Analysis, Algebraic
Topology and Differential Geometry cover the material in this
course and then go on to develop it in the directions demanded
by their particular subject.
\begin{thebibliography}{9}
\bibitem{Kelley} Kelley,~J.~L., \emph{General Topology}, Princeton~N.~J,.
Van Nostrand, 1955. [Reissued by Springer in 1975
and Ishi Press in 2008.]
\bibitem{Mansfield} Mansfield,~M.~J.,
\emph{Introduction to Topology}, Princeton~N.~J.,
Van Nostrand, 1963.
\bibitem{Mendelson} Mendelson,~B., \emph{Introduction to Topology},
Boston Mass., Allyn and Bacon, 1962. [Now available in
a Dover reprint, New York, Dover, 1990]
\bibitem{Sutherland} Sutherland,~W.~A.,
\emph{Introduction to Metric and Topological Spaces}, Oxford,
OUP, 1975. (Now in second edition.)
\end{thebibliography}
\section{Exercises}\label{S;exercises one}
\begin{exercise}\label{E;axiom grubbing}
Let $X$ be a set and
$d:X^{2}\rightarrow{\mathbb R}$ a function with the
following properties.
(i)$'$ $d(x,x)=0$ for all $x\in X$.
(ii)$'$ $d(x,y)=0$ implies $x=y$.
(iv)$'$ $d(y,x)+d(y,z)\geq d(x,z)$ for all $x,\,y,\,z\in X$.
\noindent Show that $d$ is a metric on $X$.
\end{exercise}
\begin{exercise}\label{E;extend composition}
Let ${\mathbb R}^{N}$ have its usual (Euclidean) metric.
(i) Suppose that $f_{j}:{\mathbb R}^{n_{j}}\rightarrow{\mathbb R}^{m_{j}}$
is continuous for $1\leq j\leq k$. Show that the map
$f:{\mathbb R}^{n_{1}+n_{2}+\ldots+n_{k}}\rightarrow
{\mathbb R}^{m_{1}+m_{2}+\ldots+m_{k}}$
given by
\[f({\mathbf x}_{1},{\mathbf x}_{2},\ldots,{\mathbf x}_{k})
=(f_{1}({\mathbf x}_{1}),f_{2}({\mathbf x}_{2}),
\ldots,f_{k}({\mathbf x}_{k}))\]
is continuous.
(ii) Show that the map $U:{\mathbb R}^{n}\rightarrow{\mathbb R}^{kn}$
given by
\[U({\mathbf x})=({\mathbf x},{\mathbf x},\ldots,{\mathbf x})\]
is continuous.
(iii) Suppose that $g_{j}:{\mathbb R}^{n}\rightarrow{\mathbb R}^{m_{j}}$
is continuous for $1\leq j\leq k$.
Use the composition law to show that the map
$g:{\mathbb R}^{n}\rightarrow
{\mathbb R}^{m_{1}+m_{2}+\ldots+m_{k}}$
given by
\[g({\mathbf x})
=(g_{1}({\mathbf x}),g_{2}({\mathbf x}),\ldots,g_{k}({\mathbf x}))\]
is continuous.
(iv) Show that the maps $A,B:{\mathbb R}^{2}\rightarrow{\mathbb R}$
given by $A(x,y)=x+y$, $B(x,y)=xy$ are continuous.
(v) Use the composition law repeatedly to show that the map
$f:{\mathbb R}^{2}\rightarrow{\mathbb R}$
given by
\[f(x,y)=\sin\left(\frac{xy}{x^{2}+y^{2}+1}\right)\]
is continuous. (You may use results about maps
$g:{\mathbb R}\rightarrow{\mathbb R}$
\noindent$[$If you have difficulty with (v), try smaller subproblems.
For example, can you show that $(x,y)\mapsto x^{2}+y^{2}$ is continuous?$]$
\end{exercise}
\begin{exercise}\label{E;nasty discontinuous}
Consider ${\mathbb R}$ with the ordinary
Euclidean metric.
(i) We know that $\sin:{\mathbb R}\rightarrow{\mathbb R}$
is continuous. Show that, if $U={\mathbb R}$, then $U$ is open,
but $\sin U$ is not.
(ii) We define a function $f:{\mathbb R}\rightarrow{\mathbb R}$ as follows.
If $x\in{\mathbb R}$, set $\langle x\rangle=x-[x]$ and write
\[\langle x\rangle=.x_{1}x_{2}x_{3}\ldots\]
as a decimal, choosing the terminating form in case of ambiguity.
If $x_{2n+1}=0$ for all sufficiently large $n$, let $N$ be the
least integer such that $x_{2n+1}=0$ for all $n\geq N$, and set
\[f(x)=(-1)^{N}\sum_{j=1}^{\infty}x_{2N+2j}10^{N-j}.\]
We set $f(x)=0$ otherwise.
Show that if $U$ is a non-empty open set,
$f(U)={\mathbb R}$ and so $f(U)$ is open. Show that $f$ is not
continuous.
\end{exercise}
\begin{exercise}\label{E;closed ball}
Let $(X,d)$ be a metric space
and let $r>0$.
Show that
\[\overline{B(x,r)}=\{y\,:\,d(x,y)\leq r\}\]
is a closed set:
(a) By using the definition of a closed set in terms of limits.
(b) By showing that the complement of $\overline{B(x,r)}$
is open.
We call $\overline{B(x,r)}$ the \emph{closed ball} centre $x$ and radius
$r$.
\end{exercise}
\begin{exercise}\label{E;close shave}
Prove Theorems~\ref{T;properties metric closed}
and~\ref{T;metric continuous closed}
directly from
the definition of a closed set in terms of limits
without using open sets.
\end{exercise}
\begin{exercise}\label{E;new metrics}
(i) Let $(X,d)$ be a metric space. Show that
\[\rho(x,y)=\frac{d(x,y)}{1+d(x,y)}\]
defines a new metric on $X$.
(ii) Show that, in~(i), $d$ and $\rho$ have the
the same open sets.
(iii) Suppose that $d_{1}$, $d_{2}$, \ldots are metrics
on $X$. Show that
\[\theta(x,y)=\sum_{n=1}^{\infty}
\frac{2^{-n}d_{n}(x,y)}{1+d_{n}(x,y)}\]
defines a metric $\theta$ on $X$.
\end{exercise}
\begin{exercise}\label{E;Infinite product}
(i) Suppose that $A$ is non-empty and that $(X_{\alpha},\tau_{\alpha})$
is a topological space. Explain what is meant by saying that
$\tau$ is the smallest topology on
$\prod_{\alpha\in A}X_{\alpha}$ for which each of the projection maps
$\pi_{\beta}:\prod_{\alpha\in A}X_{\alpha}\rightarrow X_{\beta}$
is continuous and explain why we know that it exists.
We call $\tau$ the product topology.
(ii) Show that $U\in\tau$ if and only if,
given $x\in U$,
we can find $U_{\alpha}\in\tau_{\alpha}$ $[\alpha\in A]$
such that
\[x\in\prod_{\alpha\in A}U_{\alpha}\subseteq U\]
and $U_{\alpha}=X_{\alpha}$ for all but finitely many of the $\alpha$.
(iii) By considering $A=[0,1]$ and taking each $(X_{\alpha},\tau_{\alpha})$
to be a copy of ${\mathbb R}$, show that the following
condition defines a topology $\sigma$
on the space ${\mathbb R}^{[0,1]}$ of functions
$f:[0,1]\rightarrow{\mathbb R}$.
A set $U\in\sigma$ if and only if, given any $f_{0}\in U$,
there exists an $\epsilon>0$
and $x_{1},\,x_{2},\,\ldots,\,x_{n}\in[0,1]$ such that
\[\{f\in {\mathbb R}^{[0,1]}\,:\,
|f(x_{j})-f_{0}(x_{j})|<\epsilon
\ \text{for all $1\leq j\leq n$}\}\subseteq U.\]
\noindent$[$The reader who cannot see the point of this topology
is in good, but mistaken, company. The great topologist
Alexandrov recalled that when Tychonov (then aged only~20)
produced this definition `His chosen \ldots definition seemed
not only unexpected but perfectly paradoxical. $[$I remember$]$
with what mistrust $[$I$]$ met Tychonov's proposed definition.
How was it possible that a topology induced by means of
such enormous neighbourhoods, which are only distinguished
from the whole space by a finite number of the coordinates,
could catch any of the essential characteristics of a
topological product?' However, Tychonov's choice was justified
by its consequences, in particular, the generalisation (by Tychonov)
of Theorem~\ref{T;product compact} to show that the
(Tychonov) product of compact spaces is compact.
This theorem called \emph{Tychonov's theorem} is
one of the most important in modern analysis.
In common with many of the most brilliant members
of the Soviet school, Tychonov went on to work in
a large number of branches of pure and applied
mathematics. His best known work includes a remarkable
paper on solutions of the heat
equation\footnote{A substantial part of Volume~22, Number~2
of \emph{Russian Mathematical Surveys} 1967 is devoted
to Tychonov and his work. The quotation from Alexandrov
is taken from there.}.$]$
\end{exercise}
\begin{exercise}\label{E;Kuratowski}
{\bf [The Kuratowski problem\footnote{So called
because Kuratowski solved it.}]}
We work in a topological space $(X,\tau)$.
(i) If $A$ is a subset of $X$ show that $x\in \Cl A\setminus\Int A$
if and only if, whenever $x\in U\in \tau$,
we have $U\cap A\neq \emptyset$
and $U\cap A^{c}\neq \emptyset$.
(ii) Find a set $A$ of ${\mathbb R}$ with the usual
topology such that $A$, $\Cl A$, $\Int A\Cl$
and $\Cl\Int\Cl A$ are all distinct.
(iii) Show that if $A$ is any subset of $X$ then
\[\Int(\Cl(\Int(\Cl A)))=\Int(\Cl A).\]
(iv) Deduce that, starting from a set $A$, the operations
of taking interior and closure in various orders can produce
at most seven different sets (including $A$ itself).
(v) Find a subset $B$ of ${\mathbb R}$ with the usual
topology such that the operations of taking closures
and interiors in various orders produce exactly seven
different sets.
\end{exercise}
\begin{exercise}\label{E;quotient non Hausdorff}
Consider ${\mathbb R}$ with the usual (Euclidean)
topology. Let $x\sim y$ if and only if $x-y\in{\mathbb Q}$.
Show that $\sim$ is an equivalence relation. Show that
${\mathbb R}/\negthinspace\sim$ is uncountable but that the quotient
topology on ${\mathbb R}/\negthinspace\sim$ is the indiscrete topology.
\end{exercise}
\begin{exercise}\label{E;Hausdorff not metric}
(i) If $(X,\sigma)$ is a topology derived from a metric,
show that, given $x\in X$, we can find open sets
$U_{j}$ $[1\leq j]$
such that $\{x\}=\bigcap_{j=1}^{\infty}U_{j}$.
(ii) Show, by verifying the conditions for a topological
space directly
(so you may not quote Exercise~\ref{E;Infinite product}),
that the following condition defines
a topology $\tau$
on the space ${\mathbb R}^{[0,1]}$ of
functions $f:[0,1]\rightarrow{\mathbb R}$.
A set $U\in\tau$ if and only if, given any $f_{0}\in U$,
there exists an $\epsilon>0$
and $x_{1},\,x_{2},\,\ldots,\,x_{n}\in[0,1]$ such that
\[\{f\in {\mathbb R}^{[0,1]}\,:\,
|f(x_{j})-f_{0}(x_{j})|<\epsilon\ \text{for $1\leq j\leq n$}\}\subseteq U.\]
(iii) Show that the topology $\tau$ is Hausdorff
but cannot be derived from a metric.
\end{exercise}
\begin{exercise}\label{E;Product subspace}
Let $(X,\tau)$ and $(Y,\sigma)$ be topological spaces
with subsets $E$ and $F$. Let the subspace topology
on $E$ be $\tau_{E}$ and the subspace topology
on $F$ be $\sigma_{F}$. Let the product topology
on $X\times Y$ derived from $\tau$ and $\sigma$
be $\lambda$ and let the product topology
on $E\times F$ derived from $\tau_{E}$ and $\sigma_{F}$
be $\mu$. Show that $\mu$ is the subspace topology on $E\times F$
derived from $\lambda$.
\end{exercise}
\begin{exercise}\label{E;piano continuity}
(i) Let ${\mathcal H}_{i}$ be a collection of
subsets of $X_{i}$ and let $\tau_{i}$ be the smallest topology
on $X_{i}$ containing ${\mathcal H}_{i}$ $[i=1,2]$. If
$f:X_{1}\rightarrow X_{2}$ has the property that
$f^{-1}(H)\in {\mathcal H}_{1}$ whenever $H\in{\mathcal H}_{2}$,
show that $f$ is continuous
(with respect to the topologies $\tau_{1}$ and $\tau_{2}$).
(ii) Suppose that $(X,\tau)$ and $(Y,\sigma)$ are topological
space and we give $X\times Y$ the product topology.
If $(Z,\lambda)$ is a topological space, show that
$f:Z\rightarrow X\times Y$ is continuous if and only
if $\pi_{X}\circ f:Z\rightarrow X$ and
$\pi_{Y}\circ f:Z\rightarrow Y$ are continuous.
(iii) Let ${\mathbb R}$ have the usual topology (induced
by the Euclidean metric) and let ${\mathbb R}^{2}$
have the product topology (which we know to be
the usual topology induced by the Euclidean metric).
Define
\[
f(x,y)=
\begin{cases}
\frac{xy}{x^{2}+y^{2}}&\text{if $(x,y)\neq (0,0)$,}\\
0&\text{if $(x,y)=(0,0)$.}
\end{cases}
\]
Show that, if we define $h_{x}(y)=g_{y}(x)=f(x,y)$
for all $(x,y)\in{\mathbb R}^{2}$, then the function
$h_{x}:{\mathbb R}\rightarrow{\mathbb R}$ is continuous
for each $x\in{\mathbb R}$ and the function
$g_{y}:{\mathbb R}\rightarrow{\mathbb R}$ is continuous
for each $y\in{\mathbb R}$. Show, however, that $f$ is not
continuous.
\end{exercise}
\begin{exercise}\label{E;metric on compacta}
In complex variable theory we encounter
`uniform convergence on compacta'. This question
illustrates the basic idea in the case of
$C(\Omega)$ the space of \emph{continuous}
functions $f:\Omega\rightarrow{\mathbb C}$
where
\[\Omega=\{z\in{\mathbb C}\,:\,|z|<1\}.\]
(i) Show, by means of an example, that an $f\in C(\Omega)$
need not be bounded on $\Omega$.
(ii) Explain why
\[d_{n}(f,g)=\sup_{|z|\leq 1-1/n}|f(z)-g(z)|\]
exists and is finite for each $n\geq 1$ and all
$f,\,g\in C(\Omega)$. Show that $d_{n}$ satisfies the
triangle law and symmetry, but give an example of
a pair of functions
$f,\,g\in C(\Omega)$ with $f\neq g$ yet $d_{n}(f,g)=0$.
(iii) Show that
\[d(f,g)=\sum_{n=1}^{\infty}\frac{2^{-n}d_{n}(f,g)}{1+d_{n}(f,g)}\]
exists and is finite for all
$f,\,g\in C(\Omega)$.
(iv) Show that $d$ is a metric on $C(\Omega)$.
\noindent
$[$If you require a hint, do Exercise~\ref{E;new metrics}~(i).$]$
\end{exercise}
\begin{exercise}\label{E;close connection}
(i) Find the connected components of
\[\{0\}\cup\bigcup\{1/n\,:\,n\geq 1,\ n\in{\mathbb Z}\}\]
with the usual metric.
Which are open in the subspace topology
and which are not? Give reasons.
(ii) Is it true that the interior of a connected set is
always connected? Give a proof or a counterexample.
\end{exercise}
\begin{exercise}\label{E;quotient path-connected}
(i) If $(X,\tau)$ and $(Y,\sigma)$ are topological spaces,
$E$ is a path-connected subset of $X$ and $g:E\rightarrow Y$
is continuous, show that $g(E)$ is path-connected.
(More briefly, the continuous image of a path-connected
set is path-connected.)
(ii) If $(X,\tau)$ is a path-connected topological space
and $\sim$ is an equivalence relation on $X$,
show that $X/\negthinspace\sim$
with the quotient topology is path-connected.
(iii) If $(X,\tau)$ and $(Y,\sigma)$ are
path-connected topological spaces, show that $X\times Y$
with the product topology is path-connected.
(iv) If $(X,\tau)$ is a
path-connected topological space and $E$ is a subset of $X$,
show that it does not follow that $E$ with the subspace
topology is path-connected.
\end{exercise}
\begin{exercise}\label{E;uniform continuity}
Suppose that $(X,d)$ is a compact metric space,
$(Y,\rho)$ is a metric space and $f:X\rightarrow Y$
is continuous. Explain why, given $\epsilon>0$,
we can find, for each $x\in X$, a $\delta_{x}>0$
such that, if $d(x,y)<2\delta_{x}$, it follows that
$\rho(f(x),f(y))<\epsilon/2$. By considering
the open cover $B(x,\delta_{x})$ and using compactness,
show that there exists a $\delta>0$ such that
$d(x,y)<\delta$ implies $\rho(f(x),f(y))<\epsilon$.
(In other words, a continuous function from a
compact metric space to a metric space is uniformly continuous.)
\end{exercise}
\begin{exercise}\label{E;homeomorphic, non-homeomorphic}
Which of the following spaces are
homeomorphic and which are not? Give reasons.
(i) ${\mathbb R}$ with the usual topology.
(ii) ${\mathbb R}$ with the discrete topology.
(iii) ${\mathbb Z}$ with the discrete topology.
(iv) $[0,1]$ with the usual topology.
(v) $(0,1)$ with the usual topology.
\noindent
$[$This is rather feeble question but in this short
course we have not found enough topological properties
to distinguish between some clearly distinguishable
topological spaces. We return to this matter
in Exercise~\ref{E;dimension}.$]$
\end{exercise}
\begin{exercise}\label{E;dimension}
Suppose that $f:[0,1]\rightarrow{\mathbb R}$
and $g:[0,1]\rightarrow{\mathbb R}$
are continuous maps with $f(0)=-1$, $f(1)=2$,
$g(0)=0$ and $g(1)=1$. Show that
\[f([0,1])\cap g([0,1])\neq\emptyset\]
(In other words, the two paths must cross.)
Show that ${\mathbb R}$ and ${\mathbb R}^{2}$
with the usual topologies are not homeomorphic.
Are $[0,1]$ and the circle
\[\{z\in{\mathbb C}\,:\,|z|=1\}\]
homeomorphic and why?
(But are ${\mathbb R}^{2}$ and ${\mathbb R}^{3}$
homeomorphic? Questions like this form the beginning of modern
algebraic topology.)
\end{exercise}
\begin{exercise}\label{E;mind the door}
Which of the following statements
are true and which false. Give a proof or counter-example.
(i) If a topological space $(X,\tau)$ is connected
then the only sets which
are both open and closed are $X$ and $\emptyset$.
(ii) If every set in a topological space $(X,\tau)$
is open or closed (or both) then $\tau$ is the discrete
topology.
(iii) Every open cover of ${\mathbb R}$ with the usual topology
has a countable subcover.
(iv) Suppose that $\tau$ and $\sigma$ are topologies
on a space $X$ with $\sigma\supseteq\tau$. Then,
if $(X,\tau)$ is connected, so is $(X,\sigma)$.
(v) Suppose that $\tau$ and $\sigma$ are topologies
on a space $X$ with $\sigma\supseteq\tau$. Then,
if $(X,\sigma)$ is connected, so is $(X,\tau)$.
\end{exercise}
\begin{exercise} {\bf [The finite intersection property]}%
\label{E;finite intersection}
(i) (This result is almost trivial but very useful.)
Show that a topological space $(X,\tau)$ is compact
if and only if it has the following property.
If ${\mathcal F}$ is a collection of closed sets
with the `finite intersection property'
\[F_{1},\,F_{2},\,\ldots,\,F_{n}\in {\mathcal F}
\Rightarrow \bigcap_{j=1}^{n}F_{j}\neq \emptyset,\]
then
\[\bigcap_{F\in{\mathcal F}}F\neq\emptyset.\]
(ii) We work in ${\mathbb R}$ with the usual metric.
Give an example of of sequence of non-empty bounded open sets
$O_{j}$ such that
\[O_{1}\supseteq O_{2}\supseteq O_{3}\supseteq\ldots,
\ \text{but}
\ \bigcap_{j=1}^{\infty}O_{j}=\emptyset.\]
Give an example of of sequence of non-empty closed sets
$F_{j}$ such that
\[F_{1}\supseteq F_{2}\supseteq F_{3}\supseteq\ldots,
\ \text{but}
\ \bigcap_{j=1}^{\infty}F_{j}=\emptyset.\]
\end{exercise}.
\begin{exercise}\label{E;Cantor}
Consider the space of sequences of
zeros and ones $X=\{0,1\}^{\mathbb N}$. Let us set
\[d({\mathbf x},{\mathbf y})=2^{-n}\]
if $x_{j}=y_{j}$ for $1\leq j\leq n-1$, $x_{n}\neq y_{n}$
and take $d({\mathbf x},{\mathbf x})=0$.
(i) Show that $d$ is a metric.
(ii) Show that $(X,d)$ is complete.
(iii) Show that $(X,d)$ is compact.
(iv) Show that no point in $(X,d)$ is isolated (that is to say,
no one point set $\{{\mathbf x}\}$ is open).
(v) Show that the connected components of $(X,d)$ are the
one point sets.
(vi) Show that $X\times X$ with the product topology is
homeomorphic to $X$.
\noindent$[$The space just described may look nasty
at first sight, but is, in fact,
both elegant and useful.$]$
\end{exercise}
\begin{exercise}{\bf [Bases of neighbourhoods.]}%
\label{E;bases of neighbourhoods}%
(i) Let $(X,\tau)$ be a
topological space.
Write ${\mathcal N}_{x}$ for the set of neighbourhoods
of $x\in X$. Prove the following results.
\ \ (1) ${\mathcal N}_{x}\neq\emptyset$.
\ \ (2) If $N\in {\mathcal N}_{x}$, then $x\in N$.
\ \ (3) If $N,\ M\in {\mathcal N}_{x}$,
then $N\cap M\in{\mathcal N}_{x}$.
\ \ (4) If $N\in{\mathcal N}_{x}$ and $M\supseteq N$,
then $M\in{\mathcal N}_{x}$.
\ \ (5) If $N\in{\mathcal N}_{x}$ then there exists
an $U\in{\mathcal N}_{x}$ such that
$U\subseteq N$ and $U\in{\mathcal N}_{y}$ for all
$y\in U$.
(ii) Suppose that $X$ is a set such that each $x\in X$
is associated with a collection ${\mathcal N}_{x}$
of subsets of $X$. If conditions (1) to (4) of
part~(i) hold, show that the family $\tau$ of sets
$U$ such that, if $x\in U$, then we can
find an $N\in{\mathcal N}_{x}$ with $N\subseteq U$
is a topology on $X$. If, in addition, condition~(5)
holds show that ${\mathcal N}_{x}$ is a collection
of $\tau$-neighbourhoods of $x$ for each $x\in X$.
\end{exercise}
\begin{exercise}\label{E,adicts} (The $p$-adic metric.)
Suppose that $p$ is a prime. If $m,\,n\in{\mathbb Z}$
we set $d(m,n)=0$ if $m=n$ and, otherwise,
$d(m,n)=\frac{1}{r+1}$ where $p^{r}$ divides $m-n$,
but $p^{r+1}$ does not. Show that $d$ is a metric on
${\mathbb Z}$.
Now let $p=5$. Show that the sequence $2014$, $20014$,
$200014$, $\ldots$ tends to a limit in the metric.
Show that the sequence $5^{n}+5^{n-1}+\ldots+5+1$
is Cauchy but does not converge.
\end{exercise}
\begin{exercise}\label{E;nasty line}
Consider ${\mathbb R}^{2}$
with the usual Euclidean topology.
Let
\[E=\{(x,-1)\,:\,x\in{\mathbb R}\}\cup
\{(x,1)\,:\,x\in{\mathbb R}\}\]
and give $E$ the subspace topology.
Define a relation $\sim$ on $E$ by taking
\begin{align*}
(x,y)\sim(x,y)&\qquad\text{for all $(x,y)\in E$}\\
(x,y)\sim(x,-y)&\qquad\text{for all $(x,y)\in E$ with $x\neq 0$}.
\end{align*}
Show that that $\sim$ is an equivalence relation on $E$.
Now give $E/\negthinspace\sim$ the quotient topology. Show
that if $[(x,y)]\in E/\negthinspace\sim$ we can find an open neighbourhood
$U$ of $[(x,y)]$ which is homeomorphic to ${\mathbb R}$.
Show, however, that $E/\negthinspace\sim$ is not Hausdorff.
\noindent$[$This nasty example shows that `looks nice locally'
is not sufficient to give `looks nice globally'.
It is good start to a course in differential geometry
to ask what extra conditions are required to make
sure that a space that `looks locally like a line'
`looks globally like a line or a circle'.$]$
\end{exercise}
\section{More exercises}\label{S;exercises two}
There is an ancient
superstition in Cambridge that 12 exercises
are necessary and sufficient to learn six hours of
lectures. If the reader does not share this superstition
she may find the following exercises useful.
\begin{exercise}\label{E;apocryphal}
There is an apocryphal story of a
Phd student who wrote a thesis on anti-metric spaces.
(a) Let $X$ be a set and $D:X^{2}\rightarrow{\mathbb R}$
a function with the following properties.
(i) $D(x,y)\geq 0$ for all $x,\,y\in X$.
(ii) $D(x,y)=0$ if and only if $x=y$.
(iii) $D(x,y)=D(y,x)$ for all $x,\,y\in X$.
(iv) $D(x,y)+D(y,z)\leq D(x,z)$ for all $x,\,y,\,z\in X$.
Show that $X$ contains at most one point.
(b) Let $X$ be a set and $P:X^{2}\rightarrow{\mathbb R}$
a function with the following properties.
(i) $P(x,y)\geq 0$ for all $x,\,y\in X$.
(ii) $P(x,y)=0$ if and only if $x=y$.
(iii) $P(x,y)=P(y,x)$ for all $x,\,y\in X$.
(iv) $P(x,y)+P(y,z)\leq P(x,z)$ for all $x,\,y,\,z\in X$
with $x\neq z$. How many points can $X$ contain?
Give reasons for your answer\footnote{\emph{First Examiner}:
All hail blithe spirit. Art thou bird or heavenly dancer?\\
\emph{Second Examiner}: Answer yes or no. Give reasons for your answer.}.
\end{exercise}
\begin{exercise}\label{E;little elk}
Let $q\geq 1$. Let $l^{q}$ be the set of
sequences of real numbers
${\mathbf a}=(a_{1},a_{2},\ldots)$ with
$\sum_{j=1}^{\infty}|a_{j}|^{q}$ convergent.
We write $\|{\mathbf a}\|_{q}=
\left(\sum_{j=1}^{\infty}|a_{j}|^{q}\right)^{1/q}$.
(i) If ${\mathbf a}$ is a sequence and we write
\[{\mathbf a}[N]=(a_{1},a_{2},\ldots,a_{N},0,0,\ldots)\]
show that ${\mathbf a}\in l^{q}$ if and only if
$\|{\mathbf a}[N]\|_{q}$ is bounded and
that, if ${\mathbf a}\in l^{q}$, then
\[\|{\mathbf a}[N]\|_{q}\rightarrow\|{\mathbf a}\|_{q}\]
as $N\rightarrow\infty$.
(ii) Show, using~(i), that $l^{1}$ and $l^{2}$ are real
vector spaces, that $\|\ \|_{1}$ is a norm on $l^{1}$
and that $\|\ \|_{2}$ is a norm on $l^{2}$.
(iii) Show that $l^{2}\supseteq l^{1}$.
(iv) Show that the identity map
\[\iota:(l^{1},\|\ \|_{2})\rightarrow(l^{1},\|\ \|_{1})\]
(that is to say from $l^{1}$ with the subspace
norm derived from $\|\ \|_{2}$ to $l^{1}$ with the
norm $\|\ \|_{1}$) is not continuous.
Show that the identity map
\[\iota:(l^{1},\|\ \|_{1})\rightarrow(l^{1},\|\ \|_{2})\]
is continuous.
(v) If $f(a_{1},a_{2},\ldots)=(a_{1},a_{2}/2,a_{3}/3,\ldots)$,
show that
\[f:(l^{1},\|\ \|_{2})\rightarrow(l^{1},\|\ \|_{1})\]
is well defined and continuous. Is
\[f:(l^{1},\|\ \|_{1})\rightarrow(l^{1},\|\ \|_{2})\]
well defined and continuous. Give reasons
\end{exercise}
\begin{exercise}\label{E;stronger bounds}
(i) Suppose that $(X,d)$ is a metric space and
$(x_{n})$ is a sequence in $X$ with no convergent
subsequence. Let
\[f_{n}(x)=\max\big\{0,1-2^{n}d(x_{n},x)\big\}.\]
Explain why $f_{n}$ is continuous.
Show that, for each $t\in X$, we can find a $\delta(t)>0$
and an $N(t)\geq 1$ such that
\[f_{n}(x)=0\ \text{for all $x$ with $d(x,t)<\delta(t)$}\]
and all $n\geq N(t)$. Deduce that, if $\lambda_{n}\in{\mathbb R}$
the equation
\[f(t)=\sum_{n=1}^{\infty}\lambda_{n}f_{n}(t)\]
is a well defined continuous function.
(ii) Deduce that, if $(Y,\rho)$ is a metric space
such that every continuous function $f:Y\rightarrow{\mathbb R}$
is bounded, then $(Y,\rho)$ is compact.
Show further that, if $(Y,\rho)$ is a metric space
such that every continuous bounded
function $f:Y\rightarrow{\mathbb R}$
attains its bounds, then $(Y,\rho)$ is compact.
\end{exercise}
\begin{exercise}\label{E;connected Heine}
(The intermediate value theorem via Heine--Borel.)
Suppose that $f:[0,1]\rightarrow{\mathbb R}$
is a continuous function only taking the values
$0$ and $1$. Explain why, given $x\in [0,1]$,
we can find a $\delta_{x}>0$ such that $f$
is constant on $[0,1]\cap(x-\delta_{x},x+\delta_{x})$.
By using compactness, show that $f$ is constant.
Deduce that $[0,1]$ is connected.
Now suppose $g:[0,1]\rightarrow{\mathbb R}$
is a continuous function with $g(0)0$ for
all $x\notin E$.
(iii) By using the functions $f_{E_{1}}$ and $f_{E_{2}}$,
or otherwise, show that, if $E_{1}$ and $E_{2}$ are
disjoint closed subsets of $X$, then there exists a continuous
function $f:X\rightarrow{\mathbb R}$ with the
properties that $1\geq f(x)\geq 0$ for all $x\in X$
and
\[f(x)=
\begin{cases}
1&\text{if $x\in E_{1},$}\\
0&\text{if $x\in E_{2}.$}
\end{cases}
\]
Deduce that we can find disjoint open sets $U_{1}$
and $U_{2}$ such that $U_{1}\supseteq E_{1}$
and
$U_{2}\supseteq E_{2}$.
\end{exercise}
\begin{exercise}\label{E;point and compact}
(This continues on from
parts~(i)
and (ii) of Exercise~\ref{E;point and close}.)
(i) We work in a metric space $(X,d)$.
Consider two non-empty disjoint sets
$E$ and $G$.
If $E$ is compact and $G$ is closed, show that there
exists a $\delta>0$ such that
\[d(e,g)\geq\delta\]
for all $e\in E$ and $g\in G$.
(ii) Find two non-empty disjoint closed sets $E$ and $G$
in ${\mathbb R}$ with the usual metric such that
\[\inf_{e\in E,g\in G}|e-g|=0.\]
\end{exercise}
\begin{exercise}\label{E;scatter} We work on ${\mathbb R}$.
Let $\tau$ consist of all sets of the form $U\cup S$
where $U$ is an open set for the usual Euclidean
topology and $S$ is a subset of the irrationals.
(i) Show that $\tau$ is a topology. (It is called
the `scattered topology'.)
(ii) Show that $\tau$ is Hausdorff.
(iii) Show that $\{x\}$ is open if and only if $x$ is irrational.
\end{exercise}
\begin{exercise}\label{E;extend}
Let $(X,\tau)$ be a topological space
and $E$ and $F$ subsets with the subspace topologies
$\tau_{E}$, $\tau_{F}$. Suppose that $E\cup F=X$,
that $(Y,\sigma)$ is another topological space
and $g:X\rightarrow Y$ a function. Suppose
that $g|_{E}:(E,\tau_{E})\rightarrow (Y,\sigma)$
and $g|_{F}:(F,\tau_{F})\rightarrow (Y,\sigma)$
are continuous.
Which of the
following statements are always true and which
may be false? Give proofs or counterexamples.
(i) If $E$ and $F$ are open,
then $g:(X,\tau)\rightarrow (Y,\sigma)$
is continuous.
(ii) If $E$ and $F$ are closed,
then $g:(X,\tau)\rightarrow (Y,\sigma)$
is continuous.
(iii) If $E$ is open and $F=X\setminus E$,
then $g:(X,\tau)\rightarrow (Y,\sigma)$
is continuous.
\end{exercise}
\begin{exercise}\label{E;space fill} (Requires
the idea of uniform convergence from Analysis~II.)
This example of a space filling curve
due to Liu Wen is simple rather than pretty.
Let $\delta_{k}=[k/10,(k+1)/10]$ for $0\leq k\leq 9$.
Let $f,g:[0,1]\rightarrow{\mathbb R}$ be continuous
functions satisfying the following
conditions:
\[f(t)=\begin{cases}
0&\text{when $t\in\delta_{1}\cup\delta_{3}$}\\
1&\text{when $t\in\delta_{5}\cup\delta_{7}$}
\end{cases}
\ \ g(t)=\begin{cases}
0&\text{when $t\in\delta_{1}\cup\delta_{5}$}\\
1&\text{when $t\in\delta_{3}\cup\delta_{7}$}
\end{cases}
\]
and $f(0)=f(1)=0$, $g(0)=g(1)=0$.
Sketch such a function.
Set $F(t+n)=f(t)$, $G(t+n)=g(t)$ for all $t\in[0,1]$ and
$n\in{\mathbb Z}$. Explain why, if we set
\[\phi(t)=\sum_{k=1}^{\infty} 2^{-k}F(10^{k-1}t),
\ \psi(t)=\sum_{k=1}^{\infty} 2^{-k}G(10^{k-1}t),\]
the map $t\mapsto\big(\phi(t),\psi(t)\big)$
is a continuous map of $[0,1]$ to $[0,1]^{2}$ (with the usual metrics).
If
\[x=\sum_{j=1}^{\infty} x_{j}2^{-j}
\ \text{and}\ y=\sum_{j=1}^{\infty} y_{j}2^{-j}\]
with $x_{j},\,y_{j}\in\{0,1\}$, find
$t_{j}\in\{1,3,5,7\}$ such that, writing
\[t=\sum_{j=1}^{\infty} t_{j}10^{-j},\]
we have $\big(\phi(t),\psi(t)\big)=(x,y)$.
Conclude that there is a continuous surjective map
from $[0,1]$ to $[0,1]^{2}$.
\end{exercise}
\begin{exercise}\label{E;quart pot} We use the standard Euclidean metrics.
Show that there does not exist a continuous
injection $f:[0,1]^{2}\rightarrow[0,1]$.
\noindent$[$Hint: Let $E=[0,1]^{2}\setminus\{{\mathbf a}\}$
for some fixed ${\mathbf a}$ and consider $f|_{E}$.$]$
\end{exercise}
\begin{exercise}\label{E;flea}
We use the standard metric. Show that there
does not exist a continuous function $f:{\mathbb R}\rightarrow{\mathbb R}$
such that
\[x\in{\mathbb Q}\Leftrightarrow f(x)\notin {\mathbb Q}.\]
Does there exist a continuous function $g:{\mathbb R}\rightarrow{\mathbb R}$
such that
\[x\in{\mathbb Q}\Leftrightarrow g(x)\in {\mathbb Q}\ ?\]
Give reasons for your answer.
\end{exercise}
\begin{exercise}\label{E;chess}
Which, if any, of the following subsets of ${\mathbb R}^{2}$
with the usual topology are connected? Give reasons for your
answer.
(i) $A=\{(x,y)\,:\,x\in{\mathbb Q}\}$.
(ii) $A=\{(x,y)\,:\,x\in{\mathbb Q}\}\cup\{(x,y)\,:\,y\in{\mathbb Q}\}$.
\end{exercise}
\begin{exercise}\label{E;space out}
Consider a compact metric space $(X,d)$. Show
that there exists a $K$ such that $d(x,y)\leq K$ for
all $x,\,y\in X$. If $E$ is a non-empty subset of
of $X$, we define the diameter $\Delta(E)$ of $E$ by
\[\Delta(E)=\sup_{(x,y)\in E}d(x,y).\]
Show that if $\{U_{\lambda}\}_{\lambda\in\Lambda}$
is an open cover of $X$, then there exists
a $\delta>0$ such that every non-empty subset $E$
with $\Delta E<\delta$ lies in some $U_{\lambda}$.
\end{exercise}
\begin{exercise}\label{E;intersection connected}
We work in a metric space $(X,d)$.
Suppose that $E_{1}$, $E_{2}$, \ldots
are connected sets with
$E_{1}\supseteq E_{2}\supseteq\ldots$. Show that,
if the $E_{j}$ are compact, $\bigcap_{j=1}^{\infty}E_{j}$
is connected.
\noindent$[$Hint: You may find Exercise~\ref{E;point and close}~(iii)
useful.$]$
Give an example in ${\mathbb R}^{2}$ with the usual Euclidean
topology to show that the result may fail if we replace `compact'
by `closed'.
\end{exercise}
\begin{exercise}\label{E;much product}
In this question you may quote the result that
the product of two compact spaces is compact, but no other
result on product topologies.
Suppose that $(X,\tau)$, $(Y,\sigma)$ are topological
spaces and we give $X\times Y$ the product topology $\rho$.
(i) Show that, if $x\in X$, then
\[\big\{\{y\in Y\,:\,(x,y)\in U\}\,:\,U\in\rho\big\}=\sigma.\]
(ii) Give an example with $X$ and $Y$ each consisting of $2$ points
of a topology $\eta$ on $X\times Y$ such that
\[\big\{\{x\in X\,:\,(x,y)\in U\}\,:\,U\in\eta\big\}=\sigma\]
for each $y\in Y$
and
\[\big\{\{y\in Y\,:\,(x,y)\in U\}\,:\,U\in\eta\big\}=\tau\]
for each $x\in X$,
but $\eta\neq\rho$.
(iii) Prove the following results.
\ \ (a) $\rho$ Hausdorff $\Leftrightarrow\tau,\sigma$ Hausdorff.
\ \ (b) $\rho$ compact $\Leftrightarrow\tau,\sigma$ compact.
\ \ (c) $\rho$ connected $\Leftrightarrow\tau,\sigma$ connected.
\ \ (d) $\rho$ path-connected $\Leftrightarrow\tau,\sigma$
path-connected.
\end{exercise}
\begin{exercise}\label{E;dense but counting}
(i) Consider a metric space $(X,d)$.
If $X$ has a countable dense subset show that
so does every subset of $X$ (for the subspace topology).
(See Exercise~\ref{E;long non metric}~(vii) for why
this can not be extended to topological spaces.)
(ii) Consider a metric space $(Y,\rho)$. If $Y$
has a countable dense subset show that the associated
topology has a countable basis.
(iii) Let $X$ be an uncountable space. Check that
the collection $\tau$ of sets consisting of $\emptyset$
and all sets $U$ with $X\setminus U$ finite is a topology.
(We call $\tau$ the cofinite topology.) Show that
any countable subset is dense but that
$\tau$ does not have countable basis.
\end{exercise}
\begin{exercise}\label{E;long non metric} Show that the collection of
half open intervals $[a,b)$ form a basis.
Consider
the `half open topology' $\tau_{H}$
on ${\mathbb R}$ is generated by this basis.
(i) Show that $\tau_{H}$ is Hausdorff
(ii) Show that the connected components of $({\mathbb R},\tau_{H})$ are the
one point sets $\{x\}$.
(iii) Show that $[a,b]$ with $a****0$ for $x>0$,
$f(0)=0$ and $f(x)\rightarrow 0$ as $x\rightarrow 0$.
We take $X=X_{*}\cup\{f_{0}\}$ where $f_{0}$ is
the zero function
defined by $f_{0}(x)=0$ for all $x\in [0,1]$.
If $g\in X_{*}$, write
\[U_{g}=\{f\in X\,:\, f(x)/g(x)\rightarrow 0
\ \text{as $x\rightarrow 0$}\}.\]
Show that, given $g_{1},\,g_{2}\in X_{*}$, we can find
a $g_{3}\in X_{*}$ such that
\[U_{g_{3}}\subseteq U_{g_{1}}\cap U_{g_{2}}.\]
Conclude that, if $\tau$ consists of $\emptyset$ together
with all those sets $V$ such that $V\supseteq U_{g}$ for
some $g\in X_{*}$, then $\tau$ is a topology on $X$.
Show that
\[\bigcap_{g\in X_{*}}U_{g}=\{f_{0}\}.\]
Now suppose $g_{j}\in X^{*}$.
If we set $g(0)=0$ and
\[g(t)=n^{-1}\min_{1\leq j\leq n}g_{j}(t)
\ \text{for $t\in\big((n+1)^{-1},n^{-1}\big]$},\]
show that $g\in X^{*}$ and $g_{j}\notin U_{g}$.
Conclude that, although every open neighbourhood
of $f_{0}$ contains infinitely many points
and the intersection of the open neighbourhoods of
$f_{0}$ is the one point set $\{f_{0}\}$, there is no sequence
$g_{j}$ with $g_{j}\neq f_{0}$ such that
$g_{j}\rightarrow f_{0}$.
\noindent$[$If you just accept this result without thought, it
is not worth doing the question. You should compare
and contrast the metric case. I would say that $f_{0}$
is `surrounded by too many neighbourhood-shells to be approached
by a sequence', but the language of the course is inadequate
to make this thought precise.
I am told that the ancient Greek geometers used a similar
counterexample for a related purpose.$]$
\end{exercise}
\begin{exercise}\label{E;forever incomplete}
(i) Show that the following two statements
about a metric space $(X,d)$ are equivalent.
\qquad (A) There is a complete metric $\rho$ on $X$
which induces the same topology as $d$.
\qquad (B) There is a complete metric space $(Y,\theta)$
which is homeomorphic to $(X,d)$.
(ii) Consider ${\mathbb Q}$ with the usual metric $d$
and a metric $\rho$ which induces the same topology
as $d$. Write ${\mathbb Q}=\{q_{1},q_{2},\ldots\}$.
Let $y_{0}=0$, $r_{0}=1$. Show that we can find
inductively $y_{n}\in{\mathbb Q}$ and $r_{n}>0$
such that $r_{n}\leq 2^{-n}$
and
(a) $\rho(x,y_{n+1})\leq r_{n+1}
\Rightarrow \rho(x,y_{n})\leq r_{n}$,
(b) $\rho(q_{n+1},y_{n+1})\geq 2r_{n+1}$.
(iii) Continuing with (ii), show that the $y_{n}$ form
a Cauchy sequence for $\rho$ which does not converge.
(iv) Deduce that $({\mathbb Q},d)$ is not homeomorphic
to a complete metric space.
If the reader is not exhausted, the next exercise provides
a nice complement to this one.
\end{exercise}
\begin{exercise}\label{E;odd irrationals}
This question is included for the lecturer's
own amusement, but is quite a good revision question on metric spaces.
(i) If $(X,d)$ is a complete metric space, show that
a subset $E$ is complete under the restriction metric if and only
if $E$ is closed.
(ii) By considering
\[\{(x,1/x)\,:\,x\in{\mathbb R}\}\]
as a subset of ${\mathbb R}^{2}$, or otherwise,
show that
$\rho(x,y)=\sqrt{(x-y)^{2}+(x^{-1}-y^{-1})^{2}}$
is a complete metric on ${\mathbb R}\setminus\{0\}$.
Show that $({\mathbb R}\setminus\{0\},\rho)$
is homeomorphic to $({\mathbb R}\setminus\{0\},d)$
with the usual metric $d$.
(Note that all of this is very similar to
Example~\ref{E;Cauchy not topological}.)
(iii) Enumerate the rationals ${\mathbb Q}$ as
$q_{1}$, $q_{2}$, $q_{3}$, \ldots. Define
\[\rho_{n}(x,y)=\min\{2^{-n},\rho(x-q_{n},y-q_{n})\}\]
for $x,\,y\in{\mathbb R}\setminus\{q_{n}\}$.
Write ${\mathbb J}={\mathbb R}\setminus{\mathbb Q}$
and set
\[\kappa(x,y)=\sum_{n=1}^{\infty}\rho_{n}(x,y)\]
for $x,\,y\in {\mathbb J}$. Explain why $\kappa$ is a
well defined metric on ${\mathbb J}$.
(iv) Show that $({\mathbb J},\kappa)$
is homeomorphic to $({\mathbb J},d)$
with the usual metric $d$.
Show that
$({\mathbb J},\kappa)$ is a complete metric space.
(Contrast this with
the conclusion of Exercise~\ref{E;forever incomplete}.)
\end{exercise}
\begin{exercise}\label{E;topological groups}
We get interesting results when we allow
for an interplay between algebra and topology. Consider
a \emph{topological group}, that is to say a group $G$
together with a topology $\tau$ on $G$ such that
(if we give $G\times G$ the associated product
topology) the multiplication function
$m:G\times G\rightarrow G$ (given by $m(x,y)=xy$)
and the inverse function $j:G\rightarrow G$
(given by $j(x)=x^{-1}$) are continuous.
Typical examples include the matrix groups
such as $SO({\mathbb R}^{3})$ and $U({\mathbb C}^{3})$.
(i) (Homogeneity) Show that that, if $u,\,v\in G$, there
exists a homeomorphism $\phi:G\rightarrow G$ with $\phi(u)=v$.
(ii) Show that $G$ is Hausdorff if and only if $\{e\}$ is closed.
(iii) If $\{e\}$ is closed, show that the diagonal
\[\Delta G=\{(x,x)\,:\,x\in G\}\]
is a closed subgroup of $G\times G$ (i.e both a subgroup and closed
in the product topology).
(iv) If $\{e\}$ is closed, show that the centre
\[Z(G)=\{g\,:\,gh=hg\ \forall h\in G\}\]
is a closed normal subgroup.
(v) Suppose that $H$ is a subgroup of $G$. Consider the
collection $X$ of cosets of $H$. Show that, if we
give $X$ the natural quotient topology, the map $\pi:G\rightarrow X$
given by $\pi(g)=gH$ is open (that is to say $\pi$ maps
open sets to open sets).
(vi) Show that $X$, as given in (v),
is Hausdorff if and only if $H$ is closed in $G$.
\end{exercise}
\section{Some hints}
\begin{varthm}[Theorem~\ref{T;Heine--Borel}]%
\label{H;Heine--Borel}
{\bf [The Heine--Borel Theorem.]}
Let ${\mathbb R}$ be given its usual (Euclidean)
topology. Then the closed bounded interval
$[a,b]$ is compact.
\end{varthm}
\begin{proof}[Hint] Suppose that ${\mathcal C}$
is an open cover of $[a,b]$. If ${\mathcal C}_{1}$
is a finite subcover of $[a,c]$
and ${\mathcal C}_{2}$
is a finite subcover of $[c,b]$,
then ${\mathcal C}_{1}\cup{\mathcal C}_{2}$
is a finite cover of $[a,b]$. We can use this
as a basis for a lion hunting (bisection)
argument.
[Return to page~\pageref{T;Heine--Borel}
or go to a full proof on ~\pageref{P;Heine--Borel}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;compact closed}]%
\label{H;compact closed}
If $(X,\tau)$ is Hausdorff, then every compact set is closed.
\end{varthm}
\begin{proof}[Hint] Let $K$ be a compact set. If $x\notin K$,
then, given any $k\in K$, we know that $k\neq x$ and so,
since $X$ is Hausdorff, we can find open sets $U_{k}$
and $V_{k}$ such that
\[k\in V_{k},\ x\in U_{k}\ \text{and}\ V_{k}\cap U_{k}=\emptyset.\]
Now use compactness.
[Return to page~\pageref{T;compact closed}
or go to a full proof on ~\pageref{P;compact closed}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;bijection compact}]%
\label{H;bijection compact}
Let $(X,\tau)$ be a compact and $(Y,\sigma)$
a Hausdorff topological space. If $f:X\rightarrow Y$
is a continuous bijection, then it is a homeomorphism.
\end{varthm}
\begin{proof}[Hint] Observe that we need only show
that $f(K)$ is closed whenever $K$ is closed.
[Return to page~\pageref{T;bijection compact}
or go to a full proof on ~\pageref{P;bijection compact}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;product compact}]%
\label{H;product compact}
The product of two compact spaces is compact.
(More formally, if $(X,\tau)$ and $(Y,\sigma)$ are compact
topological spaces and $\lambda$ is the product topology,
then $(X\times Y,\lambda)$ is compact.)
\end{varthm}
\begin{proof}[Hint] Let $\{O_{\alpha}\}_{\alpha\in A}$ be an open
cover for $X\times Y$. Then given $(x,y)\in X\times Y$ we can find
$U_{x,y}\in\tau$, $V_{x,y}\in\sigma$ and $\alpha(x,y)\in A$ such
that
\[(x,y)\in U_{x,y}\times V_{x,y}\subseteq O_{\alpha(x,y)}.\]
Now show that, for each $x\in X$, we can find a positive
integer $n(x)$ and $y(x,j)\in Y$ $[1\leq j\leq n(x)]$
such that
\[\bigcup_{j=1}^{n(x)}V_{x,y(x,j)}=Y.\]
Now consider the $U_{x}=\bigcap_{j=1}^{n(x)}U_{x,y(x,j)}$.
[Return to page~\pageref{T;product compact}
or go to a full proof on ~\pageref{P;product compact}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;compact implies sequence}]%
\label{H;compact implies sequence}
If the metric space $(X,d)$ is compact, it is sequentially compact.
\end{varthm}
\begin{proof}[Hint] Let $x_{n}$ be a sequence in $X$. If
it has no convergent subsequence, then, for each $x\in X$,
we can find a $\delta(x)>0$ and an $N(x)$ such that
$x_{n}\notin B(x,\delta(x))$ for all $n\geq N(x)$.
[Return to page~\pageref{T;compact implies sequence}
or go to a full proof on page~\pageref{P;compact implies sequence}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;Lebesgue}]%
\label{H;Lebesgue}
Suppose that $(X,d)$ is a sequentially compact
metric space and that the collection $U_{\alpha}$
with $\alpha\in A$ is an open cover of $X$.
Then there exists a $\delta>0$ such that, given any
$x\in X$, there exists an $\alpha(x)\in A$
such that the open ball $B(x,\delta)\subseteq U_{\alpha(x)}$.
\end{varthm}
\begin{proof}[Hint] Suppose the first sentence is true and the
second sentence false. Then, for each $n\geq 1$,
we can find an $x_{n}$ such that $B(x_{n},1/n)\not\subseteq U_{\alpha}$
for all $\alpha\in A$.
[Return to page~\pageref{L;Lebesgue}
or go to a full proof on page~\pageref{P;Lebesgue}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;sequence implies compact}]%
\label{H;sequence implies compact}
If the metric space $(X,d)$ is sequentially compact, it is compact.
\end{varthm}
\begin{proof}[Hint] Let $(U_{\alpha})_{\alpha\in A}$ be an open cover
and let $\delta$ be defined as in Lemma~\ref{L;Lebesgue}.
The $B(x,\delta)$ form a cover of $X$. If they have no finite
subcover then, given $x_{1}$, $x_{2}$, \ldots $x_{n}$,
we can find an $x_{n+1}\notin\bigcup_{j=1}^{n}B(x_{j},\delta)$.
[Return to page~\pageref{T;sequence implies compact}
or go to a full proof on page~\pageref{P;sequence implies compact}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;connected to path}]%
\label{H;connected to path}
If we give ${\mathbb R}^{n}$ the usual topology,
then any open set $\Omega$ which is connected is path-connected.
\end{varthm}
\begin{proof}[Hint]
Pick ${\mathbf x}\in\Omega$, let $U$ be the set of all points
in $\Omega$ which are path-connected to ${\mathbf x}$
and let $V$ be the set
of all points in $\Omega$ which are not. We need to prove
that $U$ and $V$ are open and to do this we make use
of the fact that any point in an open ball is path-connected
to the centre of the ball.
[Return to page~\pageref{T;connected to path}
or go to a full proof on page~\pageref{P;connected to path}.]
\end{proof}
\section{Some proofs}
\begin{varthm}[Exercise~\ref{E;set functions}]%
\label{P;set functions}
We use the notation just introduced.
(i) Let $X=Y=\{1,\,2,\,3,\,4\}$
and $f(1)=1$, $f(2)=1$, $f(3)=4$, $f(4)=3$. Identify
\[f^{-1}(\{1\}),\ f^{-1}(\{2\})
\ \text{and}\ f^{-1}(\{3,\,4\}).\]
(ii) If $U_{\theta}\subseteq Y$ for all $\theta\in\Theta$, show that
\[f^{-1}\left(\bigcap_{\theta\in\Theta}U_{\theta}\right)
=\bigcap_{\theta\in\Theta}f^{-1}(U_{\theta})
\ \text{and}
\ f^{-1}\left(\bigcup_{\theta\in\Theta}U_{\theta}\right)
=\bigcup_{\theta\in\Theta}f^{-1}(U_{\theta}).\]
Show also that $f^{-1}(Y)=X$, $f^{-1}(\emptyset)=\emptyset$
and that, if $U\subseteq Y$,
\[f^{-1}(Y\setminus U)=X\setminus f^{-1}(U).\]
(iii) If $V_{\theta}\subseteq X$ for all $\theta\in\Theta$ show that
\[f\left(\bigcup_{\theta\in\Theta}V_{\theta}\right)
=\bigcup_{\theta\in\Theta}f(V_{\theta})\]
and observe that $f(\emptyset)=\emptyset$.
(iv) By finding appropriate
$X$, $Y$, $f$ and $V,\,V_{1},\,V_{2}\subseteq X$,
show that
we may have
\[f(V_{1}\cap V_{2})\neq f(V_{1})\cap f(V_{2}),
\ f(X)\neq Y\ \text{and}
\ f(X\setminus V)\neq Y\setminus f(V).\]
\end{varthm}
\begin{proof}[Solution]
(i) We have
\[f^{-1}(\{1\})=\{1,2\},\ f^{-1}(\{2\})=\emptyset,\ f^{-1}(\{3,4\})=\{3,4\}.\]
(ii) We have
\begin{align*}
x\in f^{-1}\left(\bigcap_{\theta\in\Theta}U_{\theta}\right)
&\Leftrightarrow
f(x)\in\bigcap_{\theta\in\Theta}U_{\theta}\\
& \Leftrightarrow
f(x)\in U_{\theta}\ \text{for all $\theta\in\Theta$}\\
&\Leftrightarrow
x\in f^{-1}(U_{\theta})
\ \text{for all $\theta\in\Theta$}\\
&\Leftrightarrow
x\in \bigcap_{\theta\in\Theta}f^{-1}(U_{\theta})
\end{align*}
and
\begin{align*}
x\in f^{-1}\left(\bigcup_{\theta\in\Theta}U_{\theta}\right)
&\Leftrightarrow
f(x)\in\bigcup_{\theta\in\Theta}U_{\theta}\\
& \Leftrightarrow
f(x)\in U_{\theta}\ \text{for some $\theta\in\Theta$}\\
&\Leftrightarrow
x\in f^{-1}(U_{\theta})
\ \text{for some $\theta\in\Theta$}\\
&\Leftrightarrow
x\in \bigcup_{\theta\in\Theta}f^{-1}(U_{\theta}).
\end{align*}
Thus
\[f^{-1}\left(\bigcap_{\theta\in\Theta}U_{\theta}\right)
=\bigcap_{\theta\in\Theta}f^{-1}(U_{\theta})
\ \text{and}
\ f^{-1}\left(\bigcup_{\theta\in\Theta}U_{\theta}\right)
=\bigcup_{\theta\in\Theta}f^{-1}(U_{\theta}).\]
Trivially
\[x\in f^{-1}(Y)\Leftrightarrow f(x)\in Y\Leftrightarrow x\in X\]
and
\[x\in f^{-1}(\emptyset)\Leftrightarrow f(x)
\in \emptyset\Leftrightarrow x\in \emptyset\]
so $f^{-1}(Y)=X$ and $f^{-1}(\emptyset)=\emptyset$.
Finally, if $U\subseteq Y$.
\begin{align*}
x\in f^{-1}(Y\setminus U)&\Leftrightarrow f(x)\in Y\setminus U
\Leftrightarrow f(x)\notin U\\
&\Leftrightarrow x\notin f^{-1}(U)
\Leftrightarrow x\in X\setminus f^{-1}(U)
\end{align*}
so $f^{-1}(Y\setminus U)=X\setminus f^{-1}(U)$.
(iii) We have
\begin{align*}
y\in f\left(\bigcup_{\theta\in\Theta}V_{\theta}\right)
&\Leftrightarrow
\text{there exists an}\ x\in\bigcup_{\theta\in\Theta}V_{\theta}
\ \text{with $f(x)=y$}\\
& \Leftrightarrow
\text{there exists a $\theta\in\Theta$ and an}\ x\in V_{\theta}
\ \text{with $f(x)=y$}\\
& \Leftrightarrow
\text{there exists a $\theta\in\Theta$ with}\ y\in f(V_{\theta})\\
&\Leftrightarrow
y\in \bigcup_{\theta\in\Theta}f(V_{\theta}).
\end{align*}
Thus
\[f\left(\bigcup_{\theta\in\Theta}V_{\theta}\right)
=\bigcup_{\theta\in\Theta}f(V_{\theta}).\]
We have $f(\emptyset)=\emptyset$ vacuously.
(iv) Take $X=Y=\{1,2,3\}$, $f(1)=1$, $f(2)=2$, $f(3)=1$, $V=V_{1}=\{1,2\}$
and $V_{2}=\{2,3\}$. Then
\begin{gather*}
f(V_{1}\cap V_{2})=f(\{2\})=\{2\}\neq \{1,2\}\cap\{1,2\}=f(V_{1})\cap f(V_{2}),\\
f(X)=\{1,2\}\neq\{1,2,3\}=Y\ \text{and}
f(X\setminus V)=f(\{3\})=\{1\}\neq\{3\}=Y\setminus\{1,2\}=Y\setminus V.
\end{gather*}
[Return to page~\pageref{E;set functions}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;distance positive}]%
\label{P;distance positive}
If $d:X^{2}\rightarrow{\mathbb R}$ is a function with the
following properties:
(ii) $d(x,y)=0$ if and only if $x=y$,
(iii) $d(x,y)=d(y,x)$ for all $x,\,y\in X$,
(iv) $d(x,y)+d(y,z)\geq d(x,z)$ for all $x,\,y,\,z\in X$,
\noindent show that $d$ is a metric on $X$.
\end{varthm}
\begin{proof}[Solution]
Setting $z=x$ in condition~(iv) and using
(iii) and (ii), we have
\[2d(x,y)=d(x,y)+d(y,x)\geq d(x,x)=0\]
so $d(x,y)\geq 0$.
[Return to page~\pageref{E;distance positive}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;not metric}]%
\label{P;not metric}
Let $X=\{a,\,b,\,c\}$ with $a$, $b$ and $c$
distinct. Write down functions $d_{j}:X^{2}\rightarrow{\mathbb R}$
satisfying condition~(i) of Definition~\ref{D;metric}
such that
(1) $d_{1}$ satisfies conditions~(ii) and~(iii) but not~(iv).
(2) $d_{2}$ satisfies conditions~(iii) and~(iv) but it is not
true that $x=y$ implies $d(x,y)=0$.
(3) $d_{3}$ satisfies conditions~(iii) and~(iv)
and $x=y$ implies $d_{3}(x,y)=0$.
but it is not
true that $d_{3}(x,y)=0$ implies $x=y$.
(4) $d_{4}$ satisfies conditions~(ii) and~(iv) but not~(iii).
You should verify your statements.
\end{varthm}
\begin{proof}[Solution] Here are some possible choices.
(1) Take $d_{1}(x,x)=0$ for all $x\in X$,
$d_{1}(a,b)=d_{1}(b,a)=d_{1}(a,c)=d_{1}(c,a)=1$
and $d_{1}(b,c)=d_{1}(c,b)=3$. Conditions~(ii) and~(iii)
hold by inspection, but
\[d_{1}(b,a)+d_{1}(a,c)=2<3=d_{1}(b,c).\]
(2) Take $d_{2}(x,x)=1$
and $d_{2}(x,y)=2$ if $x\neq y$. Condition~(ii) fails
and condition~(iii) holds by inspection. We observe that
\[d_{2}(x,y)+d_{2}(y,z)\geq 1+1=2\geq d_{2}(x,z)\]
so the triangle law holds.
(3) Take
$d_{2}(x,y)=0$ for all $x,\,y\in X$.
(4) Take $d_{4}(x,x)=0$ for all $x\in X$,
$d_{4}(a,b)=d_{4}(b,a)=d_{4}(a,c)=d_{4}(c,a)=1$
and $d_{1}(b,c)=1$, $d_{1}(c,b)=\tfrac{5}{4}$.
Conditions~(ii) holds,
and condition~(iii) fails by inspection
and
\begin{alignat*}{2}
d(x,y)+d(y,z)&=d(x,y)=d(x,z)\geq d(x,z)&&\qquad\text{if $y=z$},\\
d(x,y)+d(y,z)&=d(y,z)=d(x,z)\geq d(x,z)&&\qquad\text{if $x=y$},\\
d(x,y)+d(y,z)&\geq
1+1=2\geq\tfrac{5}{4}\geq d(x,z)&&\qquad\text{otherwise,}
\end{alignat*}
so the triangle law holds.
[Return to page~\pageref{E;not metric}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;norm to metric}]%
\label{P;norm to metric}
If $(V,\|\ \|)$ is a normed vector space,
then the condition
\[d({\mathbf u},{\mathbf v})=\|{\mathbf u}-{\mathbf v}\|\]
defines a metric $d$ on $V$.
\end{varthm}
\begin{proof} We observe that
\[d({\mathbf u},{\mathbf v})=\|{\mathbf u}-{\mathbf v}\|\geq 0\]
and
\[d({\mathbf u},{\mathbf u})=\|{\boldsymbol 0}\|=
\|0{\boldsymbol 0}\|=|0|\|{\boldsymbol 0}\|
=0\|{\boldsymbol 0}\|=0.\]
Further, if $d({\mathbf u},{\mathbf v})=0$,
then $\|{\mathbf u}-{\mathbf v}\|=0$
so ${\mathbf u}-{\mathbf v}={\boldsymbol 0}$ and ${\mathbf u}={\mathbf v}$.
We also observe that
\[d({\mathbf u},{\mathbf v})=\|{\mathbf u}-{\mathbf v}\|=
\|(-1)({\mathbf v}-{\mathbf u})\|
=|-1|\|{\mathbf v}-{\mathbf u}\|=d({\mathbf v},{\mathbf u})\]
and
\begin{align*}
d({\mathbf u},{\mathbf v})+d({\mathbf v},{\mathbf w})&=
\|{\mathbf u}-{\mathbf v}\|+\|{\mathbf v}-{\mathbf w}\|\\
&\geq \|({\mathbf u}-{\mathbf v})+({\mathbf v}-{\mathbf w})\|\\
&=\|{\mathbf u}-{\mathbf w}\|=
d({\mathbf u},{\mathbf w}).
\end{align*}
[Return to page~\pageref{L;norm to metric}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;inner product to norm}]%
\label{P;inner product to norm}
Let $(V,\langle\ ,\ \rangle)$ be an
inner product space. If we write
$\|{\mathbf u}\|=\langle{\mathbf u},{\mathbf u}\rangle^{1/2}$
(taking the positive root), then the following results
hold.
(i) (The Cauchy--Schwarz inequality) If
${\mathbf u},\,{\mathbf v}\in V$, then
\[\|{\mathbf u}\|\|{\mathbf v}\|\geq
|\langle{\mathbf u},{\mathbf v}\rangle|.\]
(ii) $(V,\|\ \|)$ is a normed vector space.
\end{varthm}
\begin{proof} (i) If ${\mathbf u}={\boldsymbol 0}$ or
${\mathbf v}={\boldsymbol 0}$ the result is immediate,
so we may assume that ${\mathbf u},\,{\mathbf v}\neq{\boldsymbol 0}$.
Now observe that, if $\lambda\in{\mathbb R}$,
\begin{align*}
0&\leq\langle {\mathbf u}+\lambda{\mathbf v},
{\mathbf u}+\lambda{\mathbf v}\rangle
=\langle {\mathbf u},{\mathbf u}\rangle
+2\lambda\langle {\mathbf u},{\mathbf v}\rangle
+\lambda^{2}\langle {\mathbf v},{\mathbf v}\rangle\\
&=\left(\lambda\langle {\mathbf v},{\mathbf v}\rangle^{1/2}
+\frac{\langle {\mathbf u},{\mathbf v}\rangle}
{\langle {\mathbf v},{\mathbf v}\rangle^{1/2}}\right)^{2}
-\frac{\langle {\mathbf u},{\mathbf v}\rangle^{2}}
{\langle {\mathbf v},{\mathbf v}\rangle}+
\langle {\mathbf u},{\mathbf u}\rangle.
\end{align*}
Taking
\[\lambda=-\frac{\langle {\mathbf u},{\mathbf v}\rangle}
{(\langle {\mathbf v},{\mathbf v}\rangle
\langle {\mathbf v},{\mathbf v}\rangle)^{1/2}}\]
we obtain
\[\langle {\mathbf u},{\mathbf u}\rangle
-\frac{\langle {\mathbf u},{\mathbf v}\rangle^{2}}
{\langle {\mathbf v},{\mathbf v}\rangle}\geq 0\]
and this yields the desired inequality.
(ii) Observe that using the Cauchy--Schwarz lemma
\begin{align*}
\|{\mathbf u}+{\mathbf v}\|^{2}
&=\langle {\mathbf u}+{\mathbf v},{\mathbf u}+{\mathbf v}\rangle
=\|{\mathbf u}\|^{2}+2\langle{\mathbf u},{\mathbf v}\rangle
+\|{\mathbf v}\|^{2}\\
&\leq \|{\mathbf u}\|^{2}+2\|{\mathbf u}\|\|{\mathbf v}\|
+\|{\mathbf v}\|^{2}=(\|{\mathbf u}\|+\|{\mathbf v}\|)^{2}
\end{align*}
and the triangle inequality follows on taking square roots.
[Return to Page~\ref{P;inner product to norm}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;positive vanish}]\label{P;positive vanish}
Suppose that $a****0$ for some $x\in[a,b]$.
By continuity, we can find a $\delta$ with $1>\delta>0$ such that
\[|f(t)-f(x)|\leq f(x)/2\ \text{for all $t\in [a,b]\cap[x-\delta,x+\delta]$}\]
and so
\[f(t)\geq f(x)/2\ \text{for all $t\in [a,b]\cap[x-\delta,x+\delta]$}.\]
It follows that
\[\int_{a}^{b}f(t)\,dt\geq \int_{t\in[a,b]\cap[x-\delta,x+\delta]} f(t)\,dt
\geq \delta f(x)/2>0.\]
[Return to page~\pageref{L;positive vanish}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;discontinuous vanish}]%
\label{P;discontinuous vanish}
Show that the result of Lemma~\ref{L;positive vanish}
is false if we replace `$f$ continuous' by
`$f$ Riemann integrable'.
\end{varthm}
\begin{proof}[Solution] Let $a=0$, $b=1$. Set $f(t)=0$ if $t\neq 1/2$
and set $f(1/2)=1$.
[Return to page~\pageref{E;discontinuous vanish}]
\end{proof}
\begin{varthm}[Theorem~\ref{T;three norms}]\label{P;three norms}
Suppose that $a****0$ be given and let $x\in X$. Since
$f$ is continuous, we can find a $\delta_{1}>0$
(depending on $\epsilon$ and $fg(x)=f(g(x))$ with
\[\sigma(f(g(x)),f(y))<\epsilon\ \text{whenever $\rho(g(x),y)<\delta_{1}$}.\]
Since $g$ is continuous, we can find a $\delta_{2}>0$ such that
\[\rho(g(x),g(t))<\delta_{1}\ \text{whenever $d(x,t)<\delta_{2}$}.\]
We now have
\[\sigma(f(g(x)),f(g(t)))<\epsilon\ \text{whenever $d(x,t)<\delta_{2}$}\]
as required.
[Return to page~\pageref{L;composition metric}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;exercise composition}]%
\label{P;exercise composition}
Let ${\mathbb R}$ and ${\mathbb R}^{2}$ have their usual (Euclidean) metric.
(i) Suppose that $f:{\mathbb R}\rightarrow{\mathbb R}$ and
$g:{\mathbb R}\rightarrow{\mathbb R}$ are continuous. Show that
the map $(f,g):{\mathbb R}^{2}\rightarrow{\mathbb R}^{2}$
given by $(f,g)(x,y)=(f(x),g(y))$ is continuous.
(ii) Show that the map $M:{\mathbb R}^{2}\rightarrow{\mathbb R}$
given by $M(x,y)=xy$ is continuous.
(iii) Use the composition law to show that the map
$m:{\mathbb R}^{2}\rightarrow{\mathbb R}$
given by $m(x,y)=f(x)g(y)$ is continuous.
\end{varthm}
\begin{proof}[Solution] (i) Let $(x,y)\in{\mathbb R}^{2}$.
Given $\epsilon>0$, we can find $\delta_{1}>0$ such that
\[|f(x)-f(s)|<\epsilon/2\ \text{whenever $|x-s|<\delta_{1}$}\]
and
$\delta_{2}>0$ such that
\[|g(y)-g(t)|<\epsilon/2\ \text{whenever $|y-t|<\delta_{2}$}.\]
If we set $\delta=\min(\delta_{1},\delta_{2})$, then
$\|(x,y)-(s,t)\|_{2}<\delta$ implies
\[
|x-s|<\delta\leq\delta_{1}
\ \text{and}\ |y-t|<\delta\leq\delta_{2}
\]
so that
\[|f(x)-f(s)|<\epsilon/2\ \text{and}\ |g(y)-g(t)|<\epsilon/2\]
whence
\begin{align*}
\|(f(x),g(y))-(f(s),g(t))\|_{2}
&\leq \|(f(x),0)-(f(s),0)\|_{2}+\|(0,g(y))-(0,g(t))\|_{2}\\
&=|f(x)-f(s)|+|g(y)-g(t)|<\epsilon
\end{align*}
as required.
(ii) (You should recognise this from Analysis~I.)
We use the standard Euclidean metric $d$ on ${\mathbb R}^{2}$.
Given
$\epsilon>0$ and $(x,y)\in{\mathbb R}^{2}$, set
\[\delta=\frac{\min\{\epsilon,1\}}{|x|+|y|+2}.\]
If $d\big((x,y),(u,v)\big)<\delta$, then $|x-u|,|y-v|<\delta$,
and
\begin{align*}
|M(x,y)&-M(u,v)|=|xy-uv|\leq |xy-xv|+|xv-uv|\\
&\leq |x||y-v|+|v||x-u|\leq |x||y-v|+\big(|y-v|+|y|\big)|x-u|\\
&\leq \delta|x|+(|y|+\delta)\delta\leq (|x|+|y|+1)\delta<\epsilon.
\end{align*}
Thus $M$ is continuous.
(iii) $m=M\circ Q$ with $Q(x,y)=(f(x),g(y))$. Since $M$ and $Q$
are continuous their composition $m$ is continuous.
[Return to page~\pageref{E;exercise composition}.]
\end{proof}
\begin{varthm}[Example~\ref{E;Open ball open}]%
\label{P;Open ball open}
(i) Let $(X,d)$ be a metric space.
If $r>0$, then
\[B(x,r)=\{y\,:\,d(x,y)0$ and,
whenever $d(z,y)<\delta$,
the triangle inequality gives us
\[d(x,z)\leq d(x,y)+d(y,z)0$,
then, setting ${\mathbf y}={\mathbf x}+(\delta/2){\mathbf e}$, we have
$\|{\mathbf x}-{\mathbf y}\|_{2}<\delta$,
yet ${\mathbf y}\notin\{{\mathbf x}\}$.
Thus $\{{\mathbf x}\}$ is not open.
(iii) Observe that $d(x,x)=0<1/2$ and $d(x,y)=1>1/2$ for $x\neq y$.
If $x\in E$, then $d(x,y)<1/2$ implies $y=x\in E$, so $E$ is open.
[Return to page~\pageref{E;Open ball open}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;properties metric open}]%
\label{P;properties metric open}
If $(X,d)$ is a metric space,
then the following statements are true.
(i) The empty set $\emptyset$ and the space $X$ are open.
(ii) If $U_{\alpha}$ is open for all $\alpha\in A$, then
$\bigcup_{\alpha\in A} U_{\alpha}$ is open. (In other words,
the union of open sets is open.)
(iii) If $U_{j}$ is open for all $1\leq j\leq n$, then
$\bigcap_{j=1}^{n} U_{j}$ is open.
\end{varthm}
\begin{proof}
(i) Since there are no points $e$ in $\emptyset$, the statement
\[x\in \emptyset\ \text{whenever}\ d(x,e)<1\]
holds for all $e\in \emptyset$. Since every point $x$ belongs to $X$,
the statement
\[x\in X\ \text{whenever}\ d(x,e)<1\]
holds for all $e\in X$.
(ii) If $e\in \bigcup_{\alpha\in A} U_{\alpha}$, then we can find
a particular $\alpha_{1}\in A$ with $e\in U_{\alpha_{1}}$.
Since $U_{\alpha_{1}}$ is open, we can find a $\delta>0$
such that
\[x\in U_{\alpha_{1}}\ \text{whenever}\ d(x,e)<\delta.\]
Since $U_{\alpha_{1}}\subseteq \bigcup_{\alpha\in A} U_{\alpha}$,
\[x\in \bigcup_{\alpha\in A} U_{\alpha} \text{whenever}\ d(x,e)<\delta.\]
Thus $\bigcup_{\alpha\in A} U_{\alpha}$ is open.
(iii) If $e\in \bigcap_{j=1}^{n} U_{j}$, then
$e\in U_{j}$ for each $1\leq j\leq n$. Since
$U_{j}$ is open, we can find a $\delta_{j}>0$
such that
\[x\in U_{j}\ \text{whenever}\ d(x,e)<\delta_{j}.\]
Setting $\delta=\min_{1\leq j\leq n}\delta_{j}$, we
have $\delta>0$ and
\[x\in U_{j}\ \text{whenever}\ d(x,e)<\delta\]
for all $1\leq j\leq n $. Thus
\[x\in \bigcap_{j=1}^{n} U_{j}\ \text{whenever}\ d(x,e)<\delta\]
and we have shown that $\bigcap_{j=1}^{n} U_{j}$ is open.
[Return to page~\pageref{T;properties metric open}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;metric continuous open}]%
\label{P;metric continuous open}
Let $(X,d)$ and $(Y,\rho)$ be metric spaces.
A function $f:X\rightarrow Y$ is continuous if and only
if $f^{-1}(U)$ is open in $X$ whenever $U$ is open in $Y$.
\end{varthm}
\begin{proof} Suppose first that $f$ is continuous
and that $U$ is open in $Y$. If $x\in f^{-1}(U)$, then
we can find a $y\in U$ with $f(x)=y$. Since $U$ is
open in $Y$, we can find an $\epsilon>0$ such that
\[z\in U\ \text{whenever $\rho(y,z)<\epsilon$}.\]
Since $f$ is continuous, we can find a $\delta>0$
such that
\[\rho(y,f(w))=\rho(f(x),f(w))<\epsilon
\ \text{whenever $d(x,w)<\delta$}.\]
Thus
\[f(w)\in U\ \text{whenever $d(x,w)<\delta$}.\]
In other words,
\[w\in f^{-1}(U)\ \text{whenever $d(x,w)<\delta$}.\]
We have shown that $f^{-1}(U)$ is open.
We now seek the converse result. Suppose that
$f^{-1}(U)$ is open in $X$ whenever $U$ is open in $Y$.
Suppose $x\in X$ and $\epsilon>0$. We know that the
open ball
\[B(f(x),\epsilon)=\{y\in Y\,:\, \rho(f(x),y)<\epsilon\}\]
is open. Thus
$x\in f^{-1}\big(B(f(x),\epsilon)\big)$ and
$f^{-1}\big(B(f(x),\epsilon)\big)$ is open. It follows that
there is a $\delta>0$ such that
\[w\in f^{-1}\big(B(f(x),\epsilon)\big)\ \text{whenever $d(x,w)<\delta$},\]
so, in other words,
\[\rho(f(x),f(w))<\epsilon\ \text{whenever $d(x,w)<\delta$}.\]
Thus $f$ is continuous.
[Return to page~\pageref{T;metric continuous open}.]
\end{proof}
\begin{varthm}[Example~\ref{E;open not continuous}]%
\label{P;open not continuous}
Let $X={\mathbb R}$ and $d$ be the discrete metric.
Let $Y={\mathbb R}$ and $\rho$ be the usual (Euclidean)
metric.
(i) If we define $f:X\rightarrow Y$ by $f(x)=x$, then $f$ is continuous
but there exist open sets $U$ in $X$ such that $f(U)$ is not open.
(ii) If we define $g:Y\rightarrow X$ by $g(y)=y$, then $g$ is not continuous
but $g(V)$ is open in $X$ whenever $V$ is open in $Y$.
\end{varthm}
\begin{proof} Since every set is open in $X$, we have
$f^{-1}(V)=g(V)$ open for every $V$ in $Y$ and so, in particular,
for every open set. Thus $f$ is continuous.
We observe that $U=\{0\}$ is open in $X$
and $g^{-1}(U)=f(U)=U=\{0\}$
is not open in $Y$. Thus $g$ is not continuous.
[Return to page~\pageref{E;open not continuous}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;British rail balls}]%
\label{P;British rail balls}
Consider ${\mathbb R}^{2}$.
For each of the British rail express and
British rail stopping metrics:
(i) Describe the open balls. (Consider both large
and small radii.)
(ii) Describe the open sets as well as you can.
(There is a nice description for the British rail express
metric.) Give reasons for your answers.
\end{varthm}
\begin{proof}[Solution] We start with the British rail express metric.
Write
\[B_{E}(\delta)=\{{\mathbf x}\,:\,\|{\mathbf x}\|_{2}<\delta\}\]
for the Euclidean ball centre ${\boldsymbol 0}$ $[\delta>0]$.
If $0r>0$, then
\[B({\mathbf x},r)=\{{\mathbf x}\}\cup B_{E}(r-\|{\mathbf x}\|_{2}).\]
Since open balls are open and the union of open sets is open,
we deduce that every set not containing ${\boldsymbol 0}$ and every
set containing $B_{E}(\delta)$ for some $\delta>0$ is open.
On the other hand, if $U$ is open and ${\mathbf 0}\in U$ then
$U$ must contain $B_{E}(\delta)$ for some $\delta>0$.
It follows that the collection of sets described
in the last sentence of the previous
paragraph constitute the open sets for the British rail express metric.
We turn now to the stopping metric. We observe that
\[B({\boldsymbol 0},r)=B_{E}(r)\]
for $r>0$. If ${\mathbf x}\neq{\boldsymbol 0}$ and $0r>0$, then
\[B({\mathbf x},r)=\left\{\lambda\frac{\mathbf x}{{\|{\mathbf x}\|_{2}}}
\,:\,\lambda\in(0,\|{\mathbf x}\|_{2}+r)\right\}
\cup B_{E}(r-\|{\mathbf x}\|).\]
A similar argument to the previous paragraph shows that the open sets are
precisely the unions of sets of the form
\[l({\mathbf e},(a,b))=\{\lambda{\mathbf e}\,:\,\lambda\in(a,b)\}\]
where ${\mathbf e}$ is a unit vector and $0\leq a****0$.
[Return to page~\pageref{E;British rail balls}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;limit unique}]%
\label{P;limit unique}
Consider a metric space $(X,d)$. If
a sequence $x_{n}$ has a limit, then that limit is unique.
\end{varthm}
\begin{proof} Suppose $x_{n}\rightarrow x$ and $x_{n}\rightarrow y$.
Then, given any $\epsilon>0$, we can find $N_{1}$ and $N_{2}$ such that
\[
d(x_{n},x)<\epsilon/2\ \text{for all $n\geq N_{1}$ and}
\ d(x_{n},y)<\epsilon/2\ \text{for all $n\geq N_{2}$}.
\]
Taking $N=\max(N_{1},N_{2})$, we obtain
\[d(x,y)\leq d(x_{N},x)+d(x_{N},y)<\epsilon/2+\epsilon/2=\epsilon.\]
Since $\epsilon$ was arbitrary, $d(x,y)=0$ and $x=y$.
[Return to page~\pageref{L;limit unique}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;sequence continuous}]%
\label{P;sequence continuous}
Consider two metric spaces $(X,d)$ and $(Y,\rho)$.
Show that a function $f:X\rightarrow Y$ is continuous
if and only if, whenever $x_{n}\in X$ and $x_{n}\rightarrow x$
as $n\rightarrow\infty$, we have $f(x_{n})\rightarrow f(x)$
\end{varthm}
\begin{proof}[Solution]
Suppose that $f$ is continuous and $x_{n}\rightarrow x$.
Then, given $\epsilon>0$, we can find a $\delta>0$
such that
\[d(z,x)<\delta\Rightarrow \rho\big(f(z),f(x)\big)
<\epsilon\]
and then find an $N$ such that
\[n\geq N\Rightarrow d(x_{n},x)<\delta\]
and so
\[n\geq N\Rightarrow \rho\big(f(x_{n}),f(x)\big)
<\epsilon.\]
Thus $f(x_{n})\rightarrow f(x)$.
If $f$ is not continuous, we can find an $\epsilon>0$
such that, given any $\delta>0$, there exists an
$z\in X$ with $d(z,x)<\delta$ and
$\rho\big(f(z),f(x)\big)>\epsilon$. In particular,
we can find $x_{n}\in X$ such that
$d(x_{n},x)<1/n$ but $\rho\big(f(x_{n}),f(x)\big)>\epsilon$.
Thus $x_{n}\rightarrow x$, but
$f(x_{n})\not\rightarrow f(x)$.
[Return to page~\pageref{E;sequence continuous}]
\end{proof}
\begin{varthm}[Exercise~\ref{E;identity difference}]%
\label{P;identity difference}
In this exercise we consider the
identity map between a space and itself when we equip
the space with \emph{different} metrics. We look
at the three norms (and their associated metrics)
defined on $C([0,1])$ in Theorem~\ref{T;three norms}.
Define $j_{\alpha,\beta}:(C([0,1]),\|\ \|_{\alpha})\rightarrow
(C([0,1]),\|\ \|_{\beta})$ by $j_{\alpha,\beta}(f)=f$.
(i) Show that $j_{\infty,1}$ and $j_{\infty,2}$ are
continuous, but $j_{1,\infty}$ and $j_{2,\infty}$
are not.
(ii) By using the Cauchy--Schwarz inequality
$|\langle f,g\rangle|\leq\|f\|_{2}\|g\|_{2}$
with $g=1$, or otherwise, show that
$j_{2,1}$ is continuous. Show that
$j_{1,2}$ is not.
\noindent$[$Hint:
Consider functions of the form
$f_{R,K}(x)=K\max\{0,1-Rx\}$.$]$
\end{varthm}
\begin{proof}[Solution] (i) Observe that
\[\|f\|_{1}=\int_{0}^{1}|f(t)|\,dt\leq\int_{0}^{1}\|f\|_{\infty}\,dt
=\|f\|_{\infty}\]
and
\[\|f\|_{2}^{2}=\int_{0}^{1}|f(t)|^{2}\,dt
\leq\int_{0}^{1}\|f\|_{\infty}^{2}\,dt
=\|f\|_{\infty}^{2},\]
so
\[\|f\|_{2}\leq \|f\|_{\infty}.\]
Thus
\[\|f_{n}-f\|_{\infty}\rightarrow 0\Rightarrow \|f_{n}-f\|_{1},
\,\|f_{n}-f\|_{2}\rightarrow 0\]
and $j_{\infty,1}$ and $j_{\infty,2}$ are
continuous.
However, if we put
\[f_{n}(t)=n^{1/3}\max\{0,1-nt\},\]
then
\[\|f_{n}-0\|_{1}=\int_{0}^{1}f_{n}(t)\,dt=n^{-2/3}/2\rightarrow 0\]
and
\begin{align*}
\|f_{n}-0\|_{2}^{2}&=\int_{0}^{1}f_{n}(t)^{2}\,dt
=n^{2/3}\int_{0}^{1/n}(1-nt)^{2}\,dt\\
&=n^{2/3}\left[-\frac{(1-nt)^{3}}{3n}\right]_{0}^{1/n}
=\frac{n^{-1/3}}{3}
\rightarrow 0
\end{align*}
as $n\rightarrow\infty$,
so $\|f_{n}-0\|_{2}\rightarrow 0$, yet
\[\|f_{n}-0\|_{\infty}=n^{1/3}\rightarrow\infty\]
so $j_{1,\infty}$ and $j_{2,\infty}$ are not
continuous.
(ii) Observe that
\[\|f\|_{1}=\int_{0}^{1}|f(t)|\,dt=\langle |f|,1\rangle
\leq\|f\|_{2}\|1\|_{2}\leq\|f\|_{2}.\]
Thus
\[\|f_{n}-f\|_{2}\rightarrow 0\Rightarrow \|f_{n}-f\|_{1}
\rightarrow 0\]
and $j_{2,1}$ is continuous.
However, if we put
\[f_{n}(t)=n^{2/3}\max\{0,1-nt\},\]
then
\[\|f_{n}-0\|_{1}=\int_{0}^{1}f_{n}(t)\,dt=n^{-1/3}/2\rightarrow 0,\]
yet
\[\|f_{n}-0\|_{2}^{2}=\int_{0}^{1}f_{n}(t)^{2}\,dt
=n^{4/3}\int_{0}^{1/n}(1-nt)^{2}\,dt=\frac{n^{1/3}}{3}
\rightarrow \infty\]
as $n\rightarrow\infty$,
so $j_{1,2}$ is not
continuous.
[Return to page~\pageref{E;identity difference}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;closed complements open}]%
\label{P;closed complements open}
Let $(X,d)$ be a metric space. A set $F$ in $X$
is closed if and only if its complement is open.
\end{varthm}
\begin{proof}\emph{Only if} Suppose that
$F$ is closed and $E=X\setminus F$.
If $E$ is not open, we can find an $e\in E$ such that
$B(e,\delta)\cap F\neq\emptyset$ for all $\delta>0$.
In particular, we can find $x_{n}\in F$ such that $d(x_{n},e)<1/n$
for each $n\geq 1$. Since $x_{n}\rightarrow e$ and $F$ is closed,
we have $e\in F$ contradicting our initial assumption that
$e\in E$. Thus $E$ is open.
\emph{If} We now establish the converse. Suppose $E$ is open
and $F=X\setminus E$. Suppose $x_{n}\in F$ and $x_{n}\rightarrow x$.
If $x\in E$, then, since $E$ is open,
we can find a $\delta>0$ such that $B(x,\delta)\subseteq E$.
Thus $d(x_{n},x)\geq \delta$ for all $n$ which is absurd.
Thus $x\in F$ and $F$ is closed.
[Return to page~\pageref{T;closed complements open}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;properties metric closed}]%
\label{P;properties metric closed}
If $(X,d)$ is a metric space,
then the following statements are true.
(i) The empty set $\emptyset$ and the space $X$ are closed.
(ii) If $F_{\alpha}$ is closed for all $\alpha\in A$, then
$\bigcap_{\alpha\in A} F_{\alpha}$ is closed. (In other words
the intersection of closed sets is closed.)
(iii) If $F_{j}$ is closed for all $1\leq j\leq n$, then
$\bigcup_{j=1}^{n} F_{j}$ is closed.
\end{varthm}
\begin{proof} (i) Observe that $\emptyset=X\setminus X$
and $X=X\setminus \emptyset$.
(ii) Since $F_{\alpha}$ is closed, $X\setminus F_{\alpha}$
is open for all $\alpha\in A$. It follows that
\[X\setminus \bigcap_{\alpha\in A} F_{\alpha}
=\bigcup_{\alpha\in A}(X\setminus F_{\alpha})\]
is open and so $\bigcap_{\alpha\in A} F_{\alpha}$ is closed.
(iii) Since $F_{j}$ is closed, $X\setminus F_{j}$
is open for all $1\leq j\leq n$. It follows that
\[X\setminus \bigcup_{j=1}^{n} F_{j}
=\bigcap_{j=1}^{n}(X\setminus F_{j})\]
is open and so $\bigcup_{j=1}^{n} F_{j}$ is closed.
[Return to page~\pageref{T;properties metric closed}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;metric continuous closed}]%
\label{P;metric continuous closed}
Let $(X,d)$ and $(Y,\rho)$ be metric spaces.
A function $f:X\rightarrow Y$ is continuous if and only
if $f^{-1}(F)$ is closed in $X$ whenever $F$ is closed in $Y$.
\end{varthm}
\begin{proof}
\emph{If} Suppose that
$f$ is continuous. If $F$ is closed in $Y$,
then $Y\setminus F$
is open, so
\[X\setminus f^{-1}(F)=f^{-1}(Y\setminus F)\]
is open. Thus $f^{-1}(F)$ is closed.
\emph{Only if} Suppose $f^{-1}(F)$ is closed whenever $F$ is.
If $U$ is open in $Y$,
then $Y\setminus U$
is closed, so
\[X\setminus f^{-1}(U)=f^{-1}(Y\setminus U)\]
is closed. Thus $f^{-1}(U)$ is open.
We have shown that $f$ is continuous.
[Return to page~\pageref{T;metric continuous closed}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;silly count}]%
\label{P;silly count}
Write ${\mathcal P}(Y)$ for the collection
of subsets of $Y$. If $X$ has three elements, how many
elements does ${\mathcal P}\big({\mathcal P}(X)\big)$
have?
How many topologies are there on $X$?
\end{varthm}
\begin{proof}[Solution]
If $Y$ has $n$ elements ${\mathcal P}(Y)$ has $2^{n}$
elements so ${\mathcal P}\big({\mathcal P}(X)\big)$
has $2^{2^{3}}=2^{8}=256$ elements.
Let $X=\{x,y,z\}$. We set out the types of possible
topologies below.
\begin{center}
\begin{tabular}{c|c}
type&number of this type\\
$\{\emptyset,X\}$&$1$\\
$\{\emptyset,\{x\},X\}$&$3$\\
$\{\emptyset,\{x\},\{y\},\{x,y\},X\}$&$3$\\
${\mathcal P}(X)$&$1$\\
$\{\emptyset,\{x,y\},X\}$&$3$\\
$\{\emptyset,\{x\},\{x,y\},X\}$&$6$\\
$\{\emptyset,\{z\},\{x,y\},X\}$&$3$\\
$\{\emptyset,\{x\},\{z\},\{x,y\},\{x,z\},X\}$&$6$\\
$\{\emptyset,\{x\},\{x,y\},\{x,z\},X\}$&$3$
\end{tabular}
\end{center}
There are that $29$ distinct topologies on $X$.
The moral of this question is that although there are far
fewer topologies than simple collections of subsets
and even fewer different types (non-homeomorphic
topologies in later terminology) there are still
quite a lot even for spaces of three points.
[Return to page~\pageref{E;silly count}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;other interiors}]%
\label{P;other interiors}
Let $(X,\tau)$ be a topological space and
$A$ a subset of $X$.
(i) $\Int A=\{x\in A:\exists\ U\in\tau\ \text{with}
\ x\in U\subseteq A\}$.
(ii) $\Int A$ is the unique $V\in\tau$ such that
$V\subseteq A$ and, if $W\in\tau$ and $V\subseteq W\subseteq A$,
then $V=W$. (Informally, $\Int A$ is the largest open set
contained in $A$.)
\end{varthm}
\begin{proof} (i) This is just the observation that
\begin{align*}
\Int A&=\bigcup\{U\in\tau\,:\, U\subseteq A\}\\
&=\{x\in A\,:\,\exists\ U\in\tau\ \text{with}
\ x\in U\subseteq A\}
\end{align*}
(ii) Since
\[\Int A=\bigcup\{U\in\tau\,:\, U\subseteq A\},\]
we know that $\Int A\subseteq A$. Since the union
of open sets is open, $\Int A\in\tau$. If
$W\in\tau$ and $W\subseteq A$, then
\[\Int A=\bigcup\{U\in\tau\,:\, U\subseteq A\}\supseteq W,\]
so, if $W\supseteq\Int A$, $W=\Int A$.
To prove uniqueness, suppose that $V'$
is an open subset of $A$ and
has the property that,
if $U$ in $\tau$ and $V'\subseteq U\subseteq A$.
then $V'=U$. Since $V'$
is an open subset of $A$, we have
$V'\subseteq \Int A\subseteq A$
so $V'=\Int A$.
[Return to page~\pageref{L;other interiors}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;no largest}]\label{P;no largest}
Consider ${\mathbb R}$ with its usual topology
(i.e. the one derived from the Euclidean norm). We look
at the open interval $I=(0,1)$. Show that
if $F$ is closed and $F\subseteq (0,1)$, there is a closed $G$
with $F\subseteq G\subseteq (0,1)$ and $G\neq F$.
(Thus there is no largest closed set contained in $(0,1)$.)
\end{varthm}
\begin{proof}[Solution] Suppose that $F$ is a
closed set with $F\subseteq (0,1)$. Since $0\notin F$
and $F^{c}$ is open, we can find a $\delta_{1}>0$
such that $F\cap(-\delta_{1},\delta_{1})=\emptyset$.
Similarly we can find a $\delta_{2}>0$
such that $F\cap(1-\delta_{2},1+\delta_{2})=\emptyset$.
If we set $\delta=\min\{\delta_{1},\delta_{2},1\}/2$
then $[\delta,1-\delta]$ is closed,
$(0,1)\supseteq [\delta,1-\delta]\supseteq F$,
but $[\delta,1-\delta]\neq F$.
[Return to page~\pageref{E;no largest}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;back to the future}]%
\label{P;back to the future}
Let
$(X,d)$ be a metric space and $A$ a subset of $X$.
Then $\Cl A$ consists of all those $x$ such
that we can find $x_{n}\in A$ with $d(x,x_{n})\rightarrow 0$.
(In old fashioned terminology, the closure of $A$
is its set of \emph{closure points}.)
\end{varthm}
\begin{proof}
Suppose that $x_{n}\in A$ with $d(x,x_{n})\rightarrow 0$.
Then, since $A\subseteq \Cl A$, $x_{n}\in \Cl A$
and so, since $\Cl A$ is closed, $x\in \Cl A$.
Suppose conversely that $x\in \Cl A$. Since
$\Cl A=X\setminus \Int A^{c}$, we know that the
open ball $B(x,1/n)$ of radius $1/n$ and centre $x$
cannot lie entirely within $A^{c}$, so there exists
an $x_{n}\in B(x,1/n)\cap A$.
We have $d(x,x_{n})\rightarrow 0$, so we are done.
[Return to page~\pageref{L;back to the future}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;call me dense}]%
\label{P;call me dense}
(i) Let $(X,\tau)$ be a topological space
and $(Y,d)$ a
metric space. If $f,\,g:X\rightarrow Y$ are continuous show that
$f(x)=g(x)$ for all $x\in X$.then the set
\[\{x\in X\,:\,f(x)=g(x)\}\]
is closed.
(ii) Let $(X,\tau)$ be a topological space
and $(Y,d)$ a
metric space\footnote{Exercise~\ref{E;call me Hausdorff}
gives an improvement of parts (i) and (ii).}.
If $f,\,g:X\rightarrow Y$ are continuous and $f(x)=g(x)$
for all $x\in A$, where $A$ is dense in $X$, show that
$f(x)=g(x)$ for all $x\in X$.
(iii) Consider the unit interval $[0,1]$ with the
Euclidean metric and $A=[0,1]\cap{\mathbb Q}$
with the inherited metric. Exhibit,
with proof, a continuous map
$f:A\rightarrow{\mathbb R}$
(where ${\mathbb R}$ has the standard metric)
such that there does not exist
a continuous map
$\tilde{f}:[0,1]\rightarrow{\mathbb R}$
with $\tilde{f}(x)=f(x)$ for all $x\in [0,1]$.
\end{varthm}
\begin{proof}[Solution]
(i) Let
\[E=\{x\in X\,:\,f(x)=g(x)\}.\]
We show that the complement of $E$ is open and
so $E$ is closed.
Suppose $b\in X\setminus E$. Then
$f(b)\neq g(b)$. We
can find open sets $U$ and $V$ such that
$f(b)\in U$, $g(b)\in V$ and $U\cap V=\emptyset$.
Now $f^{-1}(U)$ is open, as is $g^{-1}(V)$,
so $b\in f^{-1}(U)\cap g^{-1}(V)\in\tau$.
But $f^{-1}(U)\cap g^{-1}(V)\subseteq X\setminus E$.
Thus $X\setminus E$ is open and we are done.
(ii) Let $E$ be as in (i). We have $A\subseteq E$
and $E$ closed so $X=\Cl A\subseteq E=X$ and $E=X$.
(iii) We observe that $x\in A\Rightarrow x^{2}\neq \tfrac{1}{2}$.
If $x\in A$, set
\[f(x)=
\begin{cases}0&\text{if $x^{2}<\tfrac{1}{2}$,}\\
1&\text{otherwise.}
\end{cases}\]
Observe that, if $y\in A$ and $y^{2}<\tfrac{1}{2}$,
we can find a $\delta>0$ such that
\[|y-x|<\delta\Rightarrow x^{2}<\tfrac{1}{2}
\Rightarrow f(x)=f(y).\]
Similarly if $y\in A$ and $y^{2}>\tfrac{1}{2}$
we can find a $\delta>0$ such that
\[|y-x|<\delta\Rightarrow x^{2}>\tfrac{1}{2}
\Rightarrow f(x)=f(y).\]
Thus $f$ is continuous.
Suppose that $\tilde{f}:[0,1] \rightarrow{\mathbb R}$.
is such that $\tilde{f}(x)=f(x)$ for all $x\in A$.
Choose $p_{n},\,q_{n}\in A$
such that $p_{n}^{2}>\tfrac{1}{2}>q_{n}^{2}$
and $|p_{n}-2^{-1/2}|,\,|q_{n}-2^{-1/2}|\rightarrow 0$.
Then
\[|\tilde{f}(p_{n})-\tilde{f}(2^{-1/2})|
+|\tilde{f}(q_{n})-\tilde{f}(2^{-1/2})|
\geq |\tilde{f}(p_{n})-\tilde{f}(q_{n})|=1,\]
so $\tilde{f}$ cannot be continuous.
[Return to page~\pageref{E;call me dense}.]
\end{proof}
\begin{varthm}[Example~\ref{E;Cauchy not topological}]%
\label{P;Cauchy not topological}
Let $X={\mathbb R}$ and let $d$ be the usual metric on ${\mathbb R}$.
Let $Y=(0,1)$ (the open interval with end points $0$ and $1$)
and let $\rho$ be the usual metric on $(0,1)$. Then
$(X,d)$ and $(Y,\rho)$ are homeomorphic as topological spaces,
but $(X,d)$ is complete and $(Y,\rho)$ is not.
\end{varthm}
\begin{proof} We know from first year analysis that
$f(x)=\tan(\pi(y-1/2))$ is a bijective function $f:Y\rightarrow X$
which is continuous with continuous inverse. (Recall that a strictly increasing
continuous function has continuous inverse.) Thus
$(X,d)$ and $(Y,\rho)$ are homeomorphic. We know that
$(X,d)$ is complete by the general principle of convergence.
However, $1/n$ is a Cauchy sequence in $Y$ with no limit
in $Y$. (If $y\in (0,1)$, then there exists an $N$ with
$y>N^{-1}$. If $m\geq 2N$, then $|1/m-y|\geq 1/(2N)$
so $1/n\nrightarrow y$.)
[Return to page~\pageref{E;Cauchy not topological}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;coarsest topology}]%
\label{P;coarsest topology}
Let $X$ be a space and let ${\mathcal H}$ be a
collection of subsets of $X$. Then there exists a unique topology
$\tau_{{\mathcal H}}$ such that
(i) $\tau_{{\mathcal H}}\supseteq{\mathcal H}$, and
(ii) if $\tau$ is a topology with $\tau\supseteq {\mathcal H}$,
then $\tau\supseteq \tau_{{\mathcal H}}$.
\end{varthm}
\begin{proof} The proof follows a standard pattern, which is
worth learning.
\noindent\emph{Uniqueness} Suppose that $\sigma$ and $\sigma'$ are topologies
such that
(i) $\sigma\supseteq{\mathcal H}$,
(ii) if $\tau$ is a topology with $\tau\supseteq {\mathcal H}$,
then $\tau\supseteq \sigma$,
(i)$'$ $\sigma'\supseteq{\mathcal H}$,
(ii)$'$ if $\tau$ is a topology with $\tau\supseteq {\mathcal H}$,
then $\tau\supseteq \sigma'$.
\noindent By (i) and (ii)$'$, we have $\sigma\supseteq \sigma'$
and by (i)$'$ and (ii), we have $\sigma'\supseteq \sigma$.
Thus $\sigma=\sigma'$.
\noindent\emph{Existence} Let $T$ be the set of topologies
$\tau$ with $\tau\supseteq {\mathcal H}$. Since the discrete
topology contains ${\mathcal H}$, $T$ is non-empty.
Set
\[\tau_{\mathcal H}=\bigcap_{\tau\in T}\tau.\]
By construction, $\tau_{\mathcal H}\supseteq{\mathcal H}$ and
$\tau\supseteq \tau_{\mathcal H}$ whenever $\tau\in T$.
Thus we need only show that $\tau_{\mathcal H}$ is a topology
and this we now do.
(a) ${\emptyset},\,X\in\tau$ for all $\tau\in T$, so
${\emptyset},\,X\in\tau_{\mathcal H}$.
(b) If $U_{\alpha}\in \tau_{\mathcal H}$, then
$U_{\alpha}\in\tau$ for all $\alpha\in A$
and so
$\bigcup_{\alpha\in A}U_{\alpha}\in\tau$
for all $\tau\in T$, whence
$\bigcup_{\alpha\in A}U_{\alpha}\in \tau_{\mathcal H}$.
(c) If $U_{j}\in \tau_{\mathcal H}$, then
$U_{j}\in\tau$ for all $1\leq j\leq n$ and so
$\bigcap_{j=1}^{n}U_{j}\in\tau$
for all $\tau\in T$, whence
$\bigcap_{j=1}^{n} U_{j}\in \tau_{\mathcal H}$.
Thus $\tau_{\mathcal H}$ is a topology, as required.
[Return to page~\pageref{L;coarsest topology}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;subspace topology}]%
\label{P;subspace topology}
If $(X,\tau)$ is a topological space
and $Y\subseteq X$, then the subspace topology $\tau_{Y}$ on $Y$
is the collection of sets $Y\cap U$ with $U\in\tau$.
\end{varthm}
\begin{proof} Let $j:Y\rightarrow X$ be the inclusion
map given by $j(y)=y$ for all $y\in Y$.
Write
\[\sigma=\{Y\cap U\,:\,U\in\tau\}.\]
Since $Y\cap U=j^{-1}(U)$, we know that $\tau_{Y}$
is the smallest topology containing $\sigma$
and that the result will follow if we show that $\sigma$ is a topology
on $Y$. The following observations show this and complete
the proof.
(a) ${\emptyset}=Y\cap{\emptyset}$ and $Y=Y\cap X$.
(b) $\bigcup_{\alpha\in A}(Y\cap U_{\alpha})
=Y\cap\bigcup_{\alpha\in A}U_{\alpha}$.
(c) $\bigcap_{j=1}^{n}(Y\cap U_{j})=Y\cap\bigcap_{j=1}^{n}U_{j}$.
[Return to page~\pageref{L;subspace topology}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;product topology}]%
\label{P;product topology}
Let $(X,\tau)$ and $(Y,\sigma)$
be topological spaces and $\lambda$ the product topology
on $X\times Y$.
Then $O\in\lambda$ if and only if, given $(x,y)\in O$,
we can find $U\in \tau$ and $V\in \sigma$ such that
\[(x,y)\in U\times V\subseteq O.\]
\end{varthm}
\begin{proof} Let $\mu$ be the collection of subsets
$E$ such that, given $(x,y)\in E$,
we can find $U\in \tau$ and $V\in \sigma$ with
\[(x,y)\in U\times V\subseteq E.\]
If $U\in \tau$, then, since $\pi_{X}$ is continuous
$U\times Y=\pi_{X}^{-1}(U)\in\lambda$. Similarly,
if $V\in\sigma$ then $X\times V\in\lambda$. Thus
\[U\times V=U\times Y\cap X\times V\in\lambda.\]
If $E\in\mu$ then, given $(x,y)\in E$, we can find
$U_{(x,y)}\in \tau$ and $V_{(x,y)}\in \sigma$ such that
\[(x,y)\in U_{(x,y)}\times V_{(x,y)}\subseteq E,.\]
We observe that
\[E\subseteq \bigcup_{(x,y)\in E}U_{(x,y)}\times V_{(x,y)}\subseteq E\]
so $E=\bigcup_{(x,y)\in E}U_{(x,y)}\times V_{(x,y)}$ and, since the
union of open sets is open, $E\in\lambda$. Thus $\mu\subseteq\lambda$.
It is easy to check that $\mu$ is a topology as follows.
(a) $\emptyset\in\mu$ vacuously. If $(x,y)\in X\times Y$,
then $X\in\tau$, $Y\in\sigma$ and
$(x,y)\in X\times Y\subseteq X\times Y$. Thus $X\times Y\in\mu$.
(b) Suppose $E_{\alpha}\in\mu$ for all $\alpha\in A$.
If $(x,y)\in\bigcup_{\alpha\in A}E_{\alpha}$,
then $(x,y)\in E_{\beta}$ for some $\beta\in A$.
We can find $U\in \tau$ and $V\in \sigma$ such that
\[(x,y)\in U\times V\subseteq E_{\beta}\]
and so
\[(x,y)\in U\times V\subseteq\bigcup_{\alpha\in A}E_{\alpha}.\]
Thus $\bigcup_{\alpha\in A}E_{\alpha}\in\mu$.
(c) Suppose $E_{j}\in\mu$ for all $1\leq j\leq n$.
If $(x,y)\in\bigcap_{j=1}^{n}E_{j}$,
then $(x,y)\in E_{j}$ for all $1\leq j\leq n$.
We can find $U_{j}\in \tau$ and $V_{j}\in \sigma$ such that
\[(x,y)\in U_{j}\times V_{j}\subseteq E_{j}\]
and so
\[(x,y)\in \bigcap_{j=1}^{n} U_{j}\times \bigcap_{j=1}^{n} V_{j}
\subseteq\bigcap_{j=1}^{n}E_{j}.\]
Since $\bigcap_{j=1}^{n} U_{j}\in\tau$
and $\bigcap_{j=1}^{n} V_{j}\in\sigma$,
we have shown that $\bigcap_{j=1}^{n}E_{j}\in\mu$.
Finally, we observe that, if $U\in\tau$, then
\[\pi_{X}^{-1}(U)=U\times Y\]
and $(x,y)\in U\times Y\subseteq \pi_{X}^{-1}(U)$
with $U\in\tau$, $Y\in\sigma$,
so $\pi_{X}^{-1}(U)\in\mu$. Thus $\pi_{X}:X\times Y\rightarrow X$
is continuous if we give $X\times Y$ the topology $\mu$. A similar
result holds for $\pi_{Y}$ so, by the minimality of $\lambda$,
$\mu=\lambda$.
[Return to page~\pageref{L;product topology}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;product cut}]\label{P;product cut}
Suppose that $(X,\tau)$ and $(Y,\sigma)$
are topological spaces and we give $X\times Y$
the product topology $\mu$. Now fix $x\in X$
and give $E=\{x\}\times Y$ the subspace topology $\mu_{E}$.
Show that the map
$k:(Y,\sigma)\rightarrow(E,\mu_{E})$ given
by $k(y)=(x,y)$ is a homeomorphism.
\end{varthm}
\begin{proof}[Solution] The proof is a direct application
of Lemma~\ref{L;product topology}.
We observe that $k$ is a bijection.
If $U$ is open in $(Y,\sigma)$, then $X\times U\in\mu$
so $k(U)=\{x\}\times U\in \mu_{E}$. Thus $k^{-1}$ is continuous.
If $W$ is open in $(E,\mu_{E})$ then $W=E\cap H$
for some $H\in \mu$. If $(x,y)\in W$, then by definition,
we can find $J\in \tau$, $I\in\sigma$ such that
$(x,y)\in J\times I\subseteq H$. Thus
$y\in I\subseteq k ^{-1}(W)$
with $I\in\sigma$. We have shown that $k^{-1}(W)$ is open.
Thus $k$ is continuous.
[Return to page~\pageref{E;product cut}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;same topology}]%
\label{P;same topology}
Let $\tau_{1}$ and $\tau_{2}$ be two topologies
on the same space $X$.
(i) We have $\tau_{1}\subseteq\tau_{2}$
if and only if, given $x\in U\in\tau_{1}$, we can find
$V\in\tau_{2}$ such that $x\in V\subseteq U$.
(ii)We have $\tau_{1}=\tau_{2}$
if and only if, given $x\in U\in\tau_{1}$, we can find
$V\in\tau_{2}$ such that $x\in V\subseteq U$
and, given $x\in U\in\tau_{2}$, we can find
$V\in\tau_{1}$ such that $x\in V\subseteq U$.
\end{varthm}
\begin{proof} (i) If $\tau_{1}\subseteq\tau_{2}$
and $x\in U\in\tau_{1}$, then setting $V=U$ we
automatically
have $V\in\tau_{2}$ and $x\in V\subseteq U$.
Conversely, suppose that,
given $x\in U\in\tau_{1}$, we can find
$V\in\tau_{2}$ such that $x\in V\subseteq U$.
Then, if $U\in\tau_{1}$ is fixed, we can find
$V_{x}\in\tau_{2}$ such that $x\in V_{x}\subseteq U$
for each $x\in U$.
Now
\[U\subseteq \bigcup_{x\in U}V_{x}\subseteq U\]
so $U=\bigcup_{x\in U}V_{x}$ and, since the union
of open sets is open, $U\in\tau_{2}$. Thus $\tau_{1}\subseteq \tau_{2}$.
(ii) Observe that $\tau_{1}=\tau_{2}$
if and only if $\tau_{1}\subseteq\tau_{2}$
and $\tau_{2}\subseteq\tau_{1}$.
[Return to page~\pageref{L;same topology}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;open via neighbourhood}]%
\label{P;open via neighbourhood}
If $(X,\tau)$ is a topological space, then
a subset $A$ of $X$ is open if and only if every
point of $A$ has an open neighbourhood $U\subseteq A$.
\end{varthm}
\begin{proof}[Solution]
If $A$ is open, then $A$ is an open neighbourhood of every $x\in A$.
Conversely, suppose that every $x\in A$ has an open neighbourhood
$U_{x}$ lying entirely within $A$. Then
\[A\subseteq \bigcup_{x\in A} U_{x}\subseteq A\]
so $A= \bigcup_{x\in A} U_{x}$. Thus $A$ is the union of open sets
and so open.
[Return to page~\pageref{E;open via neighbourhood}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;Hausdorff point}]%
\label{P;Hausdorff point}
If $(X,\tau)$ is a Hausdorff space, then the one
point sets $\{x\}$ are closed.
\end{varthm}
\begin{proof} We must show that $A=X\setminus\{x\}$ is open.
But, if $y\in A$, then $y\neq x$ so, by the Hausdorff condition,
we can find $U,\,V\in\tau$ such that $x\in U$, $y\in V$
and $U\cap V=\emptyset$. We see that $y\in V\subseteq A$,
so every point of $A$ has an open neighbourhood
lying entirely within $A$. Thus $A$ is open.
[Return to page~\pageref{L;Hausdorff point}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;finite complement}]%
\label{P;finite complement}
Let $X$ be infinite (we could take $X={\mathbb Z}$
or $X={\mathbb R}$).
We say that a subset $E$ of $X$ lies in $\tau$ if
either $E=\emptyset$ or $X\setminus E$ is finite.
Show that $\tau$ is a topology
and that every one
point set $\{x\}$ is closed but that $(X,\tau)$
is not Hausdorff.
What happens if $X$ is finite?
\end{varthm}
\begin{proof}[Solution]
(a) We are told that $\emptyset\in \tau$.
Since $X\setminus X=\emptyset$, we have $X\in\tau$.
(b) If $U_{\alpha}\in\tau$ for all $\alpha\in A$, then
either $U_{\alpha}=\emptyset$ for all $\alpha\in A$,
so $\bigcup_{\alpha\in A}U_{\alpha}=\emptyset\in\tau$,
or we can find a $\beta\in A$ such that
$X\setminus U_{\beta}$ is finite.
In the second case, we observe that
\[X\setminus\bigcup_{\alpha\in A}U_{\alpha}
\subseteq X\setminus U_{\beta},\]so
$X\setminus\bigcup_{\alpha\in A}U_{\alpha}$
is finite and
$\bigcup_{\alpha\in A}U_{\alpha}\in\tau$
(c) If $U_{j}\in\tau$ for all $1\leq j\leq n$, then,
either $U_{k}=\emptyset$ for some $1\leq k\leq n$,
so $\bigcap_{j=1}^{n}U_{j}=\emptyset\in\tau$,
or $X\setminus U_{j}$ is finite for all $1\leq j\leq n$.
In the second case, since
\[X\setminus \bigcap_{j=1}^{n}U_{j}
=\bigcup_{j=1}^{n}(X\setminus U_{j}),\]
it follows that
$X\setminus \bigcap_{j=1}^{n}U_{j}$ is finite
and so $\bigcap_{j=1}^{n}U_{j}\in\tau$.
Thus $\tau$ is a topology.
Since $\{x\}$ is finite, $X\setminus\{x\}$ is open
and so $\{x\}$ is closed.
Suppose that $x \neq y$ and $x\in U\in\tau$,
$y\in V\in \tau$. Then $U,\,V\neq\emptyset$,
so $X\setminus U$ and $X\setminus V$ is finite.
It follows that
\[X\setminus U\cap V=(X\setminus U)\cup(X\setminus V)\]
is finite, and so, since $X$ is infinite, $U\cap V\neq\emptyset$.
Thus $\tau$ is not Hausdorff.
If $X$ is finite, then $\tau$ is the discrete metric
which is Hausdorff.
[Return to page~\pageref{E;finite complement}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;inherit Hausdoff subspace}]%
\label{P;inherit Hausdoff subspace}
If $(X,\tau)$ is a Hausdorff topological space
and $Y\subseteq X$, then $Y$ with the subspace topology
is also Hausdorff.
\end{varthm}
\begin{proof} Write $\tau_{Y}$ for the subspace topology.
If $x,\,y\in Y$ and $x\neq y$, then
$x,\,y\in X$ and $x\neq y$ so we can find $U,\,V\in\tau$ with
$x\in U$, $y\in V$ and $U\cap V=\emptyset$. Set $\tilde{U}=U\cap Y$
and $\tilde{V}=V\cap Y$. Then
$\tilde{U},\,\tilde{V}\in\tau_{Y}$
$x\in \tilde{U}$, $y\in \tilde{V}$ and $\tilde{U}\cap\tilde{V}=\emptyset$.
[Return to page~\pageref{L;inherit Hausdoff subspace}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;inherit Hausdoff product}]%
\label{P;inherit Hausdoff product}
If $(X,\tau)$ and $(Y,\sigma)$ are Hausdorff topological spaces,
then $X\times Y$ with the product topology
is also Hausdorff.
\end{varthm}
\begin{proof} Suppose $(x_{1},y_{1}),\,(x_{2},y_{2})$
and $(x_{1},y_{1})\neq(x_{2},y_{2})$. Then we know that at least
one of the statements $x_{1}\neq x_{2}$ and $y_{1}\neq y_{2}$
is true\footnote{But not necessarily both. This is the traditional
silly mistake.}. Without loss of generality, we may suppose
$x_{1}\neq x_{2}$. Since $(X,\tau)$ is Hausdorff, we can find
$U_{1},\,U_{2}$ disjoint open neighbourhoods of $x_{1}$ and $x_{2}$.
We observe that $U_{1}\times Y$ and $U_{2}\times Y$
are disjoint open neighbourhoods of $(x_{1},y_{1})$
and $(x_{2},y_{2})$, so we are done.
[Return to page~\pageref{L;inherit Hausdoff product}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;simple compact examples}]%
\label{P;simple compact examples}
(iv) Show that the topology described in
Exercise~\ref{E;finite complement} is compact.
(v) Let $X$ be uncountable (we could take
$X={\mathbb R}$).
We say that a subset $A$ of $X$ lies in $\tau$ if
either $A=\emptyset$ or $X\setminus A$ is countable.
Show that $\tau$ is a topology
but that $(X,\tau)$
is not compact.
\end{varthm}
\begin{proof}[Solution]
(iv) If $X=\emptyset$ there is nothing to prove.
If not, let $U_{\alpha}$ $[\alpha\in A]$ be an open cover.
Since $X\neq\emptyset$ we can choose a $\beta\in A$
such that $U_{\beta}\neq\emptyset$ and so
$U_{\beta}=X\setminus F$ where $F$ is a finite set.
For each $x\in F$ we know that
$x\in X=\bigcup_{\alpha\in A}U_{\alpha}$,
so there exists an $\alpha(x)\in A$ with $x\in U_{\alpha(x)}$.
We have
\[U_{\beta}\cup\bigcup_{x\in F}U_{\alpha(x)}=X,\]
giving us the desired open cover.
(v) I leave it the reader to show that $\tau$ is a topology.
Let $x_{1}$, $x_{2}$, \ldots, be distinct points of $X$.
Let
\[U=X\setminus\{x_{j}\,:\,1\leq j\}\]
and $U_{k}=U\cup\{x_{k}\}$. Then $U_{k}\in\tau$ $[k\geq 1]$
and $\bigcup_{k\geq 1}U_{k}=X$.
Now suppose $k(1)$, $k(2)$,\ldots, $k(N)$ given.
If $m=\max_{1\leq r\leq N}k(r)$, then
\[x_{m+1}\notin\bigcup_{r=1}^{N}U_{k(r)}\]
so there is no finite subcover.
[Return to page~\pageref{E;simple compact examples}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;separable metric}]%
\label{P;separable metric}
Suppose that
$(X,d)$ is a compact metric space
(that is to say, the topology induced by the metric is compact).
(i) Given any $\delta>0$, we can find a finite set of points $E$
such that $X=\bigcup_{e\in E}B(e,\delta)$.
(ii) $X$ has a countable dense subset.
\end{varthm}
\begin{proof} (i) Observe that the open balls $B(x,\delta)$
form an open cover of $X$ and so have a finite subcover.
(ii) For each $n\geq 1$, choose a finite subset $E_{n}$ such
that
\[X=\bigcup_{e\in E_{n}}B(e,1/n).\]
Observe that $E=\bigcup_{n=1}^{\infty} E_{n}$
is the countable union of finite sets, so countable.
If $U$ is open and non-empty, then we can find a $u\in U$
and a $\delta>0$ such that $U\supseteq B(u,\delta)$.
Choose $N>\delta^{-1}$. We can find an $e\in E_{N}\subseteq E$
with $u\in B(e,1/N)$, so
\[e\in B(u,1/N)\subseteq B(u,\delta)\subseteq U.\]
Thus $\Cl E=X$ and we are done.
[Return to page~\pageref{L;separable metric}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;Heine--Borel}]%
\label{P;Heine--Borel}
{\bf [The Heine--Borel Theorem.]}
Let ${\mathbb R}$ be given its usual (Euclidean)
topology. Then the closed bounded interval
$[a,b]$ is compact.
\end{varthm}
\begin{proof} Suppose that ${\mathcal C}$
is an open cover of $[a,b]$ (i.e. the elements of ${\mathcal C}$
are open sets and $\bigcup_{U\in{\mathcal C}}U\supseteq[a,b]$).
If ${\mathcal C}_{1}$
is a finite subcover of $[a,c]$
and ${\mathcal C}_{2}$
is a finite subcover of $[c,b]$,
then ${\mathcal C}_{1}\cup{\mathcal C}_{2}$
is a finite subcover of $[a,b]$.
Suppose now that $[a,b]$ has no finite subcover using ${\mathcal C}$.
Set $a_{0}=a$, $b_{0}=b$, and $c_{0}=(a_{0}+b_{0})/2$.
By the first paragraph, at least one of $[a_{0},c_{0}]$
and $[c_{0},b_{0}]$ has no finite subcover using ${\mathcal C}$.
If $[a_{0},c_{0}]$ has no finite subcover, set $a_{1}=a_{0}$,
$b_{1}=c_{0}$. Otherwise, set $a_{1}=c_{0}$,
$b_{1}=b_{0}$. In either case, we know that
(i) $a=a_{0}\leq a_{1}\leq b_{1}\leq b_{0}=b$,
(ii) If ${\mathcal F}$ is a finite subset of ${\mathcal C}$,
then $\bigcup_{U\in{\mathcal F}}U\not\supseteq [a_{1},b_{1}]$,
(iii) $b_{1}-a_{1}=(b-a)/2$.
Proceeding inductively, we obtain
(i)$_{n}$ $a\leq a_{n-1}\leq a_{n}\leq b_{n}\leq b_{n-1}\leq b$.
(ii)$_{n}$ If ${\mathcal F}$ is a finite subset of ${\mathcal C}$,
then $\bigcup_{U\in{\mathcal F}}U\not\supseteq [a_{n},b_{n}]$.
(iii)$_{n}$ $b_{n}-a_{n}=2^{-n}(b-a)$.
The $a_{n}$ form an increasing sequence bounded above by $b$, so,
by the fundamental axiom of analysis, $a_{n}\rightarrow A$
for some $A \leq b$. Similarly $b_{n}\rightarrow B$ for some
$B\geq a$. Since $b_{n}-a_{n}\rightarrow 0$, $A=B=x$, say,
for some $x\in [a,b]$. Since $x\in [a,b]$ and
$\bigcup_{U\in{\mathcal C}}U\supseteq[a,b]$
we can find a $V\in {\mathcal C}$
with $x\in V$. Since $V$ is open in the Euclidean metric,
we can find a $\delta>0$
such that $(x-\delta,x+\delta)\subseteq V$. Since $a_{n},\,b_{n}\rightarrow x$
we can find an $N$ such that $|x-a_{N}|,\,|x-b_{N}|<\delta$ and so
\[[a_{N},b_{N}]\subseteq (x-\delta,x+\delta)\subseteq V\]
contradicting (ii)$_{N}$. (Just take ${\mathcal F}=\{V\}$.)
The theorem follows by reductio ad absurdum.
[Return to page~\pageref{T;Heine--Borel}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;closed subset compact}]
\label{P;closed subset compact}
A closed subset of a compact set is compact.
$[$More precisely, if $E$ is compact and $F$ closed
in a given topology, then, if $F\subseteq E$, it follows that
$F$ is compact.$]$
\end{varthm}
\begin{proof} Suppose $(X,\tau)$ is a topological space,
$E$ is a compact set in $X$ and $F$ is a closed subset of $E$.
If $U_{\alpha}\in\tau$ $[\alpha\in A]$ and
$\bigcup_{\alpha\in A}U_{\alpha}\supseteq F$, then
$X\setminus F\in\tau$ and
\[(X\setminus F)\cup\bigcup_{\alpha\in A}U_{\alpha}=X\supseteq E.\]
By compactness, we can find $\alpha(j)\in A$
$[1\leq j\leq n]$ such that
\[(X\setminus F)\cup\bigcup_{j=1}^{n}U_{\alpha(j)}\supseteq E.\]
Since $(X\setminus F)\cap F=\emptyset$ and $E\supseteq F$,
it follows that
\[\bigcup_{j=1}^{n}U_{\alpha(j)}\supseteq F\]
and we are done.
[Return to page~\pageref{T;closed subset compact}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;compact closed}]%
\label{P;compact closed}
If $(X,\tau)$ is Hausdorff, then every compact set is closed.
\end{varthm}
\begin{proof} Let $K$ be a compact set. If $x\notin K$,
then, given any $k\in K$, we know that $k\neq x$ and so,
since $X$ is Hausdorff, we can find open sets $U_{k}$
and $V_{k}$ such that
\[x\in V_{k},\ k\in U_{k}\ \text{and}\ V_{k}\cap U_{k}=\emptyset.\]
Since $\bigcup_{k\in K}U_{k}\supseteq\bigcup_{k\in K}\{k\}=K$,
we have an open cover of $K$. By compactness, we can find
$k(1),\,k(2),\,\ldots,\,k(n)\in K$ such that
\[\bigcup_{j=1}^{n}U_{k(j)}\supseteq K.\]
We observe that the finite intersection $V=\bigcap_{j=1}^{n}V_{k(j)}$
is an open neighbourhood of $x$ and that
\[V\cap K\subseteq V\cap\bigcup_{j=1}^{n}U_{k(j)}=\emptyset,\]
so $V\cap K=\emptyset$ and we have shown that every $x\in X\setminus K$ has an
open neighbourhood lying entirely within $X\setminus K$.
Thus $X\setminus K$ is open and $K$ is closed.
[Return to page~\pageref{T;compact closed}.]
\end{proof}
\begin{varthm}[Example~\ref{E;compact not closed}]%
\label{P;compact not closed}
Give an example of a topological space
and a compact set which is not closed.
\end{varthm}
\begin{proof} If $(X,\tau)$ has the indiscrete topology,
then, if $Y\subseteq X$, $Y\neq X,\,\emptyset$, we have $Y$
compact but not closed. We can take $X=\{a,b\}$ with $a\neq b$
and $Y=\{a\}$.
[Return to page~\pageref{E;compact not closed}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;closed bounded}]%
\label{P;closed bounded}
Consider $({\mathbb R},\tau)$ with the standard
(Euclidean) topology. A set $E$ is compact if and
only if it is closed and bounded
(that is to say, there exists a
$M$ such that $|x|\leq M$ for all $x\in E$).
\end{varthm}
\begin{proof} If $E$ is bounded, then $E\subseteq [-M,M]$
for some $M$. By the theorem of Heine--Borel, $[-M,M]$
is compact so, if $E$ is closed, $E$ is compact.
Since $({\mathbb R},\tau)$ is Hausdorff, any compact set must be closed.
Finally suppose that $E$ is compact. We have
\[E\subseteq \bigcup_{j=1}^{\infty}(-j,j).\]
By compactness,
we can find $j(r)$ such that $E \subseteq\bigcup_{r=1}^{N}(-j(r),j(r))$
Taking $M=\max_{1\leq r\leq n}j(r)$ we have $E\subseteq(-M,M)$ so
$E$ is bounded.
[Return to page~\pageref{T;closed bounded}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;compact image}]%
\label{P;compact image}
Let $(X,\tau)$ and $(Y,\sigma)$
be topological spaces and $f:X\rightarrow Y$ a continuous
function. If $K$ is a compact subset of $X$,
then $f(K)$ is a compact subset of $Y$.
\end{varthm}
\begin{proof} Suppose that $U_{\alpha}\in\sigma$
for all $\alpha\in A$
and $\bigcup_{\alpha\in A}U_{\alpha}\supseteq f(K)$.
Then
\[\bigcup_{\alpha\in A}f^{-1}(U_{\alpha})
=f^{-1}\left(\bigcup_{\alpha\in A}U_{\alpha}\right)\supseteq K\]
and, since $f$ is continuous $f^{-1}(U_{\alpha})\in\tau$
for all $\alpha\in A$. By compactness, we can find
$\alpha(j)\in A$ $[1\leq j\leq n]$ such that
\[\bigcup_{j=1}^{n}f^{-1}(U_{\alpha(j)})\supseteq K\]
and so
\[\bigcup_{j=1}^{n}U_{\alpha(j)}\supseteq
f\left(\bigcup_{j=1}^{n}f^{-1}(U_{\alpha(j)})\right)
\supseteq f(K)\]
and we are done.
[Return to page~\pageref{T;compact image}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;attains bounds}]%
\label{P;attains bounds}
Let ${\mathbb R}$ have the usual metric.
If $K$ is a
closed and bounded subset of ${\mathbb R}$
and $f:K\rightarrow{\mathbb R}$ is continuous,
then $f$ is bounded and attains its bounds.
\end{varthm}
\begin{proof} If $K$ is empty there is nothing to prove,
so we assume $K\neq\emptyset$.
Since $K$ is compact and $f$ is continuous,
$f(K)$ is compact. Thus $f(K)$ is a non-empty closed
bounded set. Since $f(K)$ is non-empty and bounded,
it has a supremum $\alpha$, say. Since $f(K)$ is closed,
it contains its supremum.
[Observe that we can find $k_{n}\in K$ such that
\[\alpha-1/n\leq f(k_{n})\leq \alpha\]
and so $f(k_{n})\rightarrow\alpha$. Since $f(K)$
is closed, $\alpha\in f(K)$.]
[Return to page~\pageref{T;attains bounds}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;converse attains bounds}]%
\label{P;converse attains bounds}
Let ${\mathbb R}$ have the usual metric.
(i) If $K$ is a subset of ${\mathbb R}$ with the property
that, whenever $f:K\rightarrow{\mathbb R}$ is continuous,
$f$ is bounded, show that
that $K$ is closed and bounded.
(ii) If $K$ is a subset of ${\mathbb R}$ with the property
that, whenever $f:K\rightarrow{\mathbb R}$ is continuous
and bounded, then $f$ attains its bounds then
$K$ is closed and bounded.
\end{varthm}
\begin{proof} (i) If $K=\emptyset$ there is nothing to prove,
so we assume $K\neq\emptyset$.
Let $f:K\rightarrow {\mathbb R}$ be defined by
$f(k)=|k|$. Since $f$ is bounded, $K$ must be.
If $x\notin K$, then the function $f:K\rightarrow {\mathbb R}$
given by $f(k)=|k-x|^{-1}$ is continuous and so bounded.
Thus we can find an $M>0$ such that $|f(k)| M^{-1}$ for all $k\in K$
and the open ball $B(x,M^{-1})$ lies entirely in the complement
of $K$. Thus $K$ is closed.
(ii) If $K$ is unbounded, then, setting $f(x)=\tan^{-1} x$, we see that
$f$ is bounded on $K$, but does not attain its bounds.
If $K$ is not closed, then we can find $a\in \Cl(K)$
with $a\notin K$. If we set
\[f(x)=\tan^{-1}\frac{1}{a-x}\]
then $f$ is bounded on $K$ but does not attain its bounds.
[Return to page~\pageref{E;converse attains bounds}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;bijection compact}]%
\label{P;bijection compact}
Let $(X,\tau)$ be a compact and $(Y,\sigma)$
a Hausdorff topological space. If $f:X\rightarrow Y$
is a continuous bijection, then it is a homeomorphism.
\end{varthm}
\begin{proof} Since $f$ is a bijection, $g=f^{-1}$ is a well
defined function. If $K$ is closed in $X$, then (since a closed
subset of a compact space is compact) $K$ is compact
so $f(K)$ is compact. But a compact subset of a Hausdorff
space is closed so $g^{-1}(K)=f(K)$ is closed. Thus
$g$ is continuous and we are done. (If $U$ is open in $X$
then $X\setminus U$ is closed so $Y\setminus g^{-1}(U)=g^{-1}(X\setminus U)$
is closed and $g^{-1}(U)$ is open.)
[Return to page~\pageref{T;bijection compact}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;compare topologies}]%
\label{P;compare topologies}
Let $\tau_{1}$ and $\tau_{2}$ be topologies
on the same space $X$.
(i) If $\tau_{1}\supseteq \tau_{2}$ and $\tau_{1}$ is compact,
then so is $\tau_{2}$.
(ii) If $\tau_{1}\supseteq \tau_{2}$ and $\tau_{2}$ is Hausdorff,
then so is $\tau_{1}$.
(iii) If $\tau_{1}\supseteq \tau_{2}$, $\tau_{1}$ is compact
and $\tau_{2}$ is Hausdorff, then $\tau_{1}=\tau_{2}$.
\end{varthm}
\begin{proof} (i) The map $\iota:(X,{\tau}_{1})\rightarrow(X,{\tau}_{2})$
is continuous and so takes compact sets to compact sets. In particular,
since $X$ is compact, in $\tau_{1}$, $X=\iota X$ is compact in $\tau_{2}$.
(ii) If $x\neq y$ we can find $x\in U\in\tau_{2}$ and $y\in V\in\tau_{2}$
with $U\cap V=\emptyset$. Automatically
$x\in U\in\tau_{1}$ and $y\in V\in\tau_{1}$ so we are done.
(iii) The map $\iota:(X,{\tau}_{1})\rightarrow(X,{\tau}_{2})$
is a continuous bijection and so a homeomorphism.
[Return to page~\pageref{T;compare topologies}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;too hot}]%
\label{P;too hot}
(i) Give an example of a Hausdorff space $(X,\tau)$ and
a compact Hausdorff space $(Y,\sigma)$
together with a continuous bijection $f:X\rightarrow Y$
which is not a homeomorphism.
(ii) Give an example of a compact Hausdorff space $(X,\tau)$ and
a compact space $(Y,\sigma)$
together with a continuous bijection $f:X\rightarrow Y$
which is not a homeomorphism.
\end{varthm}
\begin{proof}[Solution] Let $\tau_{1}$ be the
indiscrete topology on $[0,1]$,
$\tau_{2}$ the usual (Euclidean) topology on $[0,1]$
and $\tau_{3}$ the discrete topology on $[0,1]$.
Then $([0,1],\tau_{1})$ is compact (but not Hausdorff),
$([0,1],\tau_{2})$ is compact and Hausdorff,
and $([0,1],\tau_{3})$ is Hausdorff (but not compact).
The identity maps $\iota:([0,1],\tau_{2})\rightarrow([0,1],\tau_{1})$
and $\iota:([0,1],\tau_{3})\rightarrow([0,1],\tau_{3})$ are continuous
bijections but not homeomorphisms.
[Return to page~\pageref{E;too hot}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;product compact}]%
\label{P;product compact}
The product of two compact spaces is compact.
(More formally, if $(X,\tau)$ and $(Y,\sigma)$ are compact
topological spaces and $\lambda$ is the product topology,
then $(X\times Y,\lambda)$ is compact.)
\end{varthm}
\begin{proof} Let $O_{\alpha}\in\lambda$ $[\alpha\in A]$ and
\[\bigcup_{\alpha\in A}O_{\alpha}=X\times Y.\]
Then, given $(x,y)\in X\times Y$, we can find
$U_{x,y}\in\tau$, $V_{x,y}\in\sigma$ and $\alpha(x,y)\in A$ such
that
\[(x,y)\in U_{x,y}\times V_{x,y}\subseteq O_{\alpha(x,y)}.\]
In particular, we have
\[\bigcup_{y\in Y}\{x\}\times V_{x,y}=\{(x,y)\,:\,y\in Y\}\]
for each $x\in X$ and so
\[\bigcup_{y\in Y}V_{x,y}=Y.\]
By compactness, we can find a positive
integer $n(x)$ and $y(x,j)\in Y$ $[1\leq j\leq n(x)]$
such that
\[\bigcup_{j=1}^{n(x)}V_{x,y(x,j)}=Y.\]
Now $U_{x}=\bigcap_{j=1}^{n(x)}U_{x,y(x,j)}$ is the finite intersection
of open sets in $X$ and so open. Further $x\in U_{x}$ and so
\[\bigcup_{x\in X}U_{x}=X.\]
By compactness, we can find $x_{1},\,x_{2},\,\ldots,\,x_{m}$ such that
\[\bigcup_{r=1}^{m}U_{x_{r}}=X.\]
It follows that
\begin{align*}
\bigcup_{r=1}^{m}\bigcup_{j=1}^{n(x_{r})}O_{x_{r},y(x_{r},j)}
&\supseteq \bigcup_{r=1}^{m}
\bigcup_{j=1}^{n(x_{r})}U_{x_{r},y(x_{r},j)}\times V_{x_{r},y(x_{r},j)}\\
&\supseteq \bigcup_{r=1}^{m}\bigcup_{j=1}^{n(x_{r})}
U_{x_{r}}\times V_{x_{r},y(x_{r},j)}\\
&\supseteq \bigcup_{r=1}^{m}U_{x_{r}}\times Y\\
&\supseteq X\times Y
\end{align*}
and we are done.
[Return to page~\pageref{T;product compact}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;circle as quotient}]%
\label{P;circle as quotient}
Consider the complex plane with its usual metric.
Let
\[{\partial}D=\{z\in{\mathbb C}\,:\,|z|=1\}\]
and give ${\partial}D$ the subspace topology $\tau$.
Give ${\mathbb R}$ its usual topology and define
an equivalence relation $\sim$ by $x\sim y$ if $x-y\in{\mathbb Z}$.
We write ${\mathbb R}/\negthinspace\sim={\mathbb T}$ and give ${\mathbb T}$
the quotient topology. The object of this exercise
is to show that ${\partial}D$ and ${\mathbb T}$ are homeomorphic.
(i) Verify that $\sim$ is indeed an equivalence relation.
(ii) Show that, if we define
$f:{\mathbb R}\rightarrow {\partial}D$
by $f(x)=\exp(2\pi ix)$, then $f(U)$ is
open whenever $U$ is open.
(iii) If $q:{\mathbb R}\rightarrow {\mathbb T}$ is the quotient map
$q(x)=[x]$ show that $q(x)=q(y)$ if and only if $f(x)=f(y)$.
Deduce that $q\big(f^{-1}(\{\exp(2\pi ix)\})\big)=[x]$
and that the equation $F(\exp(2\pi ix))=[x]$ gives a well
defined bijection $F:{\partial}D\rightarrow{\mathbb T}$.
(iv) Show that $F^{-1}(V)=f\big(q^{-1}(V)\big)$ and deduce
that $F$ is continuous.
(v) Show that ${\mathbb T}$ is Hausdorff and explain why
${\partial}D$ is compact. Deduce that $F$ is a homeomorphism.
\end{varthm}
\begin{proof}[Solution]
(i) Observe that $x-x=0\in{\mathbb Z}$, so $x\sim x$.
Observe that $x\sim y$ implies $x-y\in{\mathbb Z}$,
so $y-x=-(x-y)\in{\mathbb Z}$ and $y\sim x$.
Observe that, if $x\sim y$ and $y\sim z$, then $x-y,\,y-z\in{\mathbb Z}$,
so
\[x-z=(x-y)+(y-z)=x-z\in{\mathbb Z}\]
and $x\sim z$.
(ii) If $x\in U$ an open set, then we can find a $1>\delta>0$
such that $|x-y|<\delta$ implies $y\in U$.
By simple geometry, any $z\in{\mathbb C}$ with $|z|=1$ and
$|\exp(2\pi ix)-z|<\delta/100$
can be written as $z=\exp(2\pi iy)$ with $|y-x|<\delta$.
Thus
\[\partial D\cap\{z\in{\mathbb C}\,:\,|z-\exp(2\pi ix)|<\delta/100\}
\subseteq f(U).\]
We have shown that $f(U)$ is open.
(iii) We have
\begin{align*}
q(x)=q(y)&\Leftrightarrow y\in[x] \Leftrightarrow
x-y\in{\mathbb Z} \Leftrightarrow
\exp(2\pi i(x-y))=1\\
&\Leftrightarrow \exp(2\pi ix)=\exp(2\pi iy)
\Leftrightarrow f(x)=f(y).
\end{align*}
It follows that the equation $F(\exp(2\pi ix))=[x]$ gives a well
defined bijection $F:{\partial}D\rightarrow{\mathbb T}$.
(iv) Observe that
\[F^{-1}([x])=\{\exp(2\pi it)\,:\,\exp(2\pi it)=\exp(2\pi ix)\}
=f\big(q^{-1}([x])\big)\]
and so $F^{-1}(V)=f\big(q^{-1}(V)\big)$. If $V$ is open,
then, since $q$ is continuous, $q^{-1}(V)$ is open so, by (ii),
$F^{-1}(V)$ is open. Thus $F$ is continuous.
(v) If $[x]\neq [y]$, then we know that $x-y\notin{\mathbb Z}$
and the set
\[\{|t|\,:\,t-(x-y)\in{\mathbb Z},\,|t|<1\}\]
is finite and non-empty. Thus there exists a $\delta>0$
such that
\[\{|t|\,:\,t-(x-y)\in{\mathbb Z},\,|t|<\delta\}=\emptyset.\]
Let
\[U_{x}=\bigcup_{j=-\infty}^{\infty}(j+x-\delta/4,j+x+\delta/4)
\ \text{and}
\ U_{y}=\bigcup_{j=-\infty}^{\infty}(j+y-\delta/4,j+y+\delta/4).\]
Observe that $U_{x}$ and $U_{y}$ are open in ${\mathbb R}$
and $q^{-1}\big(q(U_{x}))=U_{x}$, $q^{-1}\big(q(U_{y}))=U_{y}$,
and so $q(U_{x})$ and $q(U_{y})$ are open in the quotient topology.
Since $[x]\in q(U_{x})$, $[y]\in q(U_{y})$
and $q(U_{x})\cap q(U_{y})=\emptyset$,
we have shown that the quotient topology is Hausdorff.
Since ${\partial}D$ is closed and bounded in ${\mathbb C}$
and we can identify ${\mathbb C}$ with ${\mathbb R}^{2}$ as a metric
space, ${\partial}D$ is compact.
Since a continuous bijection from a compact to a Hausdorff space
is a homeomorphism, $F$ is a homeomorphism.
[Remark. It is just as simple to show that the natural
map from ${\mathbb T}$ (which we know to be compact, why?)
to ${\partial}D$ (which we know to be Hausdorff, why?)
is a bijective continuous map. Or we could show continuity
in both directions and not use the result on continuous bijections.]
[Return to page~\pageref{E;circle as quotient}.]
\end{proof}
\begin{varthm}[Example~\ref{E;bounded not convergent}]%
\label{P;bounded not convergent}
Give an example of a metric space
$(X,d)$ which is bounded (in the sense that there exists an $M$
with $d(x,y)\leq M$ for all $x,\,y\in X$) but
for which there exist sequences with no convergent subsequence.
\end{varthm}
\begin{proof}[Solution] Consider the discrete metric on
${\mathbb Z}$. If $x_{n}=n$ and $x\in {\mathbb Z}$,
then $d(x,x_{n})=1$ for all $n$
with at most one exception. Thus the sequence $x_{n}$
can have no convergent subsequence.
[Return to page~\pageref{E;bounded not convergent}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;compact implies sequence}]%
\label{P;compact implies sequence}
If the metric space $(X,d)$ is compact, it is sequentially compact.
\end{varthm}
\begin{proof} Let $x_{n}$ be a sequence in $X$. If
it has no convergent subsequence, then, for each $x\in X$
we can find a $\delta(x)>0$ and an $N(x)$ such that
$x_{n}\notin B(x,\delta(x))$ for all $n\geq N(x)$.
Since
\[X=\bigcup_{x\in X}\{x\}
\subseteq\bigcup_{x\in X}B(x,\delta(x))\subseteq X,\]
the $B(x,\delta(x))$ form an open cover and, by compactness,
have a finite subcover. In other words, we can find
an $M$ and $y_{j}\in X$ $[1\leq j\leq M]$ such that
\[X=\bigcup_{j=1}^{M}B\big(y_{j},\delta(y_{j})\big).\]
Now set $N=\max_{1\leq j\leq M}N(y_{j})$. Since
$N\geq N(y_{j})$, we have
$x_{N}\notin B\big(y_{j},\delta(y_{j})\big)$
for all $1\leq j\leq M$. Thus
$x_{N}\notin\bigcup_{j=1}^{M}B\big(y_{j},\delta(y_{j})\big)
=X$ which is absurd.
The result follows by reductio ad absurdum.
[Return to page~\pageref{T;compact implies sequence}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;compact complete}]%
\label{P;compact complete}
If the metric space $(X,d)$ is compact,
then $d$ is complete.
\end{varthm}
\begin{proof}
Let $(x_{n})$ be a Cauchy sequence. By sequential compactness,
the sequence has a convergent subsequence and so is
convergent.
[Return to page~\pageref{T;compact complete}.]
\end{proof}
\begin{varthm}[Theorem~\ref{L;one out}]%
\label{P;one out}
Let $(X,d)$ be a metric space. If a subsequence
of a Cauchy sequence converges, then the series converges.
\end{varthm}
\begin{proof}
Suppose that $(x_{n})$ is Cauchy,
$n(j)\rightarrow\infty$ and $x_{n(j)}\rightarrow a$.
Given $\epsilon>0$, we can find an $N$ such that
$d(x_{n},x_{m})<\epsilon/2$ for $n,\,m\geq N$
and a $k$ such that $n(k)\geq N$ and
$d(x_{n(k)},a)<\epsilon/2$. Thus, if $n\geq N$,
\[d(x_{n},a)\leq d(x_{n},x_{n(k)})+d(x_{n(k)},a)<\epsilon\]
and we are done.
[Return to page~\pageref{L;one out}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;Lebesgue}]%
\label{P;Lebesgue}
Suppose that $(X,d)$ is a sequentially compact
metric space and that the collection $U_{\alpha}$
with $\alpha\in A$ is an open cover of $X$.
Then there exists a $\delta>0$ such that, given any
$x\in X$, there exists an $\alpha(x)\in A$
such that the open ball $B(x,\delta)\subseteq U_{\alpha(x)}$.
\end{varthm}
\begin{proof} Suppose the first sentence is true and the
second sentence false. Then, for each $n\geq 1$,
we can find an $x_{n}$ such that the open ball
$B(x_{n},1/n)\not\subseteq U_{\alpha}$
for all $\alpha\in A$. By sequential compactness,
we can find $y\in X$ and $n(j)\rightarrow\infty$
such that $x_{n(j)}\rightarrow y$.
Since $y\in X$, we must have $y\in U_{\beta}$
for some $\beta\in A$. Since $U_{\beta}$ is open,
we can find an $\epsilon$ such that
$B(y,\epsilon)\subseteq U_{\beta}$.
Now choose $J$ sufficiently large that $n(J)>2\epsilon^{-1}$
and $d(x_{n(J)},y)<\epsilon/2$. We now have,
using the triangle inequality, that
\[B(x_{n(J)},1/n(J))\subseteq B(x_{n(J)},\epsilon/2)
\subseteq B(y,\epsilon)\subseteq U_{\beta},\]
contradicting the definition of $x_{n(J)}$.
The result follows by reductio ad absurdum.
[Return to page~\pageref{L;Lebesgue}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;sequence implies compact}]%
\label{P;sequence implies compact}
If the metric space $(X,d)$ is sequentially compact,
it is compact.
\end{varthm}
\begin{proof} Let $(U_{\alpha})_{\alpha\in A}$ be an open cover
and let $\delta$ be defined as in Lemma~\ref{L;Lebesgue}.
The $B(x,\delta)$ form a cover of $X$. If they have no finite
subcover, then given $x_{1}$, $x_{2}$, \ldots $x_{n}$
we can find an $x_{n+1}\notin\bigcup_{j=1}^{n}B(x_{j},\delta)$.
Consider the sequence $x_{j}$ thus obtained.
We have $d(x_{n+1},x_{k})>\delta$ whenever $n\geq k\geq 1$
and so $d(x_{r},x_{s})>\delta$ for all $r\neq s$.
It follows that, if $x\in X$, $d(x_{n},x)>\delta/2$
for all $n$ with at most one exception. Thus
the sequence of $x_{n}$ has no convergent subsequence.
It thus follows, by reductio ad absurdum, that the
$B(x,\delta)$ have a finite subcover. In other words,
we can find
an $M$ and $y_{j}\in X$ $[1\leq j\leq M]$ such that
\[X=\bigcup_{j=1}^{M}B(y_{j},\delta).\]
We thus have
\[X=\bigcup_{j=1}^{M}B(y_{j},\delta)
\subseteq \bigcup_{j=1}^{M}U_{\alpha(y_{j})}\subseteq X\]
so $X=\bigcup_{j=1}^{M}U_{\alpha(y_{j})}$ and we have
found a finite subcover.
Thus $X$ is compact.
[Return to page~\pageref{T;sequence implies compact}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;locally constant}]%
\label{P;locally constant} If $A$ contains at least two points,
then a topological space $(X,\tau)$ is connected if and only if
every locally constant function $f:X\rightarrow A$
is constant.
\end{varthm}
\begin{proof} Suppose first that $(X,\tau)$ is connected
and $f:(X,\tau)\rightarrow(A,\Delta)$ is continuous
(where $\Delta$ is the discrete topology).
Choose $t\in X$. Since
every subset of $A$ is open in the discrete
topology $\{f(t)\}$ and $A\setminus\{f(t)\}$
are open so
\[U=\{x\in X\,:\,f(x)=f(t)\}=f^{-1}(\{f(t)\})\]
and
\[V=\{x\in X\,:\,f(x)\neq f(t)\}=f^{-1}(A\setminus\{f(t)\})\]
are open. Since $U\cap V=\emptyset$, $U\cup V=X$, $U$ is non-empty
and $X$ is connected, we have $V=\emptyset$ and $f$ constant.
Conversely, if $(X,\tau)$ is not connected, we can find
$U,\,V\in\tau$ such that $U\cap V=\emptyset$, $U\cup V=X$,
$U,\,V\neq\emptyset$. Choosing $a,\,b\in A$ with $a\neq b$ and setting
$f(x)=a$ for $x\in U$, $f(x)=b$ for $x\in V$ we obtain
a locally constant non-constant $f$.
[Return to page~\pageref{T;locally constant}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;quotient connected}]%
\label{P;quotient connected}
Prove the following results.
(i) If $(X,\tau)$ and $(Y,\sigma)$ are topological spaces,
$E$ is a connected subset of $X$ and $g:E\rightarrow Y$
is continuous, then $g(E)$ is connected.
(More briefly, the continuous image of a connected
set is connected.)
(ii) If $(X,\tau)$ is a connected topological space
and $\sim$ is an equivalence relation on $X$, then $X/\negthinspace\sim$
with the quotient topology is connected.
(iii) If $(X,\tau)$ and $(Y,\sigma)$ are
connected topological spaces, then $X\times Y$
with the product topology is connected.
(iv) If $(X,\tau)$ is a
connected topological space and $E$ is a subset of $X$,
it does not follow that $E$ with the subspace topology is connected.
\end{varthm}
\begin{proof} (i) If $g(E)$ is not connected we can find a non-constant
continuous
$f:g(E)\rightarrow{\mathbb R}$ taking only the values $0$ and $1$.
Setting $F=f\circ g$ (the composition of $f$ and $g$),
we know that $F:E\rightarrow{\mathbb R}$ is non-constant,
continuous and only takes the values $0$ and $1$.
Thus $E$ is not connected.
(ii) $X/\negthinspace\sim$ is the continuous image of $X$ under the
quotient map which we know to be continuous.
(iii) Suppose $X\times Y$ with the product topology
is not connected. Then we can find
a non-constant continuous function
$f:X\times Y\rightarrow{\mathbb R}$ taking only the values $0$ and $1$.
Take $(x,y),\,(u,v)\in X\times Y$ with $f(x,y)\neq f(u,v)$.
Then, if $f(x,v)=f(x,y)$, it follows that $f(x,v)\neq f(u,v)$.
Without loss of generality, suppose that $f(x,v)\neq f(x,y)$.
Then we know that the function $\theta:Y\rightarrow X\times Y$
given by $\theta(z)=(x,z)$ is continuous.
(Use Exercise~\ref{E;product cut} or argue directly
as follows.
If $\Omega$ is open in $X\times Y$ and $z\in\theta^{-1}(\Omega)$,
then $(x,z)\in\Omega$, so we can find $U$ open in $X$
and $V$ open in $Y$ such that
$(x,z)\in U\times V\subseteq \Omega$. Thus
$z\in V\subseteq \theta^{-1}(\Omega)$
and we have shown $\theta^{-1}(\Omega)$ open.)
If we set $F=f\circ\theta$, then
$F:Y\rightarrow{\mathbb R}$ is non-constant,
continuous and only takes the values $0$ and $1$.
Thus $Y$ is not connected.
(iv) ${\mathbb R}$ is connected with the usual topology,
but $E=(-2,-1)\cup(1,2)$ is not.
[Return to page~\pageref{E;quotient connected}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;closure connected}]%
\label{P;closure connected}
Let $E$ be a subset of a topological space
$(X,\tau)$. If $E$ is connected so is $\Cl E$.
\end{varthm}
\begin{proof}
Suppose that $U$ and $V$ are open sets with
\[\Cl E\subseteq U\cap V
\ \text{and}\ \Cl E\cap U\cap V=\emptyset.\]
Then (since $\Cl E\supseteq E$) we have
$E\subseteq U\cap V$ and $E\cap U\cap V=\emptyset$.
Since $E$ is connected we know that either $E\cap U=\emptyset$
or $E\cap V=\emptyset$.
Without loss of generality, suppose $E\cap V=\emptyset$.
Then $V\subseteq E^{c}$ so
\[V\subseteq \Int E^{c}=(Cl E)^{c}\]
and $\Cl E\cap V=\emptyset$.
Thus $\Cl E$ is connected.
[Return to page~\pageref{L;closure connected}].
\end{proof}
\begin{varthm}[Lemma~\ref{L;connected components}]
\label{P;connected components}
We work in a topological space $(X,\tau)$.
(i) Let $x_{0}\in X$. If $x_{0}\in E_{\alpha}$
and $E_{\alpha}$ is connected for all $\alpha\in A$,
then $\bigcup_{\alpha\in A}E_{\alpha}$ is connected.
(ii) Write $x\sim y$ if there exists a connected set $E$
with $x,\,y\in E$. Then $\sim$ is an equivalence relation.
(iii) The equivalence classes $[x]$ are connected.
(iv) If $F$ is connected and $F\supseteq [x]$, then $F=[x]$.
\end{varthm}
\begin{proof} (i) Let $U$ and $V$ be open sets such that
\[U\cup V\supseteq \bigcup_{\alpha\in A}E_{\alpha}
\ \text{and}
\ U\cap V\cap \bigcup_{\alpha\in A}E_{\alpha}=\emptyset.\]
Without loss of generality, let $x_{0}\in U$.
Then
\[U\cup V\supseteq E_{\alpha}
\ \text{and}
\ U\cap V\cap E_{\alpha}=\emptyset\]
for each $\alpha\in A$. But
$x_{0}\in U\cap E_{\alpha}$ so
$U\cap E_{\alpha}\neq\emptyset$, and so, by the
connectedness of $E_{\alpha}$, we have
\[U\supseteq E_{\alpha}\]
for all $\alpha\in A$. Thus
$U\supseteq \bigcup_{\alpha\in A}E_{\alpha}$.
We have shown that $\bigcup_{\alpha\in A}E_{\alpha}$ is connected.
(ii) Observe that if $U$ and $V$ are sets (open or not) such that
\[U\cup V\supseteq \{x\},
\ \text{and}
\ U\cap V\cap \{x\}=\emptyset.\]
then either $x\notin U$ and $U\cap\{x\}=\emptyset$
or $x\in U$ so $U\supseteq\{x\}$. Thus the one point set
$\{x\}$ is connected and $x\sim x$.
The symmetry of the definition tells us that,
if $x\sim y$, then $y\sim x$.
If $x\sim y$ and $y\sim z$, then $x,\,y\in E$ and $y,\,z\in F$
for some connected sets $E$ and $F$. By part~(i),
$E\cup F$ is connected (observe that $y\in E,\,F$)
so, since $x,\,z\in E\cup F$, $x\sim z$.
We have shown that $\sim$ is an equivalence relation.
(iii) If $y\in [x]$, then there exists a connected set $E_{y}$
with $x,\,y\in E_{y}$. By definition $[x]\supseteq E_{y}$ so
\[[x]=\bigcup_{y\in[x]}\{y\}\subseteq \bigcup_{y\in[x]}E_{y}\subseteq [x]\]
whence
\[[x]=\bigcup_{y\in[x]}E_{y}\]
and, by part~(i), $[x]$ is connected.
(iv) If $F$ is connected and $[x]\subseteq F$, then $x\in F$
and, by definition of $\sim$, $[x]\supseteq F$.
It follows that $F=[x]$.
[Return to page~\pageref{L;connected components}.]
\end{proof}
\begin{varthm}[Lemma~\ref{L;path-connected equivalence}]%
\label{P;path-connected equivalence}
If $(X,\tau)$ is a topological space and
we write $x\sim y$ if $x$ is path-connected
to $y$, then $\sim$ is an equivalence relation.
\end{varthm}
\begin{proof}
If $x\in X$, then the map $\gamma:[0,1]\rightarrow X$ defined by
$\gamma(t)=x$ for all $t$ is continuous.
(Observe that, if $F$ is a closed set in X, then
$\gamma^{-1}(F)$ takes the value $\emptyset$
or $[0,1]$ both of which are closed.) Thus $x\sim x$.
If $x\sim y$, then we can find a continuous map
$\gamma:[0,1]\rightarrow X$ with $\gamma(0)=x$
and $\gamma(1)=y$. The map $T:[0,1]\rightarrow [0,1]$
given by $T(t)=1-t$ is continuous so the composition
$\tilde{\gamma}=\gamma\circ T$ is. Observe
that $\tilde{\gamma}(0)=y$ and $\tilde{\gamma}(1)=x$
so $y\sim x$.
If $x\sim y$ and $y\sim z$, then we can find continuous maps
$\gamma_{j}:[0,1]\rightarrow X$ with $\gamma_{1}(0)=x$,
$\gamma_{1}(1)=y$, $\gamma_{2}(0)=y$ and $\gamma_{2}(1)=z$.
Define $\gamma:[0,1]\rightarrow X$ by
\[
\gamma(t)=
\begin{cases}
\gamma_{1}(2t)&\text{if $t\in[0,1/2]$}\\
\gamma_{2}(2t-1)&\text{if $t\in(1/2,1]$}.
\end{cases}
\]
If $U$ is open in $X$, then
\[\gamma^{-1}(U)=\{t/2\,:\,t\in\gamma_{1}^{-1}(U)\}
\cup\{(1+t)/2\,:\,t\in\gamma_{2}^{-1}(U)\}\]
is open.
(If more detail is required we argue as follows.
Suppose $s\in\gamma^{-1}(U)$. If $s\in(0,1/2)$,
then $2s\in \gamma_{1}^{-1}(U)$ so, since $\gamma_{1}^{-1}(U)$
is open we can find a $\delta>0$ with $s>\delta$
such that $(2s-\delta,2s+\delta)\subseteq \gamma_{1}^{-1}(U)$.
Thus $(s-\delta/2,s+\delta/2)\subseteq \gamma^{-1}(U)$.
If $s=0$ then $0\in\gamma_{1}^{-1}(U)$ so, since $\gamma_{1}^{-1}(U)$
is open we can find a $\delta>0$ with $1>\delta$ such that
$[0,\delta)\subseteq \gamma_{1}^{-1}(U)$. Thus
$[s,\delta/2)=[0,\delta/2)\subseteq \gamma^{-1}(U)$.
The cases $s\in(1/2,1]$ are dealt with similarly.
This leaves the case $s=1/2$. Arguing as before, we can find
$\delta_{1},\delta_{2}>0$ with $1>\delta_{1},\delta_{2}$
such that
\[(1-\delta_{1},1]\subseteq \gamma_{1}^{-1}(U)
\ \text{and}
\ [0,\delta_{2})\subseteq \gamma_{2}^{-1}(U).\]
Setting $\delta=\min(\delta_{1},\delta_{2})$ we have
\[(1/2-\delta/2,1/2+\delta/2)
\subseteq\gamma^{-1}(U).\]
We see that the case $s=1/2$ is really the only one which requires
care.)
Thus $\gamma$ is continuous
and, since $\gamma(0)=x$, $\gamma(1)=z$, $x\sim z$.
[Return to page~\pageref{L;path-connected equivalence}.]
\end{proof}
\begin{varthm}[Theorem~\ref{T;path-connected to connected}]
\label{P;path-connected to connected}
If a topological space is path-connected, then it
is connected.
\end{varthm}
\begin{proof}
Suppose that $(X,\tau)$ is path-connected and
that $U$ and $V$ are
open sets with $U\cap V=\emptyset$ and $U\cup V=X$.
If $U\neq \emptyset$, choose $x\in U$.
If $y\in X$, we
can find $f:[0,1]\rightarrow X$ continuous with
$f(0)=x$ and $f(1)=y$. Now the continuous image of a connected set
is connected and $[0,1]$ is connected, so $f([0,1])$ is connected.
Since
\[U\cap V\cap f([0,1])=\emptyset,
\ U\cup V\supseteq f([0,1])
\ \text{and}\ U\cap f([0,1])\neq\emptyset,\]
we know that $U\supseteq f([0,1])$ so $y\in U$. Thus $U=X$.
We have shown that $X$ is connected.
[Return to page~\pageref{T;path-connected to connected}.]
\end{proof}
\begin{varthm}[Exercise~\ref{E;bounded connected}]%
\label{P;bounded connected}
Show that the non-empty bounded connected subsets
of ${\mathbb R}$ (with the usual topology)
are the intervals. (By intervals we mean
sets of the form $[a,b]$, $[a,b)$, $(a,b]$ and $(a,b)$
with $a\leq b$.
Note that $[a,a]=\{a\}$, $(a,a)=\emptyset$.)
Describe, without proof, all the connected subsets of ${\mathbb R}$.
\end{varthm}
\begin{proof}[Solution] Since
$[a,b]$, $[a,b)$, $(a,b]$ and $(a,b)$ are path connected,
they are connected.
Suppose, conversely, that $E$ is bounded and contains at least two points.
Since $E$ is bounded $\alpha=\inf E$ and $\beta=\sup E$ exist.
Further $\alpha<\beta$. If $c\in(\alpha,\beta)\setminus E$
we can find $x,y\in E$ such that $\alpha0$ lying entirely within
$\Omega$. If ${\mathbf y}\in B({\mathbf u},\delta)$,
then ${\mathbf u}$ is path-connected to ${\mathbf y}$ in
$B({\mathbf u},\delta)$ and so in $U$.
(Consider $\gamma:[0,1]\rightarrow\Omega$ given by
$\gamma(t)=t{\mathbf u}+(1-t){\mathbf y}$.)
Since ${\mathbf x}$ is path-connected to ${\mathbf u}$
and
${\mathbf u}$ is path-connected to ${\mathbf y}$,
it follows that
${\mathbf x}$ is path-connected to ${\mathbf y}$
in $\Omega$ so ${\mathbf y}\in U$.
Now suppose that ${\mathbf v}\in V$. Since $\Omega$
is open, we can find an open ball $B({\mathbf v},\delta)$
centre ${\mathbf v}$, radius $\delta>0$ lying entirely within
$\Omega$. If ${\mathbf y}\in B({\mathbf v},\delta)$,
then ${\mathbf v}$ is path-connected to ${\mathbf y}$ in
$B({\mathbf v},\delta)$ and so in $V$. It follows that,
if ${\mathbf y}$ is path-connected to ${\mathbf x}$,
then so is ${\mathbf v}$. But ${\mathbf v}\in V$,
so ${\mathbf y}$ is not path-connected to ${\mathbf x}$.
Thus ${\mathbf y}\in V$.
Since $U\cup V=\Omega$ and $U\cap V=\emptyset$, the connectedness
of $\Omega$ shows that $U=\Omega$ and $\Omega$ is path-connected.
[Return to page~\pageref{T;connected to path}.]
\end{proof}
\begin{varthm}[Example~\ref{E;connected not path-connected}]%
\label{P;connected not path-connected}
We work in ${\mathbb R}^{2}$ with the usual topology.
Let
\[E_{1}=\{(0,y)\,:\,|y|\leq 1\}
\ \text{and}
\ E_{2}=\{(x,\sin 1/x)\,:\,00$ (since $x_{r}\geq 0$ for all $r$). We can find an $N$
such that $|x-x_{r}|x/2$ for all $r\geq N$.
Thus, by continuity,
\[(x_{r},y_{r})=(x_{r},\sin 1/x_{r})\rightarrow (x,\sin 1/x)
\in E_{2}\subseteq E.\]
Thus $E$ is closed.
Now suppose, if possible, that $E$ is disconnected.
Then we can find $U$ and $V$ open such that
\[U\cap E\neq\emptyset,\ V\cap E\neq\emptyset,\ U\cup V\supseteq E
\ \text{and $U\cap V\cap E=\emptyset$}.\]
Then
\[U\cup V\supseteq E_{j}
\ \text{and $U\cap V\cap E_{j}=\emptyset$}.\]
and so, since $E_{j}$ is path-connected, so connected,
we have $U\cap E_{j}=\emptyset$ or $V\cap E_{j}=\emptyset$
$[j=1,2]$. Without loss of generality, assume $V\cap E_{1}=\emptyset$
so $U\supseteq E_{1}$. Since $(0,0)\in E_{1}$, we have
$(0,0)\in U$. Since $U$ is open, we can find a $\delta>0$
such that $(x,y)\in U$ whenever $\|(x,y)\|_{2}<\delta$.
If $n$ is large,
\[((n\pi)^{-1},0)\in U\cap E_{2}=U\cap V\cap E,\]
contradicting our initial assumptions.
By reductio ad absurdum, $E$ is connected.
(iii) Write ${\mathbf x}(t)=(x(t),y(t))$. Since ${\mathbf x}$
is continuous, so is $x$. Since $x(0)=1$ and $x(1)=0$,
the intermediate value theorem tells us that we can find
$t_{1}$ with $0**