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.Limit.Compactness.CompactnessFeedEndpoint |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Analysis.Compactness.CompactSmoothConvergence |
| 3 | import PoincareLib.Analysis.Calculus.SpatialJets |
| 4 | |
| 5 | /-! |
| 6 | # Attaching the prescribed birth coefficients to the interior limit |
| 7 | |
| 8 | The coefficient family at positive times is the extracted limit. Its |
| 9 | birth slice is the prescribed smooth initial metric. Actual spatial |
| 10 | jets converge to that slice by the uniform time modulus, so the |
| 11 | resulting extended family has continuous spatial jets through birth. |
| 12 | Morgan--Tian, Claim 16.6 and Corollary 16.9, pp. 371-373; |
| 13 | M44 derivation 80. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped ContDiff Topology |
| 20 | |
| 21 | namespace PoincareMT.M44 |
| 22 | |
| 23 | variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 24 | [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 25 | |
| 26 | /-- Full compact smooth convergence gives convergence of every |
| 27 | actual spatial jet at an interior spacetime point. Source: the |
| 28 | coordinate limit in Claim 16.6; M44 derivation 80. -/ |
| 29 | theorem tendsto_spatialJet_of_compactSmooth |
| 30 | {fseq : ℕ → ℝ × E → V} {f : ℝ × E → V} {U : Set (ℝ × E)} |
| 31 | (h : CompactSmoothConvergenceOn fseq f atTop U) |
| 32 | {p : ℝ × E} (hp : p ∈ U) (m : ℕ) : |
| 33 | Tendsto (fun k => iteratedFDeriv ℝ m (fun x => fseq k (p.1, x)) p.2) atTop |
| 34 | (𝓝 (iteratedFDeriv ℝ m (fun x => f (p.1, x)) p.2)) := by |
| 35 | let P := ContinuousMultilinearMap.compContinuousLinearMapL |
| 36 | (𝕜 := ℝ) (F := V) (fun _ : Fin m => ContinuousLinearMap.inr ℝ ℝ E) |
| 37 | have hfull := (h.jets m {p} isCompact_singleton |
| 38 | (singleton_subset_iff.mpr hp)).tendsto_at (mem_singleton p) |
| 39 | have hlimit := P.continuous.continuousAt.tendsto.comp hfull |
| 40 | have hread : iteratedFDeriv ℝ m (fun x => f (p.1, x)) p.2 = |
| 41 | P (iteratedFDeriv ℝ m f p) := by |
| 42 | ext v |
| 43 | exact Poincare.Analysis.iteratedFDeriv_spatial_slice f |
| 44 | (h.smooth.contDiffAt (h.isOpen.mem_nhds hp)) m v |
| 45 | rw [← hread] at hlimit |
| 46 | apply hlimit.congr' |
| 47 | filter_upwards [h.eventually_smooth {p} isCompact_singleton |
| 48 | (singleton_subset_iff.mpr hp)] with k hk |
| 49 | ext v |
| 50 | exact (Poincare.Analysis.iteratedFDeriv_spatial_slice (fseq k) |
| 51 | (hk p (mem_singleton p)) m v).symm |
| 52 | |
| 53 | /-- The actual coefficient family with its prescribed birth |
| 54 | slice. Source: Claim 16.6 and Corollary 16.9; derivation 80. -/ |
| 55 | noncomputable def birthExtendedCoefficients (b0 : E → V) (b : ℝ × E → V) : |
| 56 | ℝ × E → V := by |
| 57 | classical |
| 58 | exact fun p => if p.1 = 0 then b0 p.2 else b p |
| 59 | |
| 60 | omit [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup V] [NormedSpace ℝ V] in |
| 61 | /-- The attached birth slice is exactly the prescribed coefficient |
| 62 | field. Source: Claim 16.6; derivation 80. -/ |
| 63 | theorem birthExtendedCoefficients_zero (b0 : E → V) (b : ℝ × E → V) : |
| 64 | (fun x => birthExtendedCoefficients b0 b (0, x)) = b0 := by |
| 65 | funext x |
| 66 | simp [birthExtendedCoefficients] |
| 67 | |
| 68 | omit [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup V] [NormedSpace ℝ V] in |
| 69 | /-- The extension preserves the actual positive-time coefficient |
| 70 | family. Source: Corollary 16.9; derivation 80. -/ |
| 71 | theorem birthExtendedCoefficients_interior (b0 : E → V) (b : ℝ × E → V) (T : ℝ) : |
| 72 | EqOn (birthExtendedCoefficients b0 b) b (Ioo 0 T ×ˢ univ) := by |
| 73 | intro p hp |
| 74 | exact if_neg hp.1.1.ne' |
| 75 | |
| 76 | /-- Every spatial slice of the extended family is smooth on all |
| 77 | coordinate space, including birth. Source: Claim 16.6 and |
| 78 | Corollary 16.9; derivation 80. -/ |
| 79 | theorem birthExtendedCoefficients_spatial_smooth |
| 80 | {b0 : E → V} {b : ℝ × E → V} {T : ℝ} |
| 81 | (hb0 : ContDiff ℝ ∞ b0) (hb : ContDiffOn ℝ ∞ b (Ioo 0 T ×ˢ univ)) : |
| 82 | ∀ t ∈ Ico 0 T, ContDiffOn ℝ ∞ |
| 83 | (fun x => birthExtendedCoefficients b0 b (t, x)) univ := by |
| 84 | intro t ht |
| 85 | rcases eq_or_lt_of_le ht.1 with hzero | hpos |
| 86 | · subst t |
| 87 | rw [birthExtendedCoefficients_zero] |
| 88 | exact hb0.contDiffOn |
| 89 | · have hslice : ContDiffOn ℝ ∞ (fun x : E => b (t, x)) univ := |
| 90 | hb.comp (contDiffOn_const.prodMk contDiffOn_id) |
| 91 | (fun x _ => (show (t, x) ∈ Ioo 0 T ×ˢ (univ : Set E) from |
| 92 | ⟨⟨hpos, ht.2⟩, mem_univ x⟩)) |
| 93 | simpa only [birthExtendedCoefficients, if_neg hpos.ne'] using hslice |
| 94 | |
| 95 | /-- The actual spatial jets of the extracted positive-time |
| 96 | limit extend continuously to the prescribed birth jets under |
| 97 | the uniform compact time modulus. Source: Claim 16.6 and |
| 98 | Corollary 16.9; M44 derivation 80. -/ |
| 99 | theorem continuousOn_birthExtended_spatialJets [ProperSpace E] |
| 100 | {fseq : ℕ → ℝ × E → V} {b : ℝ × E → V} {b0 : E → V} |
| 101 | {T : ℝ} (hT : 0 < T) (hb0 : ContDiff ℝ ∞ b0) |
| 102 | (hconv : CompactSmoothConvergenceOn fseq b atTop (Ioo 0 T ×ˢ univ)) |
| 103 | (hbirth : ∀ m : ℕ, ∀ x : E, |
| 104 | Tendsto (fun k => iteratedFDeriv ℝ m (fun y => fseq k (0, y)) x) atTop |
| 105 | (𝓝 (iteratedFDeriv ℝ m b0 x))) |
| 106 | (hmodulus : ∀ m : ℕ, ∀ K : Set E, IsCompact K → ∃ L : ℝ, 0 ≤ L ∧ |
| 107 | ∀ t ∈ Ioo 0 T, ∀ x ∈ K, ∀ᶠ k in atTop, |
| 108 | ‖iteratedFDeriv ℝ m (fun y => fseq k (t, y)) x - |
| 109 | iteratedFDeriv ℝ m (fun y => fseq k (0, y)) x‖ ≤ L * t) : |
| 110 | ∀ m : ℕ, ContinuousOn |
| 111 | (fun p => iteratedFDeriv ℝ m |
| 112 | (fun x => birthExtendedCoefficients b0 b (p.1, x)) p.2) (Ico 0 T ×ˢ univ) := by |
| 113 | have hsmooth : ContDiffOn ℝ ∞ (birthExtendedCoefficients b0 b) (Ioo 0 T ×ˢ univ) := |
| 114 | hconv.smooth.congr (birthExtendedCoefficients_interior b0 b T) |
| 115 | intro m |
| 116 | have hright (x : E) : ContinuousWithinAt |
| 117 | (fun p : ℝ × E => iteratedFDeriv ℝ m |
| 118 | (fun y => birthExtendedCoefficients b0 b (p.1, y)) p.2) (Ici 0 ×ˢ univ) (0, x) := by |
| 119 | apply continuousWithinAt_birth_of_uniform_modulus hT isOpen_univ |
| 120 | (fseq := fun k p => iteratedFDeriv ℝ m (fun y => fseq k (p.1, y)) p.2) |
| 121 | · change ContinuousOn (iteratedFDeriv ℝ m |
| 122 | (fun y => birthExtendedCoefficients b0 b (0, y))) univ |
| 123 | rw [birthExtendedCoefficients_zero] |
| 124 | exact (hb0.continuous_iteratedFDeriv (by exact_mod_cast le_top)).continuousOn |
| 125 | · intro y _hy |
| 126 | simpa only [birthExtendedCoefficients_zero] using hbirth m y |
| 127 | · intro t ht y _hy |
| 128 | simpa only [birthExtendedCoefficients, if_neg ht.1.ne'] using |
| 129 | tendsto_spatialJet_of_compactSmooth hconv |
| 130 | (show (t, y) ∈ Ioo 0 T ×ˢ (univ : Set E) from ⟨ht, mem_univ y⟩) m |
| 131 | · intro K hK _hKU |
| 132 | exact hmodulus m K hK |
| 133 | · exact mem_univ x |
| 134 | have hinterior := (contDiffOn_spatialJet_within hsmooth |
| 135 | isOpen_Ioo.uniqueDiffOn isOpen_univ m).continuousOn |
| 136 | rintro ⟨t, x⟩ ht |
| 137 | rcases eq_or_lt_of_le ht.1.1 with hzero | hpos |
| 138 | · change 0 = t at hzero |
| 139 | subst t |
| 140 | exact (hright x).mono (prod_mono (fun _ hs => hs.1) Subset.rfl) |
| 141 | · exact (hinterior.continuousAt ((isOpen_Ioo.prod isOpen_univ).mem_nhds |
| 142 | ⟨⟨hpos, ht.1.2⟩, ht.2⟩)).continuousWithinAt |
| 143 | |
| 144 | end PoincareMT.M44 |