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.GlobalSchedule.Global.GlobalControlledExtension |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.GlobalSchedule.Normalized.NormalizedAssembly |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.GlobalSchedule.Given.GivenPrefixStage |
| 4 | |
| 5 | /-! |
| 6 | # The two global outputs of the fixed numerical schedule |
| 7 | |
| 8 | Morgan--Tian Theorem 15.9 and Corollary 15.10, pp. 363-366, and Section |
| 9 | 17.2, pp. 408-411. Both branches retain the same setup, recursive numerical |
| 10 | choices, volume cutoff and count service. See the final-global-assembly |
| 11 | derivation for the quantifier order and actual source-flow preservation. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M51 |
| 22 | |
| 23 | variable (S : RepairedControlledSchedulesData.{u}) |
| 24 | (N : RepairedNoncollapseInductionData S) |
| 25 | (C : RepairedCanonicalInductionData S N) |
| 26 | (A : M48AnalyticCalibration S) (P : M48Predecessors.{u}) |
| 27 | (F50 : RepairedFinitePrefixTheory.{u}) |
| 28 | (d : ℝ) (hd : (M51Numerical.schedule S N C).Delta 0 ≤ d) |
| 29 | (losses : ∀ (F : SurgeryFlowData.{u}) (V : RepairedVolumeLossControls F), |
| 30 | F.standard_initial = S.standard_initial → F.local_constants = S.constants → |
| 31 | (∀ t ∈ F.surgery_times, F.parameters.delta t ≤ d) → |
| 32 | Nonempty (RepairedVolumeLossData F V)) |
| 33 | (count : ∀ (B : ℝ) (V₀ : ℝ≥0∞) (hMin : ℝ), |
| 34 | 0 < B → V₀ ≠ (⊤ : ℝ≥0∞) → 0 < hMin → |
| 35 | ∃ bound : ℕ, ∀ (G : SurgeryFlowData.{u}) (O : SurgeryObservation G), |
| 36 | G.standard_initial = S.standard_initial → |
| 37 | G.local_constants = S.constants → O.H ≤ B → |
| 38 | RepairedObservedVolumeControls G O → |
| 39 | calibratedMetricVolume (G.metric 0) univ ≤ V₀ → |
| 40 | (∀ t ∈ G.surgery_times ∩ surgeryObservationInterval O, |
| 41 | G.parameters.delta t ≤ d ∧ hMin ≤ G.parameters.h t) → |
| 42 | ∀ U : Finset ℝ, |
| 43 | (↑U : Set ℝ) ⊆ G.surgery_times ∩ surgeryObservationInterval O → |
| 44 | U.card ≤ bound) |
| 45 | |
| 46 | include A P F50 d hd losses count |
| 47 | |
| 48 | /-- Theorem 15.9: extend this given controlled flow, including its old events. |
| 49 | Morgan--Tian Theorem 15.9 and Corollary 15.10, pp. 363-366. -/ |
| 50 | theorem givenPrefixAssembly |
| 51 | (delta : ℝ → ℝ) |
| 52 | (hcut : ∀ j t, t ∈ surgeryEpochEntry j → 0 ≤ t → |
| 53 | delta t ≤ (M51Numerical.schedule S N C).Delta j) |
| 54 | (F : SurgeryFlowData.{u}) (H : ℝ) |
| 55 | (pref : RepairedGlobalControlledPrefix (M51Numerical.schedule S N C) delta F H) : |
| 56 | Nonempty (RepairedGlobalControlledExtension (M51Numerical.schedule S N C) F) := by |
| 57 | rcases controlledPrefix_start P.m13 F50 d hd |
| 58 | (by simpa only [S.setup_standard_initial_eq] using losses) pref hcut with |
| 59 | finished | ⟨k, X, _hX, _hH⟩ |
| 60 | · exact finished |
| 61 | · obtain ⟨Q⟩ := exists_completed_stage_chain_from A P d hd |
| 62 | (by simpa only [S.setup_standard_initial_eq] using count) delta k X |
| 63 | pref.delta_eq pref.schedule_agreement hcut |
| 64 | exact ⟨Q.controlledExtension P.m13 F50 d hd losses delta |
| 65 | pref.delta_eq pref.schedule_agreement hcut⟩ |
| 66 | |
| 67 | /-- Corollary 15.10: retain the initial metric, exact schedule and selected loss. |
| 68 | Morgan--Tian Theorem 15.9 and Corollary 15.10, pp. 363-366. -/ |
| 69 | theorem normalizedFlowAssembly |
| 70 | {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] |
| 71 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 72 | [T2Space M] [T3Space M] [SecondCountableTopology M] [CompactSpace M] [Nonempty M] |
| 73 | (I : NormalizedInitialMetric (M := M)) |
| 74 | (hRP : NoTrivialNormalProjectivePlane (M := M)) |
| 75 | (delta : ℝ → ℝ) (hmono : AntitoneOn delta (Ici 0)) |
| 76 | (hpos : ∀ t, 0 ≤ t → 0 < delta t) |
| 77 | (hcut : ∀ j t, t ∈ surgeryEpochEntry j → 0 ≤ t → |
| 78 | delta t ≤ (M51Numerical.schedule S N C).Delta j) : |
| 79 | ∃ G : RepairedGlobalScheduleData I, |
| 80 | G.flow.local_constants = S.constants ∧ |
| 81 | HEq G.schedule (M51Numerical.schedule S N C) ∧ G.control_function = delta := by |
| 82 | obtain ⟨F, hstd, hK, hparameters, ⟨e, he⟩, X, _hX⟩ := |
| 83 | M51Initial.exists_first_stage S N C I hRP delta hmono hpos hcut |
| 84 | have hdelta : ∀ t, 0 ≤ t → F.parameters.delta t = delta t := by |
| 85 | intro t _ |
| 86 | rw [hparameters] |
| 87 | rfl |
| 88 | have hprofiles : ∀ j t, t ∈ surgeryEpochEntry j → 0 ≤ t → |
| 89 | F.parameters.r t = (M51Numerical.schedule S N C).r j ∧ |
| 90 | F.parameters.kappa t = (M51Numerical.schedule S N C).kappa j ∧ |
| 91 | F.parameters.h t = S.setup.selector.h (delta t * F.parameters.r t) (delta t) := by |
| 92 | intro j t ht _ |
| 93 | rw [hparameters] |
| 94 | exact ⟨GlobalSurgerySchedule.parameters_r _ _ _ _ ht, |
| 95 | GlobalSurgerySchedule.parameters_kappa _ _ _ _ ht, rfl⟩ |
| 96 | obtain ⟨Q⟩ := exists_completed_stage_chain_from A P d hd |
| 97 | (by simpa only [S.setup_standard_initial_eq] using count) delta 0 X |
| 98 | hdelta hprofiles hcut |
| 99 | let R := Q.controlledExtension P.m13 F50 d hd losses delta hdelta hprofiles hcut |
| 100 | have hepsilon : F.parameters.epsilon = S.setup.epsilon := by rw [hparameters]; rfl |
| 101 | have hC : F.parameters.C = S.setup.C := by rw [hparameters]; rfl |
| 102 | obtain ⟨G, _hflow, hconstants, hschedule, hcontrol⟩ := |
| 103 | normalizedAssembly S N C P.m13 F50 d hd losses I R hstd hK hepsilon hC |
| 104 | e he delta hmono hpos hdelta |
| 105 | exact ⟨G, hconstants, hschedule, hcontrol⟩ |
| 106 | |
| 107 | end PoincareMT.M51 |