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.Blowup.Construction.PartialLimits.RetainedSpatialJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Controlled.Geometry |
| 3 | import Mathlib.Topology.Instances.ENNReal.Lemmas |
| 4 | |
| 5 | /-! |
| 6 | # Spatial jets throughout the backward domain |
| 7 | |
| 8 | An eventually available closed source slab supplies joint smoothness on a |
| 9 | smaller half-open time domain. Open-intersection locality retains the full |
| 10 | backward within jets, including zero, and the original comparison maps. |
| 11 | This is Morgan--Tian Definition 5.12 and Proposition 5.14, pp. 90-91, |
| 12 | in the extension of Theorem 11.8, p. 272. The lower slicing supplier |
| 13 | remains explicit, as in the reviewed backward-spatial-jets-and-curvature |
| 14 | derivation. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 22 | |
| 23 | namespace PoincareMT.M30 |
| 24 | |
| 25 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 26 | FlowCarrier.isManifold FlowCarrier.t2Space FlowCarrier.t3Space |
| 27 | |
| 28 | set_option synthInstance.maxHeartbeats 100000 in |
| 29 | -- The dependent bilinear jet spaces need additional instance search. |
| 30 | set_option maxHeartbeats 600000 in |
| 31 | -- The local domain restriction retains the full dependent coefficient functions. |
| 32 | /-- The retained scalar spatial jets converge throughout the actual backward |
| 33 | domain, including zero (Definition 5.12 and Proposition 5.14, pp. 90-91; |
| 34 | Theorem 11.8, p. 272). -/ |
| 35 | theorem tendsto_backward_scalar_spatial_jets |
| 36 | (hSlice : SpatialSliceJetConvergenceService.{0, 0, 0, 0, 0}) |
| 37 | {n : ℕ} {s' s : ℝ} {T0 : ℝ≥0∞} {J : ℕ → Set ℝ} |
| 38 | (hzero : s' < 0 ∧ 0 < s) |
| 39 | {S : PointedFlowSequence n s' s} |
| 40 | (G : PointedGeometricConvergence S) |
| 41 | (Fsrc : ∀ k, RicciFlow n (S.carrier k).carrier (J k)) |
| 42 | (htime : ∀ A : ℝ, 0 < A → ENNReal.ofReal A < T0 → |
| 43 | ∀ᶠ k in atTop, Icc (-A) 0 ⊆ J k) |
| 44 | (F : RicciFlow n G.limitCarrier.carrier (blowupBackwardInterval T0)) : |
| 45 | let f := fun (q : G.limitCarrier.carrier) k |
| 46 | (z : ℝ × EuclideanSpace ℝ (Fin n)) => |
| 47 | ((Fsrc (G.subsequence k)).metric z.1).pullbackCoefficients |
| 48 | ((fun y => ((G.embedding k).toFun (0, y)).2) ∘ |
| 49 | (extChartAt (𝓡 n) q).symm) z.2 |
| 50 | let g := fun (q : G.limitCarrier.carrier) |
| 51 | (z : ℝ × EuclideanSpace ℝ (Fin n)) => |
| 52 | (F.metric z.1).pullbackCoefficients (extChartAt (𝓡 n) q).symm z.2 |
| 53 | (∀ (q : G.limitCarrier.carrier) (m : ℕ) |
| 54 | (K : Set (ℝ × EuclideanSpace ℝ (Fin n))), |
| 55 | IsCompact K → K ⊆ blowupBackwardInterval T0 ×ˢ |
| 56 | (extChartAt (𝓡 n) q).target → |
| 57 | TendstoUniformlyOn |
| 58 | (fun k => iteratedFDerivWithin ℝ m (f q k) |
| 59 | (blowupBackwardInterval T0 ×ˢ (extChartAt (𝓡 n) q).target)) |
| 60 | (iteratedFDerivWithin ℝ m (g q) |
| 61 | (blowupBackwardInterval T0 ×ˢ (extChartAt (𝓡 n) q).target)) atTop K) → |
| 62 | ∀ (q : G.limitCarrier.carrier) (p : EuclideanSpace ℝ (Fin n)), |
| 63 | p ∈ (extChartAt (𝓡 n) q).target → |
| 64 | ∀ t ∈ blowupBackwardInterval T0, ∀ (r : ℕ) (a b : Fin n), |
| 65 | Tendsto (fun k => iteratedFDeriv ℝ r |
| 66 | (fun y => f q k (t, y) |
| 67 | (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 68 | (EuclideanSpace.basisFun (Fin n) ℝ b)) p) atTop |
| 69 | (𝓝 (iteratedFDeriv ℝ r |
| 70 | (fun y => g q (t, y) |
| 71 | (EuclideanSpace.basisFun (Fin n) ℝ a) |
| 72 | (EuclideanSpace.basisFun (Fin n) ℝ b)) p)) := by |
| 73 | classical |
| 74 | intro f g hjets q p hp t ht r a b |
| 75 | let E := EuclideanSpace ℝ (Fin n) |
| 76 | let : NormedAddCommGroup (E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup |
| 77 | let : NormedAddCommGroup (E →L[ℝ] E →L[ℝ] ℝ) := |
| 78 | ContinuousLinearMap.toNormedAddCommGroup |
| 79 | let B := E →L[ℝ] E →L[ℝ] ℝ |
| 80 | let c := extChartAt (𝓡 n) q |
| 81 | obtain ⟨δ, hδ, hδH⟩ := Metric.isOpen_iff.mp |
| 82 | (isOpen_Iio.preimage ENNReal.continuous_ofReal) (-t) ht.2 |
| 83 | let A := -t + δ / 2 |
| 84 | have hAt : -t < A := by dsimp only [A]; linarith |
| 85 | have hA : 0 < A := (neg_nonneg.mpr ht.1).trans_lt hAt |
| 86 | have hAh : ENNReal.ofReal A < T0 := by |
| 87 | apply hδH |
| 88 | change dist A (-t) < δ |
| 89 | rw [Real.dist_eq, abs_of_nonneg (sub_nonneg.mpr hAt.le)] |
| 90 | dsimp only [A] |
| 91 | linarith |
| 92 | have hsmall : Ioc (-A) (0 : ℝ) ⊆ blowupBackwardInterval T0 := by |
| 93 | intro u hu |
| 94 | exact ⟨hu.2, (ENNReal.ofReal_le_ofReal (show -u ≤ A by linarith [hu.1])).trans_lt hAh⟩ |
| 95 | obtain ⟨ε, hε, hball⟩ := Metric.isOpen_iff.mp |
| 96 | (isOpen_extChartAt_target (I := 𝓡 n) q) p hp |
| 97 | let ρ : ℝ := ε / 2 |
| 98 | have hρ : 0 < ρ := half_pos hε |
| 99 | let U := Metric.ball p ρ |
| 100 | let Kbar := Metric.closedBall p ρ |
| 101 | have hU : IsOpen U := Metric.isOpen_ball |
| 102 | have hKbar : IsCompact Kbar := isCompact_closedBall p ρ |
| 103 | have hKc : Kbar ⊆ c.target := |
| 104 | (Metric.closedBall_subset_ball (half_lt_self hε)).trans hball |
| 105 | have hUc : U ⊆ c.target := Metric.ball_subset_closedBall.trans hKc |
| 106 | have hpU : p ∈ U := Metric.mem_ball_self hρ |
| 107 | have hchart {y : E} (hy : y ∈ c.target) : |
| 108 | ContMDiffAt (𝓡 n) (𝓡 n) ∞ c.symm y := |
| 109 | (contMDiffWithinAt_extChartAt_symm_target (n := ∞) q hy).contMDiffAt |
| 110 | (extChartAt_target_mem_nhds' hy) |
| 111 | obtain ⟨N, hN⟩ := G.exists_exhaustion_superset |
| 112 | (hKbar.image_of_continuousOn |
| 113 | ((contMDiffOn_extChartAt_symm (n := ∞) q).continuousOn.mono hKc)) |
| 114 | let ψ (k : ℕ) : G.limitCarrier.carrier → (S.carrier (G.subsequence k)).carrier := |
| 115 | fun y => ((G.embedding k).toFun (0, y)).2 |
| 116 | have hmaps : ∀ᶠ k : ℕ in atTop, |
| 117 | ContMDiffOn (𝓡 n) (𝓡 n) ∞ (ψ k ∘ c.symm) U := by |
| 118 | filter_upwards [eventually_ge_atTop N] with k hk y hy |
| 119 | have hx : c.symm y ∈ G.exhaustion k := G.exhaustion_monotone hk |
| 120 | (hN (mem_image_of_mem c.symm (Metric.ball_subset_closedBall hy))) |
| 121 | exact (((G.embedding k).spatialMap_contMDiffAt (G.exhaustion_open k) |
| 122 | hzero hx).comp y (hchart (hUc hy))).contMDiffWithinAt |
| 123 | let D := blowupBackwardInterval T0 ×ˢ c.target |
| 124 | let Dloc := Ioc (-A) (0 : ℝ) ×ˢ U |
| 125 | have hsource : ∀ᶠ k : ℕ in atTop, ContDiffOn ℝ ∞ (f q k) Dloc := by |
| 126 | filter_upwards [hmaps, |
| 127 | G.subsequence_strictMono.tendsto_atTop.eventually (htime A hA hAh)] with k hk htimek |
| 128 | exact ((Fsrc (G.subsequence k)).contDiffOn_pullbackCoefficients_within hU hk).mono |
| 129 | (prod_mono (fun u hu => htimek ⟨hu.1.le, hu.2⟩) (Subset.refl _)) |
| 130 | have htarget : ContDiffOn ℝ ∞ (g q) Dloc := |
| 131 | (F.contDiffOn_pullbackCoefficients_within hU |
| 132 | ((contMDiffOn_extChartAt_symm (n := ∞) q).mono hUc)).mono |
| 133 | (prod_mono hsmall (Subset.refl _)) |
| 134 | have hinter : D ∩ (Ioi (-A) ×ˢ U) = Dloc := by |
| 135 | apply Subset.antisymm |
| 136 | · intro z hz |
| 137 | exact ⟨⟨hz.2.1, hz.1.1.1⟩, hz.2.2⟩ |
| 138 | · intro z hz |
| 139 | exact ⟨⟨hsmall hz.1, hUc hz.2⟩, ⟨hz.1.1, hz.2⟩⟩ |
| 140 | have hrestrict (v : ℝ × E → B) {z : ℝ × E} (hz : z ∈ Dloc) : |
| 141 | iteratedFDerivWithin ℝ r v Dloc z = iteratedFDerivWithin ℝ r v D z := by |
| 142 | rw [← hinter] |
| 143 | exact iteratedFDerivWithin_inter_open (isOpen_Ioi.prod hU) ⟨hz.1.1, hz.2⟩ |
| 144 | have hsingle : ({(t, p)} : Set (ℝ × E)) ⊆ Dloc := |
| 145 | singleton_subset_iff.mpr ⟨⟨by linarith, ht.1⟩, hpU⟩ |
| 146 | have hlocal : TendstoUniformlyOn |
| 147 | (fun k => iteratedFDerivWithin ℝ r (f q k) Dloc) |
| 148 | (iteratedFDerivWithin ℝ r (g q) Dloc) atTop ({(t, p)} : Set (ℝ × E)) := by |
| 149 | refine ((hjets q r {(t, p)} isCompact_singleton |
| 150 | (singleton_subset_iff.mpr ⟨ht, hp⟩)).congr ?_).congr_right ?_ |
| 151 | · exact Eventually.of_forall fun k z hz => (hrestrict (f q k) (hsingle hz)).symm |
| 152 | · intro z hz |
| 153 | exact (hrestrict (g q) (hsingle hz)).symm |
| 154 | have hr : (r : ℕ∞ω) ≤ (∞ : ℕ∞ω) := by exact_mod_cast le_top |
| 155 | have hspatial := hSlice hlocal (uniqueDiffOn_Ioc (-A) 0) |
| 156 | hU hsingle hsource htarget hr |
| 157 | let L : B →L[ℝ] ℝ := |
| 158 | (ContinuousLinearMap.apply ℝ ℝ (EuclideanSpace.basisFun (Fin n) ℝ b)).comp |
| 159 | (ContinuousLinearMap.apply ℝ (E →L[ℝ] ℝ) (EuclideanSpace.basisFun (Fin n) ℝ a)) |
| 160 | let Lr := ContinuousLinearMap.compContinuousMultilinearMapL ℝ |
| 161 | (fun _ : Fin r => E) B ℝ L |
| 162 | have heval := (Lr.uniformContinuous.comp_tendstoUniformlyOn hspatial).tendsto_at |
| 163 | (mem_singleton (t, p)) |
| 164 | have hlimit : ContDiffAt ℝ ∞ (fun y => g q (t, y)) p := |
| 165 | (F.metric t).contDiffAt_pullbackCoefficients (hchart hp) |
| 166 | change Tendsto (fun k => iteratedFDeriv ℝ r (L ∘ fun y => f q k (t, y)) p) |
| 167 | atTop (𝓝 (iteratedFDeriv ℝ r (L ∘ fun y => g q (t, y)) p)) |
| 168 | rw [L.iteratedFDeriv_comp_left hlimit hr] |
| 169 | refine heval.congr' ?_ |
| 170 | filter_upwards [hmaps] with k hk |
| 171 | exact (L.iteratedFDeriv_comp_left |
| 172 | (((Fsrc (G.subsequence k)).metric t).contDiffAt_pullbackCoefficients |
| 173 | (hk.contMDiffAt (hU.mem_nhds hpU))) hr).symm |
| 174 | |
| 175 | end PoincareMT.M30 |