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.ChartConnectionVariation |
| 3 | |
| 4 | /-! |
| 5 | # Smooth actual time derivatives of a closed-time family |
| 6 | |
| 7 | Morgan-Tian Lemma 6.18, pp. 113-114. M08's actual time-within |
| 8 | partial, after swapping the factors, is the time derivative of each |
| 9 | curve and remains jointly smooth at closed time endpoints. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped ContDiff |
| 16 | |
| 17 | namespace PoincareMT.M14 |
| 18 | |
| 19 | variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 21 | |
| 22 | /-- Actual within time derivatives vary smoothly with the open |
| 23 | parameter and closed time, with no off-time regularity assumption, |
| 24 | the phase regularity used in Lemma 6.18, pp. 113-114. -/ |
| 25 | theorem closedFamily_timeDerivative_contDiffOn {U : Set E} {C : Set ℝ} |
| 26 | (hU : IsOpen U) (hC : UniqueDiffOn ℝ C) (q : E × ℝ → F) |
| 27 | (hq : ContDiffOn ℝ ∞ q (U ×ˢ C)) : |
| 28 | ContDiffOn ℝ ∞ (fun z => derivWithin (fun s => q (z.1, s)) C z.2) (U ×ˢ C) := by |
| 29 | let f : ℝ × E → F := fun z => q (z.2, z.1) |
| 30 | have hf : ContDiffOn ℝ ∞ f (C ×ˢ U) := |
| 31 | hq.comp (contDiffOn_snd.prodMk contDiffOn_fst) (fun _ hz => ⟨hz.2, hz.1⟩) |
| 32 | have hD := (M08.timeWithinFDeriv_contDiffOn hC hU f hf).comp |
| 33 | (contDiffOn_snd.prodMk contDiffOn_fst) (fun z (hz : z ∈ U ×ˢ C) => ⟨hz.2, hz.1⟩) |
| 34 | apply hD.congr |
| 35 | intro z hz |
| 36 | exact (M08.hasDerivWithinAt_timeWithin f hf hz.2 hz.1).derivWithin (hC z.2 hz.2) |
| 37 | |
| 38 | end PoincareMT.M14 |