Complete totally bounded metric space is compact (source code)

= Complete totally bounded metric space is compact

A metric space is compact exactly when it is both <complete> and <totally bounded>. For the nontrivial direction, successively choose a point from a nested sequence of finite $2^{-n}$-nets; a diagonal construction gives a Cauchy subsequence of every sequence, and completeness gives its limit.