A metric \(d\) on \(X\) induces the topology with basis the open balls. Metric spaces are Hausdorff and normal, and a metric space is separable if and only if it is second countable. A metric space is complete if every Cauchy sequence converges, and totally bounded if for every \(\varepsilon>0\) it is covered by finitely many balls of radius \(\varepsilon\). Neither property is a topological invariant: \(\RR\) is complete and not totally bounded, \((0,1)\) is totally bounded and not complete, and the two are homeomorphic. A metric space is compact if and only if it is complete and totally bounded. The Lebesgue number lemma: for every open cover \(\mathcal U\) of a compact metric space there is \(\delta>0\) such that every subset of diameter less than \(\delta\) lies in some member of \(\mathcal U\).
Diameter of a subset of a metric space (Tag D-B7CYY)
Let \((X, d)\) be a metric space and \(A\subseteq X\) a nonempty subset. The diameter of \(A\) is \[ \diam(A) \coloneqq \sup_{p, q\in A}d(p, q) \in [0, \infty] .\]
Bounded set in a metric space (Tag D-2GCTV)
Let \((X, d)\) be a metric space. A subset \(S \subseteq X\) is bounded if there exists \(m\in \RR\) such that \(d(x, y) < m\) for all \(x, y\in S\).
Distance from a point to a subset (Tag D-D5G27)
Let \((X, d)\) be a metric space, \(S\subseteq X\) a nonempty subset, and \(x\in X\). The distance from \(x\) to \(S\) is \[ \dist(x, S)\coloneqq\inf_{s\in S} d(x, s). \]
Uniformly continuous map (Tag D-WGYSB)
Let \((X, d_X)\) and \((Y, d_Y)\) be metric spaces. A map \(f\colon X\to Y\) is uniformly continuous if for every \(\varepsilon > 0\) there exists \(\delta > 0\) such that for all \(x_1, x_2\in X\), \[ d_X(x_1, x_2) < \delta \implies d_Y(f(x_1), f(x_2)) < \varepsilon. \]
Totally bounded metric space (Tag FF-VWKGM)
A metric space \((M, d)\) is totally bounded if for every \(\eps > 0\) there are finitely many open balls of radius \(\eps\) whose union is \(M\) [@Mun00].
Totally bounded if and only if Cauchy subsequences exist (Tag T-PCL4H)
A metric space is totally bounded if and only if every sequence in it has a Cauchy subsequence.
Sequentially compact if and only if complete and totally bounded (Tag T-4RLPQ)
A metric space \(X\) is sequentially compact if and only if it is complete and totally bounded.
For metric spaces, sequential compactness is equivalent to compactness [@Mun00], and compactness is equivalent to being complete and totally bounded [@Mun00].
Lebesgue number of an open cover (Tag D-SDMMS)
Let \((X,d)\) be a metric space and \(\mathcal U\) an open cover of \(X\). A real number \(\delta>0\) is a Lebesgue number for \(\mathcal U\) if every subset \(A\subseteq X\) with diameter \(\diam(A)<\delta\) is contained in some \(U\in\mathcal U\).
(Lebesgue number lemma)
Every open cover of a compact metric space has a Lebesgue number [@Mun00].
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.