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.Coordinates.SquareChartMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.CoordinatePhase |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.ODE.TimeDependentFlow |
| 4 | |
| 5 | /-! |
| 6 | # Actual regularized chart flows at variable initial times |
| 7 | |
| 8 | These local restart families retain the original time window and chart |
| 9 | target while varying initial time, position, and velocity together. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option maxSynthPendingDepth 3 |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedLength |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 23 | [IsManifold (𝓡 n) ∞ M] |
| 24 | |
| 25 | local notation "E" => EuclideanSpace ℝ (Fin n) |
| 26 | |
| 27 | theorem exists_squareChart_local_flow {J : Set ℝ} (F : RicciFlow n M J) |
| 28 | (hM04 : RicciFlowCurvatureTheory.{u}) |
| 29 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 30 | (p : M) (z0 : ℝ × (E × E)) |
| 31 | (hz0 : z0.1 ∈ Set.Ioo (-Real.sqrt b) (Real.sqrt b) ∧ |
| 32 | z0.2.1 ∈ (chartAt E p).target) : |
| 33 | let S : Set (ℝ × (E × E)) := |
| 34 | {z | z.1 ∈ Set.Ioo (-Real.sqrt b) (Real.sqrt b) ∧ z.2.1 ∈ (chartAt E p).target} |
| 35 | ∃ (beta : (ℝ × (E × E)) × ℝ → E × E) (W : Set (ℝ × (E × E))) (d : ℝ), |
| 36 | IsOpen W ∧ z0 ∈ W ∧ W ⊆ S ∧ 0 < d ∧ |
| 37 | ContDiffOn ℝ ∞ beta (W ×ˢ Set.Ioo (-d) d) ∧ |
| 38 | (∀ z ∈ W, beta (z, 0) = z.2) ∧ |
| 39 | ∀ z ∈ W, ∀ t ∈ Set.Ioo (-d) d, |
| 40 | (z.1 + t, beta (z, t)) ∈ S ∧ |
| 41 | HasDerivAt (fun r ↦ beta (z, r)) |
| 42 | (regularizedCoordinatePhase (squareChartMetric F T p) (squareChartScalar F T p) |
| 43 | (z.1 + t, beta (z, t))) t := by |
| 44 | let U := Set.Ioo (-Real.sqrt b) (Real.sqrt b) ×ˢ (chartAt E p).target |
| 45 | let S : Set (ℝ × (E × E)) := {z | (z.1, z.2.1) ∈ U} |
| 46 | have hU : IsOpen U := isOpen_Ioo.prod (chartAt E p).open_target |
| 47 | have hS : IsOpen S := |
| 48 | hU.preimage (continuous_fst.prodMk (continuous_fst.comp continuous_snd)) |
| 49 | have hphase : ContDiffOn ℝ ∞ |
| 50 | (regularizedCoordinatePhase (squareChartMetric F T p) (squareChartScalar F T p)) S := |
| 51 | regularizedCoordinatePhase_smooth _ _ U hU |
| 52 | (squareChartMetric_smooth F T b hb hwindow p) |
| 53 | (squareChartScalar_smooth F hM04 T b hb hwindow p) |
| 54 | (fun z hz v hv ↦ squareChartMetric_pos F T p z hz.2 v hv) |
| 55 | exact exists_local_smooth_timeDependent_flow S hS _ hphase z0 hz0 |
| 56 | |
| 57 | end PoincareMT.ReducedLength |