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.Exponential.Families.FamilyDensity |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Families.ClosedFamilyPrimitive |
| 3 | |
| 4 | /-! |
| 5 | # Smooth actions of actual closed-time families |
| 6 | |
| 7 | Morgan-Tian equation (6.2), Lemma 6.22 and Proposition 6.30, |
| 8 | pp. 106, 115-116, 118-119. The genuine within square-time velocity |
| 9 | defines the density; integration over each retained prefix is smooth |
| 10 | in every finite-dimensional parameter. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {P : Type} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 25 | |
| 26 | /-- The actual square-density integral of a parameterized family, |
| 27 | with the retained time set determining its within velocity, |
| 28 | equation (6.2) and Proposition 6.30, pp. 106, 118-119. -/ |
| 29 | noncomputable def squareFamilyAction (G : GeneralizedLGeometryTransport n X time I) |
| 30 | (γ : ℝ × P → G.Point) (C : Set ℝ) (a b : ℝ) (p : P) : ℝ := |
| 31 | ∫ s in a..b, squareCurveDensity G (fun r => γ (r, p)) C s |
| 32 | |
| 33 | set_option maxHeartbeats 800000 in |
| 34 | -- The actual density retains its dependent spacetime velocity during integral composition. |
| 35 | /-- Every actual prefix square action is smooth in the open family |
| 36 | parameters, including when either square-time endpoint is physical, |
| 37 | Lemma 6.22 and Proposition 6.30, pp. 115-116, 118-119. -/ |
| 38 | theorem squareFamilyAction_contDiffOn [FiniteDimensional ℝ P] |
| 39 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) {a b c : ℝ} (hab : a < b) |
| 40 | {U : Set P} (hU : IsOpen U) {γ : ℝ × P → G.Point} |
| 41 | (hγ : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, P))) (spacetimeModel n) ∞ γ (Icc a b ×ˢ U)) |
| 42 | (hc : c ∈ Icc a b) : |
| 43 | ContDiffOn ℝ ∞ (squareFamilyAction G γ (Icc a b) a c) U := by |
| 44 | let f : ℝ × P → ℝ := fun z => squareCurveDensity G (fun r => γ (r, z.2)) (Icc a b) z.1 |
| 45 | have hd : ContDiffOn ℝ ∞ f (Icc a b ×ˢ U) := |
| 46 | squareFamilyDensity_contDiffOn hM12 (uniqueDiffOn_Icc hab) hU hγ |
| 47 | have hi : ContDiffOn ℝ ∞ (fun z : P × ℝ => ∫ s in a..z.2, f (s, z.1)) (U ×ˢ Icc a b) := |
| 48 | closedFamilyPrimitive_contDiffOn (E := P) (F := ℝ) hab hU f hd |
| 49 | change ContDiffOn ℝ ∞ (fun p : P => ∫ s in a..c, f (s, p)) U |
| 50 | exact hi.comp (contDiffOn_id.prodMk contDiffOn_const) (fun _ hz => ⟨hz, hc⟩) |
| 51 | |
| 52 | end PoincareMT.M14 |