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.StandardCap.Persistence.Comparison.Initial.UniformExactComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Comparison.Initial.PhysicalInitialChart |
| 3 | |
| 4 | /-! |
| 5 | # Exact initial comparison at a uniform surgery cutoff |
| 6 | |
| 7 | The cutoff is chosen before the surgery flow, event, and cap. It gives |
| 8 | an exact-ball local comparison satisfying the frozen metric link, then |
| 9 | an initial chart onto the actual post-surgery ball. |
| 10 | Morgan--Tian, Claim 16.6 and Corollary 16.7, pp. 371-372; derivation 25. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- The uniform refinement and both M36 cutoffs give exact comparisons |
| 24 | for all actual eligible local surgery results. The displayed neck |
| 25 | inequality is the one required by the frozen initial metric link. |
| 26 | Source: Claim 16.6 and Corollary 16.7, pp. 371-372. -/ |
| 27 | theorem exists_initial_cap_exact_comparison_cutoff |
| 28 | (g₀ : StandardInitialMetric) (K : MetricSurgeryConstants) |
| 29 | {tolerance : ℝ} (htol : 0 < tolerance) : |
| 30 | ∃ deltaBar : ℝ, 0 < deltaBar ∧ |
| 31 | ∀ (F : SurgeryFlowData.{u}), F.standard_initial = g₀ → |
| 32 | F.local_constants = K → |
| 33 | ∀ (t : ℝ) (hT : t ∈ F.surgery_times) |
| 34 | [Nonempty (F.slice t).carrier], F.parameters.delta t ≤ deltaBar → |
| 35 | ∀ i : Fin (F.event t hT).cap_count, |
| 36 | ∃ Q : SurgeryCapClose F.standard_initial |
| 37 | ((F.event t hT).local_result i).output |
| 38 | ((F.event t hT).local_result i).metric |
| 39 | ((F.event t hT).local_result i).tip |
| 40 | (((F.event t hT).necks i).neck.scale) tolerance, |
| 41 | ((F.event t hT).necks i).neck.epsilon ≤ |
| 42 | F.local_constants.comparison_delta tolerance ∧ |
| 43 | ∀ r : ℝ, 0 < r → r ≤ tolerance⁻¹ → |
| 44 | Q.map '' F.standard_initial.metric.ball 0 r = |
| 45 | ((F.event t hT).local_result i).metric.ball |
| 46 | ((F.event t hT).local_result i).tip |
| 47 | (((F.event t hT).necks i).neck.scale * r) := by |
| 48 | obtain ⟨delta, hdelta, hrefine⟩ := |
| 49 | M44.exists_initial_exact_comparison_threshold.{u} g₀ htol |
| 50 | refine ⟨min (K.comparison_delta delta) (K.comparison_delta tolerance), |
| 51 | lt_min (K.comparison_delta_pos delta hdelta) |
| 52 | (K.comparison_delta_pos tolerance htol), ?_⟩ |
| 53 | intro F hg₀ hK t hT _ hsmall i |
| 54 | have hinput : ((F.event t hT).necks i).neck.epsilon ≤ |
| 55 | F.local_constants.comparison_delta delta := by |
| 56 | rw [(F.event t hT).neck_delta i, hK] |
| 57 | exact hsmall.trans (min_le_left _ _) |
| 58 | have houtput : ((F.event t hT).necks i).neck.epsilon ≤ |
| 59 | F.local_constants.comparison_delta tolerance := by |
| 60 | rw [(F.event t hT).neck_delta i, hK] |
| 61 | exact hsmall.trans (min_le_right _ _) |
| 62 | obtain ⟨Q⟩ := ((F.event t hT).local_result i).standard_close delta hdelta hinput |
| 63 | rw [← hg₀] at hrefine |
| 64 | obtain ⟨Q', hballs⟩ := hrefine _ _ _ _ delta Q le_rfl |
| 65 | exact ⟨Q', houtput, hballs⟩ |
| 66 | |
| 67 | /-- One positive surgery cutoff supplies the frozen initial comparison |
| 68 | onto each requested physical ball. No exponential map, frame, or |
| 69 | compactness data are required from the caller. |
| 70 | Source: Corollary 16.7, p. 372, used in Proposition 16.5, p. 374. -/ |
| 71 | theorem exists_initial_cap_exact_chart_cutoff |
| 72 | (g₀ : StandardInitialMetric) (K : MetricSurgeryConstants) |
| 73 | {A : ℝ} (hA : 0 < A) : |
| 74 | ∃ deltaBar : ℝ, 0 < deltaBar ∧ |
| 75 | ∀ (F : SurgeryFlowData.{u}), F.standard_initial = g₀ → |
| 76 | F.local_constants = K → |
| 77 | ∀ (t : ℝ) (hT : t ∈ F.surgery_times) |
| 78 | [Nonempty (F.slice t).carrier], F.parameters.delta t ≤ deltaBar → |
| 79 | ∀ i : Fin (F.event t hT).cap_count, |
| 80 | ∃ initial : SurgeryCapInitialComparison F t hT i A, |
| 81 | initial.chart '' F.standard_initial.metric.ball 0 A = |
| 82 | (F.metric t).ball ((F.event t hT).caps i).tip (A * F.parameters.h t) := by |
| 83 | let tolerance : ℝ := (A + 1)⁻¹ |
| 84 | have htol : 0 < tolerance := inv_pos.mpr (by linarith) |
| 85 | have hfit : A < tolerance⁻¹ := by |
| 86 | dsimp [tolerance] |
| 87 | rw [inv_inv] |
| 88 | linarith |
| 89 | obtain ⟨deltaBar, hdelta, hcomparison⟩ := |
| 90 | exists_initial_cap_exact_comparison_cutoff.{u} g₀ K htol |
| 91 | refine ⟨deltaBar, hdelta, ?_⟩ |
| 92 | intro F hg₀ hK t hT _ hsmall i |
| 93 | obtain ⟨Q, hlink, hballs⟩ := hcomparison F hg₀ hK t hT hsmall i |
| 94 | exact initial_cap_chart_of_exact_comparison F t hT i hA hfit Q hlink |
| 95 | (hballs A hA hfit.le) |
| 96 | |
| 97 | end PoincareMT |