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.Event.LimitReference |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Terminal.Event.Disappearing |
| 3 | |
| 4 | /-! |
| 5 | # Uniform disappearing control for the actual terminal retained region |
| 6 | |
| 7 | The regular-limit source transports an open neighborhood of the terminal |
| 8 | low-curvature core to the original ordinary flow. Its late scalar bounds |
| 9 | and canonical cover therefore apply to the event's actual reference slice. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set TopologicalSpace |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.RepairedContinuationLimitBridge |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 25 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 26 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} {H : SingularTimeAssumptions G T M} |
| 27 | {L : RepairedSingularRegularLimitData H} {N : RepairedHornSelectionData H} |
| 28 | {F : SurgeryFlowData.{u}} {I : RepairedContinuationInput F T} |
| 29 | (B : RepairedContinuationLimitBridge H L N I) |
| 30 | [Nonempty (N.limit.extension.extended.slice T).carrier] |
| 31 | |
| 32 | def oldRetainedOpen (U : Opens (N.limit.extension.extended.slice T).carrier) : |
| 33 | Opens (F.slice I.last_slab.start).carrier := |
| 34 | ⟨B.core_map ⁻¹' (N.limit.terminal_source '' (U : Set _)), |
| 35 | (N.limit.terminal_source_openEmbedding.isOpenMap _ U.isOpen).preimage |
| 36 | B.core_map_isOpenEmbedding.continuous⟩ |
| 37 | |
| 38 | theorem controlled_core_subset_oldRetainedOpen |
| 39 | (U : Opens (N.limit.extension.extended.slice T).carrier) |
| 40 | (hcore : {x | N.limit.terminal_scalar x ≤ I.rho⁻¹ ^ 2} ⊆ U) : |
| 41 | I.controlled_core ⊆ B.oldRetainedOpen U := by |
| 42 | intro x hx |
| 43 | have h := B.core_map_image.subset (mem_image_of_mem _ hx) |
| 44 | obtain ⟨_, z, hz, hscalar⟩ := h |
| 45 | exact ⟨z, hcore hscalar, hz⟩ |
| 46 | |
| 47 | theorem reference_oldRetainedOpen_image |
| 48 | (U : Opens (N.limit.extension.extended.slice T).carrier) |
| 49 | (σ : Ico H.reference.tMinus T) : |
| 50 | I.last_slab.identify (B.referenceRebaseTime σ) '' (B.oldRetainedOpen U : Set _) = |
| 51 | (B.referenceLimitIdentify N.limit σ).inverse '' (U : Set _) := by |
| 52 | apply Subset.antisymm |
| 53 | · rintro _ ⟨x, ⟨z, hz, hzx⟩, rfl⟩ |
| 54 | refine ⟨z, hz, ?_⟩ |
| 55 | change (B.reference_identify σ).symm (N.limit.terminal_source z) = _ |
| 56 | rw [hzx, B.core_map_eq_reference_at σ x] |
| 57 | exact (B.reference_identify σ).symm_apply_apply _ |
| 58 | · rintro _ ⟨z, hz, rfl⟩ |
| 59 | let x := (I.last_slab.identify (B.referenceRebaseTime σ)).symm |
| 60 | ((B.reference_identify σ).symm (N.limit.terminal_source z)) |
| 61 | refine ⟨x, ?_, (I.last_slab.identify (B.referenceRebaseTime σ)).apply_symm_apply _⟩ |
| 62 | refine ⟨z, hz, ?_⟩ |
| 63 | rw [B.core_map_eq_reference_at σ x] |
| 64 | simp only [x, referenceRebaseTime, Diffeomorph.apply_symm_apply] |
| 65 | |
| 66 | theorem reference_uniform_scalar_tail_off_open |
| 67 | (U : Opens (N.limit.extension.extended.slice T).carrier) |
| 68 | (hcore : {x | N.limit.terminal_scalar x ≤ I.rho⁻¹ ^ 2} ⊆ U) |
| 69 | (σ : Ico H.reference.tMinus T) (a : ℝ) (ha : a < I.rho⁻¹ ^ 2) : |
| 70 | ∃ s : ℝ, σ.1 < s ∧ s < T ∧ |
| 71 | ∀ t ∈ Ico s T, ∀ x : (F.slice σ.1).carrier, |
| 72 | x ∉ (B.referenceLimitIdentify N.limit σ).inverse '' (U : Set _) → |
| 73 | a < ((I.last_slab.rebaseFlow (B.referenceRebaseTime σ)).connection t).scalarCurvature x := by |
| 74 | have h := B.rebase_uniform_scalar_tail_off_open (B.oldRetainedOpen U) |
| 75 | (B.oldRetainedOpen U).isOpen (B.controlled_core_subset_oldRetainedOpen U hcore) |
| 76 | (B.referenceRebaseTime σ) a ha |
| 77 | rw [B.reference_oldRetainedOpen_image U σ] at h |
| 78 | exact h |
| 79 | |
| 80 | theorem exists_reference_disappearing_cover |
| 81 | (U : Opens (N.limit.extension.extended.slice T).carrier) |
| 82 | (hcore : {x | N.limit.terminal_scalar x ≤ I.rho⁻¹ ^ 2} ⊆ U) |
| 83 | (σ : Ico H.reference.tMinus T) : |
| 84 | ∃ s : ℝ, σ.1 < s ∧ s < T ∧ |
| 85 | ∀ t ∈ Ico s T, ∀ x : (F.slice σ.1).carrier, |
| 86 | x ∉ (B.referenceLimitIdentify N.limit σ).inverse '' (U : Set _) → |
| 87 | (∃ K : EpsilonNeck ((I.last_slab.rebaseFlow (B.referenceRebaseTime σ)).metric t), |
| 88 | K.center = x ∧ K.epsilon = F.parameters.epsilon) ∨ |
| 89 | (∃ K : CapCertificate ((I.last_slab.rebaseFlow (B.referenceRebaseTime σ)).metric t), |
| 90 | x ∈ K.core ∧ K.epsilon = F.parameters.epsilon ∧ K.cap_constant ≤ F.parameters.C) ∨ |
| 91 | (∃ V : Set (F.slice σ.1).carrier, x ∈ V ∧ V = connectedComponent x ∧ |
| 92 | ∀ y ∈ V, ∀ v w : TangentSpace (𝓡 3) y, |
| 93 | LeviCivitaData.IsOrthonormalPair |
| 94 | ((I.last_slab.rebaseFlow (B.referenceRebaseTime σ)).metric t) y v w → |
| 95 | 0 < ((I.last_slab.rebaseFlow (B.referenceRebaseTime σ)).connection t).sectionalCurvature y v w) := by |
| 96 | have h := B.exists_rebase_disappearing_cover (B.oldRetainedOpen U) |
| 97 | (B.oldRetainedOpen U).isOpen (B.controlled_core_subset_oldRetainedOpen U hcore) |
| 98 | (B.referenceRebaseTime σ) |
| 99 | rw [B.reference_oldRetainedOpen_image U σ] at h |
| 100 | exact h |
| 101 | |
| 102 | end PoincareMT.RepairedContinuationLimitBridge |