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.CurveShortening.Comparison.Annulus |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.Noncollapse.Cylinder.CylinderDistance |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.AreaComparison.Projection.Pointwise |
| 4 | |
| 5 | /-! |
| 6 | # Constructing the base projection of an admissible product annulus |
| 7 | |
| 8 | The product-to-base projection is 1-Lipschitz for the retained metric. This |
| 9 | file packages the elementary annulus fields and the area comparison once the |
| 10 | projected density has been supplied with its (totalized) integral. |
| 11 | |
| 12 | Morgan--Tian context: Section 19.6, Lemmas 19.30-19.31, printed pp. 461-466. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Bundle Manifold MeasureTheory Set |
| 19 | open scoped Manifold ContDiff Bundle ENNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | {a b : ℝ} {F : RicciFlow n M (Set.Icc a b)} |
| 28 | {circumference : ℝ} (P : M62.CircleProductData F circumference) |
| 29 | |
| 30 | /-- Projection from the circle product does not increase Riemannian extended distance. |
| 31 | Source: Auxiliary step for MT Lemma 19.30, p. 462; the actual half-disk collar in |
| 32 | `proof-work/tasks/M64/reports/2026-09-24-sharp-polar-collar.md`. -/ |
| 33 | theorem m64Projection_edist_le (t : ℝ) (x y : P.charts.Point) : |
| 34 | (F.metric t).edist x.1 y.1 ≤ |
| 35 | ENNReal.ofReal 1 * (P.flow.metric t).edist x y := by |
| 36 | let := P.charts.chartedSpace |
| 37 | let hfst : ContMDiff (𝓡 (n + 1)) (𝓡 n) 1 |
| 38 | (Prod.fst : P.charts.Point → M) := |
| 39 | (contMDiff_fst.comp P.charts.to_product_smooth).of_le (by simp) |
| 40 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 41 | ⟨(F.metric t).toRiemannianMetric⟩ |
| 42 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (n + 1)) : P.charts.Point → Type _) := |
| 43 | ⟨(P.flow.metric t).toRiemannianMetric⟩ |
| 44 | apply RiemannianMetric.edist_le_mul_of_tangentNorm_mfderiv_le |
| 45 | (P.flow.metric t) (F.metric t) hfst (by norm_num) |
| 46 | intro q v |
| 47 | rw [← P.charts.split_space] |
| 48 | unfold RiemannianMetric.tangentNorm |
| 49 | rw [P.metric_eq] |
| 50 | simp only [one_mul] |
| 51 | apply Real.sqrt_le_sqrt |
| 52 | exact le_add_of_nonneg_right |
| 53 | ((P.circle.metricOnPoints.toRiemannianMetric.toCore q.2).re_inner_nonneg _) |
| 54 | |
| 55 | /-- Admit the literal projection of an annulus once its actual projected density is |
| 56 | integrable. Source: Auxiliary step for MT Lemma 19.30, p. 462; the actual half-disk collar |
| 57 | in `proof-work/tasks/M64/reports/2026-09-24-sharp-polar-collar.md`. -/ |
| 58 | theorem m64ProjectedAnnulus_of_integrable |
| 59 | (t : ℝ) (c0 c1 : ℝ → P.charts.Point) |
| 60 | (A : M64Annulus (P.flow.metric t) c0 c1) |
| 61 | (harea : IntegrableOn |
| 62 | (m60AreaDensity (F.metric t) (fun z => (A.map z).1)) |
| 63 | m64AnnulusDomain volume) : |
| 64 | 0 ≤ A.area ∧ |
| 65 | ∃ B : M64Annulus (F.metric t) (fun x => (c0 x).1) (fun x => (c1 x).1), |
| 66 | B.map = (fun z => (A.map z).1) ∧ |
| 67 | B.area = m64ProjectedAnnulusArea P t A ∧ |
| 68 | 0 ≤ B.area ∧ B.area ≤ A.area := by |
| 69 | let := P.charts.chartedSpace |
| 70 | let hfst : ContMDiff (𝓡 (n + 1)) (𝓡 n) 1 |
| 71 | (Prod.fst : P.charts.Point → M) := |
| 72 | (contMDiff_fst.comp P.charts.to_product_smooth).of_le (by simp) |
| 73 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 74 | ⟨(F.metric t).toRiemannianMetric⟩ |
| 75 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (n + 1)) : P.charts.Point → Type _) := |
| 76 | ⟨(P.flow.metric t).toRiemannianMetric⟩ |
| 77 | have hdom : MeasurableSet m64AnnulusDomain := by |
| 78 | change MeasurableSet {p : LoopPlane | |
| 79 | 0 ≤ p 0 ∧ p 0 ≤ curvePeriod ∧ 0 ≤ p 1 ∧ p 1 ≤ 1} |
| 80 | measurability |
| 81 | have hLip : ∀ x y : m64AnnulusDomain, |
| 82 | (F.metric t).edist ((A.map x).1) ((A.map y).1) ≤ |
| 83 | ENNReal.ofReal A.lipschitz_constant * |
| 84 | ENNReal.ofReal ‖(x : LoopPlane) - y‖ := by |
| 85 | intro x y |
| 86 | calc |
| 87 | (F.metric t).edist ((A.map x).1) ((A.map y).1) ≤ |
| 88 | ENNReal.ofReal 1 * (P.flow.metric t).edist (A.map x) (A.map y) := |
| 89 | m64Projection_edist_le P t (A.map x) (A.map y) |
| 90 | _ ≤ ENNReal.ofReal 1 * |
| 91 | (ENNReal.ofReal A.lipschitz_constant * |
| 92 | ENNReal.ofReal ‖(x : LoopPlane) - y‖) := |
| 93 | by simpa using A.lipschitz_on_domain x y |
| 94 | _ = ENNReal.ofReal A.lipschitz_constant * |
| 95 | ENNReal.ofReal ‖(x : LoopPlane) - y‖ := by simp |
| 96 | have hDiff : ∀ᵐ z ∂volume, |
| 97 | z ∈ m64AnnulusDomain → |
| 98 | MDifferentiableAt (𝓡 2) (𝓡 n) (fun w => (A.map w).1) z := by |
| 99 | filter_upwards [A.ae_manifold_differentiable] with z hz |
| 100 | intro hzdom |
| 101 | exact (hfst.mdifferentiableAt (by simp)).comp z (hz hzdom) |
| 102 | have hA_nonneg : 0 ≤ A.area := by |
| 103 | unfold M64Annulus.area m64AnnulusArea |
| 104 | exact integral_nonneg (fun _ => m60AreaDensity_nonneg (P.flow.metric t) A.map _) |
| 105 | let B : M64Annulus (F.metric t) (fun x => (c0 x).1) (fun x => (c1 x).1) := |
| 106 | { map := fun z => (A.map z).1 |
| 107 | continuous_on_domain := |
| 108 | continuous_fst.continuousOn.comp A.continuous_on_domain |
| 109 | (fun _ _ => mem_univ _) |
| 110 | periodic := by |
| 111 | intro x s |
| 112 | exact congrArg Prod.fst (A.periodic x s) |
| 113 | lower_boundary := by |
| 114 | intro x |
| 115 | exact congrArg Prod.fst (A.lower_boundary x) |
| 116 | upper_boundary := by |
| 117 | intro x |
| 118 | exact congrArg Prod.fst (A.upper_boundary x) |
| 119 | lipschitz_constant := A.lipschitz_constant |
| 120 | lipschitz_nonnegative := A.lipschitz_nonnegative |
| 121 | lipschitz_on_domain := hLip |
| 122 | ae_manifold_differentiable := hDiff |
| 123 | area_integrable := harea } |
| 124 | have hpoint : ∀ᵐ z ∂volume.restrict m64AnnulusDomain, |
| 125 | m60AreaDensity (F.metric t) (fun w => (A.map w).1) z ≤ |
| 126 | m60AreaDensity (P.flow.metric t) A.map z := by |
| 127 | filter_upwards [ae_restrict_mem hdom, ae_restrict_of_ae A.ae_manifold_differentiable] |
| 128 | with z hzdom hz |
| 129 | exact m64CircleProduct_projected_density_le P t A.map z (hz hzdom) |
| 130 | have harea_le : B.area ≤ A.area := by |
| 131 | change (∫ z in m64AnnulusDomain, |
| 132 | m60AreaDensity (F.metric t) (fun w => (A.map w).1) z) ≤ |
| 133 | ∫ z in m64AnnulusDomain, m60AreaDensity (P.flow.metric t) A.map z |
| 134 | exact integral_mono_ae harea A.area_integrable hpoint |
| 135 | refine ⟨hA_nonneg, ⟨B, rfl, ?_, ?_, harea_le⟩⟩ |
| 136 | · rfl |
| 137 | · exact integral_nonneg (fun _ => m60AreaDensity_nonneg (F.metric t) |
| 138 | (fun z => (A.map z).1) _) |
| 139 | |
| 140 | end PoincareMT |