## Section7.4Completeness and compactness

Note: 2 lectures

### Subsection7.4.1Cauchy sequences and completeness

Just like with sequences of real numbers, we define Cauchy sequences.

#### Definition7.4.1.

Let $$(X,d)$$ be a metric space. A sequence $$\{ x_n \}$$ in $$X$$ is a Cauchy sequence if for every $$\epsilon > 0\text{,}$$ there exists an $$M \in \N$$ such that for all $$n \geq M$$ and all $$k \geq M\text{,}$$ we have

\begin{equation*} d(x_n, x_k) < \epsilon . \end{equation*}

The definition is again simply a translation of the concept from the real numbers to metric spaces. A sequence of real numbers is Cauchy in the sense of Chapter 2 if and only if it is Cauchy in the sense above, provided we equip the real numbers with the standard metric $$d(x,y) = \abs{x-y}\text{.}$$

#### Proof.

Suppose $$\{ x_n \}$$ converges to $$x\text{.}$$ Given $$\epsilon > 0\text{,}$$ there is an $$M$$ such that for all $$n \geq M\text{,}$$ we have $$d(x,x_n) < \nicefrac{\epsilon}{2}\text{.}$$ Hence for all $$n,k \geq M\text{,}$$ we have $$d(x_n,x_k) \leq d(x_n,x) + d(x,x_k) < \nicefrac{\epsilon}{2} + \nicefrac{\epsilon}{2} = \epsilon\text{.}$$

#### Definition7.4.3.

Let $$(X,d)$$ be a metric space. We say $$X$$ is complete or Cauchy-complete if every Cauchy sequence $$\{ x_n \}$$ in $$X$$ converges to an $$x \in X\text{.}$$

For $$\R = \R^1\text{,}$$ completeness was proved in Chapter 2. The proof of completeness in $$\R^n$$ is a reduction to the one-dimensional case.

#### Proof.

Let $$\{ x_j \}_{j=1}^\infty$$ be a Cauchy sequence in $$\R^n\text{,}$$ where we write $$x_j = \bigl(x_{j,1},x_{j,2},\ldots,x_{j,n}\bigr) \in \R^n\text{.}$$ As the sequence is Cauchy, given $$\epsilon > 0\text{,}$$ there exists an $$M$$ such that for all $$i,j \geq M\text{,}$$

\begin{equation*} d(x_i,x_j) < \epsilon. \end{equation*}

Fix some $$k=1,2,\ldots,n\text{.}$$ For $$i,j \geq M\text{,}$$

\begin{equation*} \bigl\lvert x_{i,k} - x_{j,k} \bigr\rvert = \sqrt{{\bigl(x_{i,k} - x_{j,k}\bigr)}^2} \leq \sqrt{\sum_{\ell=1}^n {\bigl(x_{i,\ell}-x_{j,\ell}\bigr)}^2} = d(x_i,x_j) < \epsilon . \end{equation*}

Hence the sequence $$\{ x_{j,k} \}_{j=1}^\infty$$ is Cauchy. As $$\R$$ is complete the sequence converges; there exists a $$y_k \in \R$$ such that $$y_k = \lim_{j\to\infty} x_{j,k}\text{.}$$ Write $$y = (y_1,y_2,\ldots,y_n) \in \R^n\text{.}$$ By Proposition 7.3.9, $$\{ x_j \}$$ converges to $$y \in \R^n\text{,}$$ and hence $$\R^n$$ is complete.

A subset of $$\R^n$$ with the subspace metric need not be complete. For example, $$(0,1]$$ with the subspace metric is not complete as $$\{ \nicefrac{1}{n} \}$$ is a Cauchy sequence in $$(0,1]$$ with no limit in $$(0,1]\text{.}$$

In the language of metric spaces, the results on continuity of section Section 6.2, say that the metric space $$C([a,b],\R)$$ of Example 7.1.8 is complete. The proof follows by “unrolling the definitions,” and is left as Exercise 7.4.7.

