The following practice problems focus on compact sets and are solved mainly by means of the open-cover definition.
Recall that a set \(K\subseteq\mathbb R\) is said to be compact if every open cover of \(K\) admits a finite subcover. In symbols, whenever
\[ K\subseteq \bigcup_{i\in I} U_i, \]
where each \(U_i\) is open, there exist indices \(i_1,\ldots,i_m\in I\) such that
\[ K\subseteq U_{i_1}\cup\cdots\cup U_{i_m}. \]
Exercise 1 — level ★☆☆☆☆
Using the definition, prove that every set consisting of a single point is compact.
Answer
Every singleton \(\{a\}\subseteq\mathbb R\) is compact.
Solution
Let
\[ K=\{a\}. \]
Consider an arbitrary open cover of \(K\), that is, a family of open sets \(\{U_i\}_{i\in I}\) such that
\[ \{a\}\subseteq \bigcup_{i\in I}U_i. \]
Since \(a\in K\), there must exist at least one index \(i_1\in I\) such that
\[ a\in U_{i_1}. \]
Then the single open set \(U_{i_1}\) covers all of \(K\), since \(K\) contains only the point \(a\):
\[ K=\{a\}\subseteq U_{i_1}. \]
We have thus extracted from the original cover a subcover consisting of a single open set. Hence \(\{a\}\) is compact.
Exercise 2 — level ★☆☆☆☆
Using the definition, prove that every finite set of real numbers is compact.
Answer
Every finite set \(K=\{a_1,\ldots,a_n\}\subseteq\mathbb R\) is compact.
Solution
Let
\[ K=\{a_1,\ldots,a_n\}. \]
Consider an arbitrary open cover of \(K\):
\[ K\subseteq \bigcup_{i\in I}U_i. \]
Since \(a_1\in K\), there is an open set \(U_{i_1}\) such that
\[ a_1\in U_{i_1}. \]
Since \(a_2\in K\), there is an open set \(U_{i_2}\) such that
\[ a_2\in U_{i_2}. \]
Proceeding in this way, for each point \(a_j\) we choose an open set \(U_{i_j}\) of the cover such that
\[ a_j\in U_{i_j}. \]
We thus obtain finitely many open sets
\[ U_{i_1},\ldots,U_{i_n} \]
such that
\[ K\subseteq U_{i_1}\cup\cdots\cup U_{i_n}. \]
Every open cover of \(K\) therefore admits a finite subcover. Hence \(K\) is compact.
Exercise 3 — level ★★☆☆☆
Using the definition, prove that the union of two compact sets is compact.
Answer
If \(K_1\) and \(K_2\) are compact, then \(K_1\cup K_2\) is compact.
Solution
Let \(\{U_i\}_{i\in I}\) be an open cover of \(K_1\cup K_2\). Then
\[ K_1\cup K_2\subseteq \bigcup_{i\in I}U_i. \]
Since \(K_1\subseteq K_1\cup K_2\), the same family \(\{U_i\}_{i\in I}\) also covers \(K_1\):
\[ K_1\subseteq \bigcup_{i\in I}U_i. \]
As \(K_1\) is compact, there exist indices \(i_1,\ldots,i_m\in I\) such that
\[ K_1\subseteq U_{i_1}\cup\cdots\cup U_{i_m}. \]
Likewise, since \(K_2\) is compact, there exist indices \(j_1,\ldots,j_n\in I\) such that
\[ K_2\subseteq U_{j_1}\cup\cdots\cup U_{j_n}. \]
Taking the union of these two finite subcovers, we obtain
\[ K_1\cup K_2\subseteq U_{i_1}\cup\cdots\cup U_{i_m}\cup U_{j_1}\cup\cdots\cup U_{j_n}. \]
This is a finite subcover of the original cover. Hence \(K_1\cup K_2\) is compact.
Exercise 4 — level ★★★☆☆
Using open covers, prove that the closed interval \([a,b]\) is compact.
Answer
Every closed and bounded interval \([a,b]\) is compact.
Solution
If \(a=b\), then \([a,b]=\{a\}\), which is compact by Exercise 1. We may therefore assume that \(a\lt b\).
Let \(\{U_i\}_{i\in I}\) be an open cover of \([a,b]\):
\[ [a,b]\subseteq \bigcup_{i\in I}U_i. \]
Consider the set
\[ S=\{x\in[a,b]: [a,x]\text{ admits a finite subcover extracted from }\{U_i\}_{i\in I}\}. \]
The set \(S\) is nonempty. Indeed, \(a\in[a,b]\), so there is an open set \(U_{i_0}\) with \(a\in U_{i_0}\). Since \(U_{i_0}\) is open, there exists \(\delta\gt 0\) such that
\[ (a-\delta,a+\delta)\subseteq U_{i_0}. \]
Hence, for some \(x\gt a\), the interval \([a,x]\) is contained in \(U_{i_0}\). Therefore \(x\in S\).
Moreover, \(S\) is bounded above by \(b\). By the completeness of \(\mathbb R\), there exists
\[ c=\sup S. \]
We claim that \(c=b\). Suppose, for contradiction, that \(c\lt b\).
Since \(c\in[a,b]\), there is an open set \(U_{i_c}\) of the cover such that
\[ c\in U_{i_c}. \]
As \(U_{i_c}\) is open, there exists \(\varepsilon\gt 0\) such that
\[ (c-\varepsilon,c+\varepsilon)\subseteq U_{i_c}. \]
Since \(c=\sup S\), we can choose \(s\in S\) with
\[ c-\varepsilon\lt s\le c. \]
By the definition of \(S\), the interval \([a,s]\) is covered by finitely many open sets of the cover. Moreover, the interval \([s,c+\varepsilon/2]\) is contained in \(U_{i_c}\).
Hence \([a,c+\varepsilon/2]\) admits a finite subcover. This means that
\[ c+\frac{\varepsilon}{2}\in S, \]
provided that \(c+\varepsilon/2\le b\). If necessary, we choose a smaller increment so as to stay within \([a,b]\).
We thus obtain a point of \(S\) greater than \(c\), contradicting the fact that \(c\) is an upper bound of \(S\).
Therefore \(c=b\). Since \(b\in[a,b]\), there exists an open set \(U_{i_b}\) of the cover such that
\[ b\in U_{i_b}. \]
As \(U_{i_b}\) is open, there exists \(\eta\gt 0\) such that
\[ (b-\eta,b+\eta)\subseteq U_{i_b}. \]
Since \(b=\sup S\), we can choose \(s\in S\) such that
\[ b-\eta\lt s\le b. \]
By the definition of \(S\), the interval \([a,s]\) admits a finite subcover. Moreover,
\[ [s,b]\subseteq (b-\eta,b+\eta)\subseteq U_{i_b}. \]
Hence \([a,b]\) is covered by finitely many open sets of the original cover. Since the cover was arbitrary, \([a,b]\) is compact.
Exercise 5 — level ★★☆☆☆
Using an open cover, prove that the interval \((0,1)\) is not compact.
Answer
The interval \((0,1)\) is not compact.
Solution
To show that \((0,1)\) is not compact, it suffices to construct an open cover that admits no finite subcover.
Consider the family of open sets
\[ U_n=\left(\frac1n,1\right), \qquad n\ge 2. \]
We show that \(\{U_n\}_{n\ge 2}\) covers \((0,1)\). Let \(x\in(0,1)\). Since \(x\gt 0\), we can choose \(n\) large enough so that
\[ \frac1n\lt x. \]
Then
\[ x\in\left(\frac1n,1\right)=U_n. \]
Hence
\[ (0,1)\subseteq \bigcup_{n=2}^{+\infty}U_n. \]
Now take finitely many of these open sets:
\[ U_{n_1},\ldots,U_{n_m}. \]
Let
\[ N=\max\{n_1,\ldots,n_m\}. \]
Then the chosen finite union is contained in
\[ \left(\frac1N,1\right). \]
But the point
\[ \frac1{N+1} \]
belongs to \((0,1)\) and does not belong to \(\left(\frac1N,1\right)\), since
\[ \frac1{N+1}\lt \frac1N. \]
Hence no finite subfamily covers \((0,1)\). Therefore \((0,1)\) is not compact.
Exercise 6 — level ★★☆☆☆
Using an open cover, prove that \((0,1]\) is not compact.
Answer
The interval \((0,1]\) is not compact.
Solution
Consider the family of open sets
\[ U_n=\left(\frac1n,2\right), \qquad n\ge 2. \]
This family covers \((0,1]\). Indeed, if \(x\in(0,1]\) then \(x\gt 0\), so we can choose \(n\) large enough that
\[ \frac1n\lt x. \]
From \(x\le 1\lt 2\) it follows that
\[ x\in\left(\frac1n,2\right). \]
Hence \(\{U_n\}_{n\ge 2}\) is an open cover of \((0,1]\).
Now choose finitely many open sets:
\[ U_{n_1},\ldots,U_{n_m}. \]
Setting
\[ N=\max\{n_1,\ldots,n_m\}, \]
their union is contained in
\[ \left(\frac1N,2\right). \]
But
\[ \frac1{N+1}\in(0,1] \]
and
\[ \frac1{N+1}\lt \frac1N. \]
Hence \(\frac1{N+1}\) is not covered by the chosen finite union. Therefore the original open cover admits no finite subcover.
Thus \((0,1]\) is not compact.
Exercise 7 — level ★★☆☆☆
Using an open cover, prove that \(\mathbb R\) is not compact.
Answer
The set \(\mathbb R\) is not compact.
Solution
Consider the family of open sets
\[ U_n=(-n,n), \qquad n\in\mathbb N,\ n\ge 1. \]
This family covers \(\mathbb R\). Indeed, given \(x\in\mathbb R\), we can choose \(n\in\mathbb N\) such that
\[ n\gt |x|. \]
Then
\[ x\in(-n,n)=U_n. \]
Hence
\[ \mathbb R=\bigcup_{n=1}^{+\infty}(-n,n). \]
Now take a finite subfamily:
\[ U_{n_1},\ldots,U_{n_m}. \]
Let
\[ N=\max\{n_1,\ldots,n_m\}. \]
Then
\[ U_{n_1}\cup\cdots\cup U_{n_m}\subseteq (-N,N). \]
But the point \(N+1\) belongs to \(\mathbb R\) and does not belong to \((-N,N)\). Hence the finite subfamily does not cover \(\mathbb R\).
We have found an open cover with no finite subcover. Therefore \(\mathbb R\) is not compact.
Exercise 8 — level ★★☆☆☆
Using an open cover, prove that \(\mathbb N\) is not compact as a subset of \(\mathbb R\).
Answer
The set \(\mathbb N\) is not compact in \(\mathbb R\).
Solution
Consider the family of open sets
\[ U_n=\left(n-\frac13,n+\frac13\right), \qquad n\in\mathbb N. \]
Each \(U_n\) is an open interval of \(\mathbb R\) and contains the natural number \(n\).
Hence the family \(\{U_n\}_{n\in\mathbb N}\) covers \(\mathbb N\), since for every \(n\in\mathbb N\) we have
\[ n\in U_n. \]
Suppose we take only finitely many of these open sets:
\[ U_{n_1},\ldots,U_{n_m}. \]
Let
\[ N=\max\{n_1,\ldots,n_m\}. \]
The natural number \(N+1\) belongs to none of the chosen open sets. Indeed, each chosen open set is centered at one of \(n_1,\ldots,n_m\), all of which are less than or equal to \(N\), and has radius \(\frac13\).
In particular, none of the chosen open sets can contain \(N+1\).
Hence no finite subfamily covers \(\mathbb N\). Therefore \(\mathbb N\) is not compact.
Exercise 9 — level ★★★☆☆
Using open covers, prove that the set
\[ K=\left\{0\right\}\cup\left\{\frac1n:n\in\mathbb N,\ n\ge 1\right\} \]
is compact.
Answer
The set \(K=\{0\}\cup\{\frac1n:n\ge 1\}\) is compact.
Solution
Let \(\{U_i\}_{i\in I}\) be an open cover of \(K\). Since \(0\in K\), there is an open set \(U_{i_0}\) of the cover such that
\[ 0\in U_{i_0}. \]
As \(U_{i_0}\) is open, there exists \(\varepsilon\gt 0\) such that
\[ (-\varepsilon,\varepsilon)\subseteq U_{i_0}. \]
Since
\[ \frac1n\to 0, \]
there exists \(N\in\mathbb N\) such that, for every \(n\ge N\),
\[ \frac1n\in(-\varepsilon,\varepsilon). \]
Hence \(U_{i_0}\) covers all points of the form \(\frac1n\) with \(n\ge N\), as well as the point \(0\).
It remains to cover only the finitely many points
\[ 1,\frac12,\frac13,\ldots,\frac1{N-1}. \]
For each of these points we choose an open set of the cover containing it. We thus obtain finitely many open sets which, together with \(U_{i_0}\), cover all of \(K\).
We have extracted a finite subcover from an arbitrary open cover. Hence \(K\) is compact.
Exercise 10 — level ★★★☆☆
Using an open cover, prove that the set
\[ A=\left\{\frac1n:n\in\mathbb N,\ n\ge 1\right\} \]
is not compact.
Answer
The set \(A=\{\frac1n:n\ge 1\}\) is not compact.
Solution
We construct an open cover of \(A\) with no finite subcover.
For \(n=1\), set
\[ U_1=\left(\frac34,\frac54\right). \]
For \(n\ge 2\), define
\[ U_n=\left(\frac12\left(\frac1n+\frac1{n+1}\right),\frac12\left(\frac1{n-1}+\frac1n\right)\right). \]
Each \(U_n\) is an open interval of \(\mathbb R\), and each \(U_n\) contains the point \(\frac1n\).
Moreover, by construction, \(U_n\) does not contain any other point of the sequence \(A\). Therefore the family
\[ \{U_n\}_{n\ge 1} \]
is an open cover of \(A\).
Now take finitely many of these open sets:
\[ U_{n_1},\ldots,U_{n_m}. \]
Since this is a finite family, it can cover only the finitely many points
\[ \frac1{n_1},\ldots,\frac1{n_m}. \]
But \(A\) contains infinitely many points. Hence there exists some \(k\in\mathbb N\) such that
\[ k\notin\{n_1,\ldots,n_m\}. \]
The point \(\frac1k\in A\) is not covered by the chosen finite subfamily.
Thus the open cover \(\{U_n\}_{n\ge 1}\) admits no finite subcover. Therefore \(A\) is not compact.
Exercise 11 — level ★★★☆☆
Using the definition, prove that every closed subset of a compact set is compact.
Answer
If \(K\) is compact and \(F\subseteq K\) is closed, then \(F\) is compact.
Solution
Let \(\{U_i\}_{i\in I}\) be an open cover of \(F\):
\[ F\subseteq \bigcup_{i\in I}U_i. \]
Since \(F\) is closed, its complement \(\mathbb R\setminus F\) is open.
Consider then the family of open sets
\[ \{U_i\}_{i\in I}\cup\{\mathbb R\setminus F\}. \]
This family covers \(K\). Indeed, if \(x\in K\), there are two possibilities:
\[ x\in F \quad \text{or} \quad x\notin F. \]
If \(x\in F\), then \(x\) is covered by some \(U_i\). If instead \(x\notin F\), then
\[ x\in\mathbb R\setminus F. \]
We have thus constructed an open cover of \(K\).
Since \(K\) is compact, there is a finite subcover:
\[ K\subseteq U_{i_1}\cup\cdots\cup U_{i_m}\cup(\mathbb R\setminus F). \]
Now restrict to \(F\). The points of \(F\) do not belong to \(\mathbb R\setminus F\), so they must be covered by the open sets
\[ U_{i_1},\ldots,U_{i_m}. \]
Therefore
\[ F\subseteq U_{i_1}\cup\cdots\cup U_{i_m}. \]
We have extracted a finite subcover of the original open cover of \(F\). Hence \(F\) is compact.
Exercise 12 — level ★★★☆☆
Prove that the intersection of a compact set with a closed set is compact.
Answer
If \(K\) is compact and \(F\) is closed, then \(K\cap F\) is compact.
Solution
Since
\[ K\cap F\subseteq K, \]
we may regard \(K\cap F\) as a subset of \(K\).
Moreover, \(K\cap F\) is closed in \(K\), since \(F\) is closed in \(\mathbb R\).
We apply the result of the previous exercise: every closed subset of a compact set is compact.
Since \(K\) is compact and \(K\cap F\) is closed in \(K\), it follows that
\[ K\cap F \]
is compact.
Hence the intersection of a compact set with a closed set is compact.
Exercise 13 — level ★★★☆☆
Using the definition, prove that the continuous image of a compact set is compact.
Answer
If \(K\) is compact and \(f:K\to\mathbb R\) is continuous, then \(f(K)\) is compact.
Solution
Let \(\{V_i\}_{i\in I}\) be an open cover of \(f(K)\):
\[ f(K)\subseteq \bigcup_{i\in I}V_i. \]
Consider the preimages of the open sets \(V_i\):
\[ f^{-1}(V_i)=\{x\in K:f(x)\in V_i\}. \]
Since \(f\) is continuous, each \(f^{-1}(V_i)\) is open in \(K\).
Moreover, the family \(\{f^{-1}(V_i)\}_{i\in I}\) covers \(K\). Indeed, if \(x\in K\) then \(f(x)\in f(K)\), so there exists \(i\in I\) such that
\[ f(x)\in V_i. \]
Hence
\[ x\in f^{-1}(V_i). \]
Since \(K\) is compact, there exist indices \(i_1,\ldots,i_m\in I\) such that
\[ K\subseteq f^{-1}(V_{i_1})\cup\cdots\cup f^{-1}(V_{i_m}). \]
Now apply \(f\). If \(y\in f(K)\), then \(y=f(x)\) for some \(x\in K\). Since \(x\) belongs to one of the sets \(f^{-1}(V_{i_j})\), it follows that
\[ y=f(x)\in V_{i_j}. \]
Hence
\[ f(K)\subseteq V_{i_1}\cup\cdots\cup V_{i_m}. \]
We have extracted a finite subcover of the original open cover of \(f(K)\). Therefore \(f(K)\) is compact.
Exercise 14 — level ★★★★☆
Prove that a continuous function on a compact set is bounded.
Answer
If \(K\) is compact and \(f:K\to\mathbb R\) is continuous, then \(f\) is bounded on \(K\).
Solution
By the previous exercise, the image \(f(K)\) is compact.
We now prove directly, by means of covers, that a compact set \(C\subseteq\mathbb R\) is bounded.
Consider the family of open sets
\[ U_n=(-n,n), \qquad n\in\mathbb N. \]
This family covers \(\mathbb R\), and hence also covers \(C\):
\[ C\subseteq \bigcup_{n=1}^{+\infty}(-n,n). \]
Since \(C\) is compact, there exist \(n_1,\ldots,n_m\) such that
\[ C\subseteq (-n_1,n_1)\cup\cdots\cup(-n_m,n_m). \]
Setting
\[ N=\max\{n_1,\ldots,n_m\}, \]
we obtain
\[ C\subseteq (-N,N). \]
Hence \(C\) is bounded.
Applying this result to \(C=f(K)\), we obtain that \(f(K)\) is bounded. Hence there exists \(M\gt 0\) such that
\[ |f(x)|\le M \]
for every \(x\in K\). Therefore \(f\) is bounded on \(K\).
Exercise 15 — level ★★★★☆
Using compactness, prove that a continuous function on a compact set attains a maximum and a minimum.
Answer
If \(K\) is compact and \(f:K\to\mathbb R\) is continuous, then \(f\) attains an absolute maximum and an absolute minimum on \(K\).
Solution
Since \(f\) is continuous and \(K\) is compact, the image \(f(K)\) is compact.
From the previous exercise we know that a compact subset of \(\mathbb R\) is bounded. Hence \(f(K)\) is bounded above and below.
Let
\[ M=\sup f(K). \]
We claim that \(M\in f(K)\). Suppose, for contradiction, that \(M\notin f(K)\).
Consider the family of open sets
\[ V_n=(-\infty,M-\frac1n), \qquad n\in\mathbb N. \]
Since \(M\) is the supremum but, by our assumption, does not belong to \(f(K)\), every point of \(f(K)\) is strictly less than \(M\). Hence every point of \(f(K)\) belongs to some \(V_n\).
Thus \(\{V_n\}_{n\ge 1}\) is an open cover of \(f(K)\).
Since \(f(K)\) is compact, there is a finite subcover:
\[ f(K)\subseteq V_{n_1}\cup\cdots\cup V_{n_m}. \]
Let
\[ N=\max\{n_1,\ldots,n_m\}. \]
Then the finite union is contained in
\[ (-\infty,M-\frac1N). \]
Hence
\[ f(K)\subseteq (-\infty,M-\frac1N), \]
which contradicts the fact that \(M\) is the least upper bound of \(f(K)\).
Therefore \(M\in f(K)\), that is, there exists \(x_{\max}\in K\) such that
\[ f(x_{\max})=M. \]
In an analogous way one shows that \(f\) also attains its absolute minimum. Hence \(f\) attains a maximum and a minimum on \(K\).
Exercise 16 — level ★★★☆☆
Using open covers, prove that every compact subset of \(\mathbb R\) is bounded.
Answer
Every compact set \(K\subseteq\mathbb R\) is bounded.
Solution
Consider the family of open sets
\[ U_n=(-n,n), \qquad n\in\mathbb N,\ n\ge 1. \]
This family covers \(\mathbb R\), since every real number belongs to some interval \((-n,n)\).
Consequently it also covers \(K\):
\[ K\subseteq \bigcup_{n=1}^{+\infty}(-n,n). \]
Since \(K\) is compact, there exist \(n_1,\ldots,n_m\) such that
\[ K\subseteq (-n_1,n_1)\cup\cdots\cup(-n_m,n_m). \]
Set
\[ N=\max\{n_1,\ldots,n_m\}. \]
Then
\[ (-n_1,n_1)\cup\cdots\cup(-n_m,n_m)\subseteq (-N,N). \]
Hence
\[ K\subseteq (-N,N). \]
Therefore \(K\) is bounded.
Exercise 17 — level ★★★★☆
Using open covers, prove that every compact subset of \(\mathbb R\) is closed.
Answer
Every compact set \(K\subseteq\mathbb R\) is closed.
Solution
To prove that \(K\) is closed, we show that the complement \(\mathbb R\setminus K\) is open.
Let \(x_0\in\mathbb R\setminus K\). We must show that there is an open neighborhood of \(x_0\) entirely contained in \(\mathbb R\setminus K\).
For each \(y\in K\), since \(y\ne x_0\), we can choose two disjoint open neighborhoods of \(y\) and of \(x_0\). For instance, set
\[ r_y=\frac{|y-x_0|}{3}. \]
Then the intervals
\[ U_y=(y-r_y,y+r_y) \]
and
\[ V_y=(x_0-r_y,x_0+r_y) \]
are disjoint.
The family \(\{U_y\}_{y\in K}\) is an open cover of \(K\), since each point \(y\in K\) belongs to its own \(U_y\).
Since \(K\) is compact, there exist \(y_1,\ldots,y_m\in K\) such that
\[ K\subseteq U_{y_1}\cup\cdots\cup U_{y_m}. \]
Now consider
\[ V=V_{y_1}\cap\cdots\cap V_{y_m}. \]
The set \(V\) is open, being a finite intersection of open sets, and it contains \(x_0\).
Moreover, \(V\) is disjoint from each \(U_{y_j}\), and hence disjoint from their union. Since this union contains \(K\), we obtain
\[ V\cap K=\varnothing. \]
Hence
\[ V\subseteq \mathbb R\setminus K. \]
We have found an open neighborhood of \(x_0\) contained in the complement of \(K\). Hence \(\mathbb R\setminus K\) is open and \(K\) is closed.
Exercise 18 — level ★★★☆☆
Using an open cover, prove that the set \([0,1]\setminus\{\frac12\}\) is not compact.
Answer
The set \([0,1]\setminus\{\frac12\}\) is not compact.
Solution
Write
\[ A=[0,1]\setminus\left\{\frac12\right\}. \]
We construct an open cover of \(A\) that admits no finite subcover.
Consider the open sets
\[ U_n=\left(-1,\frac12-\frac1n\right)\cup\left(\frac12+\frac1n,2\right), \qquad n\ge 3. \]
Each \(U_n\) is open, being the union of two open sets.
We show that \(\{U_n\}_{n\ge 3}\) covers \(A\). Let \(x\in A\). Then \(x\in[0,1]\) and \(x\ne \frac12\).
If \(x\lt \frac12\), we can choose \(n\) large enough that
\[ x\lt \frac12-\frac1n. \]
Hence \(x\in U_n\).
If instead \(x\gt \frac12\), we can choose \(n\) large enough that
\[ x\gt \frac12+\frac1n. \]
In this case too, \(x\in U_n\). Hence \(\{U_n\}_{n\ge 3}\) covers \(A\).
Now take finitely many of these open sets:
\[ U_{n_1},\ldots,U_{n_m}. \]
Let
\[ N=\max\{n_1,\ldots,n_m\}. \]
The chosen finite union leaves uncovered the points of \(A\) sufficiently close to \(\frac12\). For instance, the point
\[ x=\frac12+\frac1{N+1} \]
belongs to \(A\) but to none of the chosen open sets, since it is still too close to \(\frac12\).
Hence the open cover we constructed admits no finite subcover. Therefore \(A\) is not compact.
Exercise 19 — level ★★★★☆
Prove that the intersection of two compact subsets of \(\mathbb R\) is compact.
Answer
If \(K_1,K_2\subseteq\mathbb R\) are compact, then \(K_1\cap K_2\) is compact.
Solution
From Exercise 17 we know that every compact subset of \(\mathbb R\) is closed. Hence \(K_2\) is closed.
Since \(K_1\) is compact and \(K_2\) is closed, the intersection
\[ K_1\cap K_2 \]
is a closed subset of the compact set \(K_1\).
By Exercise 11, every closed subset of a compact set is compact.
Therefore
\[ K_1\cap K_2 \]
is compact.
Note that the argument rests entirely on the definition of compactness and its basic consequences: compact sets are closed, and closed sets contained in compact sets are compact.
Exercise 20 — level ★★★★★
Let \(K\subseteq\mathbb R\) be a compact set and let \(\{F_n\}_{n\ge 1}\) be a decreasing sequence of nonempty closed subsets of \(K\), that is,
\[ F_1\supseteq F_2\supseteq F_3\supseteq\cdots, \]
with \(F_n\) closed and \(F_n\subseteq K\) for every \(n\). Prove that
\[ \bigcap_{n=1}^{+\infty}F_n\ne\varnothing. \]
Answer
The intersection of a decreasing sequence of nonempty closed sets contained in a compact set is nonempty.
Solution
We argue by contradiction. Suppose that
\[ \bigcap_{n=1}^{+\infty}F_n=\varnothing. \]
Then no point of \(K\) belongs to all the sets \(F_n\). Equivalently, for every \(x\in K\) there is at least one index \(n\) such that
\[ x\notin F_n. \]
Since each \(F_n\) is closed in \(\mathbb R\), its complement
\[ \mathbb R\setminus F_n \]
is open in \(\mathbb R\). The family
\[ \{\mathbb R\setminus F_n:n\ge 1\} \]
is therefore an open cover of \(K\). Indeed, from the assumption
\[ \bigcap_{n=1}^{+\infty}F_n=\varnothing \]
it follows that every \(x\in K\) belongs to at least one of the complements \(\mathbb R\setminus F_n\).
Since \(K\) is compact, from this open cover we can extract a finite subcover. Hence there exist indices
\[ n_1,\ldots,n_m \]
such that
\[ K\subseteq (\mathbb R\setminus F_{n_1})\cup\cdots\cup(\mathbb R\setminus F_{n_m}). \]
Let
\[ N=\max\{n_1,\ldots,n_m\}. \]
Since the sequence \((F_n)\) is decreasing, we have
\[ F_N\subseteq F_{n_j} \]
for every \(j=1,\ldots,m\). Consequently,
\[ \mathbb R\setminus F_{n_j}\subseteq \mathbb R\setminus F_N \]
for every \(j=1,\ldots,m\).
Hence
\[ K\subseteq \mathbb R\setminus F_N. \]
Since \(F_N\subseteq K\), this implies
\[ F_N=\varnothing, \]
contradicting the hypothesis that all the \(F_n\) are nonempty.
The assumption leading to a contradiction was therefore false. Hence
\[ \bigcap_{n=1}^{+\infty}F_n\ne\varnothing. \]