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.PartialLimits.RegularSets.MetricConvergence |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Spheres.RoundTransfer |
| 4 | import PoincareLib.Analysis.Calculus.SmoothCompactness.Pullback |
| 5 | |
| 6 | /-! |
| 7 | # Scalar curvature on the actual regular spatial embeddings |
| 8 | |
| 9 | The metric jets retained by Theorem 5.6 determine scalar curvature at each |
| 10 | fixed limit point. Source maps are used only on their eventual open |
| 11 | exhaustion domains. Morgan--Tian, pp. 85-87 and 254-255; M28 derivation 72. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | set_option maxSynthPendingDepth 12 |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M28 |
| 25 | |
| 26 | open SpacetimeBounds Poincare.Analysis.Calculus |
| 27 | |
| 28 | private theorem tendsto_values_of_uniform_zero_jets |
| 29 | {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 30 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 31 | {B : ℕ → E → F} {B₀ : E → F} {K : Set E} {x : E} |
| 32 | (h : TendstoUniformlyOn (fun k => iteratedFDeriv ℝ 0 (B k)) |
| 33 | (iteratedFDeriv ℝ 0 B₀) atTop K) (hx : x ∈ K) : |
| 34 | Tendsto (fun k => B k x) atTop (𝓝 (B₀ x)) := by |
| 35 | exact ((ContinuousMultilinearMap.uniformContinuous_eval_const |
| 36 | (0 : Fin 0 → E)).comp_tendstoUniformlyOn h).tendsto_at hx |
| 37 | |
| 38 | /-- Derivatives through order two give the coordinate metric two-jet |
| 39 | limit, with the actual Fréchet derivatives (M28 derivation 72). -/ |
| 40 | theorem tendsto_metricTwoJet_of_uniform_bilinear_jets |
| 41 | {n : ℕ} {B : ℕ → EuclideanSpace ℝ (Fin n) → MetricCoefficient n} |
| 42 | {B₀ : EuclideanSpace ℝ (Fin n) → MetricCoefficient n} |
| 43 | {K : Set (EuclideanSpace ℝ (Fin n))} {x : EuclideanSpace ℝ (Fin n)} |
| 44 | (h : ∀ m ≤ 2, TendstoUniformlyOn (fun k => iteratedFDeriv ℝ m (B k)) |
| 45 | (iteratedFDeriv ℝ m B₀) atTop K) (hx : x ∈ K) : |
| 46 | Tendsto (fun k => metricTwoJet (B k) x) atTop (𝓝 (metricTwoJet B₀ x)) := by |
| 47 | have h₀ := tendsto_values_of_uniform_zero_jets (h 0 (by omega)) hx |
| 48 | have h₁ := tendsto_values_of_uniform_zero_jets |
| 49 | (tendstoUniformlyOn_fderiv_jets 0 (h 1 (by omega))) hx |
| 50 | have h₂ := tendsto_values_of_uniform_zero_jets |
| 51 | (tendstoUniformlyOn_fderiv_jets 0 |
| 52 | (tendstoUniformlyOn_fderiv_jets 1 (h 2 (by omega)))) hx |
| 53 | exact h₀.prodMk_nhds (h₁.prodMk_nhds h₂) |
| 54 | |
| 55 | namespace RegularPointedMetricConvergence |
| 56 | |
| 57 | variable {M : ℕ → Type u} [∀ k, TopologicalSpace (M k)] |
| 58 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin 3)) (M k)] |
| 59 | [∀ k, IsManifold (𝓡 3) ∞ (M k)] |
| 60 | {g : ∀ k, RiemannianMetric 3 (M k)} {p : ∀ k, M k} |
| 61 | |
| 62 | /-- The scalar at a fixed limit point is the limit of the actual source |
| 63 | scalars under the retained embeddings. No scalar convergence is assumed |
| 64 | (Theorem 5.6, pp. 85-87; Claims 10.10-10.11, pp. 254-255; derivation 72). -/ |
| 65 | theorem tendsto_scalarCurvature |
| 66 | (G : RegularPointedMetricConvergence g p) (D : ∀ k, LeviCivitaData (g k)) : |
| 67 | letI := G.limitCarrier.topologicalSpace |
| 68 | letI := G.limitCarrier.chartedSpace |
| 69 | letI := G.limitCarrier.isManifold |
| 70 | ∀ (D₀ : LeviCivitaData G.limitMetric) (q : G.limitCarrier.carrier), |
| 71 | Tendsto (fun k => (D (G.subsequence k)).scalarCurvature (G.embedding k q)) |
| 72 | atTop (𝓝 (D₀.scalarCurvature q)) := by |
| 73 | let := G.limitCarrier.topologicalSpace |
| 74 | let := G.limitCarrier.chartedSpace |
| 75 | let := G.limitCarrier.isManifold |
| 76 | intro D₀ q |
| 77 | let c := extChartAt (𝓡 3) q |
| 78 | let x := c q |
| 79 | have hx : x ∈ c.target := mem_extChartAt_target q |
| 80 | have hc : c.symm x = q := extChartAt_to_inv q |
| 81 | have hjets := tendsto_metricTwoJet_of_uniform_bilinear_jets |
| 82 | (fun m _ => G.metric_jets q m {x} (isCompact_singleton) |
| 83 | (singleton_subset_iff.mpr hx)) (mem_singleton x) |
| 84 | have hread := (tube.contDiffAt_jetScalarCurvature |
| 85 | (J := metricTwoJet (G.limitMetric.pullbackCoefficients c.symm) x) |
| 86 | (G.limitMetric.isInvertible_chartCoefficients q hx)).continuousAt.tendsto.comp hjets |
| 87 | have hlimit : tube.jetScalarCurvature |
| 88 | (metricTwoJet (G.limitMetric.pullbackCoefficients c.symm) x) = |
| 89 | D₀.scalarCurvature q := by |
| 90 | rw [tube.jetScalarCurvature_metricTwoJet_pullback D₀ |
| 91 | (isOpen_extChartAt_target q) (contMDiffOn_extChartAt_symm q) |
| 92 | (fun y hy => by |
| 93 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 94 | isInvertible_mfderivWithin_extChartAt_symm hy) hx, hc] |
| 95 | rw [hlimit] at hread |
| 96 | have hmono : Monotone G.exhaustion := monotone_nat_of_le_succ |
| 97 | (fun j => subset_closure.trans (G.exhaustion_step j)) |
| 98 | obtain ⟨j, hj⟩ : ∃ j, q ∈ G.exhaustion j := by |
| 99 | have hq : q ∈ ⋃ j, G.exhaustion j := G.exhaustion_covers.symm ▸ mem_univ q |
| 100 | exact mem_iUnion.mp hq |
| 101 | apply hread.congr' |
| 102 | filter_upwards [eventually_ge_atTop j] with k hk |
| 103 | let U := c.target ∩ c.symm ⁻¹' G.exhaustion k |
| 104 | have hU : IsOpen U := |
| 105 | (contMDiffOn_extChartAt_symm (n := ∞) q).continuousOn.isOpen_inter_preimage |
| 106 | (isOpen_extChartAt_target q) (G.exhaustion_open k) |
| 107 | have hxU : x ∈ U := ⟨hx, by simpa only [mem_preimage, hc] using hmono hk hj⟩ |
| 108 | have hchart (y) (hy : y ∈ U) : ContMDiffAt (𝓡 3) (𝓡 3) ∞ c.symm y := |
| 109 | (contMDiffOn_extChartAt_symm q).contMDiffAt |
| 110 | ((isOpen_extChartAt_target q).mem_nhds hy.1) |
| 111 | have hmap (y) (hy : y ∈ U) : |
| 112 | IsLocalDiffeomorphAt (𝓡 3) (𝓡 3) ∞ (G.embedding k) (c.symm y) := |
| 113 | G.embedding_smooth k ⟨c.symm y, hy.2⟩ |
| 114 | have hsmooth : ContMDiffOn (𝓡 3) (𝓡 3) ∞ (G.embedding k ∘ c.symm) U := |
| 115 | fun y hy => ((hmap y hy).contMDiffAt.comp y (hchart y hy)).contMDiffWithinAt |
| 116 | have hinvertible (y) (hy : y ∈ U) : |
| 117 | (mfderiv (𝓡 3) (𝓡 3) (G.embedding k ∘ c.symm) y).IsInvertible := by |
| 118 | rw [mfderiv_comp y ((hmap y hy).mdifferentiableAt (by simp)) |
| 119 | ((hchart y hy).mdifferentiableAt (by simp))] |
| 120 | have hi : (mfderiv (𝓡 3) (𝓡 3) c.symm y).IsInvertible := by |
| 121 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 122 | isInvertible_mfderivWithin_extChartAt_symm hy.1 |
| 123 | exact (show (mfderiv (𝓡 3) (𝓡 3) (G.embedding k) (c.symm y)).IsInvertible from |
| 124 | ⟨(hmap y hy).mfderivToContinuousLinearEquiv (by simp), rfl⟩).comp hi |
| 125 | simpa only [Function.comp_apply, hc] using |
| 126 | tube.jetScalarCurvature_metricTwoJet_pullback (D (G.subsequence k)) |
| 127 | hU hsmooth hinvertible hxU |
| 128 | |
| 129 | /-- A uniform eventual source scalar lower bound survives on the first |
| 130 | spatial limit (Claims 10.10-10.11, pp. 254-255; derivation 72). -/ |
| 131 | theorem scalarCurvature_lower_bound |
| 132 | (G : RegularPointedMetricConvergence g p) (D : ∀ k, LeviCivitaData (g k)) : |
| 133 | letI := G.limitCarrier.topologicalSpace |
| 134 | letI := G.limitCarrier.chartedSpace |
| 135 | letI := G.limitCarrier.isManifold |
| 136 | ∀ (D₀ : LeviCivitaData G.limitMetric) (q : G.limitCarrier.carrier) (b : ℝ), |
| 137 | (∀ᶠ k in atTop, b ≤ (D (G.subsequence k)).scalarCurvature (G.embedding k q)) → |
| 138 | b ≤ D₀.scalarCurvature q := by |
| 139 | let := G.limitCarrier.topologicalSpace |
| 140 | let := G.limitCarrier.chartedSpace |
| 141 | let := G.limitCarrier.isManifold |
| 142 | intro D₀ q b hb |
| 143 | exact ge_of_tendsto (G.tendsto_scalarCurvature D D₀ q) hb |
| 144 | |
| 145 | end RegularPointedMetricConvergence |
| 146 | |
| 147 | end PoincareMT.M28 |