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.Lipschitz.RectangleGreen |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Lipschitz.ObservedColumns |
| 3 | |
| 4 | /-! |
| 5 | # Vector Green identities for admissible observations |
| 6 | |
| 7 | The scalar Lipschitz identities pass through each Euclidean coordinate. |
| 8 | Integrability of every displayed vector term is established first. |
| 9 | |
| 10 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 11 | 447-449. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter MeasureTheory |
| 18 | open scoped Topology ENNReal NNReal ContDiff |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | variable {m : ℕ} |
| 23 | local notation "E" => EuclideanSpace ℝ (Fin m) |
| 24 | local notation "S" => interior m64AnnulusDomain |
| 25 | local notation "mu" => volume.restrict S |
| 26 | |
| 27 | /-- The actual vector Green pairings are integrable before applying coordinate identities. |
| 28 | Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 29 | theorem m64_lipschitz_vector_green_integrable {f : LoopPlane → E} {phi : LoopPlane → ℝ} |
| 30 | {K : ℝ≥0} (hf : LipschitzOnWith K f m64AnnulusDomain) |
| 31 | (hdiff : ∀ᵐ p ∂mu, DifferentiableAt ℝ f p) (hphi : ContDiff ℝ 1 phi) (i : Fin 2) : |
| 32 | IntegrableOn (fun p => phi p • fderiv ℝ f p (EuclideanSpace.single i 1)) S volume ∧ |
| 33 | IntegrableOn (fun p => fderiv ℝ phi p (EuclideanSpace.single i 1) • f p) S volume := by |
| 34 | constructor |
| 35 | · apply Integrable.of_eval_piLp |
| 36 | intro b |
| 37 | have hh := (m64_lipschitz_green_integrable (m64_lipschitz_coordinate hf b) hphi i).1 |
| 38 | apply hh.congr |
| 39 | filter_upwards [m64_vector_partial_coordinate_ae hdiff i b] with p hp |
| 40 | simpa only [PiLp.smul_apply, smul_eq_mul] using congrArg (fun t : ℝ => phi p * t) hp |
| 41 | · apply Integrable.of_eval_piLp |
| 42 | intro b |
| 43 | simpa only [IntegrableOn, PiLp.smul_apply, smul_eq_mul] using |
| 44 | (m64_lipschitz_green_integrable (m64_lipschitz_coordinate hf b) hphi i).2 |
| 45 | |
| 46 | /-- The actual vector-valued Lipschitz rectangle map satisfies the vertical Green identity. |
| 47 | Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 48 | theorem m64Annulus_vertical_green_lipschitzOn_vector |
| 49 | {f : LoopPlane → E} {phi : LoopPlane → ℝ} {K : ℝ≥0} |
| 50 | (hf : LipschitzOnWith K f m64AnnulusDomain) |
| 51 | (hdiff : ∀ᵐ p ∂mu, DifferentiableAt ℝ f p) (hphi : ContDiff ℝ 1 phi) : |
| 52 | (∫ p in S, phi p • fderiv ℝ f p (EuclideanSpace.single (1 : Fin 2) 1)) + |
| 53 | (∫ p in S, fderiv ℝ phi p (EuclideanSpace.single (1 : Fin 2) 1) • f p) = |
| 54 | ∫ x in Icc (0 : ℝ) curvePeriod, |
| 55 | phi (annulusPoint x 1) • f (annulusPoint x 1) - |
| 56 | phi (annulusPoint x 0) • f (annulusPoint x 0) := by |
| 57 | obtain ⟨hleft, hright⟩ := m64_lipschitz_vector_green_integrable hf hdiff hphi 1 |
| 58 | have htrace (s : ℝ) (hs : s ∈ Icc (0 : ℝ) 1) : |
| 59 | ContinuousOn (fun x => f (annulusPoint x s)) (Icc (0 : ℝ) curvePeriod) := |
| 60 | hf.continuousOn.comp (m64AnnulusPoint_horizontal_lipschitz s).continuous.continuousOn |
| 61 | (fun x hx => ⟨hx.1, hx.2, hs.1, hs.2⟩) |
| 62 | have hp (s : ℝ) : Continuous (fun x => phi (annulusPoint x s)) := |
| 63 | hphi.continuous.comp (m64AnnulusPoint_horizontal_lipschitz s).continuous |
| 64 | have hb : IntegrableOn (fun x => phi (annulusPoint x 1) • f (annulusPoint x 1) - |
| 65 | phi (annulusPoint x 0) • f (annulusPoint x 0)) (Icc (0 : ℝ) curvePeriod) volume := |
| 66 | (((hp 1).continuousOn.smul (htrace 1 (by norm_num))).sub |
| 67 | ((hp 0).continuousOn.smul (htrace 0 (by norm_num)))).integrableOn_compact isCompact_Icc |
| 68 | apply PiLp.ext |
| 69 | intro b |
| 70 | rw [PiLp.add_apply, eval_integral_piLp hleft.eval_piLp b, |
| 71 | eval_integral_piLp hright.eval_piLp b, eval_integral_piLp hb.eval_piLp b] |
| 72 | simp only [PiLp.smul_apply, PiLp.sub_apply, smul_eq_mul] |
| 73 | have hc : (∫ p in S, phi p * |
| 74 | fderiv ℝ (fun q => f q b) p (EuclideanSpace.single (1 : Fin 2) 1)) = |
| 75 | ∫ p in S, phi p * (fderiv ℝ f p (EuclideanSpace.single (1 : Fin 2) 1)) b := |
| 76 | integral_congr_ae ((m64_vector_partial_coordinate_ae hdiff 1 b).mono |
| 77 | fun p hp => congrArg (fun t : ℝ => phi p * t) hp) |
| 78 | rw [← hc] |
| 79 | exact m64Annulus_vertical_green_lipschitzOn (m64_lipschitz_coordinate hf b) hphi |
| 80 | |
| 81 | /-- The actual vector-valued Lipschitz rectangle map satisfies the horizontal Green |
| 82 | identity. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 83 | theorem m64Annulus_horizontal_green_lipschitzOn_vector |
| 84 | {f : LoopPlane → E} {phi : LoopPlane → ℝ} {K : ℝ≥0} |
| 85 | (hf : LipschitzOnWith K f m64AnnulusDomain) |
| 86 | (hdiff : ∀ᵐ p ∂mu, DifferentiableAt ℝ f p) (hphi : ContDiff ℝ 1 phi) : |
| 87 | (∫ p in S, phi p • fderiv ℝ f p (EuclideanSpace.single (0 : Fin 2) 1)) + |
| 88 | (∫ p in S, fderiv ℝ phi p (EuclideanSpace.single (0 : Fin 2) 1) • f p) = |
| 89 | ∫ s in Icc (0 : ℝ) 1, |
| 90 | phi (annulusPoint curvePeriod s) • f (annulusPoint curvePeriod s) - |
| 91 | phi (annulusPoint 0 s) • f (annulusPoint 0 s) := by |
| 92 | obtain ⟨hleft, hright⟩ := m64_lipschitz_vector_green_integrable hf hdiff hphi 0 |
| 93 | have htrace (x : ℝ) (hx : x ∈ Icc (0 : ℝ) curvePeriod) : |
| 94 | ContinuousOn (fun s => f (annulusPoint x s)) (Icc (0 : ℝ) 1) := |
| 95 | hf.continuousOn.comp (m64AnnulusPoint_vertical_lipschitz x).continuous.continuousOn |
| 96 | (fun s hs => ⟨hx.1, hx.2, hs.1, hs.2⟩) |
| 97 | have hp (x : ℝ) : Continuous (fun s => phi (annulusPoint x s)) := |
| 98 | hphi.continuous.comp (m64AnnulusPoint_vertical_lipschitz x).continuous |
| 99 | have hP : 0 ≤ curvePeriod := by unfold curvePeriod; positivity |
| 100 | have hb : IntegrableOn (fun s => phi (annulusPoint curvePeriod s) • |
| 101 | f (annulusPoint curvePeriod s) - phi (annulusPoint 0 s) • f (annulusPoint 0 s)) |
| 102 | (Icc (0 : ℝ) 1) volume := |
| 103 | (((hp curvePeriod).continuousOn.smul (htrace curvePeriod ⟨hP, le_rfl⟩)).sub |
| 104 | ((hp 0).continuousOn.smul (htrace 0 ⟨le_rfl, hP⟩))).integrableOn_compact isCompact_Icc |
| 105 | apply PiLp.ext |
| 106 | intro b |
| 107 | rw [PiLp.add_apply, eval_integral_piLp hleft.eval_piLp b, |
| 108 | eval_integral_piLp hright.eval_piLp b, eval_integral_piLp hb.eval_piLp b] |
| 109 | simp only [PiLp.smul_apply, PiLp.sub_apply, smul_eq_mul] |
| 110 | have hc : (∫ p in S, phi p * |
| 111 | fderiv ℝ (fun q => f q b) p (EuclideanSpace.single (0 : Fin 2) 1)) = |
| 112 | ∫ p in S, phi p * (fderiv ℝ f p (EuclideanSpace.single (0 : Fin 2) 1)) b := |
| 113 | integral_congr_ae ((m64_vector_partial_coordinate_ae hdiff 0 b).mono |
| 114 | fun p hp => congrArg (fun t : ℝ => phi p * t) hp) |
| 115 | rw [← hc] |
| 116 | exact m64Annulus_horizontal_green_lipschitzOn (m64_lipschitz_coordinate hf b) hphi |
| 117 | |
| 118 | /-- Matching actual map and test values cancel the angular boundary flux in the vector Green |
| 119 | identity. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 120 | theorem m64Annulus_periodic_green_lipschitzOn_vector |
| 121 | {f : LoopPlane → E} {phi : LoopPlane → ℝ} {K : ℝ≥0} |
| 122 | (hf : LipschitzOnWith K f m64AnnulusDomain) |
| 123 | (hdiff : ∀ᵐ p ∂mu, DifferentiableAt ℝ f p) (hphi : ContDiff ℝ 1 phi) |
| 124 | (hfseam : ∀ s ∈ Icc (0 : ℝ) 1, f (annulusPoint curvePeriod s) = f (annulusPoint 0 s)) |
| 125 | (hpseam : ∀ s ∈ Icc (0 : ℝ) 1, |
| 126 | phi (annulusPoint curvePeriod s) = phi (annulusPoint 0 s)) : |
| 127 | (∫ p in S, phi p • fderiv ℝ f p (EuclideanSpace.single (0 : Fin 2) 1)) + |
| 128 | (∫ p in S, fderiv ℝ phi p (EuclideanSpace.single (0 : Fin 2) 1) • f p) = 0 := by |
| 129 | rw [m64Annulus_horizontal_green_lipschitzOn_vector hf hdiff hphi] |
| 130 | apply integral_eq_zero_of_ae |
| 131 | filter_upwards [ae_restrict_mem measurableSet_Icc] with s hs |
| 132 | rw [hfseam s hs, hpseam s hs, sub_self] |
| 133 | rfl |
| 134 | |
| 135 | end PoincareMT |