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.Global.Certificate |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.NoncollapseGeometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Volume.FinitePrefixData |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Flow.TerminalPolicy |
| 5 | |
| 6 | /-! |
| 7 | Adapted from Mapher `PoincareMT/Definitions/M51GlobalSchedule.lean` at |
| 8 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. Declaration bodies are retained; |
| 9 | see `references/ricci-flow/mapher/surgery-adapters-port.json`. |
| 10 | -/ |
| 11 | |
| 12 | /-! |
| 13 | # M51 repaired global schedule induction data |
| 14 | |
| 15 | This partial global certificate records the actual changing-carrier flow and |
| 16 | the schedule/finite-prefix information assembled before the stronger M52 |
| 17 | controlled-flow certificate is formed. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | |
| 22 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT |
| 27 | |
| 28 | /-! Theorem 15.9 has two source-facing uses. Corollary 15.10 starts from a |
| 29 | normalized initial metric; Theorem 15.9 also extends an already given finite |
| 30 | controlled flow. Keep that second input primitive and tied to its actual flow |
| 31 | so the global theorem cannot replace it by a newly chosen solution. -/ |
| 32 | |
| 33 | structure RepairedGlobalControlledPrefix |
| 34 | {K : MetricSurgeryConstants} (schedule : GlobalSurgerySchedule K) |
| 35 | (delta : ℝ → ℝ) (flow : SurgeryFlowData.{u}) (horizon : ℝ) : Prop where |
| 36 | horizon_pos : 0 < horizon |
| 37 | time_domain_eq : flow.time_domain = Set.Ico 0 horizon |
| 38 | local_constants_eq : flow.local_constants = K |
| 39 | standard_initial_eq : flow.standard_initial = schedule.setup.standard_initial |
| 40 | parameters_epsilon_eq : flow.parameters.epsilon = schedule.setup.epsilon |
| 41 | parameters_C_eq : flow.parameters.C = schedule.setup.C |
| 42 | admissible : SurgeryFlowAdmissible flow |
| 43 | /-- The given history already uses the Definition 15.8 surgery policy. -/ |
| 44 | terminal_policy : SurgeryFlowTerminalPolicyOn flow flow.time_domain |
| 45 | pinched : SurgeryFlowPinched flow |
| 46 | canonical : SurgeryCanonicalAssumption flow |
| 47 | noncollapsed : SurgeryNoncollapsed flow |
| 48 | delta_eq : ∀ t, 0 ≤ t → flow.parameters.delta t = delta t |
| 49 | /-- An extension preserves the entire parameter record. The numerical |
| 50 | profiles are therefore prescribed on all nonnegative times; no future |
| 51 | geometric control is an input. -/ |
| 52 | schedule_agreement : ∀ j : ℕ, ∀ t ∈ surgeryEpochEntry j, |
| 53 | 0 ≤ t → |
| 54 | flow.parameters.r t = schedule.r j ∧ |
| 55 | flow.parameters.kappa t = schedule.kappa j ∧ |
| 56 | flow.parameters.h t = schedule.setup.selector.h |
| 57 | (delta t * flow.parameters.r t) (delta t) |
| 58 | |
| 59 | structure RepairedGlobalControlledExtension |
| 60 | {K : MetricSurgeryConstants} (schedule : GlobalSurgerySchedule K) |
| 61 | (flow : SurgeryFlowData.{u}) where |
| 62 | extension : SurgeryFlowExtension flow |
| 63 | time_domain_eq : extension.extended.time_domain = Set.Ici 0 |
| 64 | admissible : SurgeryFlowAdmissible extension.extended |
| 65 | terminal_policy : |
| 66 | SurgeryFlowTerminalPolicyOn extension.extended extension.extended.time_domain |
| 67 | pinched : SurgeryFlowPinched extension.extended |
| 68 | canonical : SurgeryCanonicalAssumption extension.extended |
| 69 | noncollapsed : SurgeryNoncollapsed extension.extended |
| 70 | schedule_agreement : ∀ j : ℕ, ∀ t ∈ surgeryEpochEntry j, |
| 71 | t ∈ extension.extended.time_domain → |
| 72 | extension.extended.parameters.r t = schedule.r j ∧ |
| 73 | extension.extended.parameters.kappa t = schedule.kappa j ∧ |
| 74 | extension.extended.parameters.delta t ≤ schedule.Delta j ∧ |
| 75 | extension.extended.parameters.h t = schedule.setup.selector.h |
| 76 | (extension.extended.parameters.delta t * extension.extended.parameters.r t) |
| 77 | (extension.extended.parameters.delta t) |
| 78 | local_finite : ∀ Kset : Set ℝ, IsCompact Kset → |
| 79 | (extension.extended.surgery_times ∩ Kset).Finite |
| 80 | no_finite_accumulation : ∀ T : ℝ, T ∉ extension.extended.surgery_times → |
| 81 | ∃ d : ℝ, 0 < d ∧ |
| 82 | (extension.extended.surgery_times ∩ Set.Ioo (T - d) (T + d)).Finite |
| 83 | |
| 84 | structure RepairedGlobalScheduleData |
| 85 | {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] |
| 86 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 87 | [IsManifold (𝓡 3) ∞ M] [T2Space M] [T3Space M] |
| 88 | [SecondCountableTopology M] |
| 89 | (N : NormalizedInitialMetric (M := M)) where |
| 90 | flow : SurgeryFlowData.{u} |
| 91 | schedule : GlobalSurgerySchedule flow.local_constants |
| 92 | prefix_witness : ∀ i : ℕ, 0 < i → |
| 93 | Nonempty (GlobalSurgeryPrefixWitness flow.local_constants schedule i) |
| 94 | control_function : ℝ → ℝ |
| 95 | control_antitone : AntitoneOn control_function (Set.Ici 0) |
| 96 | control_positive : ∀ t ∈ flow.time_domain, 0 < control_function t |
| 97 | control_eq : ∀ t ∈ flow.time_domain, |
| 98 | flow.parameters.delta t = control_function t |
| 99 | /-- The global flow keeps the setup's epsilon and cap constant. -/ |
| 100 | parameters_epsilon_eq : flow.parameters.epsilon = schedule.setup.epsilon |
| 101 | parameters_C_eq : flow.parameters.C = schedule.setup.C |
| 102 | /-- Whole-domain controls exported by the M48 extension chain. -/ |
| 103 | admissible : SurgeryFlowAdmissible flow |
| 104 | /-- Constructed from the actual finite stages and their copied events. -/ |
| 105 | terminal_policy : SurgeryFlowTerminalPolicyOn flow flow.time_domain |
| 106 | pinched : SurgeryFlowPinched flow |
| 107 | canonical : SurgeryCanonicalAssumption flow |
| 108 | noncollapsed : SurgeryNoncollapsed flow |
| 109 | schedule_standard_initial : schedule.setup.standard_initial = flow.standard_initial |
| 110 | /-- M51 applies M49 to this same raw flow after tightening the schedule |
| 111 | below M49's selected cutoff. No selected M37 operation is required. -/ |
| 112 | volume_nonempty_pre_interval : RepairedNonemptyEventPreInterval flow |
| 113 | volume_vanishing_pre_interval : RepairedVanishingEventPreInterval flow |
| 114 | volume_zero_cap_discard : RepairedZeroCapDiscard flow |
| 115 | volume_loss : RepairedVolumeLossData flow { |
| 116 | admissible := admissible |
| 117 | pinched := pinched |
| 118 | nonempty_pre_interval := volume_nonempty_pre_interval |
| 119 | vanishing_pre_interval := volume_vanishing_pre_interval |
| 120 | zero_cap_discard := volume_zero_cap_discard } |
| 121 | time_domain_eq : flow.time_domain = Set.Ici 0 |
| 122 | initial_identification : Diffeomorph (𝓡 3) (𝓡 3) M |
| 123 | (flow.slice 0).carrier ∞ |
| 124 | initial_metric_pullback : ∀ x v w, |
| 125 | (flow.metric 0).inner (initial_identification x) |
| 126 | (mfderiv (𝓡 3) (𝓡 3) initial_identification x v) |
| 127 | (mfderiv (𝓡 3) (𝓡 3) initial_identification x w) = |
| 128 | N.metric.inner x v w |
| 129 | schedule_agreement : ∀ j : ℕ, ∀ t ∈ surgeryEpochEntry j, |
| 130 | t ∈ flow.time_domain → |
| 131 | flow.parameters.r t = schedule.r j ∧ |
| 132 | flow.parameters.kappa t = schedule.kappa j ∧ |
| 133 | flow.parameters.delta t ≤ schedule.Delta j ∧ |
| 134 | flow.parameters.h t = schedule.setup.selector.h |
| 135 | (flow.parameters.delta t * flow.parameters.r t) |
| 136 | (flow.parameters.delta t) |
| 137 | local_finite : ∀ Kset : Set ℝ, IsCompact Kset → |
| 138 | (flow.surgery_times ∩ Kset).Finite |
| 139 | |
| 140 | end PoincareMT |