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.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Weak.Compactness |
| 3 | import PoincareLib.Analysis.Parabolic.Quasilinear.Euclidean.Rellich |
| 4 | |
| 5 | /-! |
| 6 | # Interior strong compactness from the annular energy bound |
| 7 | |
| 8 | The cutoff argument in Morrey's weak compactness step (ICM 1950, printed |
| 9 | p. 184) reduces to the closed M03 Rellich theorem. Product-rule estimates |
| 10 | derive the bounded supported C1 family; compactness is not a hypothesis. |
| 11 | |
| 12 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 13 | 447-449. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | open Set Filter MeasureTheory |
| 21 | open scoped ContDiff Topology ENNReal |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | open EuclideanTranslationNative EuclideanMollificationNative EuclideanRellichNative |
| 26 | |
| 27 | /-- Every interior cutoff of a uniformly bounded scalar sequence with bounded annular |
| 28 | derivative energy has compact closure in L2. Proof expansion for Morgan-Tian (2007), Lemma |
| 29 | 19.15, pp. 447-449. -/ |
| 30 | theorem m64Annulus_localized_l2_isCompact |
| 31 | (f : ℕ → LoopPlane → ℝ) (hf : ∀ j, ContDiff ℝ 1 (f j)) |
| 32 | {A C : ℝ} (hA : ∀ j p, ‖f j p‖ ≤ A) |
| 33 | (hC : ∀ j (i : Fin 2), (∫ p in interior m64AnnulusDomain, |
| 34 | (fderiv ℝ (f j) p (EuclideanSpace.single i 1)) ^ 2) ≤ C) |
| 35 | (phi : LoopPlane → ℝ) (hphi : ContDiff ℝ 1 phi) |
| 36 | (hc : HasCompactSupport phi) (hs : tsupport phi ⊆ interior m64AnnulusDomain) : |
| 37 | ∃ hU : ∀ j, MemLp (fun p => phi p * f j p) 2 volume, |
| 38 | IsCompact (closure (range (fun j => (hU j).toLp (fun p => phi p * f j p)))) := by |
| 39 | let S := interior m64AnnulusDomain |
| 40 | let U : ℕ → LoopPlane → ℝ := fun j p => phi p * f j p |
| 41 | have hUc (j : ℕ) : HasCompactSupport (U j) := hc.mul_right |
| 42 | have hUd (j : ℕ) : ContDiff ℝ 1 (U j) := hphi.mul (hf j) |
| 43 | have hU (j : ℕ) : MemLp (U j) 2 volume := |
| 44 | (hUd j).continuous.memLp_of_hasCompactSupport (hUc j) |
| 45 | have hcol (j : ℕ) (i : Fin 2) : MemLp |
| 46 | (fun p => fderiv ℝ (U j) p (EuclideanSpace.single i 1)) 2 volume := |
| 47 | (((hUd j).continuous_fderiv (by simp)).clm_apply continuous_const).memLp_of_hasCompactSupport |
| 48 | ((hUc j).fderiv_apply ℝ _) |
| 49 | have hA0 : 0 ≤ A := (norm_nonneg (f 0 0)).trans (hA 0 0) |
| 50 | have hf2 (j : ℕ) (p : LoopPlane) : (f j p) ^ 2 ≤ A ^ 2 := by |
| 51 | simpa only [Real.norm_eq_abs, sq_abs] using |
| 52 | (sq_le_sq₀ (norm_nonneg (f j p)) hA0).mpr (hA j p) |
| 53 | obtain ⟨P, hP⟩ := (hc.isCompact_range hphi.continuous).isBounded.exists_norm_le |
| 54 | have hP0 : 0 ≤ P := (norm_nonneg (phi 0)).trans (hP _ (mem_range_self _)) |
| 55 | have hphi2 (p : LoopPlane) : (phi p) ^ 2 ≤ P ^ 2 := by |
| 56 | simpa only [Real.norm_eq_abs, sq_abs] using |
| 57 | (sq_le_sq₀ (norm_nonneg (phi p)) hP0).mpr (hP _ (mem_range_self _)) |
| 58 | have hphiLp : MemLp phi 2 (volume : Measure LoopPlane) := |
| 59 | hphi.continuous.memLp_of_hasCompactSupport hc |
| 60 | have hiphi : Integrable (fun p => phi p ^ 2) volume := hphiLp.integrable_sq |
| 61 | have hnorm (j : ℕ) : ‖(hU j).toLp (U j)‖ ≤ |
| 62 | Real.sqrt (max (A ^ 2 * ∫ p, phi p ^ 2) 0) := by |
| 63 | apply Real.le_sqrt_of_sq_le |
| 64 | rw [scalar_toLp_norm_sq] |
| 65 | apply le_trans _ (le_max_left _ _) |
| 66 | calc |
| 67 | (∫ p, U j p ^ 2) ≤ ∫ p, A ^ 2 * phi p ^ 2 := by |
| 68 | apply integral_mono (hU j).integrable_sq (hiphi.const_mul _) |
| 69 | intro p |
| 70 | dsimp only [U] |
| 71 | nlinarith [mul_le_mul_of_nonneg_right (hf2 j p) (sq_nonneg (phi p))] |
| 72 | _ = _ := integral_const_mul _ _ |
| 73 | have hiF (j : ℕ) (i : Fin 2) : IntegrableOn |
| 74 | (fun p => (fderiv ℝ (f j) p (EuclideanSpace.single i 1)) ^ 2) S := |
| 75 | ((((hf j).continuous_fderiv (by simp)).clm_apply continuous_const).pow 2).continuousOn |
| 76 | |>.integrableOn_compact m64AnnulusDomain_isCompact |>.mono_set interior_subset |
| 77 | have hphiCol (i : Fin 2) : MemLp |
| 78 | (fun p => fderiv ℝ phi p (EuclideanSpace.single i 1)) 2 volume := |
| 79 | ((hphi.continuous_fderiv (by simp)).clm_apply continuous_const).memLp_of_hasCompactSupport |
| 80 | (hc.fderiv_apply ℝ _) |
| 81 | have hiPhi (i : Fin 2) : IntegrableOn |
| 82 | (fun p => (fderiv ℝ phi p (EuclideanSpace.single i 1)) ^ 2) S := |
| 83 | (hphiCol i).integrable_sq.integrableOn |
| 84 | let Q (i : Fin 2) : ℝ := |
| 85 | ∫ p in S, (fderiv ℝ phi p (EuclideanSpace.single i 1)) ^ 2 |
| 86 | have hder (j : ℕ) (i : Fin 2) : |
| 87 | (∫ p, (fderiv ℝ (U j) p (EuclideanSpace.single i 1)) ^ 2) ≤ |
| 88 | 2 * (P ^ 2 * C + A ^ 2 * Q i) := by |
| 89 | have hpoint (p : LoopPlane) : |
| 90 | (fderiv ℝ (U j) p (EuclideanSpace.single i 1)) ^ 2 ≤ |
| 91 | 2 * (P ^ 2 * (fderiv ℝ (f j) p (EuclideanSpace.single i 1)) ^ 2 + |
| 92 | A ^ 2 * (fderiv ℝ phi p (EuclideanSpace.single i 1)) ^ 2) := by |
| 93 | dsimp only [U] |
| 94 | rw [fderiv_fun_mul (hphi.differentiable (by simp) p) ((hf j).differentiable (by simp) p)] |
| 95 | simp only [add_apply, smul_apply, smul_eq_mul] |
| 96 | nlinarith [sq_nonneg (phi p * fderiv ℝ (f j) p (EuclideanSpace.single i 1) - |
| 97 | f j p * fderiv ℝ phi p (EuclideanSpace.single i 1)), |
| 98 | mul_le_mul_of_nonneg_right (hphi2 p) |
| 99 | (sq_nonneg (fderiv ℝ (f j) p (EuclideanSpace.single i 1))), |
| 100 | mul_le_mul_of_nonneg_right (hf2 j p) |
| 101 | (sq_nonneg (fderiv ℝ phi p (EuclideanSpace.single i 1)))] |
| 102 | calc |
| 103 | _ = ∫ p in S, (fderiv ℝ (U j) p (EuclideanSpace.single i 1)) ^ 2 := by |
| 104 | symm |
| 105 | apply setIntegral_eq_integral_of_forall_compl_eq_zero |
| 106 | intro p hp |
| 107 | have hpU : p ∉ tsupport (U j) := fun h => hp (hs (tsupport_mul_subset_left h)) |
| 108 | rw [fderiv_of_notMem_tsupport ℝ hpU] |
| 109 | simp |
| 110 | _ ≤ ∫ p in S, 2 * (P ^ 2 * (fderiv ℝ (f j) p (EuclideanSpace.single i 1)) ^ 2 + |
| 111 | A ^ 2 * (fderiv ℝ phi p (EuclideanSpace.single i 1)) ^ 2) := |
| 112 | integral_mono (hcol j i).integrable_sq.integrableOn |
| 113 | ((((hiF j i).const_mul _).add ((hiPhi i).const_mul _)).const_mul 2) hpoint |
| 114 | _ = 2 * (P ^ 2 * (∫ p in S, |
| 115 | (fderiv ℝ (f j) p (EuclideanSpace.single i 1)) ^ 2) + A ^ 2 * Q i) := by |
| 116 | rw [integral_const_mul, integral_add ((hiF j i).const_mul _) ((hiPhi i).const_mul _), |
| 117 | integral_const_mul, integral_const_mul] |
| 118 | _ ≤ _ := by gcongr; exact hC j i |
| 119 | let D := Real.sqrt (max (4 * P ^ 2 * C + 2 * A ^ 2 * (Q 0 + Q 1)) 0) |
| 120 | have henergy (j : ℕ) : gradientEnergy (U j) ≤ D ^ 2 := by |
| 121 | dsimp only [gradientEnergy] |
| 122 | rw [Fin.sum_univ_two] |
| 123 | have hle : (∫ p, (fderiv ℝ (U j) p (EuclideanSpace.single 0 1)) ^ 2) + |
| 124 | (∫ p, (fderiv ℝ (U j) p (EuclideanSpace.single 1 1)) ^ 2) ≤ |
| 125 | 4 * P ^ 2 * C + 2 * A ^ 2 * (Q 0 + Q 1) := by |
| 126 | linarith [hder j 0, hder j 1] |
| 127 | exact hle.trans (by dsimp [D]; rw [Real.sq_sqrt (le_max_right _ _)]; exact le_max_left _ _) |
| 128 | refine ⟨hU, isCompact_closure_supported_C1 (n := 2) hc (D := D) |
| 129 | (R := Real.sqrt (max (A ^ 2 * ∫ p, phi p ^ 2) 0)) (Real.sqrt_nonneg _) ?_ ?_⟩ |
| 130 | · rintro _ ⟨j, rfl⟩ |
| 131 | exact hnorm j |
| 132 | · rintro _ ⟨j, rfl⟩ |
| 133 | refine ⟨U j, hUd j, hU j, hcol j, ?_, rfl, henergy j⟩ |
| 134 | intro p hp |
| 135 | dsimp only [U] |
| 136 | rw [image_eq_zero_of_notMem_tsupport hp, zero_mul] |
| 137 | |
| 138 | end PoincareMT |