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.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallBackwardJets |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.Coordinates.WithinSmoothCompactness |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.Coordinates.WithinJetsOfAmbient |
| 5 | |
| 6 | /-! |
| 7 | # Backward coefficient limits on the same retained chart |
| 8 | |
| 9 | Buffered source bounds give one strict extraction of all mixed within jets, |
| 10 | including terminal time zero. Uniqueness of the terminal coefficient limit |
| 11 | identifies it with the already retained spatial metric. Morgan--Tian |
| 12 | Proposition 5.14 and Claims 10.10-10.11, pp. 90-91 and 254-255; |
| 13 | M28 derivation 76. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter Metric |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M28.CounterexampleNeckFamily.CriticalBallBackwardChartData |
| 26 | |
| 27 | variable {epsilon C A : ℝ} |
| 28 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 29 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 30 | {H : CounterexampleNeckFamily E} {T : ∀ k, SourceTubeData (H.segment k)} |
| 31 | {A1 : ℝ} {hA1 : 0 < A1} {phi : ℕ → ℕ} |
| 32 | {G : RegularPointedMetricConvergence |
| 33 | (fun k => H.tubeCriticalMetric T A1 (phi k)) |
| 34 | (fun k => H.tubeCriticalBase T A1 hA1 (phi k))} |
| 35 | {q : G.limitCarrier.carrier} {a : ℝ} |
| 36 | (D : CriticalBallBackwardChartData H T A1 hA1 phi G q a) |
| 37 | |
| 38 | /-- The smaller open ball on which the backward limit is extracted. |
| 39 | Its closure lies inside the source chart (derivation 76). -/ |
| 40 | def limitDomain : Set (EuclideanSpace ℝ (Fin 3)) := by |
| 41 | let := G.limitCarrier.topologicalSpace |
| 42 | let := G.limitCarrier.chartedSpace |
| 43 | exact ball (extChartAt (𝓡 3) q q) D.radius |
| 44 | |
| 45 | /-- The limit coordinate domain is open (derivation 76). -/ |
| 46 | theorem limitDomain_open : IsOpen D.limitDomain := isOpen_ball |
| 47 | |
| 48 | /-- Convexity of the coordinate ball permits within-smooth extraction |
| 49 | (Proposition 5.14; derivation 76). -/ |
| 50 | theorem limitDomain_convex : Convex ℝ D.limitDomain := convex_ball _ _ |
| 51 | |
| 52 | /-- The positive radius makes the limit chart nonempty (derivation 76). -/ |
| 53 | instance limitDomain_nonempty : Nonempty D.limitDomain := by |
| 54 | let := G.limitCarrier.topologicalSpace |
| 55 | let := G.limitCarrier.chartedSpace |
| 56 | exact ⟨⟨extChartAt (𝓡 3) q q, mem_ball_self D.radius_pos⟩⟩ |
| 57 | |
| 58 | /-- The smaller open ball lies in the compact testing set (derivation 76). -/ |
| 59 | theorem limitDomain_subset_testSet : D.limitDomain ⊆ D.testSet := ball_subset_closedBall |
| 60 | |
| 61 | /-- The limit chart lies strictly inside the geometric source-map domain |
| 62 | (derivation 76). -/ |
| 63 | theorem limitDomain_subset_domain : D.limitDomain ⊆ D.domain := |
| 64 | D.limitDomain_subset_testSet.trans D.testSet_subset_domain |
| 65 | |
| 66 | set_option synthInstance.maxHeartbeats 200000 in |
| 67 | -- The extracted bilinear spaces retain the dependent original source metric. |
| 68 | set_option maxHeartbeats 2000000 in |
| 69 | -- The compactness sequence retains the actual dependent source flows and index offset. |
| 70 | /-- Actual source curvature bounds produce one strict subsequence of all |
| 71 | mixed within coefficients, whose terminal field is the original retained |
| 72 | spatial metric. No completeness or flow gluing is asserted (derivation 76). -/ |
| 73 | theorem exists_backward_coefficient_limit {K : ℝ} (hK : 0 ≤ K) |
| 74 | (hcurv : ∀ k t, t ∈ Icc (-(a / 8)) 0 → ∀ x : strongNeckOpen (D.neck k), |
| 75 | ((D.sourceFlow k).connection t).curvatureTensorNorm x ≤ K) |
| 76 | (hderiv : ∀ m : ℕ, ∃ B : ℝ, 0 < B ∧ ∀ k t, t ∈ Icc (-(a / 8)) 0 → |
| 77 | ∀ x ∈ D.domain, ((D.sourceFlow k).connection t).curvatureDerivativeNorm m |
| 78 | (D.parametrization k x) ≤ B) : |
| 79 | letI := G.limitCarrier.topologicalSpace |
| 80 | letI := G.limitCarrier.chartedSpace |
| 81 | letI := G.limitCarrier.isManifold |
| 82 | ∃ eta : ℕ → ℕ, StrictMono eta ∧ |
| 83 | ∃ B : ℝ × EuclideanSpace ℝ (Fin 3) → |
| 84 | EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) →L[ℝ] ℝ, |
| 85 | ContDiffOn ℝ ∞ B (Icc (-(a / 8)) 0 ×ˢ D.limitDomain) ∧ |
| 86 | (∀ m L, IsCompact L → L ⊆ Icc (-(a / 8)) 0 ×ˢ D.limitDomain → |
| 87 | TendstoUniformlyOn |
| 88 | (fun k => iteratedFDerivWithin ℝ m |
| 89 | (fun z => ((D.sourceFlow (eta k)).metric z.1).pullbackCoefficients |
| 90 | (D.parametrization (eta k)) z.2) (Icc (-(a / 8)) 0 ×ˢ D.limitDomain)) |
| 91 | (iteratedFDerivWithin ℝ m B (Icc (-(a / 8)) 0 ×ˢ D.limitDomain)) atTop L) ∧ |
| 92 | ∀ x ∈ D.limitDomain, B (0, x) = |
| 93 | G.limitMetric.pullbackCoefficients (extChartAt (𝓡 3) q).symm x := by |
| 94 | let := G.limitCarrier.topologicalSpace |
| 95 | let := G.limitCarrier.chartedSpace |
| 96 | let := G.limitCarrier.isManifold |
| 97 | let J := Icc (-(a / 8)) 0 |
| 98 | let f := fun k (z : ℝ × EuclideanSpace ℝ (Fin 3)) => |
| 99 | ((D.sourceFlow k).metric z.1).pullbackCoefficients (D.parametrization k) z.2 |
| 100 | have hJ : UniqueDiffOn ℝ J := uniqueDiffOn_Icc (by linarith [D.scale_pos]) |
| 101 | let : LocallyCompactSpace J := isClosed_Icc.locallyCompactSpace |
| 102 | let : LocallyCompactSpace D.limitDomain := D.limitDomain_open.locallyCompactSpace |
| 103 | let : ∀ _ : ℕ, LocallyCompactSpace (J ×ˢ D.limitDomain) := fun _ => |
| 104 | (Homeomorph.Set.prod J D.limitDomain).isOpenEmbedding.locallyCompactSpace |
| 105 | have hsmooth (k : ℕ) : ContDiffOn ℝ ∞ (f k) (J ×ˢ D.limitDomain) := |
| 106 | (D.sourceFlow k).smooth.contDiffOn_spacetime_pullbackCoefficients_within |
| 107 | D.limitDomain_open ((D.parametrization_smooth k).mono D.limitDomain_subset_domain) |
| 108 | have hbound : ∀ (_ : ℕ) (L : Set (ℝ × EuclideanSpace ℝ (Fin 3))), |
| 109 | IsCompact L → L ⊆ J ×ˢ D.limitDomain → ∀ m : ℕ, |
| 110 | ∃ B : ℝ, ∀ᶠ k in atTop, ∀ z ∈ L, |
| 111 | ‖iteratedFDerivWithin ℝ m (f k) (J ×ˢ D.limitDomain) z‖ ≤ B := by |
| 112 | intro _ L _ hL m |
| 113 | obtain ⟨B, _, hB⟩ := D.mixed_jet_bounds hK hcurv hderiv m |
| 114 | refine ⟨B, hB.mono (fun k hk z hz => ?_)⟩ |
| 115 | rw [iteratedFDerivWithin_prod_eq_of_isOpen (f k) m D.limitDomain_open D.domain_open |
| 116 | (hL hz).2 (D.limitDomain_subset_domain (hL hz).2)] |
| 117 | exact hk z ⟨(hL hz).1, D.limitDomain_subset_testSet (hL hz).2⟩ |
| 118 | obtain ⟨eta, heta, B, hB, hjets⟩ := |
| 119 | exists_common_contDiffOn_subsequence_of_withinJet_bounds |
| 120 | (fun _ : ℕ => J ×ˢ D.limitDomain) |
| 121 | (fun _ => (convex_Icc (-(a / 8)) 0).prod D.limitDomain_convex) |
| 122 | (fun _ => hJ.prod D.limitDomain_open.uniqueDiffOn) |
| 123 | (fun _ : ℕ => f) (fun _ => hsmooth) hbound |
| 124 | refine ⟨eta, heta, B 0, hB 0, hjets 0, ?_⟩ |
| 125 | intro x hx |
| 126 | have hzero : (0 : ℝ) ∈ J := ⟨by linarith [D.scale_pos], le_rfl⟩ |
| 127 | have hpoint : ({(0, x)} : Set (ℝ × EuclideanSpace ℝ (Fin 3))) ⊆ |
| 128 | J ×ˢ D.limitDomain := singleton_subset_iff.mpr ⟨hzero, hx⟩ |
| 129 | have hcoeff := (ContinuousMultilinearMap.uniformContinuous_eval_const |
| 130 | (0 : Fin 0 → ℝ × EuclideanSpace ℝ (Fin 3))).comp_tendstoUniformlyOn |
| 131 | (hjets 0 0 {(0, x)} isCompact_singleton hpoint) |
| 132 | have htime : Tendsto (fun k => f (eta k) (0, x)) atTop (𝓝 (B 0 (0, x))) := by |
| 133 | simpa only [Function.comp_apply, iteratedFDerivWithin_zero_apply] using |
| 134 | hcoeff.tendsto_at (mem_singleton (0, x)) |
| 135 | have htarget : ({x} : Set (EuclideanSpace ℝ (Fin 3))) ⊆ |
| 136 | (extChartAt (𝓡 3) q).target := |
| 137 | singleton_subset_iff.mpr (D.target (ball_subset_closedBall (D.limitDomain_subset_domain hx))) |
| 138 | have hspatial := (G.tendstoUniformlyOn_chart_coefficients q {x} |
| 139 | isCompact_singleton htarget).tendsto_at (mem_singleton x) |
| 140 | have hspatial' : Tendsto (fun k => f (eta k) (0, x)) atTop |
| 141 | (𝓝 (G.limitMetric.pullbackCoefficients (extChartAt (𝓡 3) q).symm x)) := by |
| 142 | apply (hspatial.comp ((tendsto_add_atTop_nat D.offset).comp heta.tendsto_atTop)).congr' |
| 143 | exact Eventually.of_forall (fun k => |
| 144 | (D.terminal_coefficients (eta k) (D.limitDomain_subset_domain hx)).symm) |
| 145 | exact tendsto_nhds_unique htime hspatial' |
| 146 | |
| 147 | end PoincareMT.M28.CounterexampleNeckFamily.CriticalBallBackwardChartData |