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.Removal.Terminal.TerminalMetricJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Exponential.GeodesicTransport |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Charts.SmoothLocalFactorization |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Analysis.Compactness.CompactSmoothPullback |
| 5 | |
| 6 | /-! |
| 7 | # Terminal spatial jets in an arbitrary fixed regular reference map |
| 8 | |
| 9 | Actual primitive coordinate convergence survives smooth fixed |
| 10 | pullback in every spatial order. Sequential testing of the real |
| 11 | left-neighborhood filter gives the full terminal limit. |
| 12 | Morgan--Tian, Claim 16.10, pp. 374-375; M44 derivation 77. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M44 |
| 24 | |
| 25 | open SpacetimeBounds |
| 26 | |
| 27 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 28 | local notation "Bilin" => E →L[ℝ] E →L[ℝ] ℝ |
| 29 | |
| 30 | noncomputable local instance terminalPullbackNorm : NormedAddCommGroup Bilin := |
| 31 | ContinuousLinearMap.toNormedAddCommGroup |
| 32 | |
| 33 | noncomputable local instance terminalPullbackSpace : NormedSpace ℝ Bilin := |
| 34 | ContinuousLinearMap.toNormedSpace |
| 35 | |
| 36 | noncomputable local instance terminalPullbackTwoJetNorm : NormedAddCommGroup (MetricTwoJet 3) := |
| 37 | Prod.normedAddCommGroup |
| 38 | |
| 39 | noncomputable local instance terminalPullbackTwoJetSpace : NormedSpace ℝ (MetricTwoJet 3) := |
| 40 | Prod.normedSpace |
| 41 | |
| 42 | variable {g0 : StandardInitialMetric} {K : MetricSurgeryConstants} {P : SurgeryParameters} |
| 43 | {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 44 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 45 | |
| 46 | /-- Every sequence approaching the event from below has the |
| 47 | actual terminal coefficient field as its compact smooth limit |
| 48 | in a regular inverse chart. Source: Claim 16.10; derivation 77. -/ |
| 49 | theorem compactSmooth_preterminal_in_chart |
| 50 | (event : SurgeryEventData g0 K P slice metric T) |
| 51 | (q : (slice event.tMinus).carrier) (hq : q ∈ event.regular_limit) |
| 52 | {U : Set E} (hU : IsOpen U) (hchart : U ⊆ (extChartAt (𝓡 3) q).target) |
| 53 | (hregular : (extChartAt (𝓡 3) q).symm '' U ⊆ event.regular_limit) |
| 54 | {tseq : ℕ → ℝ} (htseq : Tendsto tseq atTop (𝓝[<] T)) : |
| 55 | CompactSmoothConvergenceOn |
| 56 | (fun n => (event.pre_flow.metric (tseq n)).pullbackCoefficients |
| 57 | (extChartAt (𝓡 3) q).symm) |
| 58 | (event.limit_metric.pullbackCoefficients |
| 59 | (event.limit_identify.map ∘ (extChartAt (𝓡 3) q).symm)) atTop U := by |
| 60 | have hc := (contMDiffOn_extChartAt_symm (I := 𝓡 3) (n := ∞) q).mono hchart |
| 61 | have hf := event.limit_identify.map_smooth.comp hc |
| 62 | (fun x hx => hregular (mem_image_of_mem _ hx)) |
| 63 | refine ⟨hU, ?_, ?_, ?_⟩ |
| 64 | · intro x hx |
| 65 | exact (event.limit_metric.contDiffAt_pullbackCoefficients |
| 66 | (hf.contMDiffAt (hU.mem_nhds hx))).contDiffWithinAt |
| 67 | · intro L _ hLU |
| 68 | exact Eventually.of_forall fun n x hx => |
| 69 | (event.pre_flow.metric (tseq n)).contDiffAt_pullbackCoefficients |
| 70 | (hc.contMDiffAt (hU.mem_nhds (hLU hx))) |
| 71 | · intro j L hL hLU |
| 72 | apply Metric.tendstoUniformlyOn_iff.mpr |
| 73 | intro eta heta |
| 74 | obtain ⟨d, hd, hbound⟩ := bilinear_jets_of_surgeryMetricLimitOn event.metric_converges |
| 75 | q hq hU hchart hregular hf j hL hLU heta |
| 76 | filter_upwards [htseq.eventually (Ioo_mem_nhdsLT (by linarith : T - d < T))] |
| 77 | with n hn x hx |
| 78 | simpa only [dist_eq_norm, norm_sub_rev] using hbound (tseq n) hn.1 hn.2 x hx |
| 79 | |
| 80 | /-- Every spatial jet of a fixed smooth regular pullback |
| 81 | converges to the actual terminal pullback jet. Source: |
| 82 | Claim 16.10, pp. 374-375; M44 derivation 77. -/ |
| 83 | theorem tendsto_preterminal_pullback_jet |
| 84 | (event : SurgeryEventData g0 K P slice metric T) |
| 85 | {A : E → (slice event.tMinus).carrier} {V : Set E} (hV : IsOpen V) |
| 86 | (hA : ContMDiffOn (𝓡 3) (𝓡 3) ∞ A V) |
| 87 | (hregular : MapsTo A V event.regular_limit) {x : E} (hx : x ∈ V) (j : ℕ) : |
| 88 | Tendsto (fun t => iteratedFDeriv ℝ j ((event.pre_flow.metric t).pullbackCoefficients A) x) |
| 89 | (𝓝[<] T) (𝓝 (iteratedFDeriv ℝ j (event.limit_metric.pullbackCoefficients |
| 90 | (event.limit_identify.map ∘ A)) x)) := by |
| 91 | obtain ⟨U, W, hU, hW, hxW, _, hchart, hinside, k, hk, hmap, hfactor⟩ := |
| 92 | Poincare.exists_smooth_local_chart_factorization hV event.regular_limit_open hA hregular hx |
| 93 | let q := A x |
| 94 | let c := extChartAt (𝓡 3) q |
| 95 | have hc : ContMDiffOn (𝓡 3) (𝓡 3) ∞ c.symm U := |
| 96 | (contMDiffOn_extChartAt_symm (I := 𝓡 3) (n := ∞) q).mono hchart |
| 97 | have hf := event.limit_identify.map_smooth.comp hc |
| 98 | (fun y hy => hinside (mem_image_of_mem _ hy)) |
| 99 | apply Filter.tendsto_of_seq_tendsto |
| 100 | intro tseq htseq |
| 101 | have hbase := compactSmooth_preterminal_in_chart event q (hregular hx) |
| 102 | hU hchart hinside htseq |
| 103 | have hpull := hbase.pullback_bilinear |
| 104 | (CompactSmoothConvergenceOn.constant (ι := ℕ) (l := atTop) hW hk) hmap |
| 105 | have hactual : CompactSmoothConvergenceOn |
| 106 | (fun n => (event.pre_flow.metric (tseq n)).pullbackCoefficients A) |
| 107 | (event.limit_metric.pullbackCoefficients (event.limit_identify.map ∘ A)) atTop W := by |
| 108 | apply hpull.congr |
| 109 | · intro n y hy |
| 110 | have hgerm : c.symm ∘ k =ᶠ[𝓝 y] A := |
| 111 | eventually_of_mem (hW.mem_nhds hy) (fun z hz => (hfactor z hz).symm) |
| 112 | ext v w |
| 113 | exact (event.pre_flow.metric (tseq n)).pullbackCoefficients_eq_of_comp_germ |
| 114 | ((hc.contMDiffAt (hU.mem_nhds (hmap hy))).mdifferentiableAt (by simp)) |
| 115 | ((hk.contDiffAt (hW.mem_nhds hy)).differentiableAt (by simp)) hgerm v w |
| 116 | · intro y hy |
| 117 | have hgerm : (event.limit_identify.map ∘ c.symm) ∘ k =ᶠ[𝓝 y] |
| 118 | event.limit_identify.map ∘ A := by |
| 119 | filter_upwards [hW.mem_nhds hy] with z hz |
| 120 | exact congrArg event.limit_identify.map (hfactor z hz).symm |
| 121 | ext v w |
| 122 | exact event.limit_metric.pullbackCoefficients_eq_of_comp_germ |
| 123 | ((hf.contMDiffAt (hU.mem_nhds (hmap hy))).mdifferentiableAt (by simp)) |
| 124 | ((hk.contDiffAt (hW.mem_nhds hy)).differentiableAt (by simp)) hgerm v w |
| 125 | exact (hactual.jets j {x} isCompact_singleton (singleton_subset_iff.mpr hxW)).tendsto_at |
| 126 | (mem_singleton x) |
| 127 | |
| 128 | /-- In particular the complete two-jet converges in every |
| 129 | actual fixed regular reference map. Source: Claim 16.10; |
| 130 | M44 derivation 77. -/ |
| 131 | theorem tendsto_preterminal_pullback_twoJet |
| 132 | (event : SurgeryEventData g0 K P slice metric T) |
| 133 | {A : E → (slice event.tMinus).carrier} {V : Set E} (hV : IsOpen V) |
| 134 | (hA : ContMDiffOn (𝓡 3) (𝓡 3) ∞ A V) |
| 135 | (hregular : MapsTo A V event.regular_limit) {x : E} (hx : x ∈ V) : |
| 136 | Tendsto (fun t => metricTwoJet ((event.pre_flow.metric t).pullbackCoefficients A) x) |
| 137 | (𝓝[<] T) (𝓝 (metricTwoJet (event.limit_metric.pullbackCoefficients |
| 138 | (event.limit_identify.map ∘ A)) x)) := by |
| 139 | apply Metric.tendsto_nhds.mpr |
| 140 | intro eta heta |
| 141 | have hj (j : ℕ) : ∀ᶠ t in 𝓝[<] T, |
| 142 | ‖iteratedFDeriv ℝ j ((event.pre_flow.metric t).pullbackCoefficients A) x - |
| 143 | iteratedFDeriv ℝ j (event.limit_metric.pullbackCoefficients |
| 144 | (event.limit_identify.map ∘ A)) x‖ ≤ eta / 2 := by |
| 145 | have h := Metric.tendsto_nhds.mp |
| 146 | (tendsto_preterminal_pullback_jet event hV hA hregular hx j) (eta / 2) (half_pos heta) |
| 147 | filter_upwards [h] with t ht |
| 148 | exact (by simpa only [dist_eq_norm] using ht : |
| 149 | ‖iteratedFDeriv ℝ j ((event.pre_flow.metric t).pullbackCoefficients A) x - |
| 150 | iteratedFDeriv ℝ j (event.limit_metric.pullbackCoefficients |
| 151 | (event.limit_identify.map ∘ A)) x‖ < eta / 2).le |
| 152 | filter_upwards [hj 0, hj 1, hj 2] with t h0 h1 h2 |
| 153 | rw [dist_eq_norm] |
| 154 | apply (norm_metricTwoJet_sub_le _ _ x ?_).trans_lt (half_lt_self heta) |
| 155 | intro j hj |
| 156 | interval_cases j <;> assumption |
| 157 | |
| 158 | end PoincareMT.M44 |