#### Exercise 5.1

Solution:

(a) Closed. As it has no limit points, $\mathbb Z$ is closed. Clearly, it is not open. $\mathbb Z$ is not compact since $\mathbb Z$ is not bounded (Heine-Borel Theorem).

(b) Closed and compact. It is closed as zero is only limit point. It is also bounded and hence compact by Heine-Borel Theorem.

(c) Open and Closed. Not compact because $\R$ is not bounded.

(d) None of them. $0$ is a limit point but not in it. Hence it is not closed. $3$ is a limit point of its complement but not in the complement. Hence its complement is not closed. Therefore it is not open. Because it is not closed so it is not compact.

(e) None of them.

(f) Closed and compact (because it is bounded).

#### Exercise 5.2

Solution:

(a) Let $\cup_{\alpha} U_\alpha$ be an arbitrary open cover of $A\cup B$. Then $\cup_{\alpha} U_\alpha$ is an open cover of $A$. Since $A$ is compact, we have a finite open cover $\cup_{\alpha\in F_1}U_\alpha$ of $A$, where $F_1$ is a finite set.

Similarly, because $\cup_{\alpha} U_\alpha$ is an open cover of $B$ and $B$ is compact, we have a finite open cover $\cup_{\alpha\in F_2}U_\alpha$ of $A$, where $F_2$ is a finite set.

Let $F=F_1\cup F_2$, then $F$ is finite and \[\cup_{\alpha\in F_1}U_\alpha \cup \cup_{\alpha\in F_2} U_\alpha=\cup_{\alpha\in F} U_\alpha.\]Hence $$A\cup B\subset \cup_{\alpha\in F_1}U_\alpha \cup \cup_{\alpha\in F_2} U_\alpha=\cup_{\alpha\in F} U_\alpha. $$Therefore $\cup_{\alpha\in F} U_\alpha$ is a finite open cover of $A\cup B$. Since $\cup_{\alpha} U_\alpha$ is arbitrary, we conclude that $A\cup B$ is compact.

(b) See Exercise 5.10.

#### Exercise 5.3

Solution:

(a) Let $U_{n}=(1-\frac{1}{n},1+\frac{1}{n})$, then $\cap_{n=1}^\infty U_n=\{1\}$ is not open.

(b) Let $U_n=[\frac{1}{n},1-\frac{1}{n}]$, then $\cup_{n=1}^\infty U_n=(0,1)$ is not closed.

#### Exercise 5.4

Solution:

(a) If $U_i$ is closed, then $U_i^c$ is open. By Proposition 5.3, $\cap_{i=1}^n U_i^c$ is also open. Hence $(\cap_{i=1}^n U_i^c)^c$ is closed. By De Morgan’s law (Fact 5.11), we have\[(\cap_{i=1}^n U_i^c)^c=\cup_{i=1}^n (U_i^c)^c=\cup_{i=1}^n U_i.\]Hence $\cup_{i=1}^n U_i$ is closed.

(b) If $U_\alpha$ is closed, then $U_{\alpha}^c$ is open. By Proposition 5.3, $\cup_{\alpha}U_\alpha^c$ is also open. Hence $(\cup_{\alpha}U_\alpha^c)^c$ is closed. By De Morgan’s law (Fact 5.11), we have\[(\cup_{\alpha}U_\alpha^c)^c=\cap_\alpha (U_\alpha^c)^c=\cap_\alpha U_\alpha.\]Hence $\cap_\alpha U_\alpha$ is closed.

#### Exercise 5.5

Solution: Suppose $x$ is a limit of $A$. Then there exists a sequence $(a_n)$ converging to $x$ such that $a_n\in A\setminus \{x\}$ for all $n$. For any $\e > 0$, since $(a_n)\to x$, we can find an $n$ such that $|a_n-x| < \e$. Since $a_n\in A\setminus \{x\}$ for $n$, we conclude that $a_n$ is a point in the intersection of $A$ and $\e$-neighborhood of $x$ intersecting other than $x$.

Conversely, suppose for any $\e >0$, there is a point in the intersection of $A$ and $\e$-neighborhood of $x$ other than $x$. For each $n\in \mathbb N$, there exists a point $a_n$ in the intersection of $A$ and $\frac{1}{n}$-neighborhood of $x$ other than $x$. Hence $|a_n-x|<\frac{1}{n}$ and $a_n\in A\setminus \{x\}$. It is clear that the sequence $(a_n)$ converges to $x$ and $a_n\in A\setminus \{x\}$ for all $n$. Thus $x$ is a limit point of $A$.

#### Exercise 5.6

Solution: Let\[U_k=\left(\frac{1}{k},4-\frac{1}{k}\right),\]then we have \[U_1\subset U_2\subset U_3 \subset \cdots.\]Taking any finitely many sets $U_{n_1},\cdots, U_{n_m}$. Let $\ell=\max\{n_1,\dots,n_m\}$. Then $n_i \leqslant \ell$ for all $1\leqslant i \leqslant m$. Then $U_{n_i}\subset U_{\ell}$. Hence\[\cup_{i=1}^m U_{n_i}\subset U_{\ell}.\]Note that $U_\ell$ is a proper subset of $(0,4)$. Therefore $U_{n_1},\cdots, U_{n_m}$ do not cover $(0,4)$.

It says that for this special open cover there are no finite open covers for $(0,4)$. Hence $(0,4)$ is not compact.

#### Exercise 5.7

Solution: If $A$ is closed and bounded, then every sequence from $A$ is bounded. Hence by Bolzano-Weierstrass Theorem, it has a convergent subsequence. Let $x$ be the limit of this convergent subsequence. If $x\in A$, then we are done. If $x\not\in A$, then $A=A\setminus\{x\}$. Hence $x$ is a limit point of $A$. But $A$ is closed, we must have $x\in A$. We get a contradiction. Hence we always have $x\in A$.

