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.ReducedLength.Action.FixedMetricSpeed |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Action.SpeedDistance |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.ODE.CompactTangentDisk |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.CurvePhase |
| 5 | |
| 6 | /-! |
| 7 | # Uniform compact confinement of regularized phases |
| 8 | |
| 9 | The fixed-metric speed estimate bounds both displacement and tangent norm. |
| 10 | Completeness supplies the compact base ball, and the actual bundle disk is |
| 11 | compact independently of the particular curve or terminal parameter. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.ReducedLength |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 24 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T3Space M] [SecondCountableTopology M] |
| 25 | |
| 26 | theorem exists_uniform_compact_phase_bound {J : Set ℝ} |
| 27 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 28 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 29 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 30 | (p : M) (b Emax : ℝ) (hb : 0 < b) (hbmax : b < τmax) (hEmax : 0 ≤ Emax) : |
| 31 | ∃ K : Set (ℝ × TangentBundle (𝓡 n) M), IsCompact K ∧ |
| 32 | ∀ (γ : ℝ → M) (U : Set ℝ) (h : ℝ), |
| 33 | 0 ≤ h → h < Real.sqrt b → IsOpen U → Set.Icc 0 h ⊆ U → |
| 34 | ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ γ U → γ 0 = p → |
| 35 | ∀ E : ParametricAlongCurveExtensionOn (n := n) (Set.Icc 0 h) γ |
| 36 | (curveVelocityWithin (n := n) γ (Set.Icc 0 h)), |
| 37 | (∀ s ∈ Set.Icc 0 h, regularizedLGeodesicEquation F T γ (Set.Icc 0 h) E s) → |
| 38 | regularizedCurveEnergy F T γ 0 ≤ Emax → |
| 39 | ∀ s ∈ Set.Icc 0 h, (s, curvePhase (n := n) γ s) ∈ K := by |
| 40 | obtain ⟨C, hC, hspeed⟩ := exists_uniform_initialMetric_speed_bound F hM04 T τmax |
| 41 | hτmax hwindow hcurvature b Emax hb hbmax hEmax |
| 42 | let g := F.metric T |
| 43 | letI : MetricSpace M := selectedMetricSpace g |
| 44 | letI : ProperSpace M := selectedMetricSpace_proper g |
| 45 | (hcurvature.1 T ⟨by linarith, le_rfl⟩) |
| 46 | let B : Set M := Metric.closedBall p (C * Real.sqrt b) |
| 47 | let D : Set (TangentBundle (𝓡 n) M) := |
| 48 | {z | z.proj ∈ B ∧ g.inner z.proj z.2 z.2 ≤ C ^ 2} |
| 49 | have hDc : IsCompact D := isCompact_tangentDisk g B (isCompact_closedBall _ _) |
| 50 | (C ^ 2) (sq_nonneg C) |
| 51 | refine ⟨Set.Icc 0 (Real.sqrt b) ×ˢ D, isCompact_Icc.prod hDc, ?_⟩ |
| 52 | intro γ U h hh hhb hU hIU hγ hstart E heq hE s hs |
| 53 | have hv := hspeed γ U h hh hhb hU hIU hγ E heq hE |
| 54 | have hsub : Set.Icc 0 s ⊆ Set.Icc 0 h := Set.Icc_subset_Icc le_rfl hs.2 |
| 55 | have hdist := selectedMetric_dist_le_of_speed_le g γ 0 s C hs.1 hC.le |
| 56 | ((hγ.of_le (by simp)).mono (hsub.trans hIU)) (fun t ht ↦ hv t (hsub ht)) |
| 57 | have hsqrt : s ≤ Real.sqrt b := hs.2.trans hhb.le |
| 58 | have hbase : γ s ∈ B := by |
| 59 | change dist (γ s) p ≤ C * Real.sqrt b |
| 60 | rw [dist_comm, ← hstart] |
| 61 | exact hdist.trans (by simpa only [sub_zero] using mul_le_mul_of_nonneg_left hsqrt hC.le) |
| 62 | have hnonneg : 0 ≤ g.inner (γ s) (curveVelocity γ s) (curveVelocity γ s) := by |
| 63 | rcases eq_or_ne (curveVelocity (n := n) γ s) 0 with hz | hz |
| 64 | · simp [hz] |
| 65 | · exact (g.pos (γ s) (curveVelocity γ s) hz).le |
| 66 | have hsquare : (g.tangentNorm (γ s) (curveVelocity γ s)) ^ 2 = |
| 67 | g.inner (γ s) (curveVelocity γ s) (curveVelocity γ s) := Real.sq_sqrt hnonneg |
| 68 | have hquadratic : g.inner (γ s) (curveVelocity γ s) (curveVelocity γ s) ≤ C ^ 2 := by |
| 69 | have hnorm := hv s hs |
| 70 | have hn : 0 ≤ g.tangentNorm (γ s) (curveVelocity γ s) := Real.sqrt_nonneg _ |
| 71 | nlinarith |
| 72 | exact ⟨⟨hs.1, hsqrt⟩, hbase, hquadratic⟩ |
| 73 | |
| 74 | end PoincareMT.ReducedLength |