The Heine-Borel Theorem in analysis states:
- A subset of the real numbers R is compact iff it is closed and bounded.
The theorem is true not only for the real numbers, but also for some other metric spaces: the complex numbers, the p-adic numbers, and Euclidean space Rn. However, it fails for the rational numbers and for infinite dimensional normed vector spaces. The proper generalization to arbitrary metric spaces is:
- A subset of a metric space is compact if and only if it is complete and totally bounded.
- It is obvious that any compact set E is totally bounded.
- Let (xn) be an arbitrary Cauchy sequence in E; let Fn be the closure of the set {xk : k >= n} in E and Un := E - Fn. If the intersection of all Fn would be empty, (Un) would be an open cover of E, hence there would be a finite subcover (Unk) of E, hence the intersection of the Fnk would be empty; this implies that Fn is empty for all n larger than any of the nk, which is a contradiction. Hence, the intersection of all Fn is not empty, and any point in this intersection is an acculumation point of the sequence (xn).
- Any accumulation point of a Cauchy sequence is a limit point (xn); hence any Cauchy sequence in E converges in E, in other words: E is complete.
- If E would not be compact, there would exist a cover (Ul)l of E having no finite subcover of E. Use the total boundedness of E to define inductively a sequence of balls (Bn) in E with
- the radius of Bn is 2-n;
- there is no finite subcover (Ul∩Bn)l of Bn;
- Bn+1∩Bn is not empty.
- Let xn be the center point of Bn and let yn be any point in Bn+1∩Bn; hence we have d(xn+1,xn) <= d(xn+1,yn)+d(yn,xn) <= 2-n-1+2-n <= 2-n+1. It follows for n <= p < q: d(xp,xq) <= d(xp,xp+1) + ... + d(xq-1,xq) <= 2-p+1 + ... + 2-q+2 <= 2-n+2. Therefore, (xn) is a Cauchy sequence in E, converging to some limit point a in E, because E is complete.
- Let l0 be an index such that Ul0 contains a; since (xn) converges to a and Ul0 is open, there is a large n such that the ball Bn is a subset of Ul0 - in contradiction to the construction of Bn.