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.Induction.Noncollapse.Assembly.PositiveComponents.PositiveSurgeryMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Terminal.TerminalScalar |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Scalar.Bounds.LocalScalarTransport |
| 4 | |
| 5 | /-! |
| 6 | # Scalar continuity across the actual retained surgery interior |
| 7 | |
| 8 | Morgan--Tian Lemma 11.2 and Proposition 16.5, used on p. 393. |
| 9 | The actual terminal metric is locally isometric to the retained post |
| 10 | metric. M44's checked preterminal scalar limit therefore has exactly |
| 11 | the post-surgery scalar as its limit; no scalar jump is introduced. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Proofs.M46 |
| 23 | |
| 24 | variable {g0 : StandardInitialMetric} {K : MetricSurgeryConstants} {P : SurgeryParameters} |
| 25 | {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 26 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 27 | |
| 28 | /-- The retained terminal and post-surgery metrics have the same actual |
| 29 | scalar at every retained interior point, Proposition 16.5, p. 370. -/ |
| 30 | theorem retained_scalar_eq_terminal |
| 31 | (event : SurgeryEventData g0 K P slice metric T) |
| 32 | (D : LeviCivitaData (metric T)) |
| 33 | {q : (slice event.tMinus).carrier} (hq : q ∈ interior event.retained_pre) : |
| 34 | D.scalarCurvature (event.retention.map q) = |
| 35 | event.limit_connection.scalarCurvature (event.limit_identify.map q) := by |
| 36 | obtain ⟨hU, hf, hm⟩ := retained_terminal_metric_identification event |
| 37 | let f := event.retention.map ∘ event.limit_identify.inverse |
| 38 | have hi (y : event.terminal.carrier) |
| 39 | (hy : y ∈ event.limit_identify.inverse ⁻¹' interior event.retained_pre) : |
| 40 | (mfderiv (𝓡 3) (𝓡 3) f y).IsInvertible := by |
| 41 | have hb := event.limit_metric.mfderiv_bijective_of_pullback_eq (metric T) y |
| 42 | (fun u v => (hm y hy u v).symm) |
| 43 | let : FiniteDimensional ℝ (TangentSpace (𝓡 3) y) := by |
| 44 | unfold TangentSpace |
| 45 | infer_instance |
| 46 | let : FiniteDimensional ℝ (TangentSpace (𝓡 3) (f y)) := by |
| 47 | unfold TangentSpace |
| 48 | infer_instance |
| 49 | let : T2Space (TangentSpace (𝓡 3) y) := by |
| 50 | unfold TangentSpace |
| 51 | infer_instance |
| 52 | let : T2Space (TangentSpace (𝓡 3) (f y)) := by |
| 53 | unfold TangentSpace |
| 54 | infer_instance |
| 55 | exact ⟨(LinearEquiv.ofBijective |
| 56 | (mfderiv (𝓡 3) (𝓡 3) f y).toLinearMap hb).toContinuousLinearEquiv, rfl⟩ |
| 57 | have hleft := event.limit_identify.left_inverse |
| 58 | (event.retained_pre_subset (interior_subset hq)) |
| 59 | have hy : event.limit_identify.map q ∈ |
| 60 | event.limit_identify.inverse ⁻¹' interior event.retained_pre := by |
| 61 | change event.limit_identify.inverse (event.limit_identify.map q) ∈ |
| 62 | interior event.retained_pre |
| 63 | rwa [hleft] |
| 64 | have h := (M44.scalar_ricciNormSq_eq_of_local_isometry |
| 65 | event.limit_connection D hU hf hi hm hy).1 |
| 66 | simpa only [Function.comp_apply, hleft] using h |
| 67 | |
| 68 | /-- The preterminal scalar of a retained line converges to its actual |
| 69 | post-surgery scalar, so the one global backward scalar comparison is |
| 70 | continuous at every retained event, pp. 392-393. -/ |
| 71 | theorem tendsto_preterminal_scalar_retained |
| 72 | (event : SurgeryEventData g0 K P slice metric T) |
| 73 | (D : LeviCivitaData (metric T)) |
| 74 | {q : (slice event.tMinus).carrier} (hq : q ∈ interior event.retained_pre) : |
| 75 | Tendsto (fun t => (event.pre_flow.connection t).scalarCurvature q) (𝓝[<] T) |
| 76 | (𝓝 (D.scalarCurvature (event.retention.map q))) := by |
| 77 | rw [retained_scalar_eq_terminal event D hq] |
| 78 | exact M44.tendsto_preterminal_scalar event |
| 79 | (event.retained_pre_subset (interior_subset hq)) |
| 80 | |
| 81 | end PoincareMT.Proofs.M46 |