\documentclass[11pt,letterpaper]{article}
\usepackage{amsmath,amsfonts}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{-0.5in}
\setlength{\textheight}{8.9in}
\setlength{\parskip}{0.4em}
\parindent0mm
\def\Q{\mathbb{Q}}
\def\R{\mathbb{R}}
\def\Z{\mathbb{Z}}
\def\C{\mathbb{C}}
\begin{document}
\begin{center}
{\bf \Large Math 112 Homework 3 Solutions}\medskip
\end{center}

{\bf Problem 1.}

Let $\{G_\alpha\}$ be an open cover of $K=\{0\}\cup\{\frac{1}{n},\
n=1,2,\dots\}$. Since $0\in K\subset \bigcup_\alpha G_\alpha$, there exists
$\alpha_0$ such that $0\in G_{\alpha_0}$; similarly for every $n\ge 1$ there
exists $\alpha_n$ such that $\frac{1}{n}\in G_{\alpha_n}$. Since 
$G_{\alpha_0}$ is open, there exists $r>0$ such that $N_r(0)=(-r,r)\subset 
G_{\alpha_0}$. Let $m$ be an integer greater than $\frac{1}{r}$: then for 
every $n>m$ we have $0<\frac{1}{n}<r$ and therefore 
$\frac{1}{n}\in (-r,r)\subset G_{\alpha_0}$. We conclude that $K\subset
G_{\alpha_0}\cup (G_{\alpha_1}\cup\dots\cup G_{\alpha_m})$; therefore we
have found a finite subcover, and we conclude that $K$ is compact.
\medskip

{\bf Problem 2.}

We construct sequences of non-empty closed (resp.\ bounded) subsets 
$E_n\subset \R$ such that $E_n\supset E_{n+1}$ and $\bigcap_{n=1}^\infty
E_n=\emptyset$; this gives the desired counterexamples to the Corollary 
(and to the theorem as well). Of course the two counterexamples must be
different (if the sets were closed and bounded then by the Heine-Borel
theorem they would be compact and Theorem 2.36 would apply).

a) Consider $F_n=[n,+\infty)\subset\R$: the sets $F_n$ are closed, and
$F_n\supset F_{n+1}$, but $\bigcap_{n=1}^\infty F_n=\emptyset$.

b) Consider $E_n=(0,\frac{1}{n}]\subset\R$: the sets $E_n$ are bounded,
and $E_n\supset E_{n+1}$, but $\bigcap_{n=1}^\infty E_n=\emptyset$.
\medskip

{\bf Problem 3.} (NOTE to graders: don't remove points if the negative elements
have been forgotten)

Observe that $E=\mathbb{Q}\cap ([-\sqrt{3},-\sqrt{2}]\cup
[\sqrt{2},\sqrt{3}])$. Therefore the complement $E^c$ of $E$ in $\mathbb{Q}$ 
is the intersection of $\mathbb{Q}$ with 
$G=(-\infty,-\sqrt{3})\cup (-\sqrt{2},\sqrt{2})\cup (\sqrt{3},+\infty)$, 
which is an open subset of $\R$. By Theorem 2.30, $\mathbb{Q}\cap G=E^c$
is open relative to $\mathbb{Q}$; therefore $E$ is closed in $\mathbb{Q}$.

$E$ is clearly bounded (all its elements are at distance less than
$\sqrt{3}$ from $0$).

$E$ is not compact: indeed, if $E$ were a compact subset of $\mathbb{Q}$, 
then it would also be compact as a subset of $\R$ (compactness is intrinsic,
Theorem 2.33), and therefore it would be a closed subset of $\R$ (by Theorem
2.34). However $\sqrt{3}$, which is a limit point of $E$ in $\R$, does not
belong to $E$; so $E$ is not closed relative to $\R$, and therefore $E$ is
not compact.

Since $V=(-\sqrt{3},-\sqrt{2})\cup(\sqrt{2},\sqrt{3})$ is an open subset
of $\R$ and $E=\mathbb{Q}\cap V$, it follows from Theorem 2.30 that $E$ is
an open subset of $\mathbb{Q}$.
\medskip

{\bf Problem 4.}

