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.Blowup.Construction.LongTime.ClosedLeftRelatedNecks |
| 2 | |
| 3 | /-! |
| 4 | # Endpoint canonical readout for the retained generalized limit |
| 5 | |
| 6 | The actual interior convergence supplies canonical slice shapes. Their |
| 7 | related necks transfer through the smooth finite-left extension, using |
| 8 | only completeness of its endpoint metric. No endpoint curvature bound |
| 9 | or completed blowup-limit record enters this proof (Claim 11.17, p. 278). |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M30 |
| 21 | |
| 22 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 23 | FlowCarrier.isManifold FlowCarrier.t2Space FlowCarrier.t3Space |
| 24 | FlowCarrier.measurableSpace FlowCarrier.borelSpace |
| 25 | |
| 26 | set_option maxHeartbeats 800000 in |
| 27 | -- The interior shape theorem and the transported metric/connection data are assembled together. |
| 28 | set_option synthInstance.maxHeartbeats 100000 in |
| 29 | -- Keep the stored limit-carrier instances while transporting the interior metrics. |
| 30 | /-- The finite-left metric has related necks at every high scalar point, |
| 31 | or its carrier is compact. The accuracy threshold is universal. -/ |
| 32 | theorem exists_generalized_closed_left_related_neck_threshold : |
| 33 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 400 ∧ |
| 34 | ∀ {S : GeneralizedBlowupSequence.{u}} {T : ℝ}, 0 < T → |
| 35 | ∀ (G : GeneralizedBlowupConvergence S (Ioc (-T) 0)) |
| 36 | (epsilon C : ℝ), 0 < epsilon → epsilon ≤ epsilon0 → |
| 37 | (∀ k, generalizedEarlierDenseStrongCanonicalNeighborhoods |
| 38 | (S.flow (G.subsequence k)) epsilon C |
| 39 | (S.base (G.subsequence k)).1 (S.base (G.subsequence k)).2) → |
| 40 | ∀ F : RicciFlow 3 G.limit.carrier.carrier (Icc (-T) 0), |
| 41 | (∀ t ∈ Ioc (-T) 0, F.metric t = G.limit.flow.metric t) → |
| 42 | MetricComplete (F.metric (-T)) → |
| 43 | ∀ x : G.limit.carrier.carrier, |
| 44 | 4 < (F.connection (-T)).scalarCurvature x → |
| 45 | (∃ N : EpsilonNeck (F.metric (-T)), |
| 46 | N.epsilon = 4 * epsilon ∧ N.connection = F.connection (-T) ∧ |
| 47 | (F.connection (-T)).scalarCurvature x ≤ |
| 48 | 16 * max 1 C * (F.connection (-T)).scalarCurvature N.center) ∨ |
| 49 | IsCompact (univ : Set G.limit.carrier.carrier) := by |
| 50 | classical |
| 51 | obtain ⟨epsilon0, hpositive, hsmall, hshape⟩ := |
| 52 | exists_generalized_canonical_slice_shape_threshold.{u} |
| 53 | refine ⟨epsilon0, hpositive, hsmall, ?_⟩ |
| 54 | intro S T hT G epsilon C hepsilon hle hdense F hmetric hcomplete x hx |
| 55 | by_cases hcompact : IsCompact (univ : Set G.limit.carrier.carrier) |
| 56 | · exact Or.inr hcompact |
| 57 | apply Or.inl |
| 58 | apply related_neck_at_left_endpoint_of_interior_necks hT hepsilon |
| 59 | (hle.trans hsmall) F hcomplete ?_ x hx |
| 60 | intro t ht y hy |
| 61 | have hleft : ∃ delta : ℝ, 0 < delta ∧ Icc (t - delta) t ⊆ Ioc (-T) 0 := by |
| 62 | refine ⟨(t + T) / 2, by linarith [ht.1], ?_⟩ |
| 63 | intro s hs |
| 64 | exact ⟨by linarith [hs.1, ht.1], hs.2.trans ht.2⟩ |
| 65 | have hreadout |
| 66 | (g' : RiemannianMetric 3 G.limit.carrier.carrier) |
| 67 | (heq : g' = G.limit.flow.metric t) (D' : LeviCivitaData g') |
| 68 | (hy' : 4 < D'.scalarCurvature y) : |
| 69 | ∃ N : EpsilonNeck g', |
| 70 | N.epsilon = 2 * epsilon ∧ N.connection = D' ∧ |
| 71 | D'.scalarCurvature y ≤ 4 * max 1 C * D'.scalarCurvature N.center ∧ |
| 72 | N.carrier ⊆ g'.ball y |
| 73 | (4 * max 1 C + (2 * Real.pi + 2 * (2 * epsilon)⁻¹) * max 1 C + 1) := by |
| 74 | subst g' |
| 75 | have hyold : 4 < (G.limit.flow.connection t).scalarCurvature y := by |
| 76 | simpa only [D'.scalarCurvature_eq (G.limit.flow.connection t)] using hy' |
| 77 | have hs := (or_assoc.mpr |
| 78 | (hshape G epsilon C hepsilon hle hdense t ht hleft y hyold)).resolve_right hcompact |
| 79 | obtain ⟨N, hNepsilon, _hNconnection, hratio, hball⟩ := |
| 80 | related_neck_data_of_canonical_slice_shape (G.limit.flow.connection t) hyold hs |
| 81 | let N' : EpsilonNeck (G.limit.flow.metric t) := { |
| 82 | N with |
| 83 | connection := D' |
| 84 | scalar_center_pos := by |
| 85 | rw [D'.scalarCurvature_eq N.connection] |
| 86 | exact N.scalar_center_pos |
| 87 | scale_eq_scalar := by |
| 88 | rw [D'.scalarCurvature_eq N.connection] |
| 89 | exact N.scale_eq_scalar } |
| 90 | refine ⟨N', hNepsilon, rfl, ?_, hball⟩ |
| 91 | change D'.scalarCurvature y ≤ 4 * max 1 C * D'.scalarCurvature N.center |
| 92 | simpa only [D'.scalarCurvature_eq (G.limit.flow.connection t)] using hratio |
| 93 | exact hreadout (F.metric t) (hmetric t ht) (F.connection t) hy |
| 94 | |
| 95 | end PoincareMT.M30 |