Let be a Cauchy sequence in a compact metric space . By sequential compactness of a compact metric space, it has a convergent subsequence . Given , choose such that whenever , and then choose such that and . For every , the triangle inequality gives
Thus the whole sequence converges to . Every Cauchy sequence converges in , so is a complete metric space.
This is always true: it is the Heine-Cantor theorem. If uniform continuity failed, there would be an and sequences such that
By sequential compactness of a compact metric space, some subsequence converges to . The triangle inequality gives . Continuity then makes both image subsequences converge to , contradicting their separation by .