As we saw above, a subspace of a complete metric space need not be complete. However, a closed subspace of a complete metric space is complete. After all, one way to think of a closed set is that it contains all points reachable from the set via a sequence. The proof is Exercise 7.4.16.

### Subsection7.4.2Compactness

#### Definition7.4.7.

Let $$(X,d)$$ be a metric space and $$K \subset X\text{.}$$ The set $$K$$ is said to be compact if for every collection of open sets $$\{ U_{\lambda} \}_{\lambda \in I}$$ such that

\begin{equation*} K \subset \bigcup_{\lambda \in I} U_\lambda , \end{equation*}

there exists a finite subset $$\{ \lambda_1, \lambda_2,\ldots,\lambda_k \} \subset I$$ such that

\begin{equation*} K \subset \bigcup_{j=1}^k U_{\lambda_j} . \end{equation*}

A collection of open sets $$\{ U_{\lambda} \}_{\lambda \in I}$$ as above is said to be an open cover of $$K\text{.}$$ A way to say that $$K$$ is compact is to say that every open cover of $$K$$ has a finite subcover.

#### Example7.4.8.

Let $$\R$$ be the metric space with the standard metric.

The set $$\R$$ is not compact. Proof: Take the sets $$U_j := (-j,j)\text{.}$$ Any $$x \in \R$$ is in some $$U_j$$ (by the Archimedean property), so we have an open cover. Suppose we have a finite subcover $$\R \subset U_{j_1} \cup U_{j_2} \cup \cdots \cup U_{j_k}\text{,}$$ and suppose $$j_1 < j_2 < \cdots < j_k\text{.}$$ Then $$\R \subset U_{j_k}\text{,}$$ but that is a contradiction as $$j_k \in \R$$ on one hand and $$j_k \notin U_{j_k} = (-j_k,j_k)$$ on the other.

The set $$(0,1) \subset \R$$ is also not compact. Proof: Take the sets $$U_{j} := (\nicefrac{1}{j},1-\nicefrac{1}{j})$$ for $$j=3,4,5,\ldots\text{.}$$ As above $$(0,1) = \bigcup_{j=3}^\infty U_j\text{.}$$ And similarly as above, if there exists a finite subcover, then there is one $$U_j$$ such that $$(0,1) \subset U_j\text{,}$$ which again leads to a contradiction.

The set $$\{ 0 \} \subset \R$$ is compact. Proof: Given an open cover $$\{ U_{\lambda} \}_{\lambda \in I}\text{,}$$ there must exist a $$\lambda_0$$ such that $$0 \in U_{\lambda_0}$$ as it is a cover. But then $$U_{\lambda_0}$$ gives a finite subcover.

We will prove below that $$[0,1]\text{,}$$ and in fact every closed and bounded interval $$[a,b]\text{,}$$ is compact.

#### Proof.

First, we prove that a compact set is bounded. Fix $$p \in X\text{.}$$ We have the open cover

\begin{equation*} K \subset \bigcup_{n=1}^\infty B(p,n) = X . \end{equation*}

If $$K$$ is compact, then there exists some set of indices $$n_1 < n_2 < \ldots < n_k$$ such that

\begin{equation*} K \subset \bigcup_{j=1}^k B(p,n_j) = B(p,n_k) . \end{equation*}

As $$K$$ is contained in a ball, $$K$$ is bounded. See the left-hand side of Figure 7.10.

Next, we show a set that is not closed is not compact. Suppose $$\widebar{K} \not= K\text{,}$$ that is, there is a point $$x \in \widebar{K} \setminus K\text{.}$$ If $$y \not= x\text{,}$$ then $$y \notin C(x,\nicefrac{1}{n})$$ for $$n \in \N$$ such that $$\nicefrac{1}{n} < d(x,y)\text{.}$$ Furthermore, $$x \notin K\text{,}$$ so

\begin{equation*} K \subset \bigcup_{n=1}^\infty {C(x,\nicefrac{1}{n})}^c . \end{equation*}

