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.CanonicalInduction.Terminal.Curvature.TerminalCurvatureScaledGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.CanonicalGeometry.CapIntrinsicDiameter |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Metric.LocalInverseMetricBound |
| 4 | |
| 5 | /-! |
| 6 | # Distance to the actual transferred cap end |
| 7 | |
| 8 | The inverse of the captured source map transports paths inside the literal |
| 9 | cap carrier. Its frozen intrinsic diameter and exact positive scaling give |
| 10 | a radius at the normalized scalar scale. MT Proposition 17.1; |
| 11 | limit-finite-cap-center.md, S1. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u v |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 25 | |
| 26 | private theorem cap_intrinsic_diameter_lt |
| 27 | {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 28 | [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 29 | {g : RiemannianMetric 3 M} (N : CapCertificate g) |
| 30 | {C H : ℝ} (hC : N.cap_constant ≤ C) (hH : 0 < H) |
| 31 | {x : M} (hx : x ∈ N.core) (hscalar : H ≤ N.connection.scalarCurvature x) : |
| 32 | intrinsicDiameter g N.carrier < ENNReal.ofReal (C * H ^ (-1 / 2 : ℝ)) := by |
| 33 | have hxN := N.core_subset_carrier' hx |
| 34 | obtain ⟨b, _, hratio⟩ := N.scalar_ratio |
| 35 | have hbounded : BddAbove (range (fun z : N.carrier => N.connection.scalarCurvature z)) := |
| 36 | ⟨b * N.connection.scalarCurvature x, by |
| 37 | rintro _ ⟨z, rfl⟩ |
| 38 | exact hratio x hxN z z.2⟩ |
| 39 | have hsup : H ≤ scalarCurvatureSupOn g N.connection N.carrier := |
| 40 | hscalar.trans (le_csSup hbounded ⟨⟨x, hxN⟩, rfl⟩) |
| 41 | have hpow := Real.rpow_le_rpow_of_nonpos hH hsup (by norm_num : (-1 / 2 : ℝ) ≤ 0) |
| 42 | apply N.intrinsic_diameter_bound.trans_le |
| 43 | apply ENNReal.ofReal_le_ofReal |
| 44 | exact (mul_le_mul_of_nonneg_left hpow N.cap_constant_pos.le).trans |
| 45 | (mul_le_mul_of_nonneg_right hC (Real.rpow_nonneg hH.le _)) |
| 46 | |
| 47 | /-- A captured physical cap and the actual forward metric comparison |
| 48 | bound distance to its unchanged end center. The inverse is the original |
| 49 | partial diffeomorphism, and the source scale remains the literal Q. -/ |
| 50 | theorem limitFinite_cap_end_distance_of_forward_bound |
| 51 | {M : Type u} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 52 | [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 53 | {X : Type v} [TopologicalSpace X] [ChartedSpace E X] [IsManifold (𝓡 3) ∞ X] |
| 54 | {g : RiemannianMetric 3 M} (h : RiemannianMetric 3 X) |
| 55 | (N : CapCertificate g) (phi : PartialDiffeomorph (𝓡 3) (𝓡 3) X M ∞) |
| 56 | {Q C H : ℝ} (hQ : 0 < Q) (hC : N.cap_constant ≤ C) (hH : 0 < H) |
| 57 | {x : X} (hxsource : x ∈ phi.source) (hx : phi x ∈ N.core) |
| 58 | (hscalar : Q * H ≤ N.connection.scalarCurvature (phi x)) |
| 59 | (hcapture : N.carrier ⊆ phi.target) |
| 60 | (hbound : ∀ z ∈ N.carrier, ∀ w : TangentSpace (𝓡 3) (phi.symm z), |
| 61 | h.tangentNorm (phi.symm z) w ≤ |
| 62 | 2 * (rescaledMetric g Q hQ).tangentNorm (phi (phi.symm z)) |
| 63 | (mfderiv (𝓡 3) (𝓡 3) phi (phi.symm z) w)) : |
| 64 | h.edist x (phi.symm N.end_neck.center) < |
| 65 | ENNReal.ofReal (2 * C * H ^ (-1 / 2 : ℝ)) := by |
| 66 | have hfactor : 0 < 2 * Real.sqrt Q := mul_pos two_pos (Real.sqrt_pos.mpr hQ) |
| 67 | have hinverse (z : M) (hz : z ∈ N.carrier) (w : TangentSpace (𝓡 3) z) : |
| 68 | h.tangentNorm (phi.symm z) (mfderiv (𝓡 3) (𝓡 3) phi.symm z w) ≤ |
| 69 | (2 * Real.sqrt Q) * g.tangentNorm z w := by |
| 70 | have hb := h.inverse_tangentNorm_le_of_forward_lower_bound |
| 71 | (rescaledMetric g Q hQ) phi.toOpenPartialHomeomorph |
| 72 | (phi.contMDiffOn_toFun.of_le (by simp)) |
| 73 | (phi.contMDiffOn_invFun.of_le (by simp)) (hcapture hz) (hbound z hz) w |
| 74 | change h.tangentNorm (phi.symm z) (mfderiv (𝓡 3) (𝓡 3) phi.symm z w) ≤ |
| 75 | 2 * (rescaledMetric g Q hQ).tangentNorm z w at hb |
| 76 | simpa only [rescaledMetric_tangentNorm, mul_assoc] using hb |
| 77 | have hlength := g.intrinsicEDist_image_le_mul h phi.symm N.carrier |
| 78 | (fun z hz => (phi.contMDiffOn_invFun z (hcapture hz)).contMDiffAt |
| 79 | (phi.open_target.mem_nhds (hcapture hz)) |>.of_le (by simp)) |
| 80 | hfactor hinverse (phi x) N.end_neck.center |
| 81 | have hend : N.end_neck.center ∈ N.carrier := |
| 82 | N.end_neck_subset (N.end_neck.central_sphere_subset N.end_neck.center_on_central_sphere) |
| 83 | have hdiam := cap_intrinsic_diameter_lt N hC (mul_pos hQ hH) hx hscalar |
| 84 | have hpair := intrinsicEDist_le_intrinsicDiameter (g := g) (N.core_subset_carrier' hx) hend |
| 85 | have hdist := (edist_le_intrinsicEDist (g := h) (phi.symm '' N.carrier) |
| 86 | (phi.symm (phi x)) (phi.symm N.end_neck.center)).trans hlength |
| 87 | have hleft : phi.symm (phi x) = x := phi.left_inv hxsource |
| 88 | rw [hleft] at hdist |
| 89 | calc |
| 90 | _ ≤ ENNReal.ofReal (2 * Real.sqrt Q) * intrinsicDiameter g N.carrier := |
| 91 | hdist.trans (mul_le_mul_right hpair _) |
| 92 | _ < ENNReal.ofReal (2 * Real.sqrt Q) * |
| 93 | ENNReal.ofReal (C * (Q * H) ^ (-1 / 2 : ℝ)) := |
| 94 | ENNReal.mul_lt_mul_right (ENNReal.ofReal_pos.mpr hfactor).ne' |
| 95 | ENNReal.ofReal_ne_top hdiam |
| 96 | _ = _ := by |
| 97 | rw [← ENNReal.ofReal_mul hfactor.le] |
| 98 | congr 1 |
| 99 | calc |
| 100 | (2 * Real.sqrt Q) * (C * (Q * H) ^ (-1 / 2 : ℝ)) = |
| 101 | (2 * C) * (Real.sqrt Q * (Q * H) ^ (-1 / 2 : ℝ)) := by ring |
| 102 | _ = _ := by rw [terminalCurvature_scaled_scalar_radius hQ hH] |
| 103 | |
| 104 | end PoincareMT.M47 |