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.Surgery.StandardCap.Persistence.Analysis.Jets.TimeJetGluing |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Analysis.Compactness.CompactTimeLimit |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Analysis.Jets.SpatialJetsWithin |
| 4 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.SpacetimeBounds.Bootstrap.Prolongation |
| 5 | |
| 6 | /-! |
| 7 | # Actual spatial derivatives recover smooth evolution through surgery |
| 8 | |
| 9 | The spatial jet fields here are the actual iterated derivatives of one |
| 10 | coefficient family. Smoothness away from finitely many times supplies |
| 11 | the differentiated evolution equations; continuous spatial jets then |
| 12 | recover smoothness at the exceptional times as well. |
| 13 | Morgan--Tian, Lemma 16.8 and Proposition 16.5, pp. 372-375; |
| 14 | see M44 derivation 49. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped ContDiff Topology |
| 22 | |
| 23 | namespace PoincareMT.M44 |
| 24 | |
| 25 | open SpacetimeBounds.Bootstrap |
| 26 | |
| 27 | variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 28 | [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 29 | |
| 30 | /-- A coefficient family satisfying a smooth finite-order spatial |
| 31 | evolution equation away from finitely many times is smooth everywhere |
| 32 | when all its actual spatial derivatives are continuous there. |
| 33 | Source: retained surgery gluing in Proposition 16.5; M44 derivation 49. -/ |
| 34 | theorem contDiffOn_of_spatial_evolution_off_finite |
| 35 | {J S : Set ℝ} {U : Set E} (hJ : IsOpen J) (hU : IsOpen U) (hS : S.Finite) |
| 36 | {n : ℕ} {Q : Jet E V n → V} {Omega : Set (Jet E V n)} |
| 37 | (hOmega : IsOpen Omega) (hQ : ContDiffOn ℝ ∞ Q Omega) |
| 38 | {f : ℝ × E → V} |
| 39 | (hsmooth : ContDiffOn ℝ ∞ f ((J \ S) ×ˢ U)) |
| 40 | (hspace : ∀ t ∈ J, ContDiffOn ℝ ∞ (fun x => f (t, x)) U) |
| 41 | (hjets : ∀ m : ℕ, ContinuousOn |
| 42 | (fun p : ℝ × E => iteratedFDeriv ℝ m (fun x => f (p.1, x)) p.2) (J ×ˢ U)) |
| 43 | (hrange : ∀ p ∈ J ×ˢ U, spatialJet n f p ∈ Omega) |
| 44 | (hevol : ∀ t ∈ J, t ∉ S → ∀ x ∈ U, |
| 45 | HasDerivAt (fun s => f (s, x)) (Q (spatialJet n f (t, x))) t) : |
| 46 | ContDiffOn ℝ ∞ f (J ×ˢ U) := by |
| 47 | let A (m : ℕ) (p : ℝ × E) := iteratedFDeriv ℝ m (fun x => f (p.1, x)) p.2 |
| 48 | let D (m : ℕ) : (E [×(m + 1)]→L[ℝ] V) →L[ℝ] E →L[ℝ] E [×m]→L[ℝ] V := |
| 49 | (continuousMultilinearCurryLeftEquiv ℝ |
| 50 | (fun _ : Fin (m + 1) => E) V).toContinuousLinearEquiv.toContinuousLinearMap |
| 51 | have hregular : IsOpen (J \ S) := hJ.sdiff hS.isClosed |
| 52 | have hfields : ∀ m, ContDiffOn ℝ ∞ (A m) (J ×ˢ U) := by |
| 53 | apply Poincare.contDiffOn_of_finite_jet_evolution hJ hU hS A D |
| 54 | (fun m => n + m + 1) (operator n Q) |
| 55 | (fun m => (baseProjection n m) ⁻¹' Omega) |
| 56 | (fun m => contDiffOn_operator hOmega hQ m) |
| 57 | · intro m p hp |
| 58 | change baseProjection n m (spatialJet (n + m) f p) ∈ Omega |
| 59 | simpa only [baseProjection_spatialJet] using hrange p hp |
| 60 | · exact hjets |
| 61 | · intro m t ht x hx |
| 62 | have hg := (hspace t ht).contDiffAt (hU.mem_nhds hx) |
| 63 | have hd := (hg.iteratedFDeriv_right (i := m) (m := 1) |
| 64 | (by exact_mod_cast le_top)).differentiableAt (by simp) |>.hasFDerivAt |
| 65 | change HasFDerivAt (iteratedFDeriv ℝ m (fun y => f (t, y))) |
| 66 | ((continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (m + 1) => E) V) |
| 67 | (iteratedFDeriv ℝ (m + 1) (fun y => f (t, y)) x)) x |
| 68 | rw [iteratedFDeriv_succ_eq_comp_left] |
| 69 | simpa only [Function.comp_apply, LinearIsometryEquiv.apply_symm_apply] using hd |
| 70 | · intro m t ht hnot x hx |
| 71 | change HasDerivAt (fun s => iteratedFDeriv ℝ m (fun y => f (s, y)) x) |
| 72 | (operator n Q m (spatialJet (n + m) f (t, x))) t |
| 73 | rw [operator_spatialJet hOmega hQ hsmooth hregular hU |
| 74 | (fun p hp => hrange p ⟨hp.1.1, hp.2⟩) ⟨ht, hnot⟩ hx m] |
| 75 | exact SpacetimeBounds.hasDerivAt_spatialJet hsmooth hregular hU ⟨ht, hnot⟩ |
| 76 | (hevol t ht hnot) m hx |
| 77 | exact (continuousMultilinearCurryFin0 ℝ E V).toContinuousLinearEquiv.contDiff.comp_contDiffOn |
| 78 | (hfields 0) |
| 79 | |
| 80 | /-- Smooth time pieces and compact convergence of every actual |
| 81 | spatial derivative give the continuous jet fields required for |
| 82 | evolution gluing. Source: Proposition 16.5; derivations 50-51. -/ |
| 83 | theorem continuousOn_spatialJets_of_compact_uniform |
| 84 | [ProperSpace E] {f : ℝ × E → V} {U : Set E} {a T b : ℝ} |
| 85 | (hU : IsOpen U) (hTb : T < b) |
| 86 | (hleft : ContDiffOn ℝ ∞ f (Ioo a T ×ˢ U)) |
| 87 | (hright : ContDiffOn ℝ ∞ f (Ico T b ×ˢ U)) |
| 88 | (hlim : ∀ m : ℕ, ∀ K : Set E, IsCompact K → K ⊆ U → |
| 89 | ∀ eta : ℝ, 0 < eta → ∃ d : ℝ, 0 < d ∧ |
| 90 | ∀ t : ℝ, T - d < t → t < T → ∀ x ∈ K, |
| 91 | ‖iteratedFDeriv ℝ m (fun y => f (t, y)) x - |
| 92 | iteratedFDeriv ℝ m (fun y => f (T, y)) x‖ < eta) : |
| 93 | ∀ m : ℕ, ContinuousOn |
| 94 | (fun p => iteratedFDeriv ℝ m (fun x => f (p.1, x)) p.2) (Ioo a b ×ˢ U) := by |
| 95 | intro m |
| 96 | apply Poincare.continuousOn_time_of_compact_uniform hU hTb |
| 97 | (contDiffOn_spatialJet_within hleft isOpen_Ioo.uniqueDiffOn hU m).continuousOn |
| 98 | (contDiffOn_spatialJet_within hright (uniqueDiffOn_Ico T b) hU m).continuousOn |
| 99 | simpa only [dist_eq_norm] using hlim m |
| 100 | |
| 101 | end PoincareMT.M44 |