A closed ball is closed, so its complement $${C(x,\nicefrac{1}{n})}^c$$ is open, and we have an open cover. If we take any finite collection of indices $$n_1 < n_2 < \ldots < n_k\text{,}$$ then

\begin{equation*} \bigcup_{j=1}^k {C(x,\nicefrac{1}{n_j})}^c = {C(x,\nicefrac{1}{n_k})}^c \end{equation*}

As $$x$$ is in the closure of $$K\text{,}$$ then $$C(x,\nicefrac{1}{n_k}) \cap K \not= \emptyset\text{.}$$ So there is no finite subcover and $$K$$ is not compact. See the right-hand side of Figure 7.10.

We prove below that in a finite-dimensional euclidean space, every closed bounded set is compact. So closed bounded sets of $$\R^n$$ are examples of compact sets. It is not true that in every metric space, closed and bounded is equivalent to compact. A simple example is an incomplete metric space such as $$(0,1)$$ with the subspace metric from $$\R\text{.}$$ There are many complete and very useful metric spaces where closed and bounded is not enough to give compactness: $$C([a,b],\R)$$ is a complete metric space, but the closed unit ball $$C(0,1)$$ is not compact, see Exercise 7.4.8. However, see also Exercise 7.4.12.

A useful property of compact sets in a metric space is that every sequence in the set has a convergent subsequence converging to a point in the set. Such sets are called sequentially compact. Let us prove that in the context of metric spaces, a set is compact if and only if it is sequentially compact. First we prove a lemma.

#### Proof.

We prove the lemma by contrapositive. If the conclusion is not true, then there is an open cover $$\{ U_\lambda \}_{\lambda \in I}$$ of $$K$$ with the following property. For every $$n \in \N\text{,}$$ there exists an $$x_n \in K$$ such that $$B(x_n,\nicefrac{1}{n})$$ is not a subset of any $$U_\lambda\text{.}$$ Take any $$x \in K\text{.}$$ There is a $$\lambda \in I$$ such that $$x \in U_\lambda\text{.}$$ As $$U_\lambda$$ is open, there is an $$\epsilon > 0$$ such that $$B(x,\epsilon) \subset U_\lambda\text{.}$$ Take $$M$$ such that $$\nicefrac{1}{M} < \nicefrac{\epsilon}{2}\text{.}$$ If $$y \in B(x,\nicefrac{\epsilon}{2})$$ and $$n \geq M\text{,}$$ then

\begin{equation*} B(y,\nicefrac{1}{n}) \subset B(y,\nicefrac{1}{M}) \subset B(y,\nicefrac{\epsilon}{2}) \subset B(x,\epsilon) \subset U_\lambda , \end{equation*}

where $$B(y,\nicefrac{\epsilon}{2}) \subset B(x,\epsilon)$$ follows by triangle inequality. See Figure 7.11. Thus $$y \not= x_n\text{.}$$ In other words, for all $$n \geq M\text{,}$$ $$x_n \notin B(x,\nicefrac{\epsilon}{2})\text{.}$$ The sequence cannot have a subsequence converging to $$x\text{.}$$ As $$x \in K$$ was arbitrary we are done.

It is important to recognize what the lemma says. It says that if $$K$$ is sequentially compact, then given any cover there is a single $$\delta > 0\text{.}$$ The $$\delta$$ depends on the cover, but, of course, it does not depend on $$x\text{.}$$

For example, let $$K := [-10,10]$$ and for $$n \in \Z$$ let $$U_n := (n,n+2)$$ define sets in an open cover. Take $$x \in K\text{.}$$ There is an $$n \in \Z\text{,}$$ such that $$n \leq x < n+1\text{.}$$ If $$n \leq x < n+\nicefrac{1}{2}\text{,}$$ then $$B\bigl(x,\nicefrac{1}{2}\bigr) \subset U_{n-1}\text{.}$$ If $$n+ \nicefrac{1}{2} \leq x < n+1\text{,}$$ then $$B\bigl(x,\nicefrac{1}{2}\bigr) \subset U_{n}\text{.}$$ So $$\delta = \nicefrac{1}{2}\text{.}$$ If instead we let $$U'_n := \bigl(\frac{n}{2},\frac{n+2}{2} \bigr)\text{,}$$ then we again obtain an open cover, but now the best $$\delta$$ we can find is $$\nicefrac{1}{4}\text{.}$$