If every sequence from $A$ has a subsequence that converges to a point in $A$, we would like to show that $A$ is closed and bounded. Let $x$ be a limit point, then there exists a sequence from $A$ converging to $x$. By assumption, this sequence has a subsequence converging to a point in $A$. But by Proposition 3.32, this subsequence must converge to $x$ as well. Hence $x\in A$. This shows that $A$ contains its limit points. Hence by Theorem 5.10, $A$ is closed.

Now we show that $A$ is bounded. Suppose $A$ is not bounded, e.g. $A$ is not bounded above. Then for any $n\in \mathbb N$, there exists $a_n\in A$ such that $a_n > n$. Hence the sequence $(a_n)$ from $A$ diverges to $\infty$, so do its any subsequences by Exercise 3.23. Hence we get a contradiction. This implies that $A$ must be bounded, completing the proof.

#### Exercise 5.8

Solution: Since $A$ is compact, by Heine-Borel Theorem, $A$ is bounded and closed. Because $U\subset A$, $U$ is bounded as well. Since $U$ is also closed, we conclude that $U$ is both closed and bounded. It follows from Heine-Borel Theorem that $U$ is compact.

This statement also holds for general topological space. A closed subspace of a compact space is compact.

Proof: Let $T$ be a compact space. Let $C$ be a closed subspace of $T$. Let $\mathcal U$ be an open cover of $C$. Since $C$ is closed, it follows by definition of closed that $T \setminus C$ is open in $T$. So if we add $T \setminus C$ to $\mathcal U$, we see that $\mathcal U \cup \left\{{T \setminus C}\right\}$ is also an open cover of $T$. As $T$ is compact, there is a finite subcover of $\mathcal U \cup \left\{{T \setminus C}\right\}$, say $\mathcal V = \left\{{U_1, U_2, \ldots, U_r}\right\}$. This covers $C$ by the fact that it covers $T$. If $T \setminus C$ is an element of $\mathcal V$, then it can be removed from $\mathcal V$ and the rest of $\mathcal V$ still covers $C$. Thus we have a finite subcover of $\mathcal U$ which covers $C$, and hence $C$ is compact.

#### Exercise 5.9

Solution: Let $A=[0,1]$, then it is clear that $A$ is closed, see Example 5.7. Since $A$ is also bounded, by Heine-Borel Theorem, $A$ is compact. Let $B=(0,1)$, then $B$ is bounded. Note that $B$ is not closed. This is because $0$ is a limit point of $U$ as $\lim_{n\to\infty}\frac{1}{n}=0$. We have $A\cap B=B$ which is not closed. Hence by Heine-Borel Theorem $B$ is not compact. This shows that $A\cap B$ is not compact.

#### Exercise 5.10

Solution: Since $U_{\alpha}$ is compact for each $\alpha$, by Heine-Borel Theorem, each $U_\alpha$ is closed and bounded. Recall from Exercise 5.4 (b), the intersection $\cap_{\alpha} U_\alpha$ is closed as well. Note that $\cap_{\alpha} U_\alpha$ is a subset of $U_{\alpha_0}$ for some $\alpha_0$. As $U_{\alpha_0}$ is bounded, so is $\cap_{\alpha} U_\alpha$. Therefore $\cap_{\alpha} U_\alpha$ is both closed and bounded, by Heine-Borel Theorem, $\cap_{\alpha} U_\alpha$ is compact.

#### Exercise 5.11

Solution: Suppose $X \subset \mathbb{R}$ is nonempty, open and closed. Let $x_0 \in X$. Finally suppose that $X \neq \mathbb{R}$; then there is some $y \not\in X$; WLOG we can assume that $y > x_0$.

Then the set $Z = \{ x \in \mathbb{R} : x > x_0, x \not\in X \}$ is bounded below (by $x_0$) and nonempty ($y \in Z$). Therefore $\inf Z = z$ exists.

- Suppose $z \in X$. Then since $X$ is open, it contains an open neighborhood $(z – \epsilon, z + \epsilon)$. Recall the definition of $z = \inf Z$, then there would be a sequence $z_n > z$, $|z – z_n| < \frac{1}{n}$, $z_n \in Z \Rightarrow z_n \not \in X$. This is not possible, because $[z, z + \epsilon) \subset X$.
- Suppose $z \not \in X$. Then since $X$ is closed, its complement is open, therefore there is an open neighborhood $(z – \epsilon, z + \epsilon)$ contained in $\mathbb{R} \setminus X$. We claim that $z-\frac{\e}{2} > x_0$ otherwise $z-\frac{\e}{2}\leqslant x_0< z$ which contradicts that $(z – \epsilon, z + \epsilon)$ is contained in $\mathbb{R} \setminus X$. Therefore $z-\frac{\e}{2} > x_0$ and this contradicts the $\inf$ definition of $z$.

It follows that $X = \mathbb{R}$.

#### Exercise 5.12

Solution: Let $U=(0,1]$. We show that $U$ is neither open nor closed.

$U$ is not closed. This is because $0$ is a limit point of $U$ as $\lim_{n\to\infty}\frac{1}{n}=0$, but $0\not\in U$. It follows from Theorem 5.10 that $U$ is not closed.

$U$ is not open. Consider $U^c=(-\infty,0]\cup (1,\infty]$. Since $\lim_{n\to\infty}(1+\frac{1}{n})=1$, we conclude that $1$ is a limit point of $U^c$. But $1\not\in U^c$, it follows from Theorem 5.10 that $U^c$ is not closed. Hence $U$ is not open by definition 5.6.