Mathlib theorem · Existing formal mathematics

Existing in Mathlib · Topology

Heine–Borel Theorem

In a proper Hausdorff (pseudo-)metric space, a set is compact exactly when it is both closed and bounded.

Exact theorem

Exact Mathlib statement

theorem Metric.isCompact_iff_isClosed_bounded {α : Type*} [PseudoMetricSpace α] {s : Set α} [T2Space α] [ProperSpace α] : IsCompact s ↔ IsClosed s ∧ IsBounded s

The theorem at a glance

Heine–Borel theorem at a glance

A visual guide to the theorem's hypotheses, structure, and conclusion; the exact statement gives the formal detail.

In a proper Hausdorff (pseudo-)metric space, compact sets are exactly the closed bounded sets. Explanatory diagram.
Detailed visual description

The poster foregrounds [PseudoMetricSpace α], [T2Space α], and [ProperSpace α] together with IsCompact s ↔ IsClosed s ∧ IsBounded s. A sealed bounded set and the same set inside a compact closed ball illustrate the two directions. The lower route explains that compact sets are closed and bounded, while a closed bounded set lies in a compact closed ball and is therefore compact. The exact-scope footer excludes an arbitrary-metric-space reading and notes that finite dimensionality and local compactness are not separate hypotheses of this declaration.

Statement structure

From hypotheses to conclusion

Statement map for Heine–Borel TheoremIn a proper Hausdorff (pseudo-)metric space, compactness of a set is equivalent to being closed and bounded. The pinned upstream declaration is Metric.isCompact_iff_isClosed_bounded. The exact checked statement is theorem Metric.isCompact_iff_isClosed_bounded {α : Type*} [PseudoMetricSpace α] {s : Set α} [T2Space α] [ProperSpace α] : IsCompact s ↔ IsClosed s ∧ IsBounded s.Mathematical readingIn a proper Hausdorff(pseudo-)metric space,compactness of a set isequivalent to beingclosed and bounded.Pinned declarationmathlib ·Metric.isCompact_iff_isClosed_boundedExact checked formtheoremMetric.isCompact_iff_isClosed_bounded{α : Type*}[PseudoMetricSpace α] {s: Set α} [T2Space α][ProperSpace α] :IsCompact s ↔ IsClosed s∧ IsBounded sStatement map for Heine–Borel TheoremIn a proper Hausdorff (pseudo-)metric space, compactness of a set is equivalent to being closed and bounded. The pinned upstream declaration is Metric.isCompact_iff_isClosed_bounded. The exact checked statement is theorem Metric.isCompact_iff_isClosed_bounded {α : Type*} [PseudoMetricSpace α] {s : Set α} [T2Space α] [ProperSpace α] : IsCompact s ↔ IsClosed s ∧ IsBounded s.Mathematical readingIn a proper Hausdorff(pseudo-)metric space,compactness of a set isequivalent to beingclosed and bounded.Pinned declarationmathlib ·Metric.isCompact_iff_isClosed_boundedExact checked formtheoremMetric.isCompact_iff_isClosed_bounded{α : Type*}[PseudoMetricSpace α] {s: Set α} [T2Space α][ProperSpace α] :IsCompact s ↔ IsClosed s∧ IsBounded s

This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.

Compactness yields closedness and boundedness; in a proper Hausdorff pseudometric space, a closed bounded set lies in a compact closed ball and is compact. Explanatory scientific diagram.
Detailed visual description

One vector-defined irregular set is reused without redrawing in four views. Seven dashed cobalt neighborhoods cover it at left. The upper central occurrence has a sealed rust boundary, while the lower central occurrence lies inside a finite-radius dotted cobalt ring; an emerald brace groups these two properties. At right, the same set lies strictly inside a double antique-gold closed ball with a finite lattice. An upper emerald arrow travels left-to-right and a lower emerald arrow returns right-to-left, encoding the equivalence.

Why it matters

A mathematical landmark

Heine–Borel is a central bridge between topology and metric geometry. Mathlib's selected form isolates the structural reason the closed-and-bounded criterion works: properness supplies compact closed balls, while Hausdorff separation supplies closedness of compact sets.

ProofAtlas record

What has been checked

Upstream indexedPinned source bytes verified locally
Locally reproducedExact upstream declaration replayed
Reviewed pageCurrent public presentation reviewed
Accepted Atlas resultNot recorded for the preferred artifact

Mathlib is the source of the theorem; the local Lean replay and page review are separate.

Claim boundary

No new theorem is claimed

This page indexes Mathlib's proper-space Heine–Borel declaration: for [PseudoMetricSpace α], [T2Space α], [ProperSpace α], and s : Set α, IsCompact s is equivalent to IsClosed s ∧ IsBounded s. It is not a closed-and-bounded criterion for arbitrary metric spaces. The selected declaration does not separately assume finite dimensionality or a LocalCompactSpace instance.

Source and local evidence

Where the theorem comes from

Existing declaration
Metric.isCompact_iff_isClosed_bounded in mathlib
Relationship
The checked artifact is the upstream declaration itself
Local Lean evidence
artifact.library.mathlib.heine-borel-theorem.v001
Source
Open the pinned upstream reference