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.Continuation.Branch |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Terminal.Pinching |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.DeepHorn.Neck.Spatial |
| 4 | |
| 5 | /-! |
| 6 | # Local surgery inputs at the selected height |
| 7 | |
| 8 | The original terminal accuracy and height guards give the hypotheses of the |
| 9 | metric surgery theorem on each selected deep neck. The spatial neck keeps the |
| 10 | terminal connection, carrier and central sphere. |
| 11 | Source: Morgan--Tian, Theorem 13.2, p. 333, and Lemma 15.11, pp. 364-365. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | namespace RepairedContinuationInput |
| 24 | |
| 25 | variable {F : SurgeryFlowData.{u}} {T : ℝ} (I : RepairedContinuationInput F T) |
| 26 | |
| 27 | include I |
| 28 | |
| 29 | theorem terminal_delta_lt_half : F.parameters.delta T < 1 / 2 := by |
| 30 | have h := I.terminal_delta_bound.trans_lt F.local_constants.delta₀_lt |
| 31 | linarith |
| 32 | |
| 33 | theorem terminal_height_scalar_large : |
| 34 | F.local_constants.R₀ ≤ (F.parameters.h T)⁻¹ ^ 2 := by |
| 35 | have hh := F.parameters.h_pos T I.terminal_pos.le |
| 36 | have hsquare : (F.parameters.h T) ^ 2 ≤ F.local_constants.R₀⁻¹ := by |
| 37 | calc |
| 38 | (F.parameters.h T) ^ 2 ≤ |
| 39 | (F.local_constants.R₀ ^ (-1 / 2 : ℝ)) ^ 2 := |
| 40 | pow_le_pow_left₀ hh.le I.terminal_height_bound 2 |
| 41 | _ = F.local_constants.R₀⁻¹ := by |
| 42 | rw [← Real.rpow_mul_natCast F.local_constants.R₀_pos.le] |
| 43 | norm_num [Real.rpow_neg_one] |
| 44 | simpa only [inv_pow] using |
| 45 | (le_inv_comm₀ (sq_pos_of_pos hh) F.local_constants.R₀_pos).mp hsquare |
| 46 | |
| 47 | /-- Apply the original local surgery guards to an actual selected terminal neck. -/ |
| 48 | def terminalSurgeryInput {G : GeneralizedRicciFlowData.{u}} |
| 49 | (E : GeneralizedFlowExtension G T) |
| 50 | (N : TerminalStrongNeck E (F.parameters.delta T)) |
| 51 | (hscalar : (E.extended.connection T).scalarCurvature N.center = |
| 52 | (F.parameters.h T)⁻¹ ^ 2) |
| 53 | (hpinched : SurgeryPinchedAt (E.extended.connection T) T) : |
| 54 | MetricSurgeryInput F.local_constants (E.extended.metric T) where |
| 55 | neck := N.spatialNeck I.terminal_delta_lt_half |
| 56 | time := T |
| 57 | delta_le := I.terminal_delta_bound |
| 58 | scalar_large := hscalar.symm ▸ I.terminal_height_scalar_large |
| 59 | pinched := ⟨hpinched.1, fun x _ => hpinched.2.1 x (Set.mem_univ x), |
| 60 | fun x _ => hpinched.2.2 x (Set.mem_univ x)⟩ |
| 61 | |
| 62 | end RepairedContinuationInput |
| 63 | |
| 64 | namespace RepairedContinuationLimitBridge |
| 65 | |
| 66 | variable {M : Type u} [TopologicalSpace M] |
| 67 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 68 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 69 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 70 | {G : GeneralizedRicciFlowData.{u}} {F : SurgeryFlowData.{u}} {T : ℝ} |
| 71 | {H : SingularTimeAssumptions G T M} |
| 72 | {L : RepairedSingularRegularLimitData H} {N : RepairedHornSelectionData H} |
| 73 | {I : RepairedContinuationInput F T} |
| 74 | |
| 75 | /-- A calibrated terminal horn supplies an actual local metric surgery at the |
| 76 | prescribed height, with the original neck and escaping end cut. -/ |
| 77 | theorem exists_terminal_surgery |
| 78 | (bridge : RepairedContinuationLimitBridge H L N I) |
| 79 | (horn : StrongHorn N.limit.extension (terminalAccuracyFactor * H.epsilon)) |
| 80 | (hboundary : HornBoundaryBelow horn (I.rho / (2 * H.constant))) : |
| 81 | ∃ neck : TerminalStrongNeck N.limit.extension (F.parameters.delta T), |
| 82 | neck.center ∈ horn.carrier ∧ neck.carrier ⊆ horn.carrier ∧ |
| 83 | (N.limit.extension.extended.connection T).scalarCurvature neck.center = |
| 84 | (F.parameters.h T)⁻¹ ^ 2 ∧ |
| 85 | Nonempty (HornEndCut horn neck I.rho) ∧ |
| 86 | ∃ J : MetricSurgeryInput F.local_constants (N.limit.extension.extended.metric T), |
| 87 | J.neck = neck.spatialNeck I.terminal_delta_lt_half ∧ |
| 88 | J.time = T ∧ Nonempty (MetricSurgeryResult F.standard_initial J) := by |
| 89 | obtain ⟨deep⟩ := bridge.deep_horn_application horn hboundary |
| 90 | obtain ⟨neck, hcenter, hcarrier, hscalar, hcut⟩ := deep.selected_neck |
| 91 | let J := I.terminalSurgeryInput N.limit.extension neck hscalar |
| 92 | (Surgery.Terminal.terminal_pinched H N.limit) |
| 93 | exact ⟨neck, hcenter, hcarrier, hscalar, hcut, J, rfl, rfl, |
| 94 | bridge.surgery_operation J⟩ |
| 95 | |
| 96 | end RepairedContinuationLimitBridge |
| 97 | |
| 98 | end PoincareMT |