Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Basic |
| 3 | |
| 4 | /-! |
| 5 | # The emetric space of a selected Riemannian metric |
| 6 | |
| 7 | Morgan-Tian, Lemma 12.6, printed p. 297. These bridges expose the exact |
| 8 | metric structure already used by the frozen `MetricComplete` definition. |
| 9 | The distance and topology are identified separately so comparison proofs |
| 10 | can use those identities without repeatedly reducing the construction. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | namespace PoincareMT.RiemannianMetric |
| 18 | |
| 19 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] [T3Space M] |
| 21 | |
| 22 | /-- The selected metric's emetric structure, as used in Lemma 12.6, p. 297. -/ |
| 23 | @[instance_reducible] |
| 24 | noncomputable def toEMetricSpace (g : RiemannianMetric n M) : EMetricSpace M := |
| 25 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 26 | ⟨g.toRiemannianMetric⟩ |
| 27 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 28 | (TangentSpace (𝓡 n) : M → Type _) := |
| 29 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ => rfl⟩⟩ |
| 30 | EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 31 | |
| 32 | /-- Lemma 12.6, p. 297, compares metrics whose induced topologies are the manifold topology. -/ |
| 33 | theorem toEMetricSpace_topology (g : RiemannianMetric n M) : |
| 34 | g.toEMetricSpace.toUniformSpace.toTopologicalSpace = ‹TopologicalSpace M› := rfl |
| 35 | |
| 36 | /-- The distance in Lemma 12.6, p. 297, is the actual selected metric's path distance. -/ |
| 37 | theorem toEMetricSpace_edist (g : RiemannianMetric n M) (x y : M) : |
| 38 | g.toEMetricSpace.edist x y = g.edist x y := rfl |
| 39 | |
| 40 | /-- Unfold the frozen completeness predicate through its identical selected metric. |
| 41 | Used in Lemma 12.6, p. 297. -/ |
| 42 | theorem metricComplete_iff_toEMetricSpace (g : RiemannianMetric n M) : |
| 43 | MetricComplete g ↔ @CompleteSpace M g.toEMetricSpace.toUniformSpace := Iff.rfl |
| 44 | |
| 45 | end PoincareMT.RiemannianMetric |