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.ReducedGeometry.LGeometry.Variation.Coordinates.ClosedChartCoefficients |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.Charts.ChartCoercivity |
| 4 | import Mathlib.Analysis.Calculus.MeanValue |
| 5 | |
| 6 | /-! |
| 7 | # Uniform spatial coefficient bounds on a closed time product |
| 8 | |
| 9 | The local coordinate comparison for Morgan-Tian Corollary 6.79, |
| 10 | pp. 144-145. Compactness bounds actual spatial within derivatives; |
| 11 | the convex mean-value estimate gives constants uniform in the |
| 12 | retained closed time interval, including physical time endpoints. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- Spatial derivatives of quadratic coefficients use nested operator spaces. |
| 17 | set_option synthInstance.maxSize 2048 |
| 18 | |
| 19 | open Set |
| 20 | open scoped ContDiff NNReal |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 25 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 26 | |
| 27 | /-- Smooth closed-time coefficients are uniformly Lipschitz in space |
| 28 | on a compact convex spatial set, the coefficient bound in the local |
| 29 | comparison for Corollary 6.79, pp. 144-145. -/ |
| 30 | theorem compact_spatial_lipschitz_within {a b : ℝ} (hab : a < b) |
| 31 | {U S : Set E} (hU : IsOpen U) (hS : IsCompact S) (hconvex : Convex ℝ S) (hsub : S ⊆ U) |
| 32 | (f : ℝ × E → F) (hf : ContDiffOn ℝ ∞ f (Icc a b ×ˢ U)) : |
| 33 | ∃ K : ℝ≥0, ∀ s ∈ Icc a b, LipschitzOnWith K (fun z => f (s, z)) S := by |
| 34 | let D := M08.spatialWithinFDeriv (Icc a b) U f |
| 35 | have hD := M08.spatialWithinFDeriv_contDiffOn (uniqueDiffOn_Icc hab) hU f hf |
| 36 | have hsmall : Icc a b ×ˢ S ⊆ Icc a b ×ˢ U := prod_mono_right hsub |
| 37 | obtain ⟨C, hC⟩ := (isCompact_Icc.prod hS).exists_bound_of_continuousOn |
| 38 | (hD.continuousOn.mono hsmall) |
| 39 | refine ⟨⟨max C 0, le_max_right _ _⟩, ?_⟩ |
| 40 | intro s hs |
| 41 | apply hconvex.lipschitzOnWith_of_nnnorm_hasFDerivWithin_le |
| 42 | (fun z hz => (M08.hasFDerivAt_spatialWithin hU f hf hs (hsub hz)).hasFDerivWithinAt) |
| 43 | intro z hz |
| 44 | change ‖D (s, z)‖ ≤ max C 0 |
| 45 | exact (hC (s, z) ⟨hs, hz⟩).trans (le_max_left _ _) |
| 46 | |
| 47 | end PoincareMT.M14 |