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.OperationTheory |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Profile.Constants |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Result |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Comparison.SurgeryComparison |
| 5 | |
| 6 | /-! |
| 7 | # M36 metric-surgery proof entry |
| 8 | |
| 9 | The constants are fixed before the manifold and input neck. The proof |
| 10 | assembles the actual local construction against the frozen metric-surgery |
| 11 | contract, including its closed collar and positive-surgery conclusions. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | open MetricSurgery |
| 24 | |
| 25 | /- |
| 26 | Morgan--Tian Claim 13.1 and Theorem 13.2 (printed pp. 332--333), together with |
| 27 | Lemma 13.4 (p. 334), state that universal constants and a large-q profile turn |
| 28 | any sufficiently small high-curvature epsilon-neck satisfying the pinching |
| 29 | conditions into a one-ended surgery output. The output retains the negative |
| 30 | half-neck isometrically, supplies the cap chart and boundary/ball controls, |
| 31 | has positive cap curvature and transported pinching, admits the radial |
| 32 | collapse with intrinsic distance decrease, and is C^k-close to the fixed |
| 33 | standard initial metric at the requested comparison scale. The same collapse |
| 34 | sends the positive half-neck into the closed cap and is the actual cap tip |
| 35 | on a nonempty positive tail, as in Claim 13.1 (pp. 331--332). After fixing the |
| 36 | standard metric, the delta threshold is reduced before all neck inputs so |
| 37 | the cutoff A₀ + 4 lies strictly inside the neck. M36's public |
| 38 | contract quantifies only a primitive standard initial metric and every |
| 39 | admissible neck input; M34 and M35 are not theorem arguments. The source audit |
| 40 | records that the radial collapse is used with its stated continuity and |
| 41 | intrinsic-distance properties rather than an unwarranted global smoothness or |
| 42 | ambient-distance claim. The explicit profile-dominance field records the |
| 43 | source choice C₀ >> q, while the closed retained-isometry field includes the |
| 44 | central-sphere endpoint. If the input neck has positive sectional curvature |
| 45 | at every point, the entire output has positive sectional curvature, by |
| 46 | Corollary 13.12 and the proof of Theorem 13.2 (pp. 339--340). The threshold |
| 47 | is chosen uniformly before the neck, independently of its positive minimum. |
| 48 | The gluing construction on p. 331 and the identification in the proof of |
| 49 | Lemma 13.15 (p. 341) extend the same cap chart to the open radius-A₀+5 |
| 50 | ball. Its closed radius-A₀+4 image is the closure of the original cap. |
| 51 | The same collapse and retained inverse are smooth on the neck collar |
| 52 | -epsilon^-1 < s < 1; their metric identity holds for s <= 0, including |
| 53 | the central sphere. No isometry on the positive collar or smoothness at |
| 54 | the radial-collapse locus is asserted. See the closed-collar contract in |
| 55 | reviews/contracts/2026-09-19-m36-closed-collar-contract.md. |
| 56 | -/ |
| 57 | set_option maxHeartbeats 1000000 in |
| 58 | -- The assembly checks dependent metric and connection identities throughout. |
| 59 | theorem repairedMetricSurgery : RepairedMetricSurgeryTheory := by |
| 60 | classical |
| 61 | constructor |
| 62 | intro g₀ |
| 63 | obtain ⟨r, hr, hrA, q0, hq0, hcurvature⟩ := exists_surgeryMetric_curvature g₀ |
| 64 | let q := max q0 101 |
| 65 | have hq100 : 100 < q := lt_of_lt_of_le (by norm_num) (le_max_right _ _) |
| 66 | have hqA : 100 * (4 + g₀.cylindrical_end.radius) ^ 2 < q := by |
| 67 | simpa only [add_comm] using hq0.trans_le (le_max_left q0 101) |
| 68 | obtain ⟨C, hdominance, hcurvature⟩ := hcurvature q (le_max_left _ _) |
| 69 | have hC : 0 < C := by linarith only [hq100, hdominance] |
| 70 | obtain ⟨deltaC, hdeltaC, hcurvature⟩ := hcurvature C le_rfl |
| 71 | choose comparison hcomparison hclose using fun eta : {e : ℝ // 0 < e} => |
| 72 | exists_surgeryMetric_standard_close g₀ C q hC.le hr eta.2 |
| 73 | let comparisonDelta : ℝ → ℝ := fun eta => |
| 74 | if heta : 0 < eta then comparison ⟨eta, heta⟩ else 1 |
| 75 | have hcomparisonDelta (eta : ℝ) (heta : 0 < eta) : 0 < comparisonDelta eta := by |
| 76 | dsimp only [comparisonDelta] |
| 77 | rw [dif_pos heta] |
| 78 | exact hcomparison ⟨eta, heta⟩ |
| 79 | let upper := min deltaC (1 / (surgeryCapRadius g₀ * (6 + 2 * C))) |
| 80 | have hupper : 0 < upper := lt_min hdeltaC (by |
| 81 | have := surgeryCapRadius_pos g₀ |
| 82 | positivity) |
| 83 | let K := profileConstants g₀ q C 1 upper comparisonDelta hq100 hdominance |
| 84 | zero_lt_one hupper hcomparisonDelta |
| 85 | have hprofile : SurgeryProfileLargeQ g₀ K := profileConstants_largeQ g₀ q C 1 upper |
| 86 | comparisonDelta hq100 hdominance zero_lt_one hupper hcomparisonDelta hqA |
| 87 | have hKupper : K.delta₀ ≤ upper := profileConstants_delta_le g₀ q C 1 upper |
| 88 | comparisonDelta hq100 hdominance zero_lt_one hupper hcomparisonDelta |
| 89 | refine ⟨{ |
| 90 | constants := K |
| 91 | profile := hprofile |
| 92 | profile_dominance := hdominance |
| 93 | operation := ?_ |
| 94 | }⟩ |
| 95 | intro M _ _ _ _ _ _ _ _ g I |
| 96 | have hcut : surgeryCapRadius g₀ < I.neck.epsilon⁻¹ := by |
| 97 | simpa only [surgeryCapRadius, add_comm] using profileConstants_cutoff_inside |
| 98 | g₀ q C 1 upper comparisonDelta hq100 hdominance zero_lt_one hupper |
| 99 | hcomparisonDelta I.neck.epsilon_pos I.delta_le |
| 100 | have hsize : I.neck.epsilon ≤ 1 / (surgeryCapRadius g₀ * (6 + 2 * K.C₀)) := |
| 101 | (I.delta_le.trans hKupper).trans (min_le_right _ _) |
| 102 | have hcurvsmall : I.neck.epsilon ≤ deltaC := |
| 103 | (I.delta_le.trans hKupper).trans (min_le_left _ _) |
| 104 | have hsmall : I.neck.epsilon < 1 / 200 := I.delta_le.trans_lt K.delta₀_lt |
| 105 | have hetaN : 0 < 1 - 6 * I.neck.epsilon := |
| 106 | neck_contraction_coefficient_pos I.neck hsmall |
| 107 | have hcurved := hcurvature (M := M) (g := g) I.neck hcut hcurvsmall |
| 108 | I.neck.scalar_center_pos hetaN |
| 109 | apply nonempty_metricSurgeryResult_of_curvature_comparison g₀ hprofile I hr hrA hcut hsize |
| 110 | · dsimp only [K, profileConstants] |
| 111 | exact hcurved |
| 112 | · intro eta heta hepsilon |
| 113 | have he : I.neck.epsilon ≤ comparison ⟨eta, heta⟩ := by |
| 114 | simpa only [K, profileConstants, comparisonDelta, dif_pos heta] using hepsilon |
| 115 | dsimp only [K, profileConstants] |
| 116 | exact hclose ⟨eta, heta⟩ (M := M) (g := g) I.neck hcut hsmall he |
| 117 | |
| 118 | end PoincareMT |