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.UniformScalarJets |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.ChartBounds |
| 4 | |
| 5 | /-! |
| 6 | # Uniform actual scalar convergence in a retained compact chart |
| 7 | |
| 8 | The coordinate two-jet readout equals the actual source scalar on one |
| 9 | common exhaustion tail. Source: Morgan--Tian Theorem 5.6, pp. 85-87, |
| 10 | and Claim 10.8, p. 254; M28 derivation 118. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | set_option maxSynthPendingDepth 12 |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M28.RegularPointedMetricConvergence |
| 23 | |
| 24 | open SpacetimeBounds |
| 25 | |
| 26 | variable {M : ℕ → Type u} [∀ k, TopologicalSpace (M k)] |
| 27 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin 3)) (M k)] |
| 28 | [∀ k, IsManifold (𝓡 3) ∞ (M k)] |
| 29 | {g : ∀ k, RiemannianMetric 3 (M k)} {p : ∀ k, M k} |
| 30 | |
| 31 | /-- Identify the coordinate scalar with the actual source scalar only |
| 32 | where the retained embedding is a local diffeomorphism. Source: |
| 33 | Theorem 5.6, pp. 85-87; M28 derivation 118. -/ |
| 34 | theorem jetScalarCurvature_chart_eq_of_mem_exhaustion |
| 35 | (G : RegularPointedMetricConvergence g p) (D : ∀ k, LeviCivitaData (g k)) : |
| 36 | letI := G.limitCarrier.topologicalSpace |
| 37 | letI := G.limitCarrier.chartedSpace |
| 38 | letI := G.limitCarrier.isManifold |
| 39 | ∀ (q : G.limitCarrier.carrier) (k : ℕ) (x : EuclideanSpace ℝ (Fin 3)), |
| 40 | x ∈ (extChartAt (𝓡 3) q).target → |
| 41 | (extChartAt (𝓡 3) q).symm x ∈ G.exhaustion k → |
| 42 | tube.jetScalarCurvature (metricTwoJet ((g (G.subsequence k)).pullbackCoefficients |
| 43 | (G.embedding k ∘ (extChartAt (𝓡 3) q).symm)) x) = |
| 44 | (D (G.subsequence k)).scalarCurvature |
| 45 | (G.embedding k ((extChartAt (𝓡 3) q).symm x)) := by |
| 46 | let := G.limitCarrier.topologicalSpace |
| 47 | let := G.limitCarrier.chartedSpace |
| 48 | let := G.limitCarrier.isManifold |
| 49 | intro q k x hx hstage |
| 50 | let c := extChartAt (𝓡 3) q |
| 51 | let U := c.target ∩ c.symm ⁻¹' G.exhaustion k |
| 52 | have hU : IsOpen U := |
| 53 | (contMDiffOn_extChartAt_symm (n := ∞) q).continuousOn.isOpen_inter_preimage |
| 54 | (isOpen_extChartAt_target q) (G.exhaustion_open k) |
| 55 | have hchart (y) (hy : y ∈ U) : ContMDiffAt (𝓡 3) (𝓡 3) ∞ c.symm y := |
| 56 | (contMDiffOn_extChartAt_symm q).contMDiffAt |
| 57 | ((isOpen_extChartAt_target q).mem_nhds hy.1) |
| 58 | have hmap (y) (hy : y ∈ U) : |
| 59 | IsLocalDiffeomorphAt (𝓡 3) (𝓡 3) ∞ (G.embedding k) (c.symm y) := |
| 60 | G.embedding_smooth k ⟨c.symm y, hy.2⟩ |
| 61 | have hsmooth : ContMDiffOn (𝓡 3) (𝓡 3) ∞ (G.embedding k ∘ c.symm) U := |
| 62 | fun y hy => ((hmap y hy).contMDiffAt.comp y (hchart y hy)).contMDiffWithinAt |
| 63 | have hinvertible (y) (hy : y ∈ U) : |
| 64 | (mfderiv (𝓡 3) (𝓡 3) (G.embedding k ∘ c.symm) y).IsInvertible := by |
| 65 | rw [mfderiv_comp y ((hmap y hy).mdifferentiableAt (by simp)) |
| 66 | ((hchart y hy).mdifferentiableAt (by simp))] |
| 67 | have hi : (mfderiv (𝓡 3) (𝓡 3) c.symm y).IsInvertible := by |
| 68 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 69 | isInvertible_mfderivWithin_extChartAt_symm hy.1 |
| 70 | exact (show (mfderiv (𝓡 3) (𝓡 3) (G.embedding k) (c.symm y)).IsInvertible from |
| 71 | ⟨(hmap y hy).mfderivToContinuousLinearEquiv (by simp), rfl⟩).comp hi |
| 72 | exact tube.jetScalarCurvature_metricTwoJet_pullback (D (G.subsequence k)) |
| 73 | hU hsmooth hinvertible ⟨hx, hstage⟩ |
| 74 | |
| 75 | /-- Scalar convergence is uniform on a fixed compact chart set, with |
| 76 | the source index preceding every tested point. Source: Theorem 5.6, |
| 77 | pp. 85-87, and Claim 10.8, p. 254; M28 derivation 118. -/ |
| 78 | theorem tendstoUniformlyOn_chart_scalarCurvature |
| 79 | (G : RegularPointedMetricConvergence g p) (D : ∀ k, LeviCivitaData (g k)) : |
| 80 | letI := G.limitCarrier.topologicalSpace |
| 81 | letI := G.limitCarrier.chartedSpace |
| 82 | letI := G.limitCarrier.isManifold |
| 83 | ∀ (D0 : LeviCivitaData G.limitMetric) (q : G.limitCarrier.carrier) |
| 84 | (K : Set (EuclideanSpace ℝ (Fin 3))), IsCompact K → |
| 85 | K ⊆ (extChartAt (𝓡 3) q).target → |
| 86 | TendstoUniformlyOn |
| 87 | (fun k x => (D (G.subsequence k)).scalarCurvature |
| 88 | (G.embedding k ((extChartAt (𝓡 3) q).symm x))) |
| 89 | (fun x => D0.scalarCurvature ((extChartAt (𝓡 3) q).symm x)) atTop K := by |
| 90 | let := G.limitCarrier.topologicalSpace |
| 91 | let := G.limitCarrier.chartedSpace |
| 92 | let := G.limitCarrier.isManifold |
| 93 | intro D0 q K hK htarget |
| 94 | let c := extChartAt (𝓡 3) q |
| 95 | let B0 := G.limitMetric.pullbackCoefficients c.symm |
| 96 | have hcontinuous : ContinuousOn (metricTwoJet B0) K := by |
| 97 | intro x hx |
| 98 | have hB : ContDiffAt ℝ ∞ B0 x := |
| 99 | (G.limitMetric.contDiffOn_chartCoefficients q).contDiffAt |
| 100 | ((isOpen_extChartAt_target q).mem_nhds (htarget hx)) |
| 101 | have hD : ContDiffAt ℝ ∞ (fderiv ℝ B0) x := hB.fderiv_right (by simp) |
| 102 | have hJ := hB.continuousAt.prodMk |
| 103 | (hD.continuousAt.prodMk (hD.fderiv_right (m := ∞) (by simp)).continuousAt) |
| 104 | exact hJ.continuousWithinAt |
| 105 | have hjets := tendstoUniformlyOn_metricTwoJet_of_uniform_bilinear_jets |
| 106 | (fun m _ => G.metric_jets q m K hK htarget) |
| 107 | have hscalar := tendstoUniformlyOn_jetScalarCurvature_of_metricTwoJet hK hcontinuous |
| 108 | (fun x hx => G.limitMetric.isInvertible_chartCoefficients q (htarget hx)) hjets |
| 109 | have himage : IsCompact (c.symm '' K) := hK.image_of_continuousOn |
| 110 | ((contMDiffOn_extChartAt_symm (n := ∞) q).continuousOn.mono htarget) |
| 111 | have hmono : Monotone G.exhaustion := monotone_nat_of_le_succ |
| 112 | (fun j => subset_closure.trans (G.exhaustion_step j)) |
| 113 | obtain ⟨j, hj⟩ := himage.elim_directed_cover G.exhaustion G.exhaustion_open |
| 114 | (by rw [G.exhaustion_covers]; exact subset_univ _) hmono.directed_le |
| 115 | have hlimit (x) (hx : x ∈ K) : tube.jetScalarCurvature (metricTwoJet B0 x) = |
| 116 | D0.scalarCurvature (c.symm x) := |
| 117 | tube.jetScalarCurvature_metricTwoJet_pullback D0 |
| 118 | (isOpen_extChartAt_target q) (contMDiffOn_extChartAt_symm q) |
| 119 | (fun y hy => by |
| 120 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 121 | isInvertible_mfderivWithin_extChartAt_symm hy) (htarget hx) |
| 122 | apply Metric.tendstoUniformlyOn_iff.mpr |
| 123 | intro delta hdelta |
| 124 | filter_upwards [Metric.tendstoUniformlyOn_iff.mp hscalar delta hdelta, |
| 125 | eventually_ge_atTop j] with k hk hjk |
| 126 | intro x hx |
| 127 | have hsource := G.jetScalarCurvature_chart_eq_of_mem_exhaustion D q k x |
| 128 | (htarget hx) (hmono hjk (hj (mem_image_of_mem _ hx))) |
| 129 | simpa only [hlimit x hx, hsource] using hk x hx |
| 130 | |
| 131 | end PoincareMT.M28.RegularPointedMetricConvergence |