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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/FamilyEquation.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Basic |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Connection.CurvatureIndependence |
| 7 | |
| 8 | /-! |
| 9 | # Native endpoint and connection bridges for short-time existence |
| 10 | |
| 11 | The analytic DeTurck construction naturally supplies a one-sided derivative on |
| 12 | `Set.Ici 0`. The public M03 contract asks for the same derivative within the |
| 13 | half-open interval `Set.Ico 0 T`. This file records that restriction and the |
| 14 | connection-independence step in the native PoincareMT types. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open scoped Manifold ContDiff |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} |
| 26 | [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 28 | [IsManifold (𝓡 n) ∞ M] |
| 29 | |
| 30 | theorem hasDerivWithinAt_Ico_of_Ici |
| 31 | {f : ℝ → ℝ} {d : ℝ} {T t : ℝ} |
| 32 | (hT : 0 < T) (ht : t ∈ Set.Ico 0 T) |
| 33 | (h : HasDerivWithinAt f d (Set.Ici 0) t) : |
| 34 | HasDerivWithinAt f d (Set.Ico 0 T) t := by |
| 35 | exact h.mono (fun s hs => hs.1) |
| 36 | |
| 37 | theorem ricciEquation_connectionIndependent |
| 38 | {g : ℝ → RiemannianMetric n M} {J : Set ℝ} |
| 39 | (t : ℝ) (ht : t ∈ J) (D D' : LeviCivitaData (g t)) |
| 40 | {x : M} {u v : TangentSpace (𝓡 n) x} |
| 41 | (h : HasDerivWithinAt (fun s ↦ (g s).inner x u v) |
| 42 | (-2 * D.ricci x u v) J t) : |
| 43 | HasDerivWithinAt (fun s ↦ (g s).inner x u v) |
| 44 | (-2 * D'.ricci x u v) J t := by |
| 45 | rw [D.ricci_eq D' x u v] at h |
| 46 | exact h |
| 47 | |
| 48 | theorem metricFamily_of_selected_connection |
| 49 | {g0 : RiemannianMetric n M} {T : ℝ} |
| 50 | (hT : 0 < T) (g : ℝ → RiemannianMetric n M) |
| 51 | (D : ∀ s : ℝ, LeviCivitaData (g s)) |
| 52 | (hg0 : g 0 = g0) |
| 53 | (hsm : RiemannianMetric.IsSmoothFamilyOn g (Set.Ico 0 T)) |
| 54 | (hEq : ∀ (t : ℝ), t ∈ Set.Ici 0 → t < T → ∀ (x : M) |
| 55 | (u v : TangentSpace (𝓡 n) x), |
| 56 | HasDerivWithinAt (fun s ↦ (g s).inner x u v) |
| 57 | (-2 * (D t).ricci x u v) (Set.Ici 0) t) : |
| 58 | ∃ T : ℝ, 0 < T ∧ ∃ g : ℝ → RiemannianMetric n M, |
| 59 | g 0 = g0 ∧ RiemannianMetric.IsSmoothFamilyOn g (Set.Ico 0 T) ∧ |
| 60 | ∀ (t : ℝ), t ∈ Set.Ico 0 T → ∀ (D' : LeviCivitaData (g t)) |
| 61 | (x : M) (u v : TangentSpace (𝓡 n) x), |
| 62 | HasDerivWithinAt (fun s ↦ (g s).inner x u v) |
| 63 | (-2 * D'.ricci x u v) (Set.Ico 0 T) t := by |
| 64 | refine ⟨T, hT, g, hg0, hsm, ?_⟩ |
| 65 | intro t ht D' x u v |
| 66 | have hIci := hEq t ht.1 ht.2 x u v |
| 67 | have hIco := hasDerivWithinAt_Ico_of_Ici hT ht hIci |
| 68 | exact ricciEquation_connectionIndependent t ht (D t) D' hIco |
| 69 | |
| 70 | end PoincareMT |