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.SelectedCertificate |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Flow.CompatibilityData |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Volume.CompactBounds |
| 4 | |
| 5 | /-! |
| 6 | Adapted from Mapher `PoincareMT/Proofs/M52/Assembly.lean` at |
| 7 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. Declaration bodies are retained; |
| 8 | see `references/ricci-flow/mapher/surgery-adapters-port.json`. |
| 9 | -/ |
| 10 | |
| 11 | /-! |
| 12 | # The M52 certificate on the exact M51 flow |
| 13 | |
| 14 | The geometric controls are M51 outputs; the four volume fields are checked |
| 15 | applications of its selected raw M49 certificate. No operation alignment, |
| 16 | new flow, or additional analytic admission is introduced here. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | |
| 21 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | /-- The raw flow boundary needed by M39--M71 is obtained directly from the |
| 28 | global certificate. It carries no optional M36 operation provenance. -/ |
| 29 | def m52CoreFlowData |
| 30 | {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 32 | [IsManifold (𝓡 3) ∞ M] [T2Space M] [T3Space M] |
| 33 | [SecondCountableTopology M] |
| 34 | {N : NormalizedInitialMetric (M := M)} |
| 35 | (G : RepairedGlobalFlowData N) : |
| 36 | RepairedSurgeryFlowData.{u} G.certificate.flow.standard_initial := |
| 37 | { flow := G.certificate.flow |
| 38 | standard_initial_eq := rfl } |
| 39 | |
| 40 | theorem m52CoreFlowData_flow |
| 41 | {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] |
| 42 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 43 | [IsManifold (𝓡 3) ∞ M] [T2Space M] [T3Space M] |
| 44 | [SecondCountableTopology M] |
| 45 | {N : NormalizedInitialMetric (M := M)} |
| 46 | (G : RepairedGlobalFlowData N) : |
| 47 | (m52CoreFlowData G).flow = G.certificate.flow := rfl |
| 48 | |
| 49 | /-- The M51 event policy applies to the exact flow in the M52 certificate. -/ |
| 50 | theorem RepairedGlobalFlowData.terminalPolicy |
| 51 | {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] |
| 52 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 53 | [IsManifold (𝓡 3) ∞ M] [T2Space M] [T3Space M] |
| 54 | [SecondCountableTopology M] |
| 55 | {N : NormalizedInitialMetric (M := M)} |
| 56 | (G : RepairedGlobalFlowData N) : |
| 57 | SurgeryFlowTerminalPolicyOn G.certificate.flow G.certificate.flow.time_domain := by |
| 58 | rw [G.flow_eq] |
| 59 | exact G.schedule.terminal_policy |
| 60 | |
| 61 | private theorem noSurgeryAfterEmpty (F : SurgeryFlowData.{u}) |
| 62 | (s : ℝ) (hs : s ∈ F.time_domain) (hempty : IsEmpty (F.slice s).carrier) |
| 63 | (t : ℝ) (ht : t ∈ F.time_domain) (hst : s < t) : t ∉ F.surgery_times := by |
| 64 | intro hevent |
| 65 | let : IsEmpty (F.slice t).carrier := F.extinction_permanent s t hs ht hst.le hempty |
| 66 | let E := F.vanishing_event t hevent |
| 67 | let a := max s E.tMinus |
| 68 | have hat : a < t := max_lt hst E.tMinus_lt |
| 69 | have hsa : s ≤ a := le_max_left _ _ |
| 70 | have ha : a ∈ F.time_domain := F.time_domain_interval.out hs ht ⟨hsa, hat.le⟩ |
| 71 | let : IsEmpty (F.slice a).carrier := F.extinction_permanent s a hs ha hsa hempty |
| 72 | obtain ⟨x⟩ := E.pre_nonempty |
| 73 | exact isEmptyElim (E.pre_identify ⟨a, le_max_right _ _, hat⟩ x) |
| 74 | |
| 75 | /-- Assemble the global certificate from M51's actual schedule/flow and the |
| 76 | selected M49 volume output. This is a logical consequence of the preceding |
| 77 | contracts for Theorem 15.9, not another analytic version of that theorem. -/ |
| 78 | theorem m52GlobalFlowDataFromSchedule |
| 79 | {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] |
| 80 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 81 | [IsManifold (𝓡 3) ∞ M] [T2Space M] [T3Space M] |
| 82 | [SecondCountableTopology M] |
| 83 | {N : NormalizedInitialMetric (M := M)} (G : RepairedGlobalScheduleData N) : |
| 84 | ∃ R : RepairedGlobalFlowData N, R.schedule = G := by |
| 85 | let certificate : GlobalSurgeryFlowCertificate N := { |
| 86 | flow := G.flow |
| 87 | schedule := G.schedule |
| 88 | control_function := G.control_function |
| 89 | control_antitone := G.control_antitone |
| 90 | control_positive := G.control_positive |
| 91 | control_eq := G.control_eq |
| 92 | schedule_standard_initial := G.schedule_standard_initial |
| 93 | parameters_epsilon_eq := G.parameters_epsilon_eq |
| 94 | parameters_C_eq := G.parameters_C_eq |
| 95 | time_domain_eq := G.time_domain_eq |
| 96 | initial_identification := G.initial_identification |
| 97 | initial_metric_pullback := G.initial_metric_pullback |
| 98 | no_two_sided_projective_plane := G.flow.no_two_sided_projective_plane |
| 99 | local_finite := G.local_finite |
| 100 | no_finite_accumulation := by |
| 101 | intro T _hT |
| 102 | refine ⟨1, by norm_num, ?_⟩ |
| 103 | apply (G.local_finite (Set.Icc (T - 1) (T + 1)) isCompact_Icc).subset |
| 104 | intro t ht |
| 105 | exact ⟨ht.1, ht.2.1.le, ht.2.2.le⟩ |
| 106 | canonical := G.canonical |
| 107 | noncollapsed := G.noncollapsed |
| 108 | pinched := G.pinched |
| 109 | admissible := G.admissible |
| 110 | schedule_agreement := G.schedule_agreement |
| 111 | volume_bound_on_compacts := m52VolumeBoundOnCompacts G.volume_loss |
| 112 | volume_loss_on_compacts := m52VolumeLossOnCompacts G.volume_loss |
| 113 | component_event_count_on_compacts := m52ComponentEventCountOnCompacts G.volume_loss |
| 114 | volume_growth_on_compacts := m52VolumeGrowthOnCompacts G.volume_loss |
| 115 | no_surgery_after_empty := noSurgeryAfterEmpty G.flow |
| 116 | permanent_empty := G.flow.extinction_permanent |
| 117 | } |
| 118 | exact ⟨⟨G, certificate, rfl, HEq.rfl, rfl⟩, rfl⟩ |
| 119 | |
| 120 | end PoincareMT |