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.Induction.EpochExtension.Terminal.ContinuationInput |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Terminal.TerminalReference |
| 3 | |
| 4 | /-! |
| 5 | # Construct the actual M33 terminal bridge |
| 6 | |
| 7 | The controlled core is Definition 11.27, p. 283, on the selected M31 limit. |
| 8 | The exact stored M32 height and M36 operation supply the two applied services. |
| 9 | This is the input construction in Section 17.2, pp. 409--410. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | /-- The low-curvature core in the actual terminal reference carrier. -/ |
| 23 | def m48TerminalCore {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 : ℝ} |
| 27 | (H : SingularTimeAssumptions G T M) (horn : RepairedHornSelectionData H) |
| 28 | (rho : ℝ) : Set M := |
| 29 | {y | y ∈ H.reference.regularLimitSet ∧ |
| 30 | ∃ z : (horn.limit.extension.extended.slice T).carrier, |
| 31 | horn.limit.terminal_source z = y ∧ horn.limit.terminal_scalar z ≤ rho⁻¹ ^ 2} |
| 32 | |
| 33 | namespace M48AnalyticCalibration |
| 34 | |
| 35 | variable {S : RepairedControlledSchedulesData.{u}} (A : M48AnalyticCalibration S) |
| 36 | {p : SurgeryParameterPrefix S.constants} {F : SurgeryFlowData.{u}} |
| 37 | {O : SurgeryObservation F} (hp : S.SeedCompatible p) |
| 38 | (old : SurgeryPrefixControls p F O) |
| 39 | {Q : SurgeryNoncollapseExtension.{u} p} {N : SurgeryCanonicalExtension p Q} |
| 40 | (controls : SurgeryEpochContinuationControls p F O Q N) |
| 41 | (hstart : surgeryEpochStart p.i ≤ O.H) |
| 42 | (hend : O.H < surgeryEpochStart (p.i + 1)) |
| 43 | (hdomain : F.time_domain = Ico 0 O.H) |
| 44 | {L : RepairedPreterminalSlab F O.H} {R : M48RegularSpacetimeData L} |
| 45 | (reference : M48RegularReferenceData L R.history) |
| 46 | (H : SingularTimeAssumptions R.history.generalized O.H (F.slice L.start).carrier) |
| 47 | (href : H.reference = reference.reference) |
| 48 | (hr : H.r₀ = A.historyRadius N.rNext) |
| 49 | (he : H.epsilon = S.setup.epsilon) (hC : H.constant = S.setup.C) |
| 50 | (hA : H.analytic_constant = S.calibration.analytic_constant) |
| 51 | (limit : RepairedSingularRegularLimitData H) (horn : RepairedHornSelectionData H) |
| 52 | (hlimit : horn.limit = limit) |
| 53 | |
| 54 | /-- All bridge fields are constructed from the same reference and limit. |
| 55 | The stored operations act on the literal terminal metric and frontier scale. -/ |
| 56 | noncomputable def terminalBridge : |
| 57 | RepairedContinuationLimitBridge H limit horn |
| 58 | (A.continuationInput hp old controls hstart hend hdomain L |
| 59 | (m48TerminalCore H horn (F.parameters.delta O.H * F.parameters.r O.H))) := by |
| 60 | let D : M48RegularReferenceData L R.history := { |
| 61 | reference := H.reference |
| 62 | start_inside := by rw [href]; exact reference.start_inside |
| 63 | metric_eq := by rw [href]; exact reference.metric_eq |
| 64 | connection_eq := by rw [href]; exact reference.connection_eq |
| 65 | history_eq := by simpa only [href] using reference.history_eq } |
| 66 | let I := A.continuationInput hp old controls hstart hend hdomain L |
| 67 | (m48TerminalCore H horn (F.parameters.delta O.H * F.parameters.r O.H)) |
| 68 | have hstd : F.standard_initial = S.standard_initial := |
| 69 | old.standard_initial_eq.trans |
| 70 | ((congrArg SurgeryControlSetup.standard_initial hp.setup_eq).trans |
| 71 | S.setup_standard_initial_eq) |
| 72 | refine { |
| 73 | appendixA := S.calibration.appendixA |
| 74 | appendixA_accuracy := by simpa only [he] using S.setup_appendixA_accuracy |
| 75 | constant_one_le := by rw [hC]; exact S.setup.C_large |
| 76 | history := R.history.history |
| 77 | reference_start_lt := D.start_inside |
| 78 | reference_identify := D.identify |
| 79 | history_reference := D.history_identify |
| 80 | reference_metric_pullback := D.metric_pullback |
| 81 | reference_scalar_pullback := D.scalar_pullback |
| 82 | reference_transport_compatibility := D.transport_compatibility |
| 83 | limit_extension_eq := congrArg SingularLimitConclusion.extension hlimit |
| 84 | rho_lt_r₀ := by rw [hr]; exact I.rho_lt_r₀ |
| 85 | core_map := id |
| 86 | core_map_eq_reference := fun x => (D.identify_slab _ x).symm |
| 87 | core_map_image := by exact Set.image_id _ |
| 88 | core_status_iff := Iff.rfl |
| 89 | parameter_epsilon_eq := he.trans |
| 90 | (old.epsilon_eq.trans (congrArg SurgeryControlSetup.epsilon hp.setup_eq)).symm |
| 91 | parameter_constant_eq := hC.trans |
| 92 | (old.C_eq.trans (congrArg SurgeryControlSetup.C hp.setup_eq)).symm |
| 93 | parameter_r₀_eq := hr |
| 94 | surgery_operation := ?_ |
| 95 | deep_horn_application := ?_ } |
| 96 | · have hK : S.cap_persistence.metric_surgery.constants = F.local_constants := |
| 97 | S.cap_constants_eq.trans old.local_constants_eq.symm |
| 98 | have operation : ∀ J : MetricSurgeryInput F.local_constants |
| 99 | (horn.limit.extension.extended.metric O.H), |
| 100 | Nonempty (MetricSurgeryResult S.standard_initial J) := |
| 101 | hK ▸ (S.cap_persistence.metric_surgery.operation |
| 102 | (g := horn.limit.extension.extended.metric O.H)) |
| 103 | simpa only [hstd] using operation |
| 104 | · intro actual_horn hboundary |
| 105 | have hh : F.parameters.h O.H = S.calibration.horn_selector.h |
| 106 | (F.parameters.delta O.H * F.parameters.r O.H) (F.parameters.delta O.H) := by |
| 107 | simpa only [hp.setup_eq, S.calibration.selector_eq] using |
| 108 | controls.next_h O.H ⟨hstart, hend⟩ |
| 109 | exact S.calibration.horn_selector.deep_horn _ _ _ I.rho_pos |
| 110 | (F.parameters.delta_pos O.H O.H_pos.le) (F.parameters.h_pos O.H O.H_pos.le) |
| 111 | hh.le H (by rw [hr]; exact I.rho_lt_r₀) he hC hA horn.limit actual_horn hboundary |
| 112 | |
| 113 | end M48AnalyticCalibration |
| 114 | |
| 115 | end PoincareMT |