On the other hand, $$\N \subset \R$$ is not sequentially compact. It is an exercise to find a cover for which no $$\delta > 0$$ works.

#### Proof.

Claim: Let $$K \subset X$$ be a subset of $$X$$ and $$\{ x_n \}$$ a sequence in $$K\text{.}$$ Suppose that for each $$x \in K\text{,}$$ there is a ball $$B(x,\alpha_x)$$ for some $$\alpha_x > 0$$ such that $$x_n \in B(x,\alpha_x)$$ for only finitely many $$n \in \N\text{.}$$ Then $$K$$ is not compact.

Proof of the claim: Notice

\begin{equation*} K \subset \bigcup_{x \in K} B(x,\alpha_x) . \end{equation*}

Any finite collection of these balls contains at most finitely many elements of $$\{ x_n \}\text{,}$$ and so there must be an $$x_n \in K$$ not in their union. Therefore, $$K$$ is not compact and the claim is proved.

So suppose that $$K$$ is compact and $$\{ x_n \}$$ is a sequence in $$K\text{.}$$ Then there exists an $$x \in K$$ such that for all $$\delta > 0\text{,}$$ $$B(x,\delta)$$ contains $$x_k$$ for infinitely many $$k \in \N\text{.}$$ We define the subsequence inductively. The ball $$B(x,1)$$ contains some $$x_k\text{,}$$ so let $$n_1 := k\text{.}$$ Suppose $$n_{j-1}$$ is defined. There must exist a $$k > n_{j-1}$$ such that $$x_k \in B(x,\nicefrac{1}{j})\text{.}$$ Define $$n_j := k\text{.}$$ We now posses a subsequence $$\{ x_{n_j} \}_{j=1}^\infty\text{.}$$ Since $$d(x,x_{n_j}) < \nicefrac{1}{j}\text{,}$$ Proposition 7.3.5 says $$\lim\, x_{n_j} = x\text{.}$$

For the other direction, suppose every sequence in $$K$$ has a subsequence converging in $$K\text{.}$$ Take an open cover $$\{ U_\lambda \}_{\lambda \in I}$$ of $$K\text{.}$$ Using the Lebesgue covering lemma above, find a $$\delta > 0$$ such that for every $$x \in K\text{,}$$ there is a $$\lambda \in I$$ with $$B(x,\delta) \subset U_\lambda\text{.}$$

Pick $$x_1 \in K$$ and find $$\lambda_1 \in I$$ such that $$B(x_1,\delta) \subset U_{\lambda_1}\text{.}$$ If $$K \subset U_{\lambda_1}\text{,}$$ we stop as we have found a finite subcover. Otherwise, there must be a point $$x_2 \in K \setminus U_{\lambda_1}\text{.}$$ Note that $$d(x_2,x_1) \geq \delta\text{.}$$ There must exist some $$\lambda_2 \in I$$ such that $$B(x_2,\delta) \subset U_{\lambda_2}\text{.}$$ We work inductively. Suppose $$\lambda_{n-1}$$ is defined. Either $$U_{\lambda_1} \cup U_{\lambda_2} \cup \cdots \cup U_{\lambda_{n-1}}$$ is a finite cover of $$K\text{,}$$ in which case we stop, or there must be a point $$x_n \in K \setminus \bigl( U_{\lambda_1} \cup U_{\lambda_2} \cup \cdots \cup U_{\lambda_{n-1}}\bigr)\text{.}$$ Note that $$d(x_n,x_j) \geq \delta$$ for all $$j = 1,2,\ldots,n-1\text{.}$$ Next, there must be some $$\lambda_n \in I$$ such that $$B(x_n,\delta) \subset U_{\lambda_n}\text{.}$$ See Figure 7.12.

