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.Class.SphereArea |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Polygon |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.Geometry |
| 4 | |
| 5 | /-! |
| 6 | # M64 actual annuli and raw-boundary filling disks |
| 7 | |
| 8 | An annulus is a metric Lipschitz map of the angular rectangle, periodic in |
| 9 | its first coordinate, with exact boundary maps and an integrable actual |
| 10 | Jacobian. The target can be the literal M62 quotient product; no real lift |
| 11 | restricts the relative winding class. Raw polygon boundaries are continuous |
| 12 | circle maps, without an invented C1 regularity assertion. |
| 13 | |
| 14 | Source: Morgan--Tian Lemma 19.15, Claims 19.19-19.20 and Corollary 19.21, |
| 15 | pp. 447-451; reviews/contracts/M64-round1.md and |
| 16 | reviews/errata/2026-09-14-m64-annulus-comparison.md. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | |
| 21 | open scoped Manifold ContDiff Bundle ENNReal |
| 22 | |
| 23 | open MeasureTheory |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT |
| 28 | |
| 29 | /-- The fixed fundamental rectangle, with angular period 2*pi. -/ |
| 30 | def m64AnnulusDomain : Set LoopPlane := |
| 31 | {p | 0 <= p 0 ∧ p 0 <= curvePeriod ∧ 0 <= p 1 ∧ p 1 <= 1} |
| 32 | |
| 33 | section Annuli |
| 34 | |
| 35 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 36 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 37 | |
| 38 | /-- Area of the actual map on the fixed rectangle. Geometric uses require |
| 39 | the regularity and integrability of an admissible annulus. -/ |
| 40 | noncomputable def m64AnnulusArea (g : RiemannianMetric n M) |
| 41 | (f : LoopPlane → M) : ℝ := |
| 42 | ∫ p in m64AnnulusDomain, m60AreaDensity g f p |
| 43 | |
| 44 | /-- An admissible annulus with literal periodic boundary maps. The Lipschitz |
| 45 | and a.e. derivative conditions exclude rough maps with spurious zero area. -/ |
| 46 | structure M64Annulus (g : RiemannianMetric n M) (c0 c1 : ℝ → M) where |
| 47 | map : LoopPlane → M |
| 48 | continuous_on_domain : ContinuousOn map m64AnnulusDomain |
| 49 | periodic : ∀ x s : ℝ, |
| 50 | map (annulusPoint (x + curvePeriod) s) = map (annulusPoint x s) |
| 51 | lower_boundary : ∀ x : ℝ, map (annulusPoint x 0) = c0 x |
| 52 | upper_boundary : ∀ x : ℝ, map (annulusPoint x 1) = c1 x |
| 53 | lipschitz_constant : ℝ |
| 54 | lipschitz_nonnegative : 0 <= lipschitz_constant |
| 55 | lipschitz_on_domain : ∀ x y : m64AnnulusDomain, |
| 56 | g.edist (map x) (map y) <= |
| 57 | ENNReal.ofReal lipschitz_constant * ENNReal.ofReal ‖(x : LoopPlane) - y‖ |
| 58 | ae_manifold_differentiable : ∀ᵐ z ∂volume, |
| 59 | z ∈ m64AnnulusDomain → MDifferentiableAt (𝓡 2) (𝓡 n) map z |
| 60 | area_integrable : IntegrableOn (m60AreaDensity g map) m64AnnulusDomain volume |
| 61 | |
| 62 | noncomputable def M64Annulus.area {g : RiemannianMetric n M} |
| 63 | {c0 c1 : ℝ → M} (A : M64Annulus g c0 c1) : ℝ := |
| 64 | m64AnnulusArea g A.map |
| 65 | |
| 66 | /-- The full area range. Its nonemptiness is not built into the infimum. -/ |
| 67 | def m64AnnulusAreaRange (g : RiemannianMetric n M) (c0 c1 : ℝ → M) : Set ℝ := |
| 68 | Set.range (fun A : M64Annulus g c0 c1 => A.area) |
| 69 | |
| 70 | noncomputable def m64LeastAnnulusArea (g : RiemannianMetric n M) |
| 71 | (c0 c1 : ℝ → M) : ℝ := |
| 72 | sInf (m64AnnulusAreaRange g c0 c1) |
| 73 | |
| 74 | /-- Finite piecewise C1 regularity on actual closed angular strips. This is |
| 75 | an extra property of the polygonal construction, not a restriction on all |
| 76 | annuli in the area infimum. -/ |
| 77 | def M64PiecewiseC1Annulus {g : RiemannianMetric n M} {c0 c1 : ℝ → M} |
| 78 | (A : M64Annulus g c0 c1) : Prop := |
| 79 | ∃ k : ℕ, 0 < k ∧ ∃ cut : Fin (k + 1) → ℝ, |
| 80 | StrictMono cut ∧ cut 0 = 0 ∧ cut (Fin.last k) = curvePeriod ∧ |
| 81 | ∀ j : Fin k, ContMDiffOn (𝓡 2) (𝓡 n) 1 A.map |
| 82 | {p | cut j.castSucc <= p 0 ∧ p 0 <= cut j.succ ∧ 0 <= p 1 ∧ p 1 <= 1} |
| 83 | |
| 84 | /-- Every transverse slice is the actual minimizing geodesic between its |
| 85 | displayed endpoints. The source's small-area interpolation has this property. -/ |
| 86 | def M64GeodesicAnnulus {g : RiemannianMetric n M} (D : LeviCivitaData g) |
| 87 | {c0 c1 : ℝ → M} (A : M64Annulus g c0 c1) : Prop := |
| 88 | ∀ x : ℝ, ∃ side : M63MinimizingGeodesicSide g D 1 (c0 x) (c1 x), |
| 89 | ∀ s ∈ Set.Icc (0 : ℝ) 1, A.map (annulusPoint x s) = side.map s |
| 90 | |
| 91 | end Annuli |
| 92 | |
| 93 | section Product |
| 94 | |
| 95 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 96 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 97 | {a b : ℝ} {F : RicciFlow n M (Set.Icc a b)} {circumference : ℝ} |
| 98 | |
| 99 | /-- Area of the literal base projection at the same time and base metric. -/ |
| 100 | noncomputable def m64ProjectedAnnulusArea |
| 101 | (P : M62.CircleProductData F circumference) (t : ℝ) |
| 102 | {c0 c1 : ℝ → P.charts.Point} (A : M64Annulus (P.flow.metric t) c0 c1) : ℝ := |
| 103 | m64AnnulusArea (F.metric t) (fun z => (A.map z).1) |
| 104 | |
| 105 | /-- The actual full four-tensor curvature supremum, distinct from M63's |
| 106 | unit-input bound K0. Compactness and continuity justify its use later. -/ |
| 107 | noncomputable def m64CurvatureSupremum (F : RicciFlow n M (Set.Icc a b)) |
| 108 | (t : ℝ) : ℝ := |
| 109 | sSup (Set.range (fun x : M => (F.connection t).curvatureTensorNorm x)) |
| 110 | |
| 111 | end Product |
| 112 | |
| 113 | section Disks |
| 114 | |
| 115 | variable {M : Type u} [TopologicalSpace M] |
| 116 | [ChartedSpace LoopAmbient M] [IsManifold (𝓡 3) ∞ M] |
| 117 | |
| 118 | /-- The actual continuous boundary of an existing C1 loop. -/ |
| 119 | def m64C1Boundary (gamma : C1FreeLoopSpace (M := M)) : ContinuousMap LoopCircle M := |
| 120 | ⟨gamma.toFun, gamma.continuous⟩ |
| 121 | |
| 122 | /-- Raw nullity uses an actual continuous filling, with no C1 boundary premise. -/ |
| 123 | def M64RawNullLoop (gamma : ContinuousMap LoopCircle M) : Prop := |
| 124 | ∃ f : LoopPlane → M, Continuous f ∧ ∀ z : LoopCircle, f z = gamma z |
| 125 | |
| 126 | /-- The same Lipschitz disk and Jacobian as the C1 filling class, indexed |
| 127 | by a continuous boundary so unsmoothed polygon corners are allowed. -/ |
| 128 | structure M64RawSpanningDisk (g : RiemannianMetric 3 M) |
| 129 | (gamma : ContinuousMap LoopCircle M) where |
| 130 | map : LoopPlane → M |
| 131 | continuous_on_disk : ContinuousOn map loopDiskSet |
| 132 | ae_manifold_differentiable : ∀ᵐ z ∂volume, |
| 133 | z ∈ loopDiskSet → MDifferentiableAt (𝓡 2) (𝓡 3) map z |
| 134 | reparameterization : CircleReparameterization |
| 135 | boundary_eq : ∀ z : LoopCircle, map z = gamma (reparameterization.map z) |
| 136 | lipschitz_constant : ℝ |
| 137 | lipschitz_nonnegative : 0 <= lipschitz_constant |
| 138 | lipschitz_on_disk : ∀ x y : LoopDisk, |
| 139 | g.edist (map x) (map y) <= |
| 140 | ENNReal.ofReal lipschitz_constant * ENNReal.ofReal ‖(x : LoopPlane) - y‖ |
| 141 | area_integrable : IntegrableOn (parametrizedAreaDensity g map) loopDiskSet volume |
| 142 | area_nonnegative : 0 <= parametrizedRiemannianArea g map |
| 143 | |
| 144 | noncomputable def M64RawSpanningDisk.area {g : RiemannianMetric 3 M} |
| 145 | {gamma : ContinuousMap LoopCircle M} (D : M64RawSpanningDisk g gamma) : ℝ := |
| 146 | parametrizedRiemannianArea g D.map |
| 147 | |
| 148 | def m64RawDiskAreaRange (g : RiemannianMetric 3 M) |
| 149 | (gamma : ContinuousMap LoopCircle M) : Set ℝ := |
| 150 | Set.range (fun D : M64RawSpanningDisk g gamma => D.area) |
| 151 | |
| 152 | noncomputable def m64RawFillingArea (g : RiemannianMetric 3 M) |
| 153 | (gamma : ContinuousMap LoopCircle M) : ℝ := |
| 154 | sInf (m64RawDiskAreaRange g gamma) |
| 155 | |
| 156 | end Disks |
| 157 | |
| 158 | end PoincareMT |