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.ReducedGeometry.ReducedVolume.Analysis.Distance.SegmentDistance |
| 2 | |
| 3 | /-! |
| 4 | # Local two-point Lipschitz bounds for inverse charts |
| 5 | |
| 6 | A fixed smooth inverse chart has uniformly bounded differential on a small |
| 7 | Euclidean ball. The segment-distance estimate gives one Lipschitz constant |
| 8 | there for the actual selected Riemannian distance, including dimension zero. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set Filter |
| 14 | open scoped Manifold ContDiff Bundle Topology ENNReal NNReal |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedVolume |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] [T3Space M] |
| 22 | |
| 23 | set_option backward.isDefEq.respectTransparency false in |
| 24 | /-- The fixed inverse chart is Lipschitz on a positive coordinate ball in the selected metric. -/ |
| 25 | theorem inverseChart_local_lipschitz (g : RiemannianMetric n M) (q : M) : |
| 26 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 27 | ⟨g.toRiemannianMetric⟩ |
| 28 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 29 | (TangentSpace (𝓡 n) : M → Type _) := |
| 30 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 31 | letI : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 32 | ∃ r : ℝ, 0 < r ∧ |
| 33 | Metric.ball (extChartAt (𝓡 n) q q) r ⊆ (extChartAt (𝓡 n) q).target ∧ |
| 34 | ∃ C : ℝ≥0, LipschitzOnWith C (extChartAt (𝓡 n) q).symm |
| 35 | (Metric.ball (extChartAt (𝓡 n) q q) r) := by |
| 36 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 37 | ⟨g.toRiemannianMetric⟩ |
| 38 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 39 | (TangentSpace (𝓡 n) : M → Type _) := |
| 40 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 41 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 42 | let (x : EuclideanSpace ℝ (Fin n)) : NormedAddCommGroup (TangentSpace (𝓡 n) x) := |
| 43 | normedAddCommGroupTangentSpaceVectorSpace x |
| 44 | let (x : EuclideanSpace ℝ (Fin n)) : NormedSpace ℝ (TangentSpace (𝓡 n) x) := |
| 45 | normedSpaceTangentSpaceVectorSpace x |
| 46 | obtain ⟨C, hC, hbound⟩ := eventually_norm_mfderivWithin_symm_extChartAt_lt (𝓡 n) q |
| 47 | have hbound' : ∀ᶠ y in 𝓝 (extChartAt (𝓡 n) q q), |
| 48 | ‖mfderiv (𝓡 n) (𝓡 n) (extChartAt (𝓡 n) q).symm y‖ < C := by |
| 49 | simpa only [modelWithCornersSelf_coe, range_id, nhdsWithin_univ, mfderivWithin_univ] |
| 50 | using hbound |
| 51 | obtain ⟨r, hr, hrsub⟩ := Metric.mem_nhds_iff.mp |
| 52 | (Filter.inter_mem (extChartAt_target_mem_nhds (I := 𝓡 n) q) hbound') |
| 53 | have htarget : Metric.ball (extChartAt (𝓡 n) q q) r ⊆ (extChartAt (𝓡 n) q).target := |
| 54 | fun y hy ↦ (hrsub hy).1 |
| 55 | refine ⟨r, hr, htarget, ⟨C, hC.le⟩, ?_⟩ |
| 56 | intro x hx y hy |
| 57 | apply riemannianEDist_le_of_differential_bound g (convex_ball _ _) Metric.isOpen_ball |
| 58 | ((contMDiffOn_extChartAt_symm (I := 𝓡 n) (n := 1) q).mono htarget) ?_ hx hy |
| 59 | intro z hz v |
| 60 | have hvnorm : ‖mfderiv (𝓡 n) (𝓡 n) (extChartAt (𝓡 n) q).symm z v‖ = |
| 61 | g.tangentNorm ((extChartAt (𝓡 n) q).symm z) |
| 62 | (mfderiv (𝓡 n) (𝓡 n) (extChartAt (𝓡 n) q).symm z v) := |
| 63 | norm_eq_sqrt_real_inner _ |
| 64 | rw [← hvnorm] |
| 65 | exact (mfderiv (𝓡 n) (𝓡 n) (extChartAt (𝓡 n) q).symm z).le_opNorm v |>.trans |
| 66 | (mul_le_mul_of_nonneg_right (hrsub hz).2.le (norm_nonneg _)) |
| 67 | |
| 68 | end PoincareMT.ReducedVolume |