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.AncientKappa.Compactness.Coordinates.EmbeddingBounds |
| 2 | import PoincareLib.Geometry.RicciFlow.AncientKappa.Asymptotic.Compactness.Coordinates.Jets |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Volume.MetricComparison |
| 4 | import PoincareLib.Geometry.RicciFlow.Compactness.Embedding.SpatialRegularity |
| 5 | |
| 6 | /-! |
| 7 | # Reference bounds on retained pointed-limit charts |
| 8 | |
| 9 | The actual M07 maps at time zero give uniform spatial metric-jet bounds |
| 10 | and positive ellipticity on every compact chart set. Scalar convergence |
| 11 | and the existing finite-basis norm estimate control the bilinear jets. |
| 12 | All derivatives use open chart neighborhoods, even when the tested |
| 13 | compact set has empty interior. |
| 14 | |
| 15 | This prepares the fixed-coordinate terminal extension in Morgan--Tian |
| 16 | Proposition 5.14, pp. 90-91, and Theorem 11.8, pp. 272-279. No ancient |
| 17 | source flow, completeness or new extraction is assumed. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | set_option backward.isDefEq.respectTransparency false |
| 22 | |
| 23 | open Set Filter |
| 24 | open scoped Manifold ContDiff Bundle Topology |
| 25 | |
| 26 | namespace PoincareMT.M30 |
| 27 | |
| 28 | open NormalizedKappaSolutionSequence |
| 29 | |
| 30 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 31 | FlowCarrier.isManifold FlowCarrier.t2Space FlowCarrier.t3Space FlowCarrier.secondCountable |
| 32 | |
| 33 | variable {a b : ℝ} {S : PointedFlowSequence 3 a b} |
| 34 | |
| 35 | set_option synthInstance.maxHeartbeats 100000 in |
| 36 | -- The actual dependent source metrics require the donor's synthesis allowance. |
| 37 | set_option maxHeartbeats 1000000 in |
| 38 | -- Identifying the nine coefficient jets unfolds both stored carrier atlases. |
| 39 | /-- The retained reference-time charts have eventually uniform spatial |
| 40 | metric-jet bounds on each compact chart set (Proposition 5.14, pp. 90-91). -/ |
| 41 | theorem exists_eventually_reference_spatial_jet_bound |
| 42 | (G : PointedGeometricConvergence S) (hzero : a < 0 ∧ 0 < b) |
| 43 | (q : G.limitCarrier.carrier) {K : Set (EuclideanSpace ℝ (Fin 3))} |
| 44 | (hK : IsCompact K) (hKc : K ⊆ (extChartAt (𝓡 3) q).target) (m : ℕ) : |
| 45 | ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k : ℕ in atTop, ∀ x ∈ K, |
| 46 | ‖iteratedFDeriv ℝ m |
| 47 | (((S.flow (G.subsequence k)).flow.metric 0).pullbackCoefficients |
| 48 | ((fun y => ((G.embedding k).toFun (0, y)).2) ∘ |
| 49 | (extChartAt (𝓡 3) q).symm)) x‖ ≤ B := by |
| 50 | classical |
| 51 | let c := extChartAt (𝓡 3) q |
| 52 | let ψ (k : ℕ) : G.limitCarrier.carrier → (S.carrier (G.subsequence k)).carrier := |
| 53 | fun y => ((G.embedding k).toFun (0, y)).2 |
| 54 | let f (k : ℕ) (i j : Fin 3) (x : EuclideanSpace ℝ (Fin 3)) := |
| 55 | G.limitCarrier.coordinateCoefficient q |
| 56 | (pullbackInnerValue G.limitFlow (S.flow (G.subsequence k)) (G.embedding k)) i j (0, x) |
| 57 | let g (i j : Fin 3) (x : EuclideanSpace ℝ (Fin 3)) := |
| 58 | G.limitCarrier.coordinateCoefficient q |
| 59 | (fun t y v w => G.limitCarrier.metricInner (G.limitFlow.metricAt t) y v w) i j (0, x) |
| 60 | have hconv (i j : Fin 3) : TendstoUniformlyOn |
| 61 | (fun k => iteratedFDeriv ℝ m (f k i j)) (iteratedFDeriv ℝ m (g i j)) atTop K := |
| 62 | G.tendstoUniformlyOn_coordinate_spatial_metricJet q m i j 0 hzero K hK hKc |
| 63 | have hdiff (i j : Fin 3) (x : EuclideanSpace ℝ (Fin 3)) (hx : x ∈ K) : |
| 64 | ContDiffAt ℝ ∞ (g i j) x := |
| 65 | (G.limitFlow.contDiffAt_coordinateCoefficient_metric q i j (0, x) hzero (hKc hx)).comp x |
| 66 | (contDiffAt_const.prodMk contDiffAt_id) |
| 67 | have hcomponent (i j : Fin 3) : ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k : ℕ in atTop, |
| 68 | ∀ x ∈ K, ‖iteratedFDeriv ℝ m (f k i j) x‖ ≤ B := by |
| 69 | obtain ⟨B, hB⟩ := hK.exists_bound_of_continuousOn |
| 70 | (fun x hx => ((hdiff i j x hx).continuousAt_iteratedFDeriv |
| 71 | (by exact_mod_cast le_top : (m : ℕ∞ω) ≤ ∞)).continuousWithinAt) |
| 72 | refine ⟨max (B + 1) 0, le_max_right _ _, ?_⟩ |
| 73 | filter_upwards [Metric.tendstoUniformlyOn_iff.mp (hconv i j) 1 zero_lt_one] |
| 74 | with k hk x hx |
| 75 | apply le_trans _ (le_max_left (B + 1) 0) |
| 76 | exact (norm_le_norm_add_norm_sub (iteratedFDeriv ℝ m (g i j) x) |
| 77 | (iteratedFDeriv ℝ m (f k i j) x)).trans |
| 78 | (add_le_add (hB x hx) (by simpa only [dist_eq_norm] using (hk x hx).le)) |
| 79 | choose B hB hbound using hcomponent |
| 80 | let C := ∑ i : Fin 3, ∑ j : Fin 3, B i j |
| 81 | have hC : 0 ≤ C := Finset.sum_nonneg fun i _ => Finset.sum_nonneg fun j _ => hB i j |
| 82 | have hBC (i j : Fin 3) : B i j ≤ C := by |
| 83 | apply (Finset.single_le_sum (fun j _ => hB i j) (Finset.mem_univ j)).trans |
| 84 | exact Finset.single_le_sum (fun i _ => Finset.sum_nonneg fun j _ => hB i j) |
| 85 | (Finset.mem_univ i) |
| 86 | obtain ⟨D, hD, hnorm⟩ := exists_bilinear_jet_norm_le_components |
| 87 | (EuclideanSpace ℝ (Fin 3)) m |
| 88 | have hc : ContinuousOn c.symm K := |
| 89 | (contMDiffOn_extChartAt_symm (n := ∞) q).continuousOn.mono hKc |
| 90 | obtain ⟨j, hj⟩ := G.exists_exhaustion_superset (hK.image_of_continuousOn hc) |
| 91 | refine ⟨D * C, mul_nonneg hD.le hC, ?_⟩ |
| 92 | filter_upwards [Filter.eventually_all.mpr (fun i => Filter.eventually_all.mpr (hbound i)), |
| 93 | eventually_ge_atTop j] with k hk hjk x hx |
| 94 | let gk := (S.flow (G.subsequence k)).flow.metric 0 |
| 95 | let A := gk.pullbackCoefficients (ψ k ∘ c.symm) |
| 96 | have hxstage := G.exhaustion_monotone hjk (hj (mem_image_of_mem _ hx)) |
| 97 | have hcx := (contMDiffWithinAt_extChartAt_symm_target (n := ∞) q (hKc hx)).contMDiffAt |
| 98 | (extChartAt_target_mem_nhds' (hKc hx)) |
| 99 | have hψ := (G.embedding k).spatialMap_contMDiffAt (G.exhaustion_open k) hzero hxstage |
| 100 | have hA : ContDiffAt ℝ ∞ A x := gk.contDiffAt_pullbackCoefficients (hψ.comp x hcx) |
| 101 | apply hnorm _ C hC |
| 102 | intro i l |
| 103 | have heq : f k i l =ᶠ[𝓝 x] coefficientEval i l ∘ A := by |
| 104 | filter_upwards [extChartAt_target_mem_nhds' (hKc hx), |
| 105 | hcx.continuousAt.preimage_mem_nhds ((G.exhaustion_open k).mem_nhds hxstage)] |
| 106 | with y hy hye |
| 107 | have hcy := (contMDiffWithinAt_extChartAt_symm_target (n := ∞) q hy).contMDiffAt |
| 108 | (extChartAt_target_mem_nhds' hy) |
| 109 | have hψy := (G.embedding k).spatialMap_contMDiffAt (G.exhaustion_open k) hzero hye |
| 110 | have hd : mfderiv (𝓡 3) (𝓡 3) (ψ k ∘ c.symm) y = |
| 111 | (mfderiv (𝓡 3) (𝓡 3) (ψ k) (c.symm y)).comp |
| 112 | (mfderiv (𝓡 3) (𝓡 3) c.symm y) := |
| 113 | mfderiv_comp y (hψy.mdifferentiableAt (by simp)) (hcy.mdifferentiableAt (by simp)) |
| 114 | change gk.inner (ψ k (c.symm y)) |
| 115 | (mfderiv (𝓡 3) (𝓡 3) (ψ k) (c.symm y) |
| 116 | (mfderiv (𝓡 3) (𝓡 3) c.symm y (EuclideanSpace.basisFun (Fin 3) ℝ i))) |
| 117 | (mfderiv (𝓡 3) (𝓡 3) (ψ k) (c.symm y) |
| 118 | (mfderiv (𝓡 3) (𝓡 3) c.symm y (EuclideanSpace.basisFun (Fin 3) ℝ l))) = |
| 119 | gk.inner (ψ k (c.symm y)) |
| 120 | (mfderiv (𝓡 3) (𝓡 3) (ψ k ∘ c.symm) y (EuclideanSpace.basisFun (Fin 3) ℝ i)) |
| 121 | (mfderiv (𝓡 3) (𝓡 3) (ψ k ∘ c.symm) y (EuclideanSpace.basisFun (Fin 3) ℝ l)) |
| 122 | rw [hd] |
| 123 | rfl |
| 124 | have hderiv := (heq.iteratedFDeriv ℝ m).self_of_nhds |
| 125 | rw [(coefficientEval i l).iteratedFDeriv_comp_left hA |
| 126 | (by exact_mod_cast le_top : (m : ℕ∞ω) ≤ ∞)] at hderiv |
| 127 | exact (hderiv ▸ hk i l x hx).trans (hBC i l) |
| 128 | |
| 129 | set_option synthInstance.maxHeartbeats 100000 in |
| 130 | -- The actual pullback forms carry the stored source and limit manifold instances. |
| 131 | set_option maxHeartbeats 800000 in |
| 132 | -- The metric comparison and chart-chain identities unfold dependent carrier data. |
| 133 | /-- The retained reference-time charts have positive uniform ellipticity |
| 134 | on each compact chart set (Proposition 5.14, pp. 90-91). -/ |
| 135 | theorem exists_eventually_reference_ellipticity |
| 136 | (G : PointedGeometricConvergence S) (hzero : a < 0 ∧ 0 < b) |
| 137 | (q : G.limitCarrier.carrier) {K : Set (EuclideanSpace ℝ (Fin 3))} |
| 138 | (hK : IsCompact K) (hKc : K ⊆ (extChartAt (𝓡 3) q).target) : |
| 139 | ∃ α β : ℝ, 0 < α ∧ 0 < β ∧ ∀ᶠ k : ℕ in atTop, ∀ x ∈ K, ∀ v, |
| 140 | α * ‖v‖ ^ 2 ≤ ((S.flow (G.subsequence k)).flow.metric 0).pullbackCoefficients |
| 141 | ((fun y => ((G.embedding k).toFun (0, y)).2) ∘ (extChartAt (𝓡 3) q).symm) x v v ∧ |
| 142 | ((S.flow (G.subsequence k)).flow.metric 0).pullbackCoefficients |
| 143 | ((fun y => ((G.embedding k).toFun (0, y)).2) ∘ (extChartAt (𝓡 3) q).symm) x v v ≤ |
| 144 | β * ‖v‖ ^ 2 := by |
| 145 | let c := extChartAt (𝓡 3) q |
| 146 | let B := (G.limitFlow.flow.metric 0).pullbackCoefficients c.symm |
| 147 | have hchart {x : EuclideanSpace ℝ (Fin 3)} (hx : x ∈ K) : |
| 148 | ContMDiffAt (𝓡 3) (𝓡 3) ∞ c.symm x := |
| 149 | (contMDiffWithinAt_extChartAt_symm_target (n := ∞) q (hKc hx)).contMDiffAt |
| 150 | (extChartAt_target_mem_nhds' (hKc hx)) |
| 151 | have hB : ContinuousOn B K := fun x hx => |
| 152 | ((G.limitFlow.flow.metric 0).contDiffAt_pullbackCoefficients |
| 153 | (hchart hx)).continuousAt.continuousWithinAt |
| 154 | have hpos : ∀ x ∈ K, ∀ v : EuclideanSpace ℝ (Fin 3), v ≠ 0 → 0 < B x v v := by |
| 155 | intro x hx v hv |
| 156 | apply (G.limitFlow.flow.metric 0).pos |
| 157 | have hi : (mfderiv (𝓡 3) (𝓡 3) c.symm x).IsInvertible := by |
| 158 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 159 | isInvertible_mfderivWithin_extChartAt_symm (hKc hx) |
| 160 | intro hz |
| 161 | apply hv |
| 162 | apply hi.injective |
| 163 | rw [map_zero] |
| 164 | convert! hz using 1 |
| 165 | obtain ⟨α, hα, hlower⟩ := exists_uniform_bilinear_family_lower_bound hK hB hpos |
| 166 | obtain ⟨β, hβ⟩ := hK.exists_bound_of_continuousOn (f := B) hB |
| 167 | have hc : ContinuousOn c.symm K := |
| 168 | (contMDiffOn_extChartAt_symm (n := ∞) q).continuousOn.mono hKc |
| 169 | have himage := hK.image_of_continuousOn hc |
| 170 | obtain ⟨j, hj⟩ := G.exists_exhaustion_superset himage |
| 171 | refine ⟨α / 2, 2 * max β 1, by positivity, by positivity, ?_⟩ |
| 172 | filter_upwards [G.eventually_pullback_inner_bounds himage hzero |
| 173 | (by norm_num : (0 : ℝ) < 1 / 2), eventually_ge_atTop j] with k hk hjk x hx v |
| 174 | let ψ : G.limitCarrier.carrier → (S.carrier (G.subsequence k)).carrier := |
| 175 | fun y => ((G.embedding k).toFun (0, y)).2 |
| 176 | let w := mfderiv (𝓡 3) (𝓡 3) c.symm x v |
| 177 | have hcomparison := hk (c.symm x) (mem_image_of_mem _ hx) w |
| 178 | have he := (G.embedding k).spatialMap_contMDiffAt (G.exhaustion_open k) hzero |
| 179 | (G.exhaustion_monotone hjk (hj (mem_image_of_mem _ hx))) |
| 180 | have hd : mfderiv (𝓡 3) (𝓡 3) (ψ ∘ c.symm) x = |
| 181 | (mfderiv (𝓡 3) (𝓡 3) ψ (c.symm x)).comp (mfderiv (𝓡 3) (𝓡 3) c.symm x) := |
| 182 | mfderiv_comp x (he.mdifferentiableAt (by simp)) ((hchart hx).mdifferentiableAt (by simp)) |
| 183 | have heq : pullbackInnerValue G.limitFlow (S.flow (G.subsequence k)) |
| 184 | (G.embedding k) 0 (c.symm x) w w = |
| 185 | ((S.flow (G.subsequence k)).flow.metric 0).pullbackCoefficients (ψ ∘ c.symm) x v v := by |
| 186 | unfold RiemannianMetric.pullbackCoefficients |
| 187 | rw [hd] |
| 188 | rfl |
| 189 | have href : G.limitCarrier.metricInner (G.limitFlow.metricAt 0) (c.symm x) w w = |
| 190 | B x v v := rfl |
| 191 | rw [heq, href] at hcomparison |
| 192 | have hupper : B x v v ≤ max β 1 * ‖v‖ ^ 2 := by |
| 193 | apply (le_abs_self _).trans |
| 194 | calc |
| 195 | |B x v v| ≤ ‖B x‖ * (‖v‖ * ‖v‖) := by |
| 196 | simpa only [Real.norm_eq_abs, mul_assoc] using (B x).le_opNorm₂ v v |
| 197 | _ ≤ max β 1 * ‖v‖ ^ 2 := by |
| 198 | simpa only [pow_two] using |
| 199 | mul_le_mul_of_nonneg_right ((hβ x hx).trans (le_max_left β 1)) |
| 200 | (mul_nonneg (norm_nonneg v) (norm_nonneg v)) |
| 201 | have hnonneg : 0 ≤ B x v v := le_trans (by positivity) (hlower x hx v) |
| 202 | constructor |
| 203 | · nlinarith [hlower x hx v, hcomparison.1] |
| 204 | · nlinarith [hcomparison.2] |
| 205 | |
| 206 | end PoincareMT.M30 |