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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Counterexamples |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.DenseTimeTransfer |
| 4 | |
| 5 | open scoped PoincareMT.BoundedDistanceSource |
| 6 | /-! |
| 7 | # The conditional same-time assembly |
| 8 | |
| 9 | The geometric contradiction must exclude the actual counterexample |
| 10 | sequences, with one accuracy threshold fixed before epsilon, C and A. |
| 11 | This file makes that consumer explicit and derives both frozen estimates |
| 12 | from it. It does not supply the tube/cone contradiction. Reference: |
| 13 | Morgan--Tian Theorem 10.2, pp. 245-265; task derivations 07 and 08. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M28 |
| 21 | |
| 22 | /-- Excluding the actual divergent counterexample sequences supplies |
| 23 | uniform constants before the flow is selected. This is the final |
| 24 | contradiction step of Theorem 10.2, pp. 246-265; the exclusion is an |
| 25 | explicit hypothesis here. -/ |
| 26 | theorem same_time_of_counterexample_exclusion {epsilon₀ : ℝ} |
| 27 | (hexclude : ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ epsilon₀ → |
| 28 | ∀ C : ℝ, 0 < C → ∀ A : ℝ, 0 ≤ A → |
| 29 | (∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 30 | ((n : ℝ) + 1) ((n : ℝ) + 1)) → False) : |
| 31 | M28SameTimeEstimateStatement.{u} epsilon₀ := by |
| 32 | by_contra h |
| 33 | obtain ⟨epsilon, hepsilon, hsmall, C, hC, A, hA, ⟨E⟩⟩ := |
| 34 | counterexamples_of_not_same_time h |
| 35 | exact hexclude epsilon hepsilon hsmall C hC A hA E |
| 36 | |
| 37 | /-- One universal accuracy threshold and the geometric sequence |
| 38 | contradiction suffice for the complete frozen M28 theory, using the |
| 39 | checked compact-path dense-time transfer. The geometric exclusion |
| 40 | remains an explicit input (Theorem 10.2; task derivations 07 and 08). -/ |
| 41 | theorem theory_of_counterexample_exclusion |
| 42 | (P : RicciFlowCurvatureTheory.{u}) {epsilon₀ : ℝ} |
| 43 | (hepsilon₀ : 0 < epsilon₀) (hsmall₀ : epsilon₀ ≤ (1 / 200 : ℝ)) |
| 44 | (hexclude : ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ epsilon₀ → |
| 45 | ∀ C : ℝ, 0 < C → ∀ A : ℝ, 0 ≤ A → |
| 46 | (∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 47 | ((n : ℝ) + 1) ((n : ℝ) + 1)) → False) : |
| 48 | RepairedBoundedDistanceTheory.{u} := by |
| 49 | have hsame := same_time_of_counterexample_exclusion hexclude |
| 50 | exact ⟨epsilon₀, hepsilon₀, hsmall₀, hsame, dense_time_of_same_time P hsame⟩ |
| 51 | |
| 52 | end PoincareMT.M28 |