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.Generalized.ReducedGeometry.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Local.ClosedODELocalExistence |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Families.ClosedEulerODE |
| 4 | |
| 5 | /-! |
| 6 | # Local families for the actual closed Euler phase |
| 7 | |
| 8 | Morgan-Tian Lemma 6.18, pp. 113-114. M08's actual phase is smooth |
| 9 | on the closed time slab and open phase domain. Restricting the slab |
| 10 | preserves its genuine spatial derivatives. The closed Picard family |
| 11 | thus solves the actual phase equation on its own clipped interval. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- The retained chart coefficient operators use the standard tangent models. |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Metric |
| 19 | open scoped Manifold ContDiff |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M14 |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | |
| 28 | /-- The actual closed Euler phase is unchanged when its time set |
| 29 | is restricted at a retained point. The spatial derivatives are |
| 30 | genuine derivatives on the open chart target, as required by |
| 31 | equation (6.5) and Lemma 6.18, pp. 108-109, 113-114. -/ |
| 32 | theorem closedChartEulerPhase_restrict {J C D : Set ℝ} (F : RicciFlow n M J) |
| 33 | (hM04 : RicciFlowCurvatureTheory.{u}) (T : ℝ) (x₀ : M) |
| 34 | (htime : ∀ s ∈ C, T - s ^ 2 ∈ J) (hDC : D ⊆ C) {s : ℝ} (hs : s ∈ D) |
| 35 | {z : EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n)} |
| 36 | (hz : z.1 ∈ (extChartAt (𝓡 n) x₀).target) : |
| 37 | M08.closedChartEulerPhase F T x₀ D s z = M08.closedChartEulerPhase F T x₀ C s z := by |
| 38 | have hU := isOpen_extChartAt_target (I := 𝓡 n) x₀ |
| 39 | have hB := (M08.hasFDerivAt_spatialWithin hU _ |
| 40 | (M08.chartActionMetric_closed_contDiffOn F T x₀ (fun t ht => htime t (hDC ht))) hs hz).unique |
| 41 | (M08.hasFDerivAt_spatialWithin hU _ |
| 42 | (M08.chartActionMetric_closed_contDiffOn F T x₀ htime) (hDC hs) hz) |
| 43 | have hP := (M08.hasFDerivAt_spatialWithin hU _ |
| 44 | (M08.chartActionPotential_closed_contDiffOn F hM04 T x₀ |
| 45 | (fun t ht => htime t (hDC ht))) hs hz).unique |
| 46 | (M08.hasFDerivAt_spatialWithin hU _ |
| 47 | (M08.chartActionPotential_closed_contDiffOn F hM04 T x₀ htime) (hDC hs) hz) |
| 48 | simp only [M08.closedChartEulerPhase, hB, hP] |
| 49 | |
| 50 | /-- A local jointly continuous family of actual closed Euler phases |
| 51 | exists through all sufficiently nearby initial phases and remains |
| 52 | inside the chart. Each time curve is smooth, including its closed |
| 53 | endpoints. This is the local existence part of Lemma 6.18, pp. 113-114. -/ |
| 54 | theorem exists_closedChartEulerPhase_family {J : Set ℝ} (F : RicciFlow n M J) |
| 55 | (hM04 : RicciFlowCurvatureTheory.{u}) (T : ℝ) (x₀ : M) |
| 56 | {a b s₀ : ℝ} (hab : a < b) (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ J) |
| 57 | (hs₀ : s₀ ∈ Icc a b) |
| 58 | {z₀ : EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n)} |
| 59 | (hz₀ : z₀.1 ∈ (extChartAt (𝓡 n) x₀).target) : |
| 60 | ∃ δ > (0 : ℝ), ∃ r > (0 : ℝ), |
| 61 | let C := Icc (max a (s₀ - δ)) (min b (s₀ + δ)) |
| 62 | max a (s₀ - δ) < min b (s₀ + δ) ∧ |
| 63 | ∃ α : (EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n)) × ℝ → |
| 64 | EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n), |
| 65 | ContinuousOn α (closedBall z₀ r ×ˢ C) ∧ |
| 66 | ∀ z ∈ closedBall z₀ r, α (z, s₀) = z ∧ |
| 67 | (∀ s ∈ C, (α (z, s)).1 ∈ (extChartAt (𝓡 n) x₀).target) ∧ |
| 68 | ContDiffOn ℝ ∞ (fun s => α (z, s)) C ∧ |
| 69 | ∀ s ∈ C, HasDerivWithinAt (fun t => α (z, t)) |
| 70 | (M08.closedChartEulerPhase F T x₀ C s (α (z, s))) C s := by |
| 71 | obtain ⟨δ, hδ, r, hr, hcd, α, hc, hα⟩ := closedODE_exists_local_family hab |
| 72 | ((isOpen_extChartAt_target (I := 𝓡 n) x₀).prod isOpen_univ) |
| 73 | (Function.uncurry (M08.closedChartEulerPhase F T x₀ (Icc a b))) |
| 74 | (M08.closedChartEulerPhase_contDiffOn F hM04 T x₀ (uniqueDiffOn_Icc hab) htime) |
| 75 | hs₀ ⟨hz₀, mem_univ _⟩ |
| 76 | refine ⟨δ, hδ, r, hr, hcd, α, hc, ?_⟩ |
| 77 | intro z hz |
| 78 | obtain ⟨hi, hmap, hsm, hd⟩ := hα z hz |
| 79 | refine ⟨hi, fun s hs => (hmap hs).1, hsm, ?_⟩ |
| 80 | intro s hs |
| 81 | have hsub : Icc (max a (s₀ - δ)) (min b (s₀ + δ)) ⊆ Icc a b := |
| 82 | fun t ht => ⟨(le_max_left _ _).trans ht.1, ht.2.trans (min_le_left _ _)⟩ |
| 83 | rw [closedChartEulerPhase_restrict F hM04 T x₀ htime hsub hs (hmap hs).1] |
| 84 | exact hd s hs |
| 85 | |
| 86 | end PoincareMT.M14 |