This is always true: it is the Heine-Cantor theorem. If uniform continuity failed, there would be an and sequences such thatBy 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 .
Solved by gpt-5.6-sol high.
Codex Wiki