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.StandardCap.Persistence.Cylinder.CylinderChart |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Charts.PartialHomeomorphCompact |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.History.Transport.GuardedCylinders |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.Noncollapse.Volume.LocalVolume |
| 5 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Volume.MeasureComparison |
| 6 | |
| 7 | /-! |
| 8 | # The actual cylinder image supplies the seed volume |
| 9 | |
| 10 | Morgan--Tian Claim 16.27, p. 393. The inverse of the actual cylinder |
| 11 | slice chart has tangent norm at most two under the quadratic comparison. |
| 12 | Its volume distortion is therefore at most eight. A compact source |
| 13 | buffer remains inside the actual regular slice at an interior time. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set MeasureTheory |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M15 |
| 25 | export PoincareMT.Generalized.Noncollapse (calibratedMetricVolume_eq_volumeMeasure) |
| 26 | end PoincareMT.M15 |
| 27 | |
| 28 | namespace PoincareMT.Proofs.M46 |
| 29 | |
| 30 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 31 | normedSpaceTangentSpaceVectorSpace |
| 32 | |
| 33 | variable {F : SurgeryFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 34 | {origin scale : ℝ} {I : Set ℝ} {U : Set C.carrier} |
| 35 | |
| 36 | /-- The inverse chart has norm at most two under the actual lower |
| 37 | quadratic bound. Both derivatives are the supplied cylinder maps. -/ |
| 38 | theorem cylinder_inverse_tangentNorm_le_two |
| 39 | (e : SurgeryFlowCylinder F C origin scale I U) (hU : IsOpen U) |
| 40 | (g : RiemannianMetric 3 C.carrier) (s : ℝ) (hs : s ∈ I) |
| 41 | (hmetric : ∀ x ∈ U, ∀ v : TangentSpace (𝓡 3) x, |
| 42 | g.inner x v v ≤ 2 * (F.metric (origin + s / scale)).inner (e.forward s hs x) |
| 43 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs) x v) |
| 44 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs) x v)) |
| 45 | {y : (F.slice (origin + s / scale)).carrier} (hy : y ∈ e.forward s hs '' U) |
| 46 | (v : TangentSpace (𝓡 3) y) : |
| 47 | g.tangentNorm (e.inverse s hs y) (mfderiv (𝓡 3) (𝓡 3) (e.inverse s hs) y v) ≤ |
| 48 | 2 * (F.metric (origin + s / scale)).tangentNorm y v := by |
| 49 | let chart := M44.cylinderSliceChart e hU s hs |
| 50 | have he : chart.toOpenPartialHomeomorph.MDifferentiable (𝓡 3) (𝓡 3) := |
| 51 | ⟨chart.mdifferentiableOn (by simp), chart.symm.mdifferentiableOn (by simp)⟩ |
| 52 | have hd : (mfderiv (𝓡 3) (𝓡 3) chart (chart.symm y)).comp |
| 53 | (mfderiv (𝓡 3) (𝓡 3) chart.symm y) = |
| 54 | ContinuousLinearMap.id ℝ (TangentSpace (𝓡 3) y) := he.comp_symm_deriv hy |
| 55 | have hv : mfderiv (𝓡 3) (𝓡 3) chart (chart.symm y) |
| 56 | (mfderiv (𝓡 3) (𝓡 3) chart.symm y v) = v := congrArg (fun A => A v) hd |
| 57 | have hm := hmetric (chart.symm y) (chart.map_target hy) |
| 58 | (mfderiv (𝓡 3) (𝓡 3) chart.symm y v) |
| 59 | change g.inner (chart.symm y) (mfderiv (𝓡 3) (𝓡 3) chart.symm y v) |
| 60 | (mfderiv (𝓡 3) (𝓡 3) chart.symm y v) ≤ |
| 61 | 2 * (F.metric (origin + s / scale)).inner (chart (chart.symm y)) |
| 62 | (mfderiv (𝓡 3) (𝓡 3) chart (chart.symm y) |
| 63 | (mfderiv (𝓡 3) (𝓡 3) chart.symm y v)) |
| 64 | (mfderiv (𝓡 3) (𝓡 3) chart (chart.symm y) |
| 65 | (mfderiv (𝓡 3) (𝓡 3) chart.symm y v)) at hm |
| 66 | rw [hv] at hm |
| 67 | have hright : chart.toPartialEquiv (chart.symm.toPartialEquiv y) = y := chart.right_inv hy |
| 68 | have hinner := congrArg (fun q => (F.metric (origin + s / scale)).inner q v v) hright |
| 69 | rw [hinner] at hm |
| 70 | change g.inner (e.inverse s hs y) (mfderiv (𝓡 3) (𝓡 3) (e.inverse s hs) y v) |
| 71 | (mfderiv (𝓡 3) (𝓡 3) (e.inverse s hs) y v) ≤ |
| 72 | 2 * (F.metric (origin + s / scale)).inner y v v at hm |
| 73 | have hn : 0 ≤ (F.metric (origin + s / scale)).inner y v v := by |
| 74 | by_cases hv0 : v = 0 |
| 75 | · simp [hv0] |
| 76 | · exact ((F.metric (origin + s / scale)).pos y v hv0).le |
| 77 | dsimp only [RiemannianMetric.tangentNorm] |
| 78 | apply (Real.sqrt_le_left (by positivity)).mpr |
| 79 | nlinarith [Real.sq_sqrt hn] |
| 80 | |
| 81 | /-- Every open seed subset has at most eight times its earlier image |
| 82 | volume in the actual metric calibration. -/ |
| 83 | theorem cylinder_image_volume_ge_eighth |
| 84 | (e : SurgeryFlowCylinder F C origin scale I U) (hU : IsOpen U) |
| 85 | (g : RiemannianMetric 3 C.carrier) (s : ℝ) (hs : s ∈ I) |
| 86 | (hmetric : ∀ x ∈ U, ∀ v : TangentSpace (𝓡 3) x, |
| 87 | g.inner x v v ≤ 2 * (F.metric (origin + s / scale)).inner (e.forward s hs x) |
| 88 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs) x v) |
| 89 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs) x v)) |
| 90 | {V : Set C.carrier} (hV : IsOpen V) (hVU : V ⊆ U) : |
| 91 | calibratedMetricVolume g V ≤ |
| 92 | 8 * calibratedMetricVolume (F.metric (origin + s / scale)) (e.forward s hs '' V) := by |
| 93 | let chart := M44.cylinderSliceChart e hU s hs |
| 94 | have hA : IsOpen (chart '' V) := |
| 95 | chart.toOpenPartialHomeomorph.isOpen_image_of_subset_source hV hVU |
| 96 | have himage : chart.symm '' (chart '' V) = V := by |
| 97 | ext x |
| 98 | constructor |
| 99 | · rintro ⟨_, ⟨y, hy, rfl⟩, rfl⟩ |
| 100 | have hleft : chart.symm.toPartialEquiv (chart.toPartialEquiv y) = y := |
| 101 | chart.left_inv (hVU hy) |
| 102 | exact hleft.symm ▸ hy |
| 103 | · intro hx |
| 104 | exact ⟨chart x, mem_image_of_mem _ hx, chart.left_inv (hVU hx)⟩ |
| 105 | have hvol := (F.metric (origin + s / scale)).volumeMeasure_image_le_of_tangentNorm_le |
| 106 | g chart.symm.toOpenPartialHomeomorph chart.open_target (Subset.refl _) |
| 107 | (chart.symm.contMDiffOn.of_le (by simp)) (by norm_num : (0 : ℝ) < 2) |
| 108 | (fun y hy v => cylinder_inverse_tangentNorm_le_two e hU g s hs hmetric hy v) |
| 109 | hA.measurableSet (image_mono hVU) |
| 110 | change g.volumeMeasure (chart.symm '' (chart '' V)) ≤ |
| 111 | ENNReal.ofReal 2 ^ 3 * (F.metric (origin + s / scale)).volumeMeasure (chart '' V) at hvol |
| 112 | rw [himage] at hvol |
| 113 | change g.volumeMeasure V ≤ ENNReal.ofReal 2 ^ 3 * |
| 114 | (F.metric (origin + s / scale)).volumeMeasure (e.forward s hs '' V) at hvol |
| 115 | simpa only [M15.calibratedMetricVolume_eq_volumeMeasure, ENNReal.ofReal_ofNat, |
| 116 | show (2 : ℝ≥0∞) ^ (3 : ℕ) = 8 by norm_num] using hvol |
| 117 | |
| 118 | /-- The image of a compact buffered seed is open, has compact closure, |
| 119 | and that entire closure lies in the actual retained regular region. -/ |
| 120 | theorem cylinder_image_regular_compact_buffer |
| 121 | (e : SurgeryFlowCylinder F C origin scale I U) (hU : IsOpen U) |
| 122 | (s : ℝ) (hs : s ∈ I) (hearlier : ∃ r ∈ I, r < s) |
| 123 | {V : Set C.carrier} (hV : IsOpen V) (hcompact : IsCompact (closure V)) |
| 124 | (hbuffer : closure V ⊆ U) : |
| 125 | IsOpen (e.forward s hs '' V) ∧ IsCompact (closure (e.forward s hs '' V)) ∧ |
| 126 | closure (e.forward s hs '' V) ⊆ m33RegularRegion F (origin + s / scale) := by |
| 127 | let chart := M44.cylinderSliceChart e hU s hs |
| 128 | have hclosure := chart.toOpenPartialHomeomorph.image_closure_of_compact_buffer |
| 129 | hcompact hbuffer |
| 130 | change e.forward s hs '' closure V = closure (e.forward s hs '' V) at hclosure |
| 131 | have hclosed : IsCompact (chart '' closure V) := |
| 132 | hcompact.image_of_continuousOn (chart.contMDiffOn.continuousOn.mono hbuffer) |
| 133 | change IsCompact (e.forward s hs '' closure V) at hclosed |
| 134 | have hregular := e.regular_image_of_earlier hs hearlier |
| 135 | refine ⟨chart.toOpenPartialHomeomorph.isOpen_image_of_subset_source hV |
| 136 | (subset_closure.trans hbuffer), ?_, ?_⟩ |
| 137 | · exact hclosure ▸ hclosed |
| 138 | · rw [← hclosure] |
| 139 | exact (image_mono hbuffer).trans hregular |
| 140 | |
| 141 | end PoincareMT.Proofs.M46 |