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.Compactness.Convergence.Terminal.SpatialJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Regularity |
| 3 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.AncientVolume.ScalarRatio.Annular.SpacetimeBounds |
| 4 | |
| 5 | /-! # Uniform coordinate jet time estimates through a finite terminal time -/ |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | set_option backward.isDefEq.respectTransparency false |
| 9 | set_option maxSynthPendingDepth 12 |
| 10 | set_option synthInstance.maxHeartbeats 100000 |
| 11 | |
| 12 | open Set Filter |
| 13 | open scoped Manifold ContDiff Bundle Topology |
| 14 | |
| 15 | namespace PoincareMT.SpacetimeBounds |
| 16 | |
| 17 | /-- The uniform interior spatial-jet estimate persists to the actual smooth |
| 18 | terminal slice. Curvature and ellipticity bounds are needed only before it. -/ |
| 19 | theorem exists_terminal_spatialJet_time_constant |
| 20 | (n d : ℕ) (K Z : ℕ → ℝ) (hK : ∀ j, 0 ≤ K j) |
| 21 | {a b : ℝ} (ha : 0 < a) (hb : 0 ≤ b) : |
| 22 | ∃ B : ℝ, 0 ≤ B ∧ |
| 23 | ∀ {M : Type*} [TopologicalSpace M] [T2Space M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | {s T : ℝ} (F : RicciFlow n M (Ioc s T)) |
| 26 | {U : Set (EuclideanSpace ℝ (Fin n))}, IsOpen U → |
| 27 | ∀ {e : EuclideanSpace ℝ (Fin n) → M}, ContMDiffOn (𝓡 n) (𝓡 n) ∞ e U → |
| 28 | (∀ y ∈ U, (mfderiv (𝓡 n) (𝓡 n) e y).IsInvertible) → |
| 29 | ∀ {t : ℝ}, s < t → t < T → T - t ≤ 1 → |
| 30 | ∀ {x : EuclideanSpace ℝ (Fin n)}, x ∈ U → |
| 31 | (∀ r ∈ Ico t T, ∀ v, |
| 32 | a * ‖v‖ ^ 2 ≤ (F.metric r).pullbackCoefficients e x v v ∧ |
| 33 | (F.metric r).pullbackCoefficients e x v v ≤ b * ‖v‖ ^ 2) → |
| 34 | (∀ j ≤ d, ∀ r ∈ Ico t T, |
| 35 | (F.connection r).curvatureDerivativeNorm j (e x) ≤ K j) → |
| 36 | (∀ j ≤ d, ‖iteratedFDeriv ℝ j ((F.metric t).pullbackCoefficients e) x‖ ≤ Z j) → |
| 37 | ∀ j ≤ d, |
| 38 | ‖iteratedFDeriv ℝ j ((F.metric T).pullbackCoefficients e) x - |
| 39 | iteratedFDeriv ℝ j ((F.metric t).pullbackCoefficients e) x‖ ≤ B * (T - t) := by |
| 40 | obtain ⟨B, hB, htime⟩ := exists_spatialJet_time_lipschitz_constant n d K Z hK ha hb |
| 41 | refine ⟨B, hB, ?_⟩ |
| 42 | intro M _ _ _ _ s T F U hU e he hi t hst htT hlen x hx hell hcurv hinit j hj |
| 43 | let Fint := Poincare.Geometry.RicciFlow.Harnack.restrictFlow F |
| 44 | (show Ioo s T ⊆ Ioc s T from fun r hr => ⟨hr.1, hr.2.le⟩) ordConnected_Ioo |
| 45 | (show (Ioo s T).Nontrivial from |
| 46 | ⟨(2 * s + T) / 3, ⟨by linarith, by linarith⟩, |
| 47 | (s + 2 * T) / 3, ⟨by linarith, by linarith⟩, by linarith⟩) |
| 48 | let f := fun r : ℝ => iteratedFDeriv ℝ j ((F.metric r).pullbackCoefficients e) x |
| 49 | have hjoint := contDiffOn_spatialJet_within |
| 50 | (F.contDiffOn_pullbackCoefficients_within hU he) (uniqueDiffOn_Ioc s T) hU j |
| 51 | have hcont : ContinuousOn f (Icc t T) := by |
| 52 | exact hjoint.continuousOn.comp (f := fun r : ℝ => (r, x)) |
| 53 | (continuous_id.prodMk continuous_const).continuousOn |
| 54 | (fun r hr => ⟨⟨hst.trans_le hr.1, hr.2⟩, hx⟩) |
| 55 | have hbound (r : ℝ) (hr : r ∈ Ico t T) : ‖f r - f t‖ ≤ B * (r - t) := by |
| 56 | have hsub : Icc t r ⊆ Ioo s T := fun q hq => |
| 57 | ⟨hst.trans_le hq.1, hq.2.trans_lt hr.2⟩ |
| 58 | have hsub' : Icc t r ⊆ Ico t T := fun q hq => ⟨hq.1, hq.2.trans_lt hr.2⟩ |
| 59 | have h := (htime Fint isOpen_Ioo hU he hi hsub |
| 60 | (by linarith [hr.2] : r - t ≤ 1) (show t ∈ Icc t r from ⟨le_rfl, hr.1⟩) |
| 61 | hx (fun q hq => hell q (hsub' hq)) |
| 62 | (fun k hk q hq => hcurv k hk q (hsub' hq)) hinit j hj).2 |
| 63 | t ⟨le_rfl, hr.1⟩ r ⟨hr.1, le_rfl⟩ |
| 64 | change ‖f r - f t‖ ≤ B * |r - t| at h |
| 65 | simpa only [abs_of_nonneg (sub_nonneg.mpr hr.1)] using h |
| 66 | have hterminal : T ∈ closure (Ico t T) := by |
| 67 | rw [closure_Ico htT.ne] |
| 68 | exact ⟨htT.le, le_rfl⟩ |
| 69 | have hleft : ContinuousWithinAt (fun r => ‖f r - f t‖) (Ico t T) T := |
| 70 | (((hcont T ⟨htT.le, le_rfl⟩).sub continuousWithinAt_const).norm).mono |
| 71 | Ico_subset_Icc_self |
| 72 | have hright : ContinuousWithinAt (fun r : ℝ => B * (r - t)) (Ico t T) T := |
| 73 | (continuous_const.mul (continuous_id.sub continuous_const)).continuousWithinAt |
| 74 | exact ContinuousWithinAt.closure_le hterminal hleft hright hbound |
| 75 | |
| 76 | end PoincareMT.SpacetimeBounds |