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.Generalized.ReducedGeometry.Calculus.Energy.FiniteEnergyMomentum |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Variation.Coordinates.ClosedChartCoefficients |
| 4 | |
| 5 | /-! |
| 6 | # Closed regularity from finite quadratic momentum |
| 7 | |
| 8 | The endpoint argument in Morgan-Tian Lemma 6.8, pp. 108-109. |
| 9 | Actual spatial within derivatives are smooth on the closed time |
| 10 | product. Compact coefficient bounds and finite L2 velocity supply the |
| 11 | integrable force required by the finite-energy momentum bootstrap. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- Riesz operators use the same real Hilbert structure as the quadratic forms. |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | -- Spatial derivatives of bilinear forms are triple operator spaces. |
| 18 | set_option synthInstance.maxSize 2048 |
| 19 | |
| 20 | open Set Filter MeasureTheory |
| 21 | open scoped ContDiff Topology |
| 22 | |
| 23 | namespace ODE |
| 24 | |
| 25 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 26 | [FiniteDimensional ℝ E] [CompleteSpace E] |
| 27 | |
| 28 | private noncomputable local instance dualNormedGroup : NormedAddCommGroup (E →L[ℝ] ℝ) := |
| 29 | ContinuousLinearMap.toNormedAddCommGroup |
| 30 | |
| 31 | private noncomputable local instance dualNormedSpace : NormedSpace ℝ (E →L[ℝ] ℝ) := |
| 32 | ContinuousLinearMap.toNormedSpace |
| 33 | |
| 34 | private noncomputable local instance bilinearNormedGroup : |
| 35 | NormedAddCommGroup (E →L[ℝ] E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup |
| 36 | |
| 37 | private noncomputable local instance bilinearNormedSpace : |
| 38 | NormedSpace ℝ (E →L[ℝ] E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedSpace |
| 39 | |
| 40 | private noncomputable local instance trilinearNormedGroup : |
| 41 | NormedAddCommGroup (E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup |
| 42 | |
| 43 | private noncomputable local instance trilinearNormedSpace : |
| 44 | NormedSpace ℝ (E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedSpace |
| 45 | |
| 46 | /-- Positive smooth quadratic coefficients and finite interior L2 |
| 47 | velocity give actual closed endpoint regularity from the momentum |
| 48 | equation, the analytic step in Lemma 6.8, pp. 108-109. -/ |
| 49 | theorem contDiffOn_of_finite_quadratic_momentum {a b : ℝ} (hab : a < b) |
| 50 | {S : Set E} (hS : IsOpen S) |
| 51 | (B : ℝ × E → E →L[ℝ] E →L[ℝ] ℝ) (V : ℝ × E → ℝ) |
| 52 | (hB : ContDiffOn ℝ ∞ B (Icc a b ×ˢ S)) (hV : ContDiffOn ℝ ∞ V (Icc a b ×ˢ S)) |
| 53 | (hpos : ∀ z ∈ Icc a b ×ˢ S, ∀ v : E, v ≠ 0 → 0 < B z v v) |
| 54 | (u d : ℝ → E) (hu : ContinuousOn u (Icc a b)) (hmem : MapsTo u (Icc a b) S) |
| 55 | (hud : ∀ s ∈ Ioo a b, HasDerivAt u (d s) s) |
| 56 | (hd : MemLp d 2 (volume.restrict (Icc a b))) |
| 57 | (hPd : ∀ s ∈ Ioo a b, |
| 58 | HasDerivAt (fun r => PoincareMT.M08.chartMomentumVector (B (r, u r)) (d r)) |
| 59 | (PoincareMT.M08.chartForceVector |
| 60 | (PoincareMT.M08.spatialWithinFDeriv (Icc a b) S B (s, u s)) |
| 61 | (PoincareMT.M08.spatialWithinFDeriv (Icc a b) S V (s, u s)) (d s)) s) : |
| 62 | ContDiffOn ℝ ∞ u (Icc a b) ∧ EqOn (derivWithin u (Icc a b)) d (Ioo a b) ∧ |
| 63 | ∀ s ∈ Icc a b, |
| 64 | HasDerivWithinAt |
| 65 | (fun r => PoincareMT.M08.chartMomentumVector (B (r, u r)) |
| 66 | (derivWithin u (Icc a b) r)) |
| 67 | (PoincareMT.M08.chartForceVector |
| 68 | (PoincareMT.M08.spatialWithinFDeriv (Icc a b) S B (s, u s)) |
| 69 | (PoincareMT.M08.spatialWithinFDeriv (Icc a b) S V (s, u s)) |
| 70 | (derivWithin u (Icc a b) s)) (Icc a b) s := by |
| 71 | let C := Icc a b |
| 72 | let DB := PoincareMT.M08.spatialWithinFDeriv C S B |
| 73 | let DV := PoincareMT.M08.spatialWithinFDeriv C S V |
| 74 | have hDB : ContDiffOn ℝ ∞ DB (C ×ˢ S) := |
| 75 | PoincareMT.M08.spatialWithinFDeriv_contDiffOn (uniqueDiffOn_Icc hab) hS B hB |
| 76 | have hDV : ContDiffOn ℝ ∞ DV (C ×ˢ S) := |
| 77 | PoincareMT.M08.spatialWithinFDeriv_contDiffOn (uniqueDiffOn_Icc hab) hS V hV |
| 78 | let A := fun z : ℝ × E => InnerProductSpace.continuousLinearMapOfBilin (B z) |
| 79 | let F := fun t (z : E × E) => PoincareMT.M08.chartForceVector (DB (t, z.1)) (DV (t, z.1)) z.2 |
| 80 | have hA : ContDiffOn ℝ ∞ A (C ×ˢ S) := contDiffOn_const.clm_comp hB |
| 81 | have hunit : ∀ z ∈ C ×ˢ S, IsUnit (A z) := |
| 82 | fun z hz => PoincareMT.M08.positive_form_operator_isUnit (B z) (hpos z hz) |
| 83 | let Ω := C ×ˢ (S ×ˢ (univ : Set E)) |
| 84 | let k := fun z : ℝ × (E × E) => (z.1, z.2.1) |
| 85 | have hk : ContDiffOn ℝ ∞ k Ω := contDiffOn_fst.prodMk contDiffOn_snd.fst |
| 86 | have hkmap : MapsTo k Ω (C ×ˢ S) := fun _ hz => ⟨hz.1, hz.2.1⟩ |
| 87 | have hargs : ContDiffOn ℝ ∞ |
| 88 | (fun z : ℝ × (E × E) => ((DB (z.1, z.2.1), DV (z.1, z.2.1)), z.2.2)) Ω := |
| 89 | ((hDB.comp hk hkmap).prodMk (hDV.comp hk hkmap)).prodMk contDiffOn_snd.snd |
| 90 | have hforce := (PoincareMT.M08.chartForceVector_contDiff (E := E)).comp_contDiffOn hargs |
| 91 | have hF : ContDiffOn ℝ ∞ (Function.uncurry F) Ω := by |
| 92 | apply hforce.congr |
| 93 | intro z _ |
| 94 | rfl |
| 95 | have hgraph : ContinuousOn (fun s => (s, u s)) C := continuousOn_id.prodMk hu |
| 96 | have hgraphmem : MapsTo (fun s => (s, u s)) C (C ×ˢ S) := |
| 97 | fun _ hs => ⟨hs, hmem hs⟩ |
| 98 | have hBc := hB.continuousOn.comp hgraph hgraphmem |
| 99 | have hDBc := hDB.continuousOn.comp hgraph hgraphmem |
| 100 | have hDVc := hDV.continuousOn.comp hgraph hgraphmem |
| 101 | obtain ⟨cB, hcB⟩ := isCompact_Icc.exists_bound_of_continuousOn hBc |
| 102 | obtain ⟨cDB, hcDB⟩ := isCompact_Icc.exists_bound_of_continuousOn hDBc |
| 103 | obtain ⟨cDV, hcDV⟩ := isCompact_Icc.exists_bound_of_continuousOn hDVc |
| 104 | let K := |cB| + |cDB| + |cDV| |
| 105 | have hK : 0 ≤ K := by positivity |
| 106 | have hbnd : ∀ s ∈ C, ‖B (s, u s)‖ ≤ K ∧ ‖DB (s, u s)‖ ≤ K ∧ ‖DV (s, u s)‖ ≤ K := by |
| 107 | intro s hs |
| 108 | have hb := hcB s hs |
| 109 | have hdb := hcDB s hs |
| 110 | have hdv := hcDV s hs |
| 111 | dsimp only [Function.comp_apply] at hb hdb hdv |
| 112 | dsimp only [K] |
| 113 | constructor |
| 114 | · linarith [le_abs_self cB, abs_nonneg cDB, abs_nonneg cDV] |
| 115 | constructor |
| 116 | · linarith [le_abs_self cDB, abs_nonneg cB, abs_nonneg cDV] |
| 117 | · linarith [le_abs_self cDV, abs_nonneg cB, abs_nonneg cDB] |
| 118 | have hQ := (PoincareMT.M08.chart_momentum_force_intervalIntegrable hab.le hK d hd |
| 119 | (fun s => B (s, u s)) (fun s => DB (s, u s)) (fun s => DV (s, u s)) |
| 120 | hBc hDBc hDVc hbnd).2 |
| 121 | exact contDiffOn_of_finite_energy_momentum hab A F hA hunit hF u d hu hmem hud hd hQ hPd |
| 122 | |
| 123 | end ODE |