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.ScalarTail |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Terminal.Extinction.Event.PreFlow |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Terminal.Extinction.Event.CanonicalCover |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Terminal.Extinction.RoundCurvature.PositiveSectional |
| 5 | |
| 6 | /-! |
| 7 | # Disappearing regions outside a retained core neighborhood |
| 8 | |
| 9 | The fixed worldline identifications transport the uniform scalar tails to |
| 10 | any late reference slice. The original canonical-neighborhood assumption |
| 11 | then gives the required neck, cap, or positive-component cover. |
| 12 | |
| 13 | Source: Morgan--Tian, Definition 15.8 and Theorem 15.9, pp. 361-363. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.RepairedContinuationLimitBridge |
| 26 | |
| 27 | variable {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 29 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 30 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} {H : SingularTimeAssumptions G T M} |
| 31 | {L : RepairedSingularRegularLimitData H} {N : RepairedHornSelectionData H} |
| 32 | {F : SurgeryFlowData.{u}} {I : RepairedContinuationInput F T} |
| 33 | (B : RepairedContinuationLimitBridge H L N I) |
| 34 | |
| 35 | include B |
| 36 | |
| 37 | theorem rebase_uniform_scalar_tail_off_open |
| 38 | (D : Set (F.slice I.last_slab.start).carrier) (hD : IsOpen D) |
| 39 | (hcore : I.controlled_core ⊆ D) (r : Ico I.last_slab.start T) |
| 40 | (a : ℝ) (ha : a < I.rho⁻¹ ^ 2) : |
| 41 | ∃ s : ℝ, r.1 < s ∧ s < T ∧ |
| 42 | ∀ t ∈ Ico s T, ∀ x : (F.slice r.1).carrier, |
| 43 | x ∉ I.last_slab.identify r '' D → |
| 44 | a < ((I.last_slab.rebaseFlow r).connection t).scalarCurvature x := by |
| 45 | obtain ⟨s, hs, hsT, htail⟩ := B.preterminal_uniform_scalar_tail_off_open D hD hcore a ha |
| 46 | obtain ⟨b, hb, hbT⟩ := exists_between (max_lt r.2.2 hsT) |
| 47 | refine ⟨b, (le_max_left _ _).trans_lt hb, hbT, ?_⟩ |
| 48 | intro t ht x hx |
| 49 | rw [I.last_slab.rebaseFlow_scalar] |
| 50 | apply htail t ⟨((le_max_right _ _).trans_lt hb).le.trans ht.1, ht.2⟩ |
| 51 | ((I.last_slab.identify r).symm x) |
| 52 | intro hin |
| 53 | exact hx ⟨(I.last_slab.identify r).symm x, hin, (I.last_slab.identify r).apply_symm_apply x⟩ |
| 54 | |
| 55 | theorem exists_rebase_canonical_tail_off_open |
| 56 | (D : Set (F.slice I.last_slab.start).carrier) (hD : IsOpen D) |
| 57 | (hcore : I.controlled_core ⊆ D) (r : Ico I.last_slab.start T) : |
| 58 | ∃ s : ℝ, r.1 < s ∧ s < T ∧ |
| 59 | ∀ t : Ico r.1 T, s ≤ t.1 → ∀ x : (F.slice r.1).carrier, |
| 60 | x ∉ I.last_slab.identify r '' D → |
| 61 | SurgeryCanonicalControl F t.1 (I.last_slab.rebaseIdentify r t x) |
| 62 | F.parameters.epsilon F.parameters.C := by |
| 63 | have hrT : 0 < F.parameters.r T := F.parameters.r_pos T I.terminal_pos.le |
| 64 | have hinv : (F.parameters.r T)⁻¹ < I.rho⁻¹ := |
| 65 | (inv_lt_inv₀ hrT I.rho_pos).mpr I.rho_lt_r |
| 66 | have hlevel : (F.parameters.r T)⁻¹ ^ 2 < I.rho⁻¹ ^ 2 := by |
| 67 | have := inv_pos.mpr hrT |
| 68 | nlinarith |
| 69 | obtain ⟨s, hs, hsT, htail⟩ := B.rebase_uniform_scalar_tail_off_open D hD hcore r _ hlevel |
| 70 | refine ⟨s, hs, hsT, ?_⟩ |
| 71 | intro t ht x hx |
| 72 | have htmem := I.last_slab.time_subset ⟨r.2.1.trans t.2.1, t.2.2⟩ |
| 73 | have htzero : 0 ≤ t.1 := F.time_domain_nonnegative htmem |
| 74 | have hr : F.parameters.r T ≤ F.parameters.r t.1 := |
| 75 | F.parameters.r_antitone htzero I.terminal_pos.le t.2.2.le |
| 76 | have hlevelt : (F.parameters.r t.1)⁻¹ ^ 2 ≤ (F.parameters.r T)⁻¹ ^ 2 := |
| 77 | pow_le_pow_left₀ (inv_nonneg.mpr (F.parameters.r_pos t.1 htzero).le) |
| 78 | ((inv_le_inv₀ (F.parameters.r_pos t.1 htzero) hrT).mpr hr) 2 |
| 79 | have hscalar := htail t.1 ⟨ht, t.2.2⟩ x hx |
| 80 | have hident := ((I.last_slab.rebaseFlow r).connection t.1).scalarCurvature_eq_of_local_isometry |
| 81 | (F.connection t.1) isOpen_univ (I.last_slab.rebaseIdentify r t).contMDiff.contMDiffOn |
| 82 | (fun y _ v w => (I.last_slab.rebase_metric r t y v w).symm) (mem_univ x) |
| 83 | rw [hident] at hscalar |
| 84 | exact I.canonical t.1 htmem _ (hlevelt.trans hscalar.le) |
| 85 | |
| 86 | theorem exists_rebase_disappearing_cover |
| 87 | (D : Set (F.slice I.last_slab.start).carrier) (hD : IsOpen D) |
| 88 | (hcore : I.controlled_core ⊆ D) (r : Ico I.last_slab.start T) : |
| 89 | ∃ s : ℝ, r.1 < s ∧ s < T ∧ |
| 90 | ∀ t ∈ Ico s T, ∀ x : (F.slice r.1).carrier, |
| 91 | x ∉ I.last_slab.identify r '' D → |
| 92 | (∃ K : EpsilonNeck ((I.last_slab.rebaseFlow r).metric t), |
| 93 | K.center = x ∧ K.epsilon = F.parameters.epsilon) ∨ |
| 94 | (∃ K : CapCertificate ((I.last_slab.rebaseFlow r).metric t), |
| 95 | x ∈ K.core ∧ K.epsilon = F.parameters.epsilon ∧ K.cap_constant ≤ F.parameters.C) ∨ |
| 96 | (∃ U : Set (F.slice r.1).carrier, x ∈ U ∧ U = connectedComponent x ∧ |
| 97 | ∀ y ∈ U, ∀ v w : TangentSpace (𝓡 3) y, |
| 98 | LeviCivitaData.IsOrthonormalPair ((I.last_slab.rebaseFlow r).metric t) y v w → |
| 99 | 0 < ((I.last_slab.rebaseFlow r).connection t).sectionalCurvature y v w) := by |
| 100 | obtain ⟨s, hs, hsT, htail⟩ := B.exists_rebase_canonical_tail_off_open D hD hcore r |
| 101 | refine ⟨s, hs, hsT, ?_⟩ |
| 102 | intro t ht x hx |
| 103 | let q : Ico r.1 T := ⟨t, hs.le.trans ht.1, ht.2⟩ |
| 104 | have he : MetricHomothety ((I.last_slab.rebaseFlow r).metric t) (F.metric t) |
| 105 | (I.last_slab.rebaseIdentify r q) 1 := by |
| 106 | intro y v w |
| 107 | simpa only [one_mul] using I.last_slab.rebase_metric r q y v w |
| 108 | have hcover := SurgeryCanonicalControl.pullback_static_cover (F.slice r.1) |
| 109 | ((I.last_slab.rebaseFlow r).metric t) ((I.last_slab.rebaseFlow r).connection t) |
| 110 | (I.last_slab.rebaseIdentify r q) he x (htail q ht.1 x hx) |
| 111 | rcases hcover with hneck | hcap | hpositive | ⟨K, hx⟩ |
| 112 | · exact Or.inl hneck |
| 113 | · exact Or.inr (Or.inl hcap) |
| 114 | · exact Or.inr (Or.inr hpositive) |
| 115 | · refine Or.inr (Or.inr ⟨K.carrier, hx, ?_, ?_⟩) |
| 116 | · rw [K.component_eq] at hx ⊢ |
| 117 | exact connectedComponent_eq hx |
| 118 | · exact K.positive_sectional ((I.last_slab.rebaseFlow r).connection t) |
| 119 | F.parameters.epsilon_le |
| 120 | |
| 121 | end PoincareMT.RepairedContinuationLimitBridge |