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.Persistence.Removal.Terminal.TerminalMetricJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Collar.PhysicalCollar |
| 3 | |
| 4 | /-! |
| 5 | # Scalar convergence at an actual regular terminal point |
| 6 | |
| 7 | The smooth scalar two-jet operator reads the primitive terminal |
| 8 | metric limit through the actual regular chart. Bounds therefore |
| 9 | pass to the terminal carrier before retention is decided. |
| 10 | Morgan--Tian, Claim 16.10, pp. 374-375; M44 derivation 70. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M44 |
| 22 | |
| 23 | open SpacetimeBounds |
| 24 | |
| 25 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 26 | |
| 27 | noncomputable local instance terminalScalarCoefficientNorm : |
| 28 | NormedAddCommGroup (MetricCoefficient 3) := ContinuousLinearMap.toNormedAddCommGroup |
| 29 | |
| 30 | noncomputable local instance terminalScalarCoefficientSpace : |
| 31 | NormedSpace ℝ (MetricCoefficient 3) := ContinuousLinearMap.toNormedSpace |
| 32 | |
| 33 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 34 | normedSpaceTangentSpaceVectorSpace |
| 35 | |
| 36 | /-- The scalar two-jet operator on a local coordinate pullback |
| 37 | equals actual scalar curvature. Source: Claim 16.10; |
| 38 | M44 derivation 70. -/ |
| 39 | theorem jetScalarCurvature_pullbackCoefficients |
| 40 | {M : Type*} [TopologicalSpace M] [ChartedSpace E M] |
| 41 | [IsManifold (𝓡 3) ∞ M] [T2Space M] |
| 42 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) |
| 43 | {f : E → M} {U : Set E} (hU : IsOpen U) |
| 44 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U) |
| 45 | (hinv : ∀ y ∈ U, (mfderiv (𝓡 3) (𝓡 3) f y).IsInvertible) |
| 46 | {x : E} (hx : x ∈ U) : |
| 47 | jetScalarCurvature (metricTwoJet (g.pullbackCoefficients f) x) = |
| 48 | D.scalarCurvature (f x) := by |
| 49 | obtain ⟨gE, DE, V, hV, hxV, hVU, hmetric⟩ := |
| 50 | RiemannianMetric.exists_local_realization hU hx (g.pullbackCoefficients f) |
| 51 | (fun y hy => (g.contDiffAt_pullbackCoefficients |
| 52 | (hf.contMDiffAt (hU.mem_nhds hy))).contDiffWithinAt) |
| 53 | (fun y _ a b => g.symm (f y) _ _) |
| 54 | (fun y hy a ha => by |
| 55 | apply g.pos (f y) |
| 56 | intro hz |
| 57 | apply ha |
| 58 | apply (hinv y hy).injective |
| 59 | rw [map_zero] |
| 60 | exact hz) |
| 61 | have heq : gE.euclideanCoefficients =ᶠ[𝓝 x] g.pullbackCoefficients f := |
| 62 | eventually_of_mem (hV.mem_nhds hxV) hmetric |
| 63 | have htwo : metricTwoJet gE.euclideanCoefficients x = |
| 64 | metricTwoJet (g.pullbackCoefficients f) x := by |
| 65 | simp only [metricTwoJet, heq.eq_of_nhds, heq.fderiv_eq, |
| 66 | (heq.fderiv (𝕜 := ℝ)).fderiv_eq] |
| 67 | rw [← htwo, jetScalarCurvature_metricTwoJet DE] |
| 68 | exact (scalar_ricciNormSq_eq_of_metric_pullback DE D |
| 69 | (hf.contMDiffAt (hU.mem_nhds hx)) |
| 70 | (eventually_of_mem (hV.mem_nhds hxV) (fun y hy => hinv y (hVU hy))) |
| 71 | (eventually_of_mem (hV.mem_nhds hxV) |
| 72 | (fun y hy a b => congrArg (fun B => B a b) (hmetric y hy)))).1.symm |
| 73 | |
| 74 | variable {g0 : StandardInitialMetric} {K : MetricSurgeryConstants} {P : SurgeryParameters} |
| 75 | {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 76 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 77 | |
| 78 | /-- Scalar curvature along each fixed regular preterminal line |
| 79 | converges to scalar curvature of the actual terminal metric. |
| 80 | Source: Claim 16.10, pp. 374-375; M44 derivation 70. -/ |
| 81 | theorem tendsto_preterminal_scalar |
| 82 | (event : SurgeryEventData g0 K P slice metric T) |
| 83 | {q : (slice event.tMinus).carrier} (hq : q ∈ event.regular_limit) : |
| 84 | Tendsto (fun t => (event.pre_flow.connection t).scalarCurvature q) (𝓝[<] T) |
| 85 | (𝓝 (event.limit_connection.scalarCurvature (event.limit_identify.map q))) := by |
| 86 | let c := extChartAt (𝓡 3) q |
| 87 | let U := c.target ∩ c.symm ⁻¹' event.regular_limit |
| 88 | have hU : IsOpen U := |
| 89 | (contMDiffOn_extChartAt_symm (I := 𝓡 3) (n := ∞) q).continuousOn.isOpen_inter_preimage |
| 90 | (isOpen_extChartAt_target q) event.regular_limit_open |
| 91 | have hchart : U ⊆ c.target := inter_subset_left |
| 92 | have hregular : c.symm '' U ⊆ event.regular_limit := by |
| 93 | rintro _ ⟨x, hx, rfl⟩ |
| 94 | exact hx.2 |
| 95 | have hc : ContMDiffOn (𝓡 3) (𝓡 3) ∞ c.symm U := |
| 96 | (contMDiffOn_extChartAt_symm q).mono hchart |
| 97 | have hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ (event.limit_identify.map ∘ c.symm) U := |
| 98 | event.limit_identify.map_smooth.comp hc (fun x hx => hx.2) |
| 99 | have hi (x : E) (hx : x ∈ U) : |
| 100 | (mfderiv (𝓡 3) (𝓡 3) c.symm x).IsInvertible := by |
| 101 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 102 | isInvertible_mfderivWithin_extChartAt_symm (hchart hx) |
| 103 | have hj (x : E) (hx : x ∈ U) : |
| 104 | (mfderiv (𝓡 3) (𝓡 3) (event.limit_identify.map ∘ c.symm) x).IsInvertible := by |
| 105 | have hreg : c.symm x ∈ interior event.regular_limit := |
| 106 | event.regular_limit_open.interior_eq.symm ▸ hx.2 |
| 107 | have hl := (regionEquivalenceInteriorChart event.limit_identify).isLocalDiffeomorphAt |
| 108 | (𝓡 3) (𝓡 3) ∞ hreg |
| 109 | have hli : (mfderiv (𝓡 3) (𝓡 3) event.limit_identify.map (c.symm x)).IsInvertible := |
| 110 | ⟨hl.mfderivToContinuousLinearEquiv (by simp), rfl⟩ |
| 111 | have hd := event.limit_identify.map_smooth.contMDiffAt |
| 112 | (event.regular_limit_open.mem_nhds hx.2) |
| 113 | rw [mfderiv_comp x (hd.mdifferentiableAt (by simp)) |
| 114 | ((hc.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp))] |
| 115 | exact hli.comp (hi x hx) |
| 116 | have hcx : c.symm (c q) = q := c.left_inv (mem_extChartAt_source q) |
| 117 | have hx : c q ∈ U := ⟨c.map_source (mem_extChartAt_source q), by |
| 118 | change c.symm (c q) ∈ event.regular_limit |
| 119 | rwa [hcx]⟩ |
| 120 | have hconv := tendsto_twoJet_of_surgeryMetricLimitOn event.metric_converges q hq |
| 121 | hU hchart hregular hf hx |
| 122 | have hscalar := (contDiffAt_jetScalarCurvature |
| 123 | (event.limit_metric.isInvertible_pullbackCoefficients (hj (c q) hx).injective)).continuousAt |
| 124 | |>.tendsto.comp hconv |
| 125 | have hread (t : ℝ) := jetScalarCurvature_pullbackCoefficients |
| 126 | (event.pre_flow.metric t) (event.pre_flow.connection t) hU hc hi hx |
| 127 | have hreadT := jetScalarCurvature_pullbackCoefficients |
| 128 | event.limit_metric event.limit_connection hU hf hj hx |
| 129 | change Tendsto (fun t => jetScalarCurvature |
| 130 | (metricTwoJet ((event.pre_flow.metric t).pullbackCoefficients c.symm) (c q))) |
| 131 | (𝓝[<] T) (𝓝 (jetScalarCurvature (metricTwoJet |
| 132 | (event.limit_metric.pullbackCoefficients (event.limit_identify.map ∘ c.symm)) |
| 133 | (c q)))) at hscalar |
| 134 | simpa only [hread, hreadT, Function.comp_apply, hcx] using hscalar |
| 135 | |
| 136 | /-- Any eventual upper scalar bound passes to the actual terminal |
| 137 | metric at each regular point. Source: the scale comparison in |
| 138 | Claim 16.10, pp. 374-375; M44 derivation 70. -/ |
| 139 | theorem terminal_scalar_le_of_preterminal |
| 140 | (event : SurgeryEventData g0 K P slice metric T) |
| 141 | {q : (slice event.tMinus).carrier} (hq : q ∈ event.regular_limit) |
| 142 | {L : ℝ} (hbound : ∀ᶠ t in 𝓝[<] T, |
| 143 | (event.pre_flow.connection t).scalarCurvature q ≤ L) : |
| 144 | event.limit_connection.scalarCurvature (event.limit_identify.map q) ≤ L := |
| 145 | le_of_tendsto (tendsto_preterminal_scalar event hq) hbound |
| 146 | |
| 147 | end PoincareMT.M44 |