Either at some point we obtain a finite subcover of $$K\text{,}$$ or we obtain an infinite sequence $$\{ x_n \}$$ as above. For contradiction, suppose that there is no finite subcover and we have the sequence $$\{ x_n \}\text{.}$$ For all $$n$$ and $$k\text{,}$$ $$n \not= k\text{,}$$ we have $$d(x_n,x_k) \geq \delta\text{,}$$ so no subsequence of $$\{ x_n \}$$ can be Cauchy. Hence, no subsequence of $$\{ x_n \}$$ can be convergent, which is a contradiction.

#### Example7.4.12.

The Bolzano–Weierstrass theorem for sequences of real numbers (Theorem 2.3.8) says that every bounded sequence in $$\R$$ has a convergent subsequence. Therefore, every sequence in a closed interval $$[a,b] \subset \R$$ has a convergent subsequence. The limit is also in $$[a,b]$$ as limits preserve non-strict inequalities. Hence a closed bounded interval $$[a,b] \subset \R$$ is (sequentially) compact.

Because $$K$$ is closed, $$E$$ is closed in $$K$$ if and only if it is closed in $$X\text{.}$$ See Proposition 7.2.12.

#### Proof.

Let $$\{ x_n \}$$ be a sequence in $$E\text{.}$$ It is also a sequence in $$K\text{.}$$ Therefore, it has a convergent subsequence $$\{ x_{n_j} \}$$ that converges to some $$x \in K\text{.}$$ As $$E$$ is closed the limit of a sequence in $$E$$ is also in $$E$$ and so $$x \in E\text{.}$$ Thus $$E$$ must be compact.

So subsets of $$\R^n$$ are compact if and only if they are closed and bounded, a condition that is much easier to check. Let us reiterate that the Heine–Borel theorem only holds for $$\R^n$$ and not for metric spaces in general. In general, compact implies closed and bounded, but not vice versa.

#### Proof.

For $$\R = \R^1$$ if $$K \subset \R$$ is closed and bounded, then every sequence $$\{ x_k \}$$ in $$K$$ is bounded, so it has a convergent subsequence by Bolzano–Weierstrass theorem (Theorem 2.3.8). As $$K$$ is closed, the limit of the subsequence must be an element of $$K\text{.}$$ So $$K$$ is compact.

Let us carry out the proof for $$n=2$$ and leave arbitrary $$n$$ as an exercise. As $$K \subset \R^2$$ is bounded, there exists a set $$B=[a,b]\times[c,d] \subset \R^2$$ such that $$K \subset B\text{.}$$ We will show that $$B$$ is compact. Then $$K\text{,}$$ being a closed subset of a compact $$B\text{,}$$ is also compact.

Let $$\bigl\{ (x_k,y_k) \bigr\}_{k=1}^\infty$$ be a sequence in $$B\text{.}$$ That is, $$a \leq x_k \leq b$$ and $$c \leq y_k \leq d$$ for all $$k\text{.}$$ A bounded sequence of real numbers has a convergent subsequence so there is a subsequence $$\{ x_{k_j} \}_{j=1}^\infty$$ that is convergent. The subsequence $$\{ y_{k_j} \}_{j=1}^\infty$$ is also a bounded sequence so there exists a subsequence $$\{ y_{k_{j_i}} \}_{i=1}^\infty$$ that is convergent. A subsequence of a convergent sequence is still convergent, so $$\{ x_{k_{j_i}} \}_{i=1}^\infty$$ is convergent. Let

\begin{equation*} x := \lim_{i\to\infty} x_{k_{j_i}} \qquad \text{and} \qquad y := \lim_{i\to\infty} y_{k_{j_i}} . \end{equation*}

By Proposition 7.3.9, $$\bigl\{ (x_{k_{j_i}},y_{k_{j_i}}) \bigr\}_{i=1}^\infty$$ converges to $$(x,y)\text{.}$$ Furthermore, as $$a \leq x_k \leq b$$ and $$c \leq y_k \leq d$$ for all $$k\text{,}$$ we know that $$(x,y) \in B\text{.}$$

