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.Volume.LossData |
| 2 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Measure.Coordinates.PullbackJacobian |
| 3 | |
| 4 | /-! |
| 5 | Adapted from Mapher `PoincareMT/Proofs/M49/RegularLimitDensity.lean` at |
| 6 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 7 | |
| 8 | # Actual chart-density convergence on the regular-limit region |
| 9 | |
| 10 | Morgan-Tian Theorem 11.19(1), p. 279, and Lemma 11.21, p. 280, |
| 11 | supply smooth convergence on the open regular region. The frozen event |
| 12 | predicate yields pointwise Gram-coefficient and volume-density limits, |
| 13 | used in Lemma 17.12, p. 410. See the stage-6 task derivation. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.SurgeryVolume |
| 24 | |
| 25 | /-- Open region identifications give the actual partial homeomorphism |
| 26 | used for the regular-limit charts (MT Theorem 11.19, p. 279). -/ |
| 27 | def regionOpenPartialHomeomorph {A B : GeneralizedSliceCarrier.{u}} |
| 28 | {U : Set A.carrier} {V : Set B.carrier} (E : SurgeryRegionEquivalence A B U V) |
| 29 | (hU : IsOpen U) (hV : IsOpen V) : OpenPartialHomeomorph A.carrier B.carrier where |
| 30 | toFun := E.map |
| 31 | invFun := E.inverse |
| 32 | source := U |
| 33 | target := V |
| 34 | map_source' := by |
| 35 | intro x hx |
| 36 | exact E.map_image.subset (mem_image_of_mem E.map hx) |
| 37 | map_target' := by |
| 38 | intro x hx |
| 39 | exact E.inverse_image.subset (mem_image_of_mem E.inverse hx) |
| 40 | left_inv' := E.left_inverse |
| 41 | right_inv' := E.right_inverse |
| 42 | open_source := hU |
| 43 | open_target := hV |
| 44 | continuousOn_toFun := E.map_smooth.continuousOn |
| 45 | continuousOn_invFun := E.inverse_smooth.continuousOn |
| 46 | |
| 47 | variable {A B : GeneralizedSliceCarrier.{u}} |
| 48 | {g : ℝ → RiemannianMetric 3 A.carrier} {gT : RiemannianMetric 3 B.carrier} |
| 49 | {f : A.carrier → B.carrier} {U : Set A.carrier} {T : ℝ} |
| 50 | |
| 51 | /-- The zeroth-order part of compact smooth convergence gives the |
| 52 | actual coefficient limit (MT Theorem 11.19(1), p. 279; Lemma 11.21, p. 280). -/ |
| 53 | theorem surgeryMetricLimitOn_coefficient_tendsto |
| 54 | (h : SurgeryMetricLimitOn A B g gT f U T) {q : A.carrier} (hq : q ∈ U) |
| 55 | {x : EuclideanSpace ℝ (Fin 3)} (hx : x ∈ (extChartAt (𝓡 3) q).target) |
| 56 | (hxU : (extChartAt (𝓡 3) q).symm x ∈ U) (i j : Fin 3) : |
| 57 | Tendsto (fun t => singularMetricCoefficient (g t) q i j x) (𝓝[<] T) |
| 58 | (𝓝 (surgeryMetricCoefficient gT |
| 59 | (fun z => f ((extChartAt (𝓡 3) q).symm z)) i j x)) := by |
| 60 | apply Metric.tendsto_nhds.mpr |
| 61 | intro ε hε |
| 62 | obtain ⟨d, hd, hbound⟩ := h q hq {x} isCompact_singleton |
| 63 | (singleton_subset_iff.mpr hx) |
| 64 | (by simpa only [image_singleton, singleton_subset_iff] using hxU) 0 i j ε hε |
| 65 | filter_upwards [Ioo_mem_nhdsLT (show T - d < T by linarith)] with t ht |
| 66 | have hb := hbound t ht.1 ht.2 x (mem_singleton x) |
| 67 | rw [dist_eq_norm] |
| 68 | simpa only [iteratedFDeriv_zero_eq_comp, Function.comp_apply, ← map_sub, |
| 69 | LinearIsometryEquiv.norm_map] using hb |
| 70 | |
| 71 | -- The metric form's dependent bilinear coercions require reducible transparency. |
| 72 | set_option backward.isDefEq.respectTransparency false in |
| 73 | /-- Actual Gram Jacobians converge with the regular-limit coefficients |
| 74 | (MT Theorem 11.19(1), p. 279, used in Lemma 17.12, p. 410). -/ |
| 75 | theorem surgeryMetricLimitOn_jacobian_tendsto |
| 76 | (h : SurgeryMetricLimitOn A B g gT f U T) {q : A.carrier} (hq : q ∈ U) |
| 77 | {x : EuclideanSpace ℝ (Fin 3)} (hx : x ∈ (extChartAt (𝓡 3) q).target) |
| 78 | (hxU : (extChartAt (𝓡 3) q).symm x ∈ U) : |
| 79 | Tendsto (fun t => SurgeryVolume.Measure.pullbackJacobian (g t) (extChartAt (𝓡 3) q).symm x) |
| 80 | (𝓝[<] T) |
| 81 | (𝓝 (SurgeryVolume.Measure.pullbackJacobian gT (fun z => f ((extChartAt (𝓡 3) q).symm z)) x)) := by |
| 82 | have hentry (i j : Fin 3) := surgeryMetricLimitOn_coefficient_tendsto h hq hx hxU i j |
| 83 | have hmatrix := tendsto_pi_nhds.mpr (fun i => tendsto_pi_nhds.mpr (hentry i)) |
| 84 | have hdet := (continuous_id.matrix_det.tendsto _).comp hmatrix |
| 85 | have hsqrt := (Real.continuous_sqrt.tendsto _).comp hdet |
| 86 | simpa only [SurgeryVolume.Measure.pullbackJacobian, SurgeryVolume.Measure.pullbackMetricForm, |
| 87 | ContinuousLinearMap.bilinearComp_apply, singularMetricCoefficient, |
| 88 | singularTensorCoefficient, surgeryMetricCoefficient, Matrix.cons_val_zero, |
| 89 | Matrix.cons_val_one, Matrix.head_cons, Function.comp_def, id_eq] using! hsqrt |
| 90 | |
| 91 | end PoincareMT.SurgeryVolume |