Assume $K_1,\dots,K_n$ are compact subsets of $X$, and let $K=K_1\cup
\dots\cup K_n$. Let $\{G_\alpha\}$ be an open cover of $K$. Observe that
$\{G_\alpha\}$ is also an open cover of $K_i$ for any $i$. So the
compactness of $K_i$ implies the existence of a finite number of indices
$\alpha_{i,1},\dots,\alpha_{i,m_i}$ such that $K_i\subset G_{\alpha_{i,1}}\cup
\dots\cup G_{\alpha_{i,m_i}}$. Let $A=\bigcup_{i=1}^n \{\alpha_{i,1},\dots,
\alpha_{i,m_i}\}$: clearly $A$ is a finite set (it is a union of $n$ finite
sets). By construction, $K\subset \bigcup_{\alpha\in A} G_\alpha$ (because
each $K_i$ is covered by $G_{\alpha_{i,1}},\dots,G_{\alpha_{i,m_i}}$ which
are all contained in $\bigcup_{\alpha\in A} G_\alpha$). Therefore we have
found a finite subcover of $K$; we conclude that $K$ is compact.

The statement no longer holds for countable unions: for example the sets
$K_i=[i-1,i]\subset \R$ are all compact, but $\bigcup_{i=1}^\infty K_i=
[0,+\infty)$ is not bounded and therefore not compact.
(Other example: $K_i=\{\frac{1}{i}\}$, $\bigcup_{i=1}^\infty K_i$ is not
closed and therefore not compact).
\medskip

{\bf Problem 5.}

a) If $\underline{a},\underline{b}\in \ell^\infty$, then for all $n\ge 1$
we have $|a_n-b_n|\le |a_n|+|b_n|\le \sup_{i\ge 1} |a_i|+\sup_{i\ge 1}
|b_i|$ (where the latter are well-defined real numbers by definition of
$\ell^\infty$). So the set $\{|a_n-b_n|,\ n\ge 1\}\subset \R$ is bounded
above (and obviously non-empty), and hence admits a least-upper bound in
$\R$. We now check the three axioms of Definition 2.15.

$(i)$ It is clear that $d(\underline{a},\underline{b})\ge 0$
since $|a_n-b_n|\ge 0$ for all $n$, and that
$d(\underline{a},\underline{a})=\sup |a_i-a_i|=0$. Conversely, if
$d(\underline{a},\underline{b})=\sup |a_i-b_i|=0$ then $|a_i-b_i|=0$ for
all $i\ge 1$, which implies that $a_i=b_i$ for all $i$ and hence
$\underline{a}=\underline{b}$. 

$(ii)$ the property $d(\underline{a},\underline{b})=
d(\underline{b},\underline{a})$ is obviously satisfied.

$(iii)$ let $\underline{a},\underline{b},\underline{c}\in\ell^\infty$.
Then for all $i\ge 1$ we have $|a_i-c_i|\le |a_i-b_i|+|b_i-c_i|\le
d(\underline{a},\underline{b})+d(\underline{b},\underline{c})$. Hence
$d(\underline{a},\underline{b})+d(\underline{b},\underline{c})$ is an upper
bound for $\{|a_i-c_i|,\ i\ge 1\}$, which implies that the least upper bound
satisfies $d(\underline{a},\underline{c})\le 
d(\underline{a},\underline{b})+d(\underline{b},\underline{c})$.

b) $B$ is closed because its complement $B^c=\{\underline{x}\in \ell^\infty,
\ d(\underline{x},\underline{0})>1\}$ is open. Indeed, consider
$\underline{x}\in B^c$, and let $r=d(\underline{x},\underline{0})-1>0$. Then
$N_r(\underline{x})\subset B^c$, since for any $\underline{a}\in
N_r(\underline{x})$ the triangle inequality implies that
$d(\underline{a},\underline{0})\ge
d(\underline{x},\underline{0})-d(\underline{x},\underline{a})>1$.
Thus every point of $B^c$ is an interior point, and
so $B^c$ is open and $B$ is closed. (Alternative answer: for the same
reasons, no point of $B^c$ can be a limit point of $B$, so every limit point
of $B$ must belong to $B$, hence $B$ is closed).

