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.Induction.CanonicalTheory |
| 2 | import Mathlib.Analysis.SpecificLimits.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Literal counterexamples to a canonical extension |
| 6 | |
| 7 | Negating the exact extension supplies actual flows for every allowed |
| 8 | radius and cutoff. The radius sequence retains the true scalar lower |
| 9 | bound, rather than imposing equality. MT Proposition 17.1, pp. 395-402; |
| 10 | induction-counterexample-sequence.md, A-B. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M47 |
| 22 | |
| 23 | /-- Failure of the exact extension forces an actual counterexample with |
| 24 | all its original inputs at each prescribed allowed radius and cutoff. -/ |
| 25 | theorem canonicalInduction_counterexample |
| 26 | {K : MetricSurgeryConstants} (p : SurgeryParameterPrefix K) |
| 27 | (Q : SurgeryNoncollapseExtension.{u} p) |
| 28 | (hno : ¬ Nonempty (SurgeryCanonicalExtension p Q)) |
| 29 | {r delta : ℝ} (hr : 0 < r) (hrLast : r ≤ p.r (Fin.last p.i)) |
| 30 | (hdelta : 0 < delta) (hcutoff : delta ≤ Q.cutoff r) : |
| 31 | ∃ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 32 | SurgeryObservationIsNextEpoch p O ∧ SurgeryPrefixControls p F O ∧ |
| 33 | SurgeryFlowAdmissible F ∧ SurgeryFlowPinched F ∧ |
| 34 | SurgeryFlowTerminalPolicyOn F (surgeryObservationInterval O) ∧ |
| 35 | SurgeryPostPrefixScales p F O r delta ∧ |
| 36 | (∀ t ∈ surgeryObservationInterval O ∩ |
| 37 | Ico (surgeryEpochStart (p.i - 1)) O.H, F.parameters.delta t ≤ delta) ∧ |
| 38 | ¬ SurgeryCanonicalOn F (surgeryObservationInterval O) r := by |
| 39 | classical |
| 40 | by_contra hnone |
| 41 | apply hno |
| 42 | refine ⟨{ |
| 43 | rNext := r |
| 44 | deltaNext := delta |
| 45 | r_pos := hr |
| 46 | r_le_last := hrLast |
| 47 | delta_pos := hdelta |
| 48 | delta_le_cutoff := hcutoff |
| 49 | canonical := ?_ }⟩ |
| 50 | intro F O hnext old admissible pinched policy scales overlap |
| 51 | by_contra hbad |
| 52 | exact hnone ⟨F, O, hnext, old, admissible, pinched, policy, scales, overlap, hbad⟩ |
| 53 | |
| 54 | /-- The actual shrinking radii stay below the fixed old radius. -/ |
| 55 | theorem canonicalInduction_radius_bounds {r : ℝ} (hr : 0 < r) (n : ℕ) : |
| 56 | 0 < r / ((n : ℝ) + 1) ∧ r / ((n : ℝ) + 1) ≤ r := by |
| 57 | have hn : 0 < (n : ℝ) + 1 := by positivity |
| 58 | refine ⟨div_pos hr hn, (div_le_iff₀ hn).mpr ?_⟩ |
| 59 | nlinarith only [Nat.cast_nonneg (α := ℝ) n, hr] |
| 60 | |
| 61 | /-- This fixed radius sequence tends to zero before any flow is chosen. -/ |
| 62 | theorem canonicalInduction_radius_tendsto (r : ℝ) : |
| 63 | Tendsto (fun n : ℕ => r / ((n : ℝ) + 1)) atTop (𝓝 0) := by |
| 64 | simpa only [mul_one_div, mul_zero] using |
| 65 | (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)).const_mul r |
| 66 | |
| 67 | /-- The genuine scalar inequality along the chosen radii implies |
| 68 | divergence; no equality of scalar and threshold is used. -/ |
| 69 | theorem canonicalInduction_scalar_diverges {r : ℝ} (hr : 0 < r) |
| 70 | {Q : ℕ → ℝ} (hQ : ∀ n : ℕ, (r / ((n : ℝ) + 1))⁻¹ ^ 2 ≤ Q n) : |
| 71 | Tendsto Q atTop atTop := by |
| 72 | have hn : Tendsto (fun n : ℕ => (n : ℝ) + 1) atTop atTop := |
| 73 | tendsto_atTop_mono (fun n => by linarith) |
| 74 | (tendsto_natCast_atTop_atTop (R := ℝ)) |
| 75 | have hdiv : Tendsto (fun n : ℕ => ((n : ℝ) + 1) / r) atTop atTop := |
| 76 | hn.atTop_div_const hr |
| 77 | have hsquare := (tendsto_pow_atTop (α := ℝ) (by norm_num : (2 : ℕ) ≠ 0)).comp hdiv |
| 78 | apply tendsto_atTop_mono _ hsquare |
| 79 | intro n |
| 80 | simpa only [inv_div, Function.comp_apply] using hQ n |
| 81 | |
| 82 | end PoincareMT.Proofs.M47 |