Continuous Bijection on Compact-Hausdorff is Homeo

lean4-prooftopologyvisualization
f:XY continuous bijection,  X compact,  Y Hausdorfff homeomorphismf: X\xrightarrow{\sim} Y\text{ continuous bijection},\;X\text{ compact},\;Y\text{ Hausdorff}\Rightarrow f\text{ homeomorphism}

Statement

Let f:XYf: X \to Y be a continuous bijection. If XX is compact and YY is Hausdorff (T2T_2), then ff is a homeomorphism (i.e., f1f^{-1} is also continuous):

f continuous bijection,X compact,Y Hausdorff    f homeomorphism.f \text{ continuous bijection},\quad X \text{ compact},\quad Y \text{ Hausdorff} \;\Longrightarrow\; f \text{ homeomorphism.}

The theorem fails if either hypothesis is dropped: T1T_1 alone does not suffice (see the counterexample with the indiscrete topology), and non-compact domains allow continuous bijections with discontinuous inverses.

Visualization

Canonical counterexample — why compactness of the domain is needed:

f : [0, 2π) → S¹,   f(t) = (cos t, sin t)

  [0, 2π):                      S¹ (unit circle):
  ────────────────────────)      ╭───────────────────╮
  0                     2π      │          (1,0)=f(0)│
                                │      ╭────────╮    │
  f is continuous: ✓             │    f│→       │    │
  f is bijective:  ✓             │      ╰────────╯    │
                                │ 2π⁻ maps to (1,0)  │
  f⁻¹ is NOT continuous: ✗       ╰───────────────────╯
    Near (1,0) on S¹, the preimage
    has points near 0 AND near 2π — two disjoint ends.

Domain [0, 2π) is NOT compact → theorem does not apply.

Compact domain fix: use [0, 2π] / ∼ (quotient identifying endpoints)
  Then domain is compact, and f descends to a homeomorphism S¹ ≅ S¹.

Key idea — closed maps:

Compact  ──continuous──▶  Hausdorff
  X                           Y

  A ⊆ X closed  ─compact──▶  f(A) compact  ─Hausdorff──▶  f(A) closed

  So f is a closed map ⟹ f⁻¹ is continuous ⟹ f is a homeomorphism.

Proof Sketch

  1. Closed maps: Show ff is a closed map (images of closed sets are closed in YY).
  2. Closed \subseteq compact: In a compact space, every closed set is compact (a closed subset of a compact space is compact).
  3. Continuous image of compact is compact: ff continuous and AXA \subseteq X compact implies f(A)f(A) compact.
  4. Compact in Hausdorff is closed: In a Hausdorff space, every compact set is closed.
  5. Chain: AA closed in XX \Rightarrow AA compact \Rightarrow f(A)f(A) compact \Rightarrow f(A)f(A) closed in YY.
  6. Closed map \Rightarrow homeomorphism: A continuous bijection that is also closed is a homeomorphism (the inverse is continuous because preimages of closed sets under f1f^{-1} are images of closed sets under ff, hence closed).

Connections

  • Heine–Borel TheoremHeine–Borel TheoremKRn  compact    K  closed and boundedK \subseteq \mathbb{R}^n \;\text{compact} \iff K \;\text{closed and bounded}In ℝⁿ, a subset is compact if and only if it is closed and boundedRead more → — the theorem that closed bounded sets in Rn\mathbb{R}^n are compact is exactly what makes many bijections [0,1]S1[0,1] \to S^1-type maps into homeomorphisms when the domain is a closed bounded interval.
  • Alexandrov One-Point CompactificationAlexandrov One-Point CompactificationX locally compact HausdorffX+=X{} compactX\text{ locally compact Hausdorff} \Rightarrow X^+ = X\cup\{\infty\}\text{ compact}Adding a single point at infinity to a locally compact Hausdorff space yields a compact spaceRead more → — the homeomorphism OnePoint(R)S1\text{OnePoint}(\mathbb{R}) \cong S^1 is an instance: stereographic projection is a continuous bijection from the compact one-point compactification to the Hausdorff circle.
  • Tychonoff's TheoremTychonoff's TheoremiIXi compact    i,  Xi compact\prod_{i \in I} X_i \text{ compact} \iff \forall i,\; X_i \text{ compact}An arbitrary product of compact spaces is compact in the product topologyRead more → — Tychonoff's theorem produces compact product spaces; when a continuous bijection maps such a product to a Hausdorff space, this theorem applies automatically.
  • Brouwer Fixed-Point TheoremBrouwer Fixed-Point Theoremf:DnDn continuous    x,  f(x)=xf : D^n \to D^n \text{ continuous} \implies \exists\, x,\; f(x) = xEvery continuous map from a compact convex set to itself has a fixed pointRead more → — Brouwer's theorem relies on the fact that DnD^n and Sn1S^{n-1} are compact Hausdorff, and continuous maps from them behave rigidly; this theorem underlies the no-retraction lemma used in the proof.

Lean4 Proof

import Mathlib.Topology.Homeomorph.Lemmas

/-- **Continuous bijection from compact to T2 is a homeomorphism**.
    Mathlib: `Continuous.homeoOfEquivCompactToT2`. -/
theorem continuous_bij_compact_t2_homeo
    {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
    [CompactSpace X] [T2Space Y]
    (f : XY) (hf : Continuous f) : X ≃ₜ Y :=
  Continuous.homeoOfEquivCompactToT2 hf