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.Metric.Curvature.SurgeryCurvature |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Collapse.RetainedIsometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Collapse.SurgeryDistance |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Distance.SurgeryBalls |
| 5 | |
| 6 | /-! |
| 7 | # Assembly of the actual local surgery result |
| 8 | |
| 9 | Morgan--Tian Claim 13.1, Theorem 13.2 and Lemma 13.4, pp. 331-334. |
| 10 | The output, metric and maps below are the actual constructed objects. |
| 11 | The explicit curvature and comparison arguments are internal assembly |
| 12 | inputs on those same objects; the final theorem must discharge both. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.MetricSurgery |
| 23 | |
| 24 | local notation "E₃" => EuclideanSpace ℝ (Fin 3) |
| 25 | |
| 26 | variable {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace E₃ M] [IsManifold (𝓡 3) ∞ M] {g : RiemannianMetric 3 M} |
| 28 | |
| 29 | /-- The concrete topology, retained geometry, intrinsic distance and ball |
| 30 | estimates assemble the frozen result from curvature and comparison proofs |
| 31 | for the same metric. This is an internal adapter, not an additional premise |
| 32 | of repairedMetricSurgery. -/ |
| 33 | theorem nonempty_metricSurgeryResult_of_curvature_comparison |
| 34 | (g₀ : StandardInitialMetric) {K : MetricSurgeryConstants} |
| 35 | (hprofile : SurgeryProfileLargeQ g₀ K) (I : MetricSurgeryInput K g) |
| 36 | {r : ℝ} (hr : 0 < r) (hrA : r ≤ g₀.cylindrical_end.radius) |
| 37 | (hcut : surgeryCapRadius g₀ < I.neck.epsilon⁻¹) |
| 38 | (hsize : I.neck.epsilon ≤ 1 / (surgeryCapRadius g₀ * (6 + 2 * K.C₀))) : |
| 39 | let H := surgeryMetric g₀ I.neck hcut K.C₀ K.q (1 - 6 * I.neck.epsilon) r |
| 40 | I.neck.scalar_center_pos |
| 41 | (neck_contraction_coefficient_pos I.neck (I.delta_le.trans_lt K.delta₀_lt)) hr |
| 42 | (∀ D : LeviCivitaData H, |
| 43 | (∀ y : SurgeryBall.{u} g₀ (surgeryOuterRadius g₀ I.neck.epsilon), |
| 44 | 1 ≤ surgeryOutputHeight g₀ I.neck y → ∀ a b : TangentSpace (𝓡 3) y, |
| 45 | LeviCivitaData.IsOrthonormalPair H y a b → 0 < D.sectionalCurvature y a b) ∧ |
| 46 | (∀ t : ℝ, SurgeryPinchedOn I.neck.connection t I.neck.carrier → SurgeryPinchedAt D t) ∧ |
| 47 | ((∀ x ∈ I.neck.carrier, ∀ a b : TangentSpace (𝓡 3) x, |
| 48 | LeviCivitaData.IsOrthonormalPair g x a b → |
| 49 | 0 < I.neck.connection.sectionalCurvature x a b) → |
| 50 | ∀ y : SurgeryBall.{u} g₀ (surgeryOuterRadius g₀ I.neck.epsilon), |
| 51 | ∀ a b : TangentSpace (𝓡 3) y, |
| 52 | LeviCivitaData.IsOrthonormalPair H y a b → 0 < D.sectionalCurvature y a b)) → |
| 53 | (∀ eta : ℝ, 0 < eta → I.neck.epsilon ≤ K.comparison_delta eta → |
| 54 | Nonempty (SurgeryCapClose g₀ (surgeryBallCarrier g₀ (surgeryOuterRadius g₀ I.neck.epsilon)) |
| 55 | H (surgeryBallTip g₀ (surgeryOuterRadius_pos g₀ I.neck)) I.neck.scale eta)) → |
| 56 | Nonempty (MetricSurgeryResult g₀ I) := by |
| 57 | dsimp only |
| 58 | intro hcurvature hcomparison |
| 59 | have hsmall : I.neck.epsilon < 1 / 200 := I.delta_le.trans_lt K.delta₀_lt |
| 60 | let H := surgeryMetric g₀ I.neck hcut K.C₀ K.q (1 - 6 * I.neck.epsilon) r |
| 61 | I.neck.scalar_center_pos (neck_contraction_coefficient_pos I.neck hsmall) hr |
| 62 | obtain ⟨D⟩ := normalization_exists_leviCivitaData H |
| 63 | obtain ⟨hinner, hpinched, hpositive⟩ := hcurvature D |
| 64 | have hballs := surgeryMetric_cap_ball_bounds g₀ I.neck hcut hsmall K.C₀_pos.le K.q hr hsize |
| 65 | have hcapDomain := standard_ball_subset_output g₀ |
| 66 | (by linarith [g₀.cylindrical_end.radius_pos] : 0 < g₀.cylindrical_end.radius + 5) |
| 67 | (surgeryOuterRadius_gt_chartRadius g₀ I.neck).le |
| 68 | refine ⟨{ |
| 69 | q_profile := hprofile |
| 70 | output := surgeryBallCarrier g₀ (surgeryOuterRadius g₀ I.neck.epsilon) |
| 71 | metric := H |
| 72 | connection := D |
| 73 | tip := surgeryBallTip g₀ (surgeryOuterRadius_pos g₀ I.neck) |
| 74 | open_ball_model := ⟨surgeryBallHomeomorph g₀ (surgeryOuterRadius_pos g₀ I.neck)⟩ |
| 75 | collapse := surgeryCollapse g₀ I.neck |
| 76 | collapse_continuous := surgeryCollapse_continuousOn g₀ I.neck |
| 77 | retained_inverse := surgeryRetainedInverse g₀ I.neck |
| 78 | retained_smooth := surgeryCollapse_contMDiffOn g₀ I.neck |
| 79 | retained_left_inverse := surgeryCollapse_left_inverse g₀ I.neck |
| 80 | retained_right_inverse := fun y _ => surgeryCollapse_right_inverse g₀ I.neck hcut y |
| 81 | retained_metric := fun x hx a b => surgeryMetric_retained g₀ I.neck hcut K.C₀ K.q |
| 82 | (1 - 6 * I.neck.epsilon) r I.neck.scalar_center_pos |
| 83 | (neck_contraction_coefficient_pos I.neck hsmall) hr K.q_pos hrA hx a b |
| 84 | retained_closed_isometry := fun x hx y hy => surgeryMetric_retained_closed_isometry |
| 85 | g₀ I.neck hcut K.C₀ K.q (1 - 6 * I.neck.epsilon) r I.neck.scalar_center_pos |
| 86 | (neck_contraction_coefficient_pos I.neck hsmall) hr K.q_pos hrA hx hy |
| 87 | distance_decreasing := fun x _ y _ => surgeryMetric_distance_decreasing |
| 88 | g₀ I.neck hcut hsmall K.C₀_pos.le K.q hr x y |
| 89 | cap_map := surgeryBallChart g₀ (surgeryOuterRadius g₀ I.neck.epsilon) |
| 90 | cap_inverse := surgeryBallInclusion g₀ (surgeryOuterRadius g₀ I.neck.epsilon) |
| 91 | cap_map_tip := surgeryBallChart_zero g₀ (surgeryOuterRadius_pos g₀ I.neck) |
| 92 | cap_map_smooth := surgeryCapChart_contMDiffOn g₀ I.neck |
| 93 | cap_left_inverse := fun x hx => surgeryBallChart_right_inverse g₀ _ (hcapDomain hx) |
| 94 | cap_right_inverse := fun y _ => surgeryBallChart_left_inverse g₀ _ y |
| 95 | cap_inverse_smooth := (surgeryBallInclusion_contMDiff g₀ _).contMDiffOn |
| 96 | output_cover := surgeryCap_output_cover g₀ I.neck hcut |
| 97 | cap_exterior := surgeryCap_exterior g₀ I.neck hcut |
| 98 | cap_boundary := surgeryCap_boundary g₀ I.neck hcut |
| 99 | collapse_positive_cap := surgeryCollapse_positive_cap g₀ I.neck |
| 100 | collapse_positive_tail := surgeryCollapse_positive_tail g₀ I.neck hcut |
| 101 | cap_inner_ball := hballs.1 |
| 102 | cap_outer_ball := hballs.2 |
| 103 | positive_sectional := fun y hy => hinner y |
| 104 | (surgeryOutputHeight_ge_one_of_mem_innerCapImage g₀ I.neck hy) |
| 105 | pinched := hpinched I.time I.pinched |
| 106 | standard_close := hcomparison |
| 107 | positive_sectional_preserved := hpositive |
| 108 | retained_inverse_smooth := surgeryRetainedInverse_contMDiffOn g₀ I.neck hcut |
| 109 | cap_closed_image := surgeryCapChart_closed_image g₀ I.neck |
| 110 | }⟩ |
| 111 | |
| 112 | end PoincareMT.MetricSurgery |