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.Extinction.Width.Path.Theory |
| 2 | |
| 3 | /-! |
| 4 | # M68 scalar clock and piecewise ODE interface |
| 5 | |
| 6 | This file fixes the primitive data for the Chapter 18 comparison after M67. |
| 7 | The profile is evaluated on the actual changing-carrier width, and the event |
| 8 | chronology is finite and ordered. The comparison theorem must restart at |
| 9 | surgery times; no global continuity predicate is used. |
| 10 | |
| 11 | Source: Morgan--Tian Definition 18.23 and Claim 18.26, pp. 433--434, |
| 12 | `references/derived/MT2007.txt:21204-21255`, together with Lemma 2.22 and |
| 13 | Proposition 2.23, `3133-3157`. The absolute scalar clock is the one used in |
| 14 | the proof of Theorem 18.1, `21142-21162`; the printed profile's initial time |
| 15 | is corrected to `T1` in both initial-data terms. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | /-! A finite ordered event list on the comparison interval. -/ |
| 27 | structure M68ProfileInput |
| 28 | {g₀ : StandardInitialMetric} |
| 29 | {D : RepairedSurgeryFlowData.{u} g₀} |
| 30 | {W : RepairedEventChildWitness D.flow} |
| 31 | {T : ℝ} {P : RepairedComponentPath D.flow T W} |
| 32 | {K : RepairedComparisonMapData D} |
| 33 | {C : RepairedComparisonHomotopyData D K} |
| 34 | {H : RepairedAncestryTransportInput D W P K C} |
| 35 | {B : M59HigherBasepointTransportService} |
| 36 | {A : RepairedAncestryTransportData D W P K C H B} |
| 37 | {q : M59SphereQuotient} |
| 38 | {hM61 : M61RawWidthCore.{u}} |
| 39 | {hM64 : M64ComparisonTheory.{u}} |
| 40 | {hM65 : M65DeformationTheory hM61 hM64} |
| 41 | (X : M67ChangingWidthPath D W P K C H B A q hM61 hM65) |
| 42 | (HX : M67Conclusion X) where |
| 43 | T₁ : ℝ |
| 44 | T₂ : ℝ |
| 45 | ordered : 0 ≤ T₁ ∧ T₁ ≤ T₂ ∧ T₂ ≤ T |
| 46 | chronology : M67FiniteChronology |
| 47 | (↑P.surgery_times : Set ℝ) T₁ T₂ |
| 48 | |
| 49 | def M68ProfileInput.start |
| 50 | {g₀ : StandardInitialMetric} |
| 51 | {D : RepairedSurgeryFlowData.{u} g₀} |
| 52 | {W : RepairedEventChildWitness D.flow} |
| 53 | {T : ℝ} {P : RepairedComponentPath D.flow T W} |
| 54 | {K : RepairedComparisonMapData D} |
| 55 | {C : RepairedComparisonHomotopyData D K} |
| 56 | {H : RepairedAncestryTransportInput D W P K C} |
| 57 | {B : M59HigherBasepointTransportService} |
| 58 | {A : RepairedAncestryTransportData D W P K C H B} |
| 59 | {q : M59SphereQuotient} |
| 60 | {hM61 : M61RawWidthCore.{u}} |
| 61 | {hM64 : M64ComparisonTheory.{u}} |
| 62 | {hM65 : M65DeformationTheory hM61 hM64} |
| 63 | {X : M67ChangingWidthPath D W P K C H B A q hM61 hM65} |
| 64 | {HX : M67Conclusion X} |
| 65 | (I : M68ProfileInput X HX) : Set.Icc (0 : ℝ) T := |
| 66 | ⟨I.T₁, I.ordered.1, I.ordered.2.1.trans I.ordered.2.2⟩ |
| 67 | |
| 68 | def M68ProfileInput.time |
| 69 | {g₀ : StandardInitialMetric} |
| 70 | {D : RepairedSurgeryFlowData.{u} g₀} |
| 71 | {W : RepairedEventChildWitness D.flow} |
| 72 | {T : ℝ} {P : RepairedComponentPath D.flow T W} |
| 73 | {K : RepairedComparisonMapData D} |
| 74 | {C : RepairedComparisonHomotopyData D K} |
| 75 | {H : RepairedAncestryTransportInput D W P K C} |
| 76 | {B : M59HigherBasepointTransportService} |
| 77 | {A : RepairedAncestryTransportData D W P K C H B} |
| 78 | {q : M59SphereQuotient} |
| 79 | {hM61 : M61RawWidthCore.{u}} |
| 80 | {hM64 : M64ComparisonTheory.{u}} |
| 81 | {hM65 : M65DeformationTheory hM61 hM64} |
| 82 | {X : M67ChangingWidthPath D W P K C H B A q hM61 hM65} |
| 83 | {HX : M67Conclusion X} |
| 84 | (I : M68ProfileInput X HX) |
| 85 | (t : Set.Icc I.T₁ I.T₂) : Set.Icc (0 : ℝ) T := |
| 86 | ⟨t.1, I.ordered.1.trans t.2.1, t.2.2.trans I.ordered.2.2⟩ |
| 87 | |
| 88 | /-! The integrating-factor solution of `z' = -2*pi + 3*z/(1+4*t)`. -/ |
| 89 | noncomputable def m68Profile |
| 90 | {g₀ : StandardInitialMetric} |
| 91 | {D : RepairedSurgeryFlowData.{u} g₀} |
| 92 | {W : RepairedEventChildWitness D.flow} |
| 93 | {T : ℝ} {P : RepairedComponentPath D.flow T W} |
| 94 | {K : RepairedComparisonMapData D} |
| 95 | {C : RepairedComparisonHomotopyData D K} |
| 96 | {H : RepairedAncestryTransportInput D W P K C} |
| 97 | {B : M59HigherBasepointTransportService} |
| 98 | {A : RepairedAncestryTransportData D W P K C H B} |
| 99 | {q : M59SphereQuotient} |
| 100 | {hM61 : M61RawWidthCore.{u}} |
| 101 | {hM64 : M64ComparisonTheory.{u}} |
| 102 | {hM65 : M65DeformationTheory hM61 hM64} |
| 103 | {X : M67ChangingWidthPath D W P K C H B A q hM61 hM65} |
| 104 | {HX : M67Conclusion X} |
| 105 | (I : M68ProfileInput X HX) (t : ℝ) : ℝ := |
| 106 | let w₁ := X.width I.start |
| 107 | let a₁ := 1 + 4 * I.T₁ |
| 108 | let a := 1 + 4 * t |
| 109 | w₁ * Real.rpow (a / a₁) ((3 : ℝ) / 4) + |
| 110 | 2 * Real.pi * Real.rpow a₁ ((1 : ℝ) / 4) * Real.rpow a ((3 : ℝ) / 4) - |
| 111 | 2 * Real.pi * a |
| 112 | |
| 113 | structure M68ProfileConclusion |
| 114 | {g₀ : StandardInitialMetric} |
| 115 | {D : RepairedSurgeryFlowData.{u} g₀} |
| 116 | {W : RepairedEventChildWitness D.flow} |
| 117 | {T : ℝ} {P : RepairedComponentPath D.flow T W} |
| 118 | {K : RepairedComparisonMapData D} |
| 119 | {C : RepairedComparisonHomotopyData D K} |
| 120 | {H : RepairedAncestryTransportInput D W P K C} |
| 121 | {B : M59HigherBasepointTransportService} |
| 122 | {A : RepairedAncestryTransportData D W P K C H B} |
| 123 | {q : M59SphereQuotient} |
| 124 | {hM61 : M61RawWidthCore.{u}} |
| 125 | {hM64 : M64ComparisonTheory.{u}} |
| 126 | {hM65 : M65DeformationTheory hM61 hM64} |
| 127 | {X : M67ChangingWidthPath D W P K C H B A q hM61 hM65} |
| 128 | {HX : M67Conclusion X} |
| 129 | (I : M68ProfileInput X HX) where |
| 130 | clock_positive : ∀ t : Set.Icc I.T₁ I.T₂, 0 < 1 + 4 * t.1 |
| 131 | profile_initial : m68Profile I I.T₁ = X.width I.start |
| 132 | profile_equation : ∀ t : Set.Icc I.T₁ I.T₂, |
| 133 | HasDerivAt (m68Profile I) (-2 * Real.pi + |
| 134 | 3 * m68Profile I t.1 / (1 + 4 * t.1)) t.1 |
| 135 | width_bound : ∀ t : Set.Icc I.T₁ I.T₂, |
| 136 | X.width (M68ProfileInput.time I t) ≤ m68Profile I t.1 |
| 137 | |
| 138 | end PoincareMT |