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.AnnularEvolution.Plateau.Boundary.TraceEstimate |
| 2 | import Mathlib.Analysis.Normed.Module.Dual |
| 3 | |
| 4 | /-! |
| 5 | # Green's identity on the annular rectangle |
| 6 | |
| 7 | The vertical fundamental theorem of calculus identifies both horizontal |
| 8 | boundary traces. The weak compactness argument can pass this identity to |
| 9 | the limit even before continuity of that limit has been proved. |
| 10 | |
| 11 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 12 | 447-449. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set MeasureTheory |
| 18 | open scoped ContDiff Topology |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 23 | |
| 24 | /-- Compute an actual continuous Banach-valued integral using the annular product |
| 25 | coordinates. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 26 | theorem m64AnnulusInteriorIntegral_eq_iterated_vector (f : LoopPlane → F) |
| 27 | (hf : Continuous f) : |
| 28 | (∫ p in interior m64AnnulusDomain, f p) = |
| 29 | ∫ x in Icc (0 : ℝ) curvePeriod, ∫ s in Icc (0 : ℝ) 1, f (annulusPoint x s) := by |
| 30 | have hfi : IntegrableOn f (interior m64AnnulusDomain) volume := |
| 31 | hf.continuousOn.integrableOn_compact m64AnnulusDomain_isCompact |
| 32 | |>.mono_set interior_subset |
| 33 | have hc : Continuous (fun q : ℝ × ℝ => f (annulusPoint q.1 q.2)) := by |
| 34 | apply hf.comp |
| 35 | unfold annulusPoint |
| 36 | fun_prop |
| 37 | have hInt : Integrable (fun q : ℝ × ℝ => f (annulusPoint q.1 q.2)) |
| 38 | ((volume.restrict (Icc (0 : ℝ) curvePeriod)).prod |
| 39 | (volume.restrict (Icc (0 : ℝ) 1))) := by |
| 40 | rw [Measure.prod_restrict] |
| 41 | exact hc.continuousOn.integrableOn_compact (isCompact_Icc.prod isCompact_Icc) |
| 42 | have hs (x : ℝ) : IntegrableOn (fun s => f (annulusPoint x s)) (Icc (0 : ℝ) 1) volume := by |
| 43 | have hh : Continuous (fun s => f (annulusPoint x s)) := by |
| 44 | apply hf.comp |
| 45 | unfold annulusPoint |
| 46 | fun_prop |
| 47 | exact hh.integrableOn_Icc |
| 48 | apply (SeparatingDual.eq_iff_forall_dual_eq (R := ℝ)).mpr |
| 49 | intro L |
| 50 | rw [← L.integral_comp_comm hfi, ← L.integral_comp_comm hInt.integral_prod_left] |
| 51 | simp_rw [← L.integral_comp_comm (hs _)] |
| 52 | exact m64AnnulusInteriorIntegral_eq_iterated (fun p => L (f p)) (L.continuous.comp hf) |
| 53 | |
| 54 | /-- Integrating the actual radial derivative gives the two literal radial boundary values. |
| 55 | Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 56 | theorem m64Annulus_integral_vertical_derivative |
| 57 | {f : LoopPlane → F} (hf : ContDiff ℝ 1 f) : |
| 58 | (∫ p in interior m64AnnulusDomain, |
| 59 | fderiv ℝ f p (EuclideanSpace.single (1 : Fin 2) 1)) = |
| 60 | ∫ x in Icc (0 : ℝ) curvePeriod, f (annulusPoint x 1) - f (annulusPoint x 0) := by |
| 61 | let D : LoopPlane → F := fun p => fderiv ℝ f p (EuclideanSpace.single (1 : Fin 2) 1) |
| 62 | have hD : Continuous D := (hf.continuous_fderiv (by simp)).clm_apply continuous_const |
| 63 | rw [m64AnnulusInteriorIntegral_eq_iterated_vector D hD] |
| 64 | apply integral_congr_ae |
| 65 | filter_upwards [] with x |
| 66 | have hd : Continuous (fun s => D (annulusPoint x s)) := by |
| 67 | apply hD.comp |
| 68 | unfold annulusPoint |
| 69 | fun_prop |
| 70 | have hder (s : ℝ) : HasDerivAt (fun t => f (annulusPoint x t)) |
| 71 | (D (annulusPoint x s)) s := |
| 72 | (hf.differentiable (by simp) _).hasFDerivAt.comp_hasDerivAt s |
| 73 | (m64AnnulusPoint_vertical_hasDerivAt x s) |
| 74 | rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le zero_le_one] |
| 75 | exact intervalIntegral.integral_eq_sub_of_hasDerivAt (fun s _ => hder s) |
| 76 | (hd.intervalIntegrable 0 1) |
| 77 | |
| 78 | /-- The actual radial product derivative gives the rectangle Green identity. Proof expansion |
| 79 | for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 80 | theorem m64Annulus_vertical_green_identity |
| 81 | {f : LoopPlane → F} {phi : LoopPlane → ℝ} |
| 82 | (hf : ContDiff ℝ 1 f) (hphi : ContDiff ℝ 1 phi) : |
| 83 | (∫ p in interior m64AnnulusDomain, |
| 84 | phi p • fderiv ℝ f p (EuclideanSpace.single (1 : Fin 2) 1)) + |
| 85 | (∫ p in interior m64AnnulusDomain, |
| 86 | fderiv ℝ phi p (EuclideanSpace.single (1 : Fin 2) 1) • f p) = |
| 87 | ∫ x in Icc (0 : ℝ) curvePeriod, |
| 88 | phi (annulusPoint x 1) • f (annulusPoint x 1) - |
| 89 | phi (annulusPoint x 0) • f (annulusPoint x 0) := by |
| 90 | let v : LoopPlane := EuclideanSpace.single (1 : Fin 2) 1 |
| 91 | have hdf : Continuous (fun p => fderiv ℝ f p v) := |
| 92 | (hf.continuous_fderiv (by simp)).clm_apply continuous_const |
| 93 | have hdp : Continuous (fun p => fderiv ℝ phi p v) := |
| 94 | (hphi.continuous_fderiv (by simp)).clm_apply continuous_const |
| 95 | have hleft : IntegrableOn (fun p => phi p • fderiv ℝ f p v) |
| 96 | (interior m64AnnulusDomain) volume := |
| 97 | (hphi.continuous.smul hdf).continuousOn.integrableOn_compact |
| 98 | m64AnnulusDomain_isCompact |>.mono_set interior_subset |
| 99 | have hright : IntegrableOn (fun p => fderiv ℝ phi p v • f p) |
| 100 | (interior m64AnnulusDomain) volume := |
| 101 | (hdp.smul hf.continuous).continuousOn.integrableOn_compact |
| 102 | m64AnnulusDomain_isCompact |>.mono_set interior_subset |
| 103 | rw [← integral_add hleft hright] |
| 104 | have hprod (p : LoopPlane) : |
| 105 | fderiv ℝ (fun q => phi q • f q) p v = |
| 106 | phi p • fderiv ℝ f p v + fderiv ℝ phi p v • f p := by |
| 107 | rw [fderiv_fun_smul (hphi.differentiable (by simp) p) |
| 108 | (hf.differentiable (by simp) p), add_apply, smul_apply, |
| 109 | ContinuousLinearMap.smulRight_apply] |
| 110 | calc |
| 111 | _ = ∫ p in interior m64AnnulusDomain, fderiv ℝ (fun q => phi q • f q) p v := |
| 112 | integral_congr_ae (Filter.Eventually.of_forall fun p => (hprod p).symm) |
| 113 | _ = _ := m64Annulus_integral_vertical_derivative (hphi.smul hf) |
| 114 | |
| 115 | end PoincareMT |