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 | |
| 3 | /-! |
| 4 | # A late reference slice and the original controlled core |
| 5 | -/ |
| 6 | |
| 7 | noncomputable section |
| 8 | set_option autoImplicit false |
| 9 | |
| 10 | open Set |
| 11 | open scoped Manifold ContDiff Topology |
| 12 | |
| 13 | universe u |
| 14 | |
| 15 | namespace PoincareMT.RepairedContinuationInput |
| 16 | |
| 17 | variable {F : SurgeryFlowData.{u}} {T : ℝ} (I : RepairedContinuationInput F T) |
| 18 | |
| 19 | def lateReferenceTime (a : ℝ) (ha : a < T) : Ico a T := by |
| 20 | let s := (max a (T - F.parameters.h T ^ 2) + T) / 2 |
| 21 | have hh : 0 < F.parameters.h T ^ 2 := sq_pos_of_pos (F.parameters.h_pos T I.terminal_pos.le) |
| 22 | have hm : max a (T - F.parameters.h T ^ 2) < T := max_lt ha (by linarith) |
| 23 | exact ⟨s, by dsimp [s]; linarith [le_max_left a (T - F.parameters.h T ^ 2)], |
| 24 | by dsimp [s]; linarith⟩ |
| 25 | |
| 26 | theorem lateReferenceTime_close (a : ℝ) (ha : a < T) : |
| 27 | T - F.parameters.h T ^ 2 < (I.lateReferenceTime a ha).1 := by |
| 28 | have hh : 0 < F.parameters.h T ^ 2 := sq_pos_of_pos (F.parameters.h_pos T I.terminal_pos.le) |
| 29 | have hm : max a (T - F.parameters.h T ^ 2) < T := max_lt ha (by linarith) |
| 30 | dsimp [lateReferenceTime] |
| 31 | linarith [le_max_right a (T - F.parameters.h T ^ 2)] |
| 32 | |
| 33 | end PoincareMT.RepairedContinuationInput |
| 34 | |
| 35 | namespace PoincareMT.RepairedContinuationLimitBridge |
| 36 | |
| 37 | variable {M : Type u} [TopologicalSpace M] |
| 38 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 39 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 40 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} {H : SingularTimeAssumptions G T M} |
| 41 | {L : RepairedSingularRegularLimitData H} {N : RepairedHornSelectionData H} |
| 42 | {F : SurgeryFlowData.{u}} {I : RepairedContinuationInput F T} |
| 43 | (B : RepairedContinuationLimitBridge H L N I) |
| 44 | |
| 45 | theorem controlled_core_regular : |
| 46 | I.controlled_core ⊆ B.core_map ⁻¹' H.reference.regularLimitSet := by |
| 47 | intro x hx |
| 48 | exact (B.core_map_image.subset (mem_image_of_mem _ hx)).1 |
| 49 | |
| 50 | theorem controlled_core_terminal_scalar |
| 51 | [Nonempty (N.limit.extension.extended.slice T).carrier] |
| 52 | {x : (F.slice I.last_slab.start).carrier} (hx : x ∈ I.controlled_core) : |
| 53 | (N.limit.extension.extended.connection T).scalarCurvature |
| 54 | (N.limit.sourceInverse (B.core_map x)) ≤ I.rho⁻¹ ^ 2 := by |
| 55 | obtain ⟨_, z, hz, hscalar⟩ := B.core_map_image.subset (mem_image_of_mem _ hx) |
| 56 | rw [← hz, N.limit.sourceInverse_source, ← N.limit.terminal_scalar_eq] |
| 57 | exact hscalar |
| 58 | |
| 59 | end PoincareMT.RepairedContinuationLimitBridge |