$B$ is bounded, of diameter 2, because $\forall \underline{a},
\underline{b}\in B$, $d(\underline{a},\underline{b})\le d(\underline{a},
\underline{0})+d(\underline{0},\underline{b})\le 1+1=2$.

c) Let $\underline{e}_n$ be the sequence whose terms $e_{n,i}$ are all zero
except for the $n$-th term $e_{n,n}$ which is equal to $1$. Clearly
$\underline{e}_n\in \ell^\infty$, and $d(\underline{e}_n,\underline{0})=
\sup_i |e_{n,i}|=1$, so $\underline{e}_n\in B$. Moreover, if $n\neq m$, then
$d(\underline{e}_n,\underline{e}_m)=\sup\{0,0,\dots,1,0,\dots,0,1,0,\dots\}=1$
(since $|e_{n,i}-e_{m,i}|$ is equal to 1 if $i=m$ or $i=n$, and 0
otherwise).
This sequence cannot have any limit point. Indeed, if $\underline{x}$ is
a limit point, then there must exist $n\ge 1$ such that
$d(\underline{x},\underline{e}_n)<1/2$. Then, by the triangle inequality,
for all $m\neq n$ we have $d(\underline{x},\underline{e}_m)\ge
d(\underline{e}_n,\underline{e}_m)-d(\underline{e}_n,\underline{x})>1/2$,
which contradicts the fact that every neighborhood of $x$ should contain
infinitely many of the $\underline{e}_m$'s.

Hence $B$ is not sequentially compact, and hence not compact.
\medskip

{\bf Problem 6.}

a) If $A$ and $B$ are disjoint closed sets, then $\bar{A}=A$ and
$\bar{B}=B$, so $\bar{A}\cap B=A\cap B=\emptyset$ and $A\cap\bar{B}=
A\cap B=\emptyset$. So $A$ and $B$ are separated.

b) Assume $A$ and $B$ are disjoint open sets. Since $A\cap B=\emptyset$,
we have $A\subset B^c$. Since $B^c$ is a closed set containing $A$, by
Theorem 2.27(c) we have $\bar{A}\subset B^c$, i.e.\ $\bar{A}\cap
B=\emptyset$. Similarly, $A^c$ is closed and $B\subset A^c$, so
$\bar{B}\subset A^c$, and therefore $A\cap\bar{B}=\emptyset$. So $A$ and
$B$ are separated.

c) We first show that $A$ and $B$ are open. We know by Theorem 2.19 that
$A=N_\delta(p)$ is open (or it can be reproved easily). The proof for $B$
is similar: let $q\in B$. Then $d(p,q)=\delta+h$ for some $h>0$. If $r\in X$
is such that $d(q,r)<h$, then by the triangle inequality
$d(p,r)\ge d(p,q)-d(r,q)>\delta$, so $r\in B$. Therefore $N_h(q)\subset B$,
i.e.\ $q$ is an interior point of $B$. Since this holds for every $q\in B$,
we conclude that $B$ is open. Since $A$ and $B$ are disjoint open subsets,
by the result of (b) they are separated.

d) Let $x,y$ be two distinct points in $X$. Fix a real number $r$ with
$0<r<d(x,y)$. Assume that there exists no point $z\in X$ such that
$d(x,z)=r$: then we can write $X=A\cup B$, where $A=\{z\in X,\ d(x,z)<r\}$
and $B=\{z\in X,\ d(x,z)>r\}$. However by part (c) the subsets $A$ and $B$
are separated, so this contradicts the connectedness of $X$ ($A$ and $B$
are non-empty because $x\in A$ and $y\in B$). We conclude
that, $\forall r\in (0,d(x,y))$, $\exists z\in X$ such that $d(x,z)=r$.

Next observe that if $X$ were countable, i.e.\ if $X=\{x_1,x_2,\dots\}$,
then $\{r>0$ s.t.\ $\exists z\in X,\ d(x,z)=r\}=\{d(x,x_1),d(x,x_2),\dots\}$
would be countable as well; however it contains the interval $(0,d(x,y))$
which we know is uncountable. So $X$ is uncountable.

\end{document}