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.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.MetricConvergence.TerminalMetricConvergence |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Cylinder.Geometry.CylinderMetricComparison |
| 4 | import PoincareLib.Geometry.RicciFlow.Local.Metric.MetricCompactBounds |
| 5 | |
| 6 | /-! |
| 7 | # Actual terminal metric comparison on compact chart sets |
| 8 | |
| 9 | Morgan-Tian Theorem 12.28, pp. 323-324. Uniform positivity of the limit |
| 10 | metric and the actual zeroth coefficient convergence give arbitrarily |
| 11 | small relative quadratic error on each retained compact chart set. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.M35.OrdinaryRealization |
| 20 | |
| 21 | private theorem chartCoefficients_pos |
| 22 | {M : Type*} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 24 | (g : RiemannianMetric 3 M) (q : M) {p : EuclideanSpace ℝ (Fin 3)} |
| 25 | (hp : p ∈ (extChartAt (𝓡 3) q).target) |
| 26 | {v : EuclideanSpace ℝ (Fin 3)} (hv : v ≠ 0) : |
| 27 | 0 < g.pullbackCoefficients (extChartAt (𝓡 3) q).symm p v v := by |
| 28 | apply g.pos |
| 29 | intro hzero |
| 30 | have hcomp := mfderiv_extChartAt_comp_mfderivWithin_extChartAt_symm hp |
| 31 | have hleft := congrArg |
| 32 | (fun A : EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) => A v) hcomp |
| 33 | simp only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] at hleft |
| 34 | have hmap := congrArg (fun w : EuclideanSpace ℝ (Fin 3) => |
| 35 | mfderiv (𝓡 3) (𝓡 3) (extChartAt (𝓡 3) q) |
| 36 | ((extChartAt (𝓡 3) q).symm p) w) hzero |
| 37 | exact hv (hleft.symm.trans (hmap.trans (map_zero _))) |
| 38 | |
| 39 | /-- Theorem 12.28: on every retained compact chart set the actual |
| 40 | rescaled original metric differs from the limit metric by arbitrarily |
| 41 | small relative quadratic error, under the same fixed spatial map. -/ |
| 42 | theorem blowupSequence_terminal_metric_comparison (P : M35StandardCapPredecessors) |
| 43 | {g₀ : StandardInitialMetric} (E : RepairedStandardCapExistenceData g₀) |
| 44 | (t : ℕ → ℝ) (x : ℕ → StandardCapSpace) |
| 45 | (ht : ∀ k, t k ∈ Ico 0 E.flow.base.lifetime) |
| 46 | (hR : Tendsto (fun k => (E.flow.connection (t k)).scalarCurvature (x k)) atTop atTop) |
| 47 | (L : GeneralizedBlowupConvergence (blowupSequence P E t x ht hR) |
| 48 | (blowupBackwardInterval ⊤)) |
| 49 | (q : L.limit.sliceCarrier.carrier) (j : ℕ) |
| 50 | (K : Set (EuclideanSpace ℝ (Fin 3))) (hK : IsCompact K) |
| 51 | (hKU : K ⊆ {p | p ∈ (extChartAt (𝓡 3) q).target ∧ |
| 52 | (extChartAt (𝓡 3) q).symm p ∈ L.exhaustion.space j}) |
| 53 | (eta : ℝ) (heta : 0 < eta) : |
| 54 | letI : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 55 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.limit.carrier.carrier := |
| 56 | L.limit.carrier.chartedSpace |
| 57 | letI : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 58 | ∃ N : ℕ, j ≤ N ∧ ∀ k ≥ N, ∀ p ∈ K, ∀ v : EuclideanSpace ℝ (Fin 3), |
| 59 | |(blowupSequence P E t x ht hR).scale (L.subsequence k) * |
| 60 | (E.flow.metric (t (L.subsequence k))).pullbackCoefficients |
| 61 | ((fun y => ((L.embedding k).forward 0 |
| 62 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos k).le, le_rfl⟩ y).val) ∘ |
| 63 | (extChartAt (𝓡 3) q).symm) p v v - |
| 64 | (L.limit.flow.metric 0).pullbackCoefficients (extChartAt (𝓡 3) q).symm p v v| ≤ |
| 65 | eta * (L.limit.flow.metric 0).pullbackCoefficients |
| 66 | (extChartAt (𝓡 3) q).symm p v v := by |
| 67 | let : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 68 | let : ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.limit.carrier.carrier := |
| 69 | L.limit.carrier.chartedSpace |
| 70 | have : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 71 | let G := (L.limit.flow.metric 0).pullbackCoefficients (extChartAt (𝓡 3) q).symm |
| 72 | have hGreg : ContinuousOn G K := |
| 73 | ((L.limit.flow.metric 0).contDiffOn_chartCoefficients q).continuousOn.mono |
| 74 | (fun _ hp => (hKU hp).1) |
| 75 | obtain ⟨c, _, hc, _, hG⟩ := Proofs.M03.exists_pos_uniform_bilinear_bounds hK hGreg |
| 76 | (fun p hp _ hv => chartCoefficients_pos (L.limit.flow.metric 0) q (hKU hp).1 hv) |
| 77 | have hdelta : 0 < eta * c / 3 := div_pos (mul_pos heta hc) (by norm_num) |
| 78 | obtain ⟨N, hjN, hN⟩ := blowupSequence_terminal_spatial_CInfinity P E t x ht hR L q j 0 |
| 79 | K hK hKU (eta * c / 3) hdelta |
| 80 | refine ⟨N, hjN, ?_⟩ |
| 81 | intro k hk p hp v |
| 82 | let Q := (blowupSequence P E t x ht hR).scale (L.subsequence k) |
| 83 | have hzero : (0 : ℝ) ∈ Icc (-L.exhaustion.time k) 0 := |
| 84 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos k).le, le_rfl⟩ |
| 85 | let f : L.limit.sliceCarrier.carrier → StandardCapSpace := |
| 86 | fun y => ((L.embedding k).forward 0 hzero y).val |
| 87 | let B := Q • (E.flow.metric (t (L.subsequence k))).pullbackCoefficients |
| 88 | (f ∘ (extChartAt (𝓡 3) q).symm) p |
| 89 | have hpoint := L.exhaustion.space_increasing (hjN.trans hk) (hKU hp).2 |
| 90 | have htime := ((L.embedding k).forward 0 hzero L.limit.base).property |
| 91 | have hf : ContMDiffAt (𝓡 3) (𝓡 3) ∞ f ((extChartAt (𝓡 3) q).symm p) := |
| 92 | ((sliceDiffeomorph htime).contMDiff.comp_contMDiffOn |
| 93 | ((L.embedding k).forward_smooth 0 hzero)).contMDiffAt |
| 94 | ((L.exhaustion.space_open k).mem_nhds hpoint) |
| 95 | have hcomp (a b : Fin 3) : |
| 96 | |(B - G p) (EuclideanSpace.basisFun (Fin 3) ℝ a) |
| 97 | (EuclideanSpace.basisFun (Fin 3) ℝ b)| ≤ eta * c / 3 := by |
| 98 | have he := hN k hk a b p hp |
| 99 | simp only [iteratedFDeriv_zero_eq_comp, Function.comp_apply, ← map_sub, |
| 100 | LinearIsometryEquiv.norm_map, Real.norm_eq_abs] at he |
| 101 | have hco := fixedCylinderMetricCoefficient_eq_pullback E.flow.base.flow |
| 102 | L.limit.sliceCarrier (t (L.subsequence k)) Q f q a b (0, p) (hKU hp).1 hf |
| 103 | simp only [zero_div, add_zero] at hco |
| 104 | exact (congrArg (fun z => |z - G p (EuclideanSpace.basisFun (Fin 3) ℝ a) |
| 105 | (EuclideanSpace.basisFun (Fin 3) ℝ b)|) hco).symm.trans_le he.le |
| 106 | have herr := M35.abs_bilinear_le_of_components (B - G p) hdelta.le hcomp v |
| 107 | have hmodel := mul_le_mul_of_nonneg_left (hG p hp v).1 heta.le |
| 108 | change |B v v - G p v v| ≤ eta * G p v v |
| 109 | change |B v v - G p v v| ≤ 3 * (eta * c / 3) * ‖v‖ ^ 2 at herr |
| 110 | nlinarith |
| 111 | |
| 112 | end PoincareMT.M35.OrdinaryRealization |