Skip to content
TheChatArchiveThe Chat Archive
Grok 4.1 Fast· xaiHugging Face Frontier Reasoning Traces

Prove that a continuous function on a compact set is uniformly continuous.

  1. User

    Prove that a continuous function on a compact set is uniformly continuous.

  2. Assistant

    Theorem

    Let K⊂RnK \subset \mathbb{R}^n be compact and f:K→Rf: K \to \mathbb{R} continuous. Then ff is uniformly continuous on KK.

    Proof (by Contradiction, using Sequential Compactness)

    Assume ff is not uniformly continuous. Then ∃ ε>0\exists \, \varepsilon > 0 such that ∀ δ>0\forall \, \delta > 0, ∃ x,y∈K\exists \, x, y \in K with ∣x−y∣<δ|x - y| < \delta but ∣f(x)−f(y)∣≥ε|f(x) - f(y)| \geq \varepsilon.

    In particular, for each integer n≥1n \geq 1, take δ=1/n\delta = 1/n. Then ∃ xn,yn∈K\exists \, x_n, y_n \in K with [ |x_n - y_n| < \frac{1}{n}, \quad |f(x_n) - f(y_n)| \geq \varepsilon. ]

    Since KK is compact, the sequence (xn)n=1∞(x_n)_{n=1}^\infty has a convergent subsequence (xnk)k=1∞(x_{n_k})_{k=1}^\infty with xnk→x∈Kx_{n_k} \to x \in K for some x∈Kx \in K.

    Now, ∣xnk−ynk∣<1/nk→0|x_{n_k} - y_{n_k}| < 1/n_k \to 0 as k→∞k \to \infty, so ynk→xy_{n_k} \to x as well.

    By continuity of ff at x∈Kx \in K, [ f(x_{n_k}) \to f(x), \quad f(y_{n_k}) \to f(x). ] Thus, [ |f(x_{n_k}) - f(y_{n_k})| \to 0. ] But ∣f(xnk)−f(ynk)∣≥ε|f(x_{n_k}) - f(y_{n_k})| \geq \varepsilon for all kk, a contradiction.

    Therefore, ff is uniformly continuous on KK.

    Q.E.D.

    (Note: This proof works in any compact metric space. Compactness of K⊂RnK \subset \mathbb{R}^n follows from the Heine-Borel theorem.)

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.