Compactness
Characterizations of compact subsets of a metric space (Tag T-YOZX6)
Let \((X,d)\) be a metric space and let \(E\subseteq X\), with the metric induced by \(d\). The following are equivalent [@Fol13]:
\(E\) is complete and totally bounded: for every \(\varepsilon>0\), \(E\) is covered by finitely many balls of radius \(\varepsilon\).
\(E\) is sequentially compact: every sequence in \(E\) has a subsequence that converges to a point of \(E\).
\(E\) is compact: every cover of \(E\) by open subsets of \(X\) has a finite subcover.
If \(X\) is complete, then \(E\) is complete if and only if \(E\) is closed in \(X\). In \(\RR^n\) with the Euclidean metric, \(E\) is totally bounded if and only if \(E\) is bounded; combined with the theorem, this gives the Heine–Borel theorem. In a general metric space, a closed bounded subset need not be compact: in an infinite set with the discrete metric \(d(x,y)=1\) for \(x\neq y\), the whole space is closed and bounded but not totally bounded.
Compact if and only if sequentially compact for metric spaces (Tag PR-25GM2)
A metric space \((X,d)\) is compact if and only if it is sequentially compact: every sequence in \(X\) has a subsequence that converges in \(X\).
(Compact if and only if sequentially compact, for metric spaces)
Let \((X,d)\) be a metric space.
Compact \(\implies\) sequentially compact. If a sequence \(\theset{x_n}\) takes only finitely many values, some value occurs infinitely often and that constant subsequence converges. Otherwise pass to infinitely many distinct terms and write \(S\) for their set. If no subsequence of \(\theset{x_n}\) converges in \(X\), then \(S\) has no limit point in \(X\), so \(S\) is closed and discrete: each \(s\in S\) has a ball \(B_s\) with \(B_s\cap S = \theset{s}\). Then \(\theset{B_s}_{s\in S}\) together with \(X\setminus S\) is an open cover with no finite subcover, so \(X\) is not compact.
Sequentially compact \(\implies\) compact. A sequentially compact metric space is complete: a Cauchy sequence has a convergent subsequence, hence converges to the same limit. It is totally bounded: if not, some \(\varepsilon>0\) admits a sequence with \(d(x_i,x_j)\geq \varepsilon\) for \(i\neq j\), and that sequence has no Cauchy subsequence, hence no convergent subsequence. Complete and totally bounded metric spaces are compact: if an open cover \(\mathcal{U}\) had no finite subcover, total boundedness would produce a nested sequence of nonempty closed sets \(F_n\) with \(\operatorname{diam} F_n \to 0\) and no \(F_n\) covered by finitely many members of \(\mathcal{U}\); completeness supplies a point of \(\bigcap_n F_n\), which lies in some \(U\in\mathcal{U}\), and for large \(n\) one has \(F_n\subseteq U\).
The closed unit ball of $C([0,1])$ is not compact (Tag PR-FKJCO)
Let \(C([0,1])\) be the space of continuous functions \([0,1]\to\RR\) with the norm \(\norm{f}_\infty\coloneqq\sup_{x\in[0,1]}\abs{f(x)}\). The closed unit ball \(B\coloneqq\theset{f\in C([0,1]) : \norm{f}_\infty\leq1}\) is not compact.
The functions \(f_n(x)\coloneqq x^n\) lie in the closed unit ball of \(C([0,1])\). A subsequence converging in \(\norm{\wait}_\infty\) would converge uniformly to its pointwise limit \(\chi_{\theset1}\), which is not continuous; so no subsequence converges, and the unit ball is not sequentially compact, hence not compact.
Heine--Borel theorem (Tag T-QPTHZ)
A subset \(X\subseteq \RR^n\) is compact if and only if \(X\) is closed and bounded.
Series and suprema
Geometric series (Tag PR-6C3GQ)
Let \(x\in\CC\). The series \(\sum_{k=0}^\infty x^k\) converges if and only if \(\abs{x} < 1\), and in that case \[ \sum_{k=0}^\infty x^k = \frac 1 {1-x} . \]
The geometric series $\sum_{k=1}^\infty 2^{-k}$ sums to one (Tag C-WR7YV)
\[ \sum_{k=1}^\infty \frac{1}{2^k} = 1. \]
The partial sums are \(\sum_{k=1}^N 2^{-k} = 1-2^{-N}\), which converge to \(1\) as \(N\to\infty\).
Singletons in $\RR$ are closed, so $\QQ$ is $F_\sigma$ (Tag PR-OGEEA)
Every singleton \(\theset{x}\subseteq\RR\) is closed, and \(\QQ=\bigcup_{q\in\QQ}\theset{q}\) is a countable union of closed sets, hence an $F_\sigma$ set in \(\RR\).
Bounded nonempty sets have a supremum and infimum (Tag L-JBMRH)
Let \(A\subseteq\RR\) be nonempty. If \(A\) is bounded above, then \(A\) has a supremum \(\sup A\in\RR\); if \(A\) is bounded below, then \(A\) has an infimum \(\inf A\in\RR\).
Nowhere dense sets
Finite unions of nowhere dense sets are nowhere dense (Tag PR-CZS5F)
Let \(X\) be a topological space and let \(S_1,\ldots,S_k\subseteq X\) be nowhere dense. Then \(S_1\cup\cdots\cup S_k\) is nowhere dense.
By induction it suffices to treat \(k=2\). Since \(\overline{S_1\cup S_2}=\overline{S_1}\cup\overline{S_2}\), it suffices to show that a union of two closed sets \(F_1,F_2\) with empty interior has empty interior. Let \(U\subseteq F_1\cup F_2\) be open. Then \(U\setminus F_1\) is open and contained in \(F_2\), so \(U\setminus F_1=\emptyset\) and \(U\subseteq F_1\); hence \(U=\emptyset\).
The statement fails for countable unions: \(\QQ=\bigcup_{q\in\QQ}\theset{q}\) is a countable union of nowhere dense subsets of \(\RR\), but \(\QQ\) is dense in \(\RR\).
$\RR$ is not a countable union of nowhere dense sets (Tag T-7FJFK)
\(\RR\) is a Baire space. In particular, \(\RR\) is not a countable union of nowhere dense subsets of \(\RR\).
Baire category theorem (Tag FT-6WPJI)
If \(X\) is a complete metric space or a locally compact Hausdorff space, then \(X\) is a Baire space: the intersection of countably many dense open subsets of \(X\) is dense in \(X\) [@Mun00].
A nonempty complete metric space is not a countable union of nowhere dense subsets.
Let \(X\) be a nonempty complete metric space and suppose \(X=\bigcup_{k\geq1}S_k\) with each \(S_k\) nowhere dense. Each \(U_k\coloneqq X\setminus\overline{S_k}\) is open, and it is dense because \(\overline{S_k}\) has empty interior. By the theorem, \(\bigcap_k U_k\) is dense in \(X\), hence nonempty since \(X\neq\emptyset\). But \(\bigcap_k U_k\subseteq X\setminus\bigcup_k S_k=\emptyset\), a contradiction.
The Cantor set is closed and has empty interior (Tag PR-JTFMW)
Let \(C_0\coloneqq[0,1]\), and let \(C_{k+1}\) be obtained from \(C_k\) by removing the open middle third of each of the \(2^k\) disjoint closed intervals of length \(3^{-k}\) whose union is \(C_k\). The Cantor set \(C\coloneqq\bigcap_{k\geq 0}C_k\) is a closed subset of \(\RR\) with empty interior.
Let \(C_n\) be the union of the \(2^n\) closed intervals of length \(3^{-n}\) remaining at stage \(n\), so \(C = \bigcap_n C_n\). Each \(C_n\) is closed, so \(C\) is closed. An interval contained in \(C\) lies in some component of \(C_n\) for every \(n\), so has length at most \(3^{-n}\) for every \(n\); hence \(C\) contains no interval and has empty interior.
The Cantor set is nowhere dense (Tag C-44LL4)
Let \(C_0\coloneqq[0,1]\), and let \(C_{k+1}\) be obtained from \(C_k\) by removing the open middle third of each of the \(2^k\) disjoint closed intervals of length \(3^{-k}\) whose union is \(C_k\). The Cantor set \(C\coloneqq\bigcap_{k\geq 0}C_k\) is nowhere dense in \(\RR\).
Each \(C_k\) is closed, so \(C\) is closed and equals its closure. If \(C\) contained an open interval \(I\) of length \(\ell>0\), then \(I\subseteq C_k\) for every \(k\); since \(I\) is connected, it would lie in one of the intervals of length \(3^{-k}\) making up \(C_k\), so \(\ell\leq 3^{-k}\) for every \(k\), which is impossible. Hence the closure of \(C\) has empty interior.
Compactness in function spaces
Existence of nonzero smooth compactly supported functions (Tag PR-HRAOC)
Let \(f\colon\RR\to\RR\) be given by \(f(x)\coloneqq e^{-1/x^2}\) for \(x>0\) and \(f(x)\coloneqq0\) for \(x\leq0\). Then \(f\in C^\infty(\RR)\), and \(\psi(x)\coloneqq f(x)\,f(1-x)\) is a \(C^\infty\) function on \(\RR\) with \(\psi>0\) on \((0,1)\) and \(\psi=0\) outside \((0,1)\). For \(n\geq1\), \(\phi(x)\coloneqq f\big(1-\abs{x}^2\big)\) is a \(C^\infty\) function on \(\RR^n\) with \(\supp\phi=\theset{x : \abs{x}\leq1}\) [@Fol13].
(Arzelà--Ascoli)
Let \(X\) be a compact metric space and \(\mathcal F\subseteq C(X)\). If \(\mathcal{F}\) is pointwise bounded and equicontinuous, then \(\mathcal{F}\) is totally bounded in the metric \(\norm{\wait}_\infty\), and its closure in \(C(X)\) is compact.
If \(U\subseteq\RR^n\) is open and \((f_k)\) is a pointwise bounded, equicontinuous sequence in \(C(U)\), then some subsequence converges uniformly on every compact subset of \(U\) to a continuous function.
Let \(\mathcal{F}\subseteq C(X)\) be pointwise bounded and equicontinuous, with \(X\) compact.
Total boundedness. Given \(\varepsilon>0\), equicontinuity supplies \(\delta>0\) such that \(d(x,y)<\delta\) implies \(\abs{f(x)-f(y)}<\varepsilon\) for every \(f\in\mathcal{F}\). Cover \(X\) by finitely many \(\delta\)-balls with centres \(x_1,\ldots,x_m\). Pointwise boundedness puts \(\theset{(f(x_1),\ldots,f(x_m))\st f\in\mathcal{F}}\) in a bounded, hence totally bounded, subset of \(\RR^m\), so there are \(f_1,\ldots,f_N\in\mathcal{F}\) such that every \(f\in\mathcal F\) has some \(f_j\) with \(\abs{f(x_i)-f_j(x_i)}<\varepsilon\) for all \(i\). For \(x\in X\) choose \(i\) with \(d(x,x_i)<\delta\); then \(\abs{f(x)-f_j(x)}\leq\abs{f(x)-f(x_i)}+\abs{f(x_i)-f_j(x_i)}+\abs{f_j(x_i)-f_j(x)}<3\varepsilon\), so \(\norm{f-f_j}_\infty < 3\varepsilon\).
Compactness of the closure. \(C(X)\) is complete in \(\norm{\wait}_\infty\), so the closure \(\overline{\mathcal{F}}\) is complete, and it is totally bounded because \(\mathcal F\) is; hence \(\overline{\mathcal F}\) is compact.
Sequences on an open set \(U\subseteq\RR^n\). Write \(U = \bigcup_n K_n\) with \(K_n\) compact and \(K_n\subseteq\operatorname{int}K_{n+1}\). By the first part applied on each \(K_n\) and sequential compactness of compact metric spaces, there are successive subsequences converging uniformly on \(K_1, K_2,\ldots\); the diagonal subsequence converges uniformly on every \(K_n\), hence on every compact subset of \(U\), and its limit is continuous.
Standard facts
Bolzano–Weierstrass. Every bounded sequence in \(\RR^n\) has a convergent subsequence.
Heine–Borel. A subset of \(\RR^n\) is compact if and only if it is closed and bounded.
Baire category theorem. If \(X\) is a complete metric space and \(U_k\subseteq X\) are open and dense, then \(\bigcap_k U_k\) is dense; in particular, a nonempty complete metric space is not a countable union of nowhere dense sets.
Nested intervals. If \(I_n = [a_n,b_n]\) are nonempty closed bounded intervals with \(I_{n+1} \subseteq I_n\), then \(\bigcap_n I_n \neq \emptyset\).
Completeness via series. A normed space is complete if and only if every absolutely convergent series in it converges.
Closed subsets of compact sets are compact, and compact subsets of Hausdorff spaces are closed.
Urysohn’s lemma. If \(A\) and \(B\) are disjoint closed subsets of a metric space or of a compact Hausdorff space \(X\), there is a continuous \(f\colon X \to [0,1]\) with \(f|_A = 0\) and \(f|_B = 1\).
A continuous function with compact support on \(\RR^n\) is bounded and uniformly continuous; see Continuity for the proof of the Heine–Cantor theorem.