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.Local.CompactSpatialJets |
| 3 | |
| 4 | /-! |
| 5 | # Constants for the compact quadratic action comparison |
| 6 | |
| 7 | The local short-time argument in Morgan-Tian Corollary 6.79, |
| 8 | pp. 144-145. Actual smooth metric and potential coefficients on a |
| 9 | closed time product give one positive coercivity constant and one |
| 10 | common spatial Lipschitz constant for the required jets. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | -- Spatial derivatives of metric coefficients have nested operator codomains. |
| 15 | set_option synthInstance.maxSize 2048 |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped ContDiff NNReal Topology |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 23 | |
| 24 | /-- Positive smooth quadratic coefficients have uniform coercivity |
| 25 | and the three spatial Lipschitz bounds used in Corollary 6.79, |
| 26 | pp. 144-145, on a compact convex coordinate region. -/ |
| 27 | theorem exists_quadratic_coefficient_bounds {a b : ℝ} (hab : a < b) |
| 28 | {U S : Set E} (hU : IsOpen U) (hS : IsCompact S) (hconvex : Convex ℝ S) (hsub : S ⊆ U) |
| 29 | (B : ℝ × E → E →L[ℝ] E →L[ℝ] ℝ) (V : ℝ × E → ℝ) |
| 30 | (hB : ContDiffOn ℝ ∞ B (Icc a b ×ˢ U)) (hV : ContDiffOn ℝ ∞ V (Icc a b ×ˢ U)) |
| 31 | (hpos : ∀ z ∈ Icc a b ×ˢ U, ∀ v : E, v ≠ 0 → 0 < B z v v) : |
| 32 | ∃ m : ℝ, 0 < m ∧ ∃ K : ℝ≥0, |
| 33 | (∀ z ∈ Icc a b ×ˢ S, ∀ v : E, m * ‖v‖ ^ 2 ≤ B z v v) ∧ |
| 34 | ∀ s ∈ Icc a b, |
| 35 | LipschitzOnWith K (fun z => B (s, z)) S ∧ |
| 36 | LipschitzOnWith K (fun z => M08.spatialWithinFDeriv (Icc a b) U B (s, z)) S ∧ |
| 37 | LipschitzOnWith K (fun z => M08.spatialWithinFDeriv (Icc a b) U V (s, z)) S := by |
| 38 | have hsmall : Icc a b ×ˢ S ⊆ Icc a b ×ˢ U := prod_mono_right hsub |
| 39 | obtain ⟨m, hm, hcoercive⟩ := M08.compact_positive_forms_coercive |
| 40 | (isCompact_Icc.prod hS) B (hB.continuousOn.mono hsmall) |
| 41 | (fun z hz => hpos z (hsmall hz)) |
| 42 | have hDB := M08.spatialWithinFDeriv_contDiffOn (uniqueDiffOn_Icc hab) hU B hB |
| 43 | have hDV := M08.spatialWithinFDeriv_contDiffOn (uniqueDiffOn_Icc hab) hU V hV |
| 44 | obtain ⟨K₀, hK₀⟩ := compact_spatial_lipschitz_within hab hU hS hconvex hsub B hB |
| 45 | obtain ⟨K₁, hK₁⟩ := compact_spatial_lipschitz_within hab hU hS hconvex hsub _ hDB |
| 46 | obtain ⟨K₂, hK₂⟩ := compact_spatial_lipschitz_within hab hU hS hconvex hsub _ hDV |
| 47 | refine ⟨m, hm, K₀ + K₁ + K₂, hcoercive, ?_⟩ |
| 48 | intro s hs |
| 49 | refine ⟨(hK₀ s hs).weaken ?_, (hK₁ s hs).weaken ?_, (hK₂ s hs).weaken ?_⟩ |
| 50 | · exact (le_add_of_nonneg_right (show 0 ≤ K₁ from zero_le)).trans |
| 51 | (le_add_of_nonneg_right (show 0 ≤ K₂ from zero_le)) |
| 52 | · exact (le_add_of_nonneg_left (show 0 ≤ K₀ from zero_le)).trans |
| 53 | (le_add_of_nonneg_right (show 0 ≤ K₂ from zero_le)) |
| 54 | · exact le_add_of_nonneg_left (show 0 ≤ K₀ + K₁ from zero_le) |
| 55 | |
| 56 | /-- Every positive kinetic coefficient dominates a fixed quadratic |
| 57 | position error on all sufficiently short intervals, the time choice |
| 58 | in Corollary 6.79, pp. 144-145. -/ |
| 59 | theorem exists_short_quadratic_interval {m β η : ℝ} (hm : 0 < m) (hη : 0 < η) : |
| 60 | ∃ d : ℝ, 0 < d ∧ d ≤ η ∧ ∀ b ∈ Ioc (0 : ℝ) d, 0 < m / 4 - β * b ^ 2 := by |
| 61 | have hc : ContinuousAt (fun b : ℝ => m / 4 - β * b ^ 2) 0 := by fun_prop |
| 62 | have hpos : 0 < m / 4 - β * (0 : ℝ) ^ 2 := by simpa using div_pos hm (by norm_num : (0 : ℝ) < 4) |
| 63 | have hevent : ∀ᶠ b in 𝓝 (0 : ℝ), 0 < m / 4 - β * b ^ 2 := hc.eventually (Ioi_mem_nhds hpos) |
| 64 | obtain ⟨ε, hε, hbound⟩ := Metric.eventually_nhds_iff.mp hevent |
| 65 | refine ⟨min η (ε / 2), lt_min hη (half_pos hε), min_le_left _ _, ?_⟩ |
| 66 | intro b hb |
| 67 | apply hbound |
| 68 | rw [dist_zero_right, Real.norm_eq_abs, abs_of_pos hb.1] |
| 69 | exact (hb.2.trans (min_le_right _ _)).trans_lt (half_lt_self hε) |
| 70 | |
| 71 | end PoincareMT.M14 |