#### Example7.4.15.

The discrete metric provides interesting counterexamples again. Let $$(X,d)$$ be a metric space with the discrete metric, that is, $$d(x,y) = 1$$ if $$x \not= y\text{.}$$ Suppose $$X$$ is an infinite set. Then

1. $$(X,d)$$ is a complete metric space.

2. Any subset $$K \subset X$$ is closed and bounded.

3. A subset $$K \subset X$$ is compact if and only if it is a finite set.

4. The conclusion of the Lebesgue covering lemma is always satisfied with e.g. $$\delta = \nicefrac{1}{2}\text{,}$$ even for noncompact $$K \subset X\text{.}$$

The proofs of the statements above are either trivial or are relegated to the exercises below.

#### Remark7.4.16.

A subtle issue with Cauchy sequences, completeness, compactness, and convergence is that compactness and convergence only depend on the topology, that is, on which sets are the open sets. On the other hand, Cauchy sequences and completeness depend on the actual metric. See Exercise 7.4.19.

### Subsection7.4.3Exercises

#### Exercise7.4.1.

Let $$(X,d)$$ be a metric space and $$A$$ a finite subset of $$X\text{.}$$ Show that $$A$$ is compact.

#### Exercise7.4.2.

Let $$A := \{ \nicefrac{1}{n} : n \in \N \} \subset \R\text{.}$$

1. Show that $$A$$ is not compact directly using the definition.

2. Show that $$A \cup \{ 0 \}$$ is compact directly using the definition.

#### Exercise7.4.3.

Let $$(X,d)$$ be a metric space with the discrete metric.

1. Prove that $$X$$ is complete.

2. Prove that $$X$$ is compact if and only if $$X$$ is a finite set.

#### Exercise7.4.4.

1. Show that the union of finitely many compact sets is a compact set.

2. Find an example where the union of infinitely many compact sets is not compact.

#### Exercise7.4.5.

Prove Theorem 7.4.14 for arbitrary dimension. Hint: The trick is to use the correct notation.

#### Exercise7.4.6.

Show that a compact set $$K$$ (in any metric space) is itself a complete metric space (using the subspace metric).

#### Exercise7.4.7.

Let $$C([a,b],\R)$$ be the metric space as in Example 7.1.8. Show that $$C([a,b],\R)$$ is a complete metric space.

#### Exercise7.4.8.

(Challenging)   Let $$C([0,1],\R)$$ be the metric space of Example 7.1.8. Let $$0$$ denote the zero function. Then show that the closed ball $$C(0,1)$$ is not compact (even though it is closed and bounded). Hints: Construct a sequence of distinct continuous functions $$\{ f_n \}$$ such that $$d(f_n,0) = 1$$ and $$d(f_n,f_k) = 1$$ for all $$n \not= k\text{.}$$ Show that the set $$\{ f_n : n \in \N \} \subset C(0,1)$$ is closed but not compact. See Chapter 6 for inspiration.

#### Exercise7.4.9.

(Challenging)   Show that there exists a metric on $$\R$$ that makes $$\R$$ into a compact set.

#### Exercise7.4.10.

Suppose $$(X,d)$$ is complete and suppose we have a countably infinite collection of nonempty compact sets $$E_1 \supset E_2 \supset E_3 \supset \cdots\text{.}$$ Prove $$\bigcap_{j=1}^\infty E_j \not= \emptyset\text{.}$$

#### Exercise7.4.11.

(Challenging)   Let $$C([0,1],\R)$$ be the metric space of Example 7.1.8. Let $$K$$ be the set of $$f \in C([0,1],\R)$$ such that $$f$$ is equal to a quadratic polynomial, i.e. $$f(x) = a+bx+cx^2\text{,}$$ and such that $$\abs{f(x)} \leq 1$$ for all $$x \in [0,1]\text{,}$$ that is $$f \in C(0,1)\text{.}$$ Show that $$K$$ is compact.

#### Exercise7.4.12.

(Challenging)   Let $$(X,d)$$ be a complete metric space. Show that $$K \subset X$$ is compact if and only if $$K$$ is closed and such that for every $$\epsilon > 0$$ there exists a finite set of points $$x_1,x_2,\ldots,x_n$$ with $$K \subset \bigcup_{j=1}^n B(x_j,\epsilon)\text{.}$$ Note: Such a set $$K$$ is said to be totally bounded, so in a complete metric space a set is compact if and only if it is closed and totally bounded.

#### Exercise7.4.13.

Take $$\N \subset \R$$ using the standard metric. Find an open cover of $$\N$$ such that the conclusion of the Lebesgue covering lemma does not hold.

#### Exercise7.4.14.

Prove the general Bolzano–Weierstrass theorem: Any bounded sequence $$\{ x_k \}$$ in $$\R^n$$ has a convergent subsequence.

#### Exercise7.4.15.

Let $$X$$ be a metric space and $$C \subset \sP(X)$$ the set of nonempty compact subsets of $$X\text{.}$$ Using the Hausdorff metric from Exercise 7.1.8, show that $$(C,d_H)$$ is a metric space. That is, show that if $$L$$ and $$K$$ are nonempty compact subsets, then $$d_H(L,K) = 0$$ if and only if $$L=K\text{.}$$

#### Exercise7.4.16.

Prove Proposition 7.4.6. That is, let $$(X,d)$$ be a complete metric space and $$E \subset X$$ a closed set. Show that $$E$$ with the subspace metric is a complete metric space.

#### Exercise7.4.17.

Let $$(X,d)$$ be an incomplete metric space. Show that there exists a closed and bounded set $$E \subset X$$ that is not compact.

#### Exercise7.4.18.

Let $$(X,d)$$ be a metric space and $$K \subset X\text{.}$$ Prove that $$K$$ is compact as a subset of $$(X,d)$$ if and only if $$K$$ is compact as a subset of itself with the subspace metric.

#### Exercise7.4.19.

Consider two metrics on $$\R\text{.}$$ Let $$d(x,y) := \abs{x-y}$$ be the standard metric, and let $$d'(x,y) := \bigl\lvert \frac{x}{1+\abs{x}} - \frac{y}{1+\abs{y}} \bigr\rvert\text{.}$$

1. Show that $$(\R,d')$$ is a metric space (if you have done Exercise 7.3.10, the computation is the same).

2. Show that the topology is the same, that is, a set is open in $$(\R,d)$$ if and only if it is open in $$(\R,d')\text{.}$$

3. Show that a set is compact in $$(\R,d)$$ if and only if it is compact in $$(\R,d')\text{.}$$

4. Show that a sequence converges in $$(\R,d)$$ if and only if it converges in $$(\R,d')\text{.}$$

5. Find a sequence of real numbers that is Cauchy in $$(\R,d')$$ but not Cauchy in $$(\R,d)\text{.}$$

6. While $$(\R,d)$$ is complete, show that $$(\R,d')$$ is not complete.

#### Exercise7.4.20.

Let $$(X,d)$$ be a complete metric space. We say a set $$S \subset X$$ is relatively compact if the closure $$\widebar{S}$$ is compact. Prove that $$S \subset X$$ is relatively compact if and only if given any sequence $$\{ x_n \}$$ in $$S\text{,}$$ there exists a subsequence $$\{ x_{n_k} \}$$ that converges (in $$X$$).

Named after the French mathematician Henri Léon Lebesgue 2  (1875–1941). The number $$\delta$$ is sometimes called the Lebesgue number of the cover.
https://en.wikipedia.org/wiki/Henri_Lebesgue
Named after the German mathematician Heinrich Eduard Heine 4  (1821–1881), and the French mathematician Félix Édouard Justin Émile Borel 5  (1871–1956).
https://en.wikipedia.org/wiki/Eduard_Heine
https://en.wikipedia.org/wiki/\%C3\%89mile_Borel
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf