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.Canonical.CanonicalTransport |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.History.RegularTimeAnalytics |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.History.RegularReference |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Analytics.LimitCalibration |
| 5 | |
| 6 | /-! |
| 7 | # Construct M31's full input on the selected M48 history |
| 8 | |
| 9 | Morgan--Tian Assumptions 11.18 and Theorem 11.19, p. 279, applied in |
| 10 | Section 17.2, pp. 409--410. The geometry, ordinary reference, canonical |
| 11 | certificates and analytic estimates all belong to the same actual history. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | namespace M48AnalyticCalibration |
| 24 | |
| 25 | variable {S : RepairedControlledSchedulesData.{u}} (A : M48AnalyticCalibration S) |
| 26 | (P : M48Predecessors.{u}) {p : SurgeryParameterPrefix S.constants} |
| 27 | {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} |
| 28 | (hp : S.SeedCompatible p) (old : SurgeryPrefixControls p F O) |
| 29 | {Q : SurgeryNoncollapseExtension.{u} p} {N : SurgeryCanonicalExtension p Q} |
| 30 | (controls : SurgeryEpochContinuationControls p F O Q N) |
| 31 | {L : RepairedPreterminalSlab F O.H} (R : M48RegularSpacetimeData L) |
| 32 | |
| 33 | include P hp old controls in |
| 34 | /-- The actual canonical input at the smaller, analytically calibrated radius. -/ |
| 35 | theorem regular_canonical (t : ℝ) (ht : t ∈ R.history.generalized.interval) |
| 36 | (hregular : t = 0 ∨ t ∉ L.singularCatalog) |
| 37 | (x : (R.history.generalized.slice t).carrier) |
| 38 | (hQ : (A.historyRadius N.rNext)⁻¹ ^ 2 ≤ R.history.generalized.scalar ⟨t, x⟩) : |
| 39 | GeneralizedCanonicalControl (F := R.history.generalized) t x S.setup.epsilon S.setup.C := by |
| 40 | have htO : t ∈ surgeryObservationInterval O := |
| 41 | (show t ∈ L.regularHistoryWindow.interval from R.history.interval_eq ▸ ht) |
| 42 | have hreg : t ∉ F.surgery_times := by |
| 43 | rcases hregular with rfl | hreg |
| 44 | · exact F.zero_not_surgery |
| 45 | · exact fun hs => hreg ((L.mem_singularCatalog_iff htO).mpr hs) |
| 46 | have hr : A.historyRadius N.rNext ≤ N.rNext := |
| 47 | (A.historyRadius_lt N.r_pos).le.trans (A.limitRadius_le N.rNext) |
| 48 | have hi : N.rNext⁻¹ ≤ (A.historyRadius N.rNext)⁻¹ := |
| 49 | (inv_le_inv₀ N.r_pos (A.historyRadius_pos N.r_pos)).2 hr |
| 50 | have hthreshold : N.rNext⁻¹ ^ 2 ≤ (A.historyRadius N.rNext)⁻¹ ^ 2 := |
| 51 | pow_le_pow_left₀ (inv_nonneg.mpr N.r_pos.le) hi 2 |
| 52 | have hactual : N.rNext⁻¹ ^ 2 ≤ (F.connection t).scalarCurvature |
| 53 | (R.history.history.forward t ht x) := by |
| 54 | rw [R.history.scalar_pullback] |
| 55 | exact hthreshold.trans hQ |
| 56 | have h := R.history.canonical_control P.m13 t ht hreg x |
| 57 | (controls.canonical t htO (O.interval_subset htO) _ hactual) |
| 58 | simpa only [old.epsilon_eq, old.C_eq, hp.setup_eq] using h |
| 59 | |
| 60 | include P hp old controls in |
| 61 | /-- Produce all of Assumptions 11.18, with explicit identities for later consumers. -/ |
| 62 | theorem singular_input |
| 63 | (reference : M48RegularReferenceData L R.history) : |
| 64 | ∃ I : SingularTimeAssumptions R.history.generalized O.H (F.slice L.start).carrier, |
| 65 | I.reference = reference.reference ∧ I.r₀ = A.historyRadius N.rNext ∧ |
| 66 | I.epsilon = S.setup.epsilon ∧ I.constant = S.setup.C ∧ |
| 67 | I.analytic_constant = S.calibration.analytic_constant ∧ |
| 68 | I.singularTimes = L.singularCatalog := by |
| 69 | refine ⟨{ |
| 70 | reference := reference.reference |
| 71 | interval_nonnegative := by |
| 72 | intro t ht |
| 73 | have h : t ∈ L.regularHistoryWindow.interval := R.history.interval_eq ▸ ht |
| 74 | exact h.1 |
| 75 | interval_preterminal := by |
| 76 | intro t ht |
| 77 | exact (show t ∈ L.regularHistoryWindow.interval from R.history.interval_eq ▸ ht) |
| 78 | interval_exhausts_preterminal := by |
| 79 | intro t ht |
| 80 | exact R.history.interval_eq.symm ▸ (show t ∈ L.regularHistoryWindow.interval from ht) |
| 81 | terminal_not_in_interval := by |
| 82 | rw [R.history.interval_eq] |
| 83 | exact fun h => lt_irrefl O.H h.2 |
| 84 | singularTimes := L.singularCatalog |
| 85 | terminal_is_singular := L.terminal_mem_singularCatalog |
| 86 | singularTimes_discrete := L.singularCatalog_discrete |
| 87 | regular_slices_compact := R.regular_slices_compact |
| 88 | positive_pinching := by |
| 89 | intro q hq |
| 90 | have h := (regular_pinched old R q.1 hq).2.1 q.2 (mem_univ _) |
| 91 | change 0 ≤ (R.history.generalized.connection q.1).scalarCurvature q.2 + _ |
| 92 | rw [neg_div] at h |
| 93 | linarith |
| 94 | hamilton_ivey_pinching := by |
| 95 | intro q hq hnegative |
| 96 | exact (regular_pinched old R q.1 hq).2.2 q.2 (mem_univ _) hnegative |
| 97 | curvature_lower_bound := ⟨-6, fun q hq => regular_scalar_lower_bound old R q.1 hq q.2⟩ |
| 98 | r₀ := A.historyRadius N.rNext |
| 99 | r₀_pos := A.historyRadius_pos N.r_pos |
| 100 | epsilon := S.setup.epsilon |
| 101 | epsilon_pos := S.setup.epsilon_pos |
| 102 | epsilon_lt_quarter := by |
| 103 | have h := S.setup.epsilon_le.trans (min_le_left _ _) |
| 104 | linarith |
| 105 | terminal_epsilon_le_threshold := by |
| 106 | simpa only [old.epsilon_eq, hp.setup_eq] using old.terminal_epsilon_le_threshold hp |
| 107 | constant := S.setup.C |
| 108 | constant_pos := S.setup.C_pos |
| 109 | analytic_constant := S.calibration.analytic_constant |
| 110 | analytic_constant_pos := S.calibration.analytic_constant_pos |
| 111 | scalar_time_derivative_bound := A.regular_time_derivative P hp old controls R |
| 112 | scalar_gradient_bound := A.regular_gradient hp old controls R |
| 113 | canonical_control := A.regular_canonical P hp old controls R }, |
| 114 | rfl, rfl, rfl, rfl, rfl, rfl⟩ |
| 115 | |
| 116 | include P hp old controls in |
| 117 | /-- Produce the reference, full input and the same calibrated limit/horn wrapper. -/ |
| 118 | theorem regular_limit : |
| 119 | ∃ reference : M48RegularReferenceData L R.history, |
| 120 | ∃ I : SingularTimeAssumptions R.history.generalized O.H (F.slice L.start).carrier, |
| 121 | I.reference = reference.reference ∧ I.r₀ = A.historyRadius N.rNext ∧ |
| 122 | I.epsilon = S.setup.epsilon ∧ I.constant = S.setup.C ∧ |
| 123 | I.analytic_constant = S.calibration.analytic_constant ∧ |
| 124 | I.singularTimes = L.singularCatalog ∧ |
| 125 | ∃ limit : RepairedSingularRegularLimitData I, |
| 126 | ∃ horn : RepairedHornSelectionData I, |
| 127 | horn.limit = limit ∧ |
| 128 | terminalAccuracyFactor * S.setup.epsilon ≤ S.calibration.appendixA.epsilon₀ := by |
| 129 | obtain ⟨reference⟩ := P.regular_reference_exists R |
| 130 | obtain ⟨I, href, hr, he, hC, hA, htimes⟩ := A.singular_input P hp old controls R reference |
| 131 | refine ⟨reference, I, href, hr, he, hC, hA, htimes, ?_⟩ |
| 132 | have hsmall : I.epsilon ≤ S.calibration.common_epsilon := by |
| 133 | rw [he] |
| 134 | linarith [S.calibration.two_epsilon_le_common, S.setup.epsilon_pos] |
| 135 | simpa only [he] using m48CalibratedLimit S I hsmall |
| 136 | |
| 137 | end M48AnalyticCalibration |
| 138 | end PoincareMT |