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.Continuation.Construction.Terminal.Extinction.Event.PreFlow |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Terminal.Extinction.CanonicalTail |
| 3 | |
| 4 | /-! |
| 5 | # Scalar and canonical bounds on the rebased vanishing pre-flow |
| 6 | |
| 7 | The cutoff margin and the uniform lower bounds transfer through the exact |
| 8 | fixed diffeomorphism. Their final intervals may always start after the |
| 9 | selected reference time. |
| 10 | Source: Morgan--Tian, Definition 15.8 and Theorem 15.9, pp. 361-363. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.RepairedContinuationLimitBridge |
| 21 | |
| 22 | variable {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 24 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 25 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} {H : SingularTimeAssumptions G T M} |
| 26 | {L : RepairedSingularRegularLimitData H} {N : RepairedHornSelectionData H} |
| 27 | {F : SurgeryFlowData.{u}} {I : RepairedContinuationInput F T} |
| 28 | (B : RepairedContinuationLimitBridge H L N I) |
| 29 | |
| 30 | include B |
| 31 | |
| 32 | theorem rebase_uniform_scalar_tail (hempty : I.controlled_core = ∅) |
| 33 | (r : Ico I.last_slab.start T) (a : ℝ) (ha : a < I.rho⁻¹ ^ 2) : |
| 34 | ∃ s : ℝ, r.1 ≤ s ∧ s < T ∧ ∀ t ∈ Ico s T, ∀ x : (F.slice r.1).carrier, |
| 35 | a < ((I.last_slab.rebaseFlow r).connection t).scalarCurvature x := by |
| 36 | obtain ⟨s, _, hsT, htail⟩ := B.preterminal_uniform_scalar_tail hempty a ha |
| 37 | refine ⟨max r.1 s, le_max_left _ _, max_lt r.2.2 hsT, ?_⟩ |
| 38 | intro t ht x |
| 39 | rw [I.last_slab.rebaseFlow_scalar] |
| 40 | exact htail t ⟨(le_max_right _ _).trans ht.1, ht.2⟩ _ |
| 41 | |
| 42 | theorem rebase_pointwise_strict_scalar_tail (hempty : I.controlled_core = ∅) |
| 43 | (r : Ico I.last_slab.start T) (x : (F.slice r.1).carrier) : |
| 44 | ∃ a : ℝ, I.rho⁻¹ ^ 2 < a ∧ ∃ s ∈ Ico r.1 T, ∀ t ∈ Ico s T, |
| 45 | a < ((I.last_slab.rebaseFlow r).connection t).scalarCurvature x := by |
| 46 | obtain ⟨a, ha, s, _, hsT, htail⟩ := |
| 47 | B.preterminal_pointwise_strict_scalar_tail hempty ((I.last_slab.identify r).symm x) |
| 48 | refine ⟨a, ha, max r.1 s, ⟨le_max_left _ _, max_lt r.2.2 hsT⟩, ?_⟩ |
| 49 | intro t ht |
| 50 | rw [I.last_slab.rebaseFlow_scalar] |
| 51 | exact htail t ⟨(le_max_right _ _).trans ht.1, ht.2⟩ |
| 52 | |
| 53 | theorem exists_rebase_canonical_tail (hempty : I.controlled_core = ∅) |
| 54 | (r : Ico I.last_slab.start T) : |
| 55 | ∃ s : ℝ, r.1 < s ∧ s < T ∧ ∀ t ∈ Ico s T, ∀ x : (F.slice t).carrier, |
| 56 | SurgeryCanonicalControl F t x F.parameters.epsilon F.parameters.C := by |
| 57 | obtain ⟨s, _, hsT, hcanonical⟩ := B.exists_canonical_tail hempty |
| 58 | obtain ⟨s', hss', hs'T⟩ := exists_between (max_lt r.2.2 hsT) |
| 59 | refine ⟨s', (le_max_left _ _).trans_lt hss', hs'T, ?_⟩ |
| 60 | intro t ht x |
| 61 | exact hcanonical t ⟨((le_max_right _ _).trans hss'.le).trans ht.1, ht.2⟩ x |
| 62 | |
| 63 | end PoincareMT.RepairedContinuationLimitBridge |