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.Local.ConeInterpolator |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Boundary.TraceEstimate |
| 3 | |
| 4 | /-! |
| 5 | # Actual short-circle contractions and their Dirichlet density |
| 6 | |
| 7 | The constant-to-circle short-geodesic rectangle has angular derivative |
| 8 | bounded by the boundary speed and radial derivative equal to the endpoint |
| 9 | distance. Its two actual Gram columns give the energy estimate. |
| 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 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Bundle |
| 19 | open scoped Manifold ContDiff Topology Bundle ENNReal |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 25 | |
| 26 | /-- The actual vertical derivative column equals the derivative of the literal radial slice. |
| 27 | Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 28 | theorem m64_local_cone_vertical_column_eq_slice {f : LoopPlane → M} {p : LoopPlane} |
| 29 | (hf : MDifferentiableAt (𝓡 2) (𝓡 n) f p) : |
| 30 | mfderiv (𝓡 2) (𝓡 n) f p (EuclideanSpace.basisFun (Fin 2) ℝ 1) = |
| 31 | mfderiv 𝓘(ℝ, ℝ) (𝓡 n) (fun s => f (annulusPoint (p 0) s)) (p 1) 1 := by |
| 32 | have hline : HasDerivAt (annulusPoint (p 0)) |
| 33 | (EuclideanSpace.basisFun (Fin 2) ℝ 1) (p 1) := by |
| 34 | convert m64AnnulusPoint_vertical_hasDerivAt (p 0) (p 1) using 1 |
| 35 | ext i |
| 36 | fin_cases i <;> simp [EuclideanSpace.basisFun_apply] |
| 37 | have hp : annulusPoint (p 0) (p 1) = p := by ext i; fin_cases i <;> rfl |
| 38 | have hd : mfderiv 𝓘(ℝ, ℝ) (𝓡 2) (annulusPoint (p 0)) (p 1) 1 = |
| 39 | EuclideanSpace.basisFun (Fin 2) ℝ 1 := by |
| 40 | simpa +instances only [mfderiv_eq_fderiv, fderiv_apply_one_eq_deriv] using! hline.deriv |
| 41 | have hc := mfderiv_comp_apply_of_eq (p 1) hf |
| 42 | hline.differentiableAt.mdifferentiableAt hp (1 : ℝ) |
| 43 | rw [hd] at hc |
| 44 | exact hc.symm |
| 45 | |
| 46 | variable [IsManifold (𝓡 n) ∞ M] [T2Space M] |
| 47 | |
| 48 | /-- Uniform short interpolation constructs actual constant-to-circle rectangles with a |
| 49 | pointwise energy bound. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 50 | theorem m64_exists_local_cone_rectangles |
| 51 | (g : RiemannianMetric n M) (hcompact : IsCompact (univ : Set M)) : |
| 52 | ∃ delta : ℝ, 0 < delta ∧ ∃ B : ℝ, 0 ≤ B ∧ |
| 53 | ∀ (gamma : ℝ → M) (center : M), ContMDiff 𝓘(ℝ, ℝ) (𝓡 n) 1 gamma → |
| 54 | Function.Periodic gamma curvePeriod → |
| 55 | (∀ x, g.edist center (gamma x) ≤ ENNReal.ofReal delta) → |
| 56 | ∃ f : LoopPlane → M, |
| 57 | (∀ p ∈ m64AnnulusDomain, ContMDiffAt (𝓡 2) (𝓡 n) 1 f p) ∧ |
| 58 | (∀ x s, f (annulusPoint (x + curvePeriod) s) = f (annulusPoint x s)) ∧ |
| 59 | (∀ x, f (annulusPoint x 0) = center) ∧ |
| 60 | (∀ x, f (annulusPoint x 1) = gamma x) ∧ |
| 61 | ∀ p ∈ m64AnnulusDomain, |
| 62 | m60EnergyDensity g f p ≤ |
| 63 | (B ^ 2 * (g.tangentNorm (gamma (p 0)) (curveVelocity gamma (p 0))) ^ 2 + |
| 64 | (g.edist center (gamma (p 0))).toReal ^ 2) / 2 := by |
| 65 | let : LocallyCompactSpace M := |
| 66 | ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) M |
| 67 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 68 | ⟨g.toRiemannianMetric⟩ |
| 69 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 70 | (TangentSpace (𝓡 n) : M → Type _) := |
| 71 | ⟨⟨g.inner, g.contMDiff.continuous, fun _ _ _ => rfl⟩⟩ |
| 72 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 73 | obtain ⟨r, hr, B, hB, H, hH, hgeom, _⟩ := m64_exists_local_cone_interpolator g hcompact |
| 74 | have hU : IsOpen {pq : M × M | g.edist pq.1 pq.2 < ENNReal.ofReal r} := |
| 75 | isOpen_lt continuous_edist continuous_const |
| 76 | refine ⟨r / 2, half_pos hr, B, hB, ?_⟩ |
| 77 | intro gamma center hgamma hperiod hshort |
| 78 | let f : LoopPlane → M := fun p => H (p 1, center, gamma (p 0)) |
| 79 | have hHat (p : LoopPlane) (hp : p ∈ m64AnnulusDomain) : |
| 80 | ContMDiffAt (𝓘(ℝ, ℝ).prod ((𝓡 n).prod (𝓡 n))) (𝓡 n) 1 H |
| 81 | (p 1, center, gamma (p 0)) := by |
| 82 | apply (hH.contMDiffAt ((isOpen_Ioo.prod hU).mem_nhds ?_)).of_le (by simp) |
| 83 | exact ⟨⟨by linarith [hp.2.2.1], by linarith [hp.2.2.2]⟩, |
| 84 | (hshort (p 0)).trans_lt ((ENNReal.ofReal_lt_ofReal_iff hr).mpr (by linarith))⟩ |
| 85 | have hfat (p : LoopPlane) (hp : p ∈ m64AnnulusDomain) : |
| 86 | ContMDiffAt (𝓡 2) (𝓡 n) 1 f p := by |
| 87 | have hp0 : ContMDiffAt (𝓡 2) 𝓘(ℝ, ℝ) 1 (fun z : LoopPlane => z 0) p := |
| 88 | (PiLp.proj (𝕜 := ℝ) 2 (fun _ : Fin 2 => ℝ) 0).contDiff.contMDiff.contMDiffAt |
| 89 | have hp1 : ContMDiffAt (𝓡 2) 𝓘(ℝ, ℝ) 1 (fun z : LoopPlane => z 1) p := |
| 90 | (PiLp.proj (𝕜 := ℝ) 2 (fun _ : Fin 2 => ℝ) 1).contDiff.contMDiff.contMDiffAt |
| 91 | exact (hHat p hp).comp p (hp1.prodMk |
| 92 | (contMDiffAt_const.prodMk (hgamma.contMDiffAt.comp p hp0))) |
| 93 | refine ⟨f, hfat, ?_, ?_, ?_, ?_⟩ |
| 94 | · intro x s |
| 95 | change H (s, center, gamma (x + curvePeriod)) = H (s, center, gamma x) |
| 96 | rw [hperiod x] |
| 97 | · intro x |
| 98 | exact (hgeom center (gamma x) (hshort x)).1 |
| 99 | · intro x |
| 100 | exact (hgeom center (gamma x) (hshort x)).2.1 |
| 101 | · intro p hp |
| 102 | have htime : p 1 ∈ Icc (0 : ℝ) 1 := ⟨hp.2.2.1, hp.2.2.2⟩ |
| 103 | have hhor : g.tangentNorm (f p) |
| 104 | (mfderiv (𝓡 2) (𝓡 n) f p (EuclideanSpace.basisFun (Fin 2) ℝ 0)) ≤ |
| 105 | B * g.tangentNorm (gamma (p 0)) (curveVelocity gamma (p 0)) := by |
| 106 | rw [m64_interpolator_horizontal_column_eq (gamma := fun _ => center) |
| 107 | (beta := gamma) p mdifferentiableAt_const |
| 108 | (hgamma.mdifferentiable one_ne_zero _) ((hHat p hp).mdifferentiableAt one_ne_zero)] |
| 109 | have hz : curveVelocity (n := n) (fun _ : ℝ => center) (p 0) = 0 := by |
| 110 | simp only [curveVelocity, mfderiv_const, zero_apply] |
| 111 | rw [hz] |
| 112 | exact (hgeom center (gamma (p 0)) (hshort (p 0))).2.2.2 (p 1) htime _ |
| 113 | have hver : g.tangentNorm (f p) |
| 114 | (mfderiv (𝓡 2) (𝓡 n) f p (EuclideanSpace.basisFun (Fin 2) ℝ 1)) = |
| 115 | (g.edist center (gamma (p 0))).toReal := by |
| 116 | rw [m64_local_cone_vertical_column_eq_slice ((hfat p hp).mdifferentiableAt one_ne_zero)] |
| 117 | exact (hgeom center (gamma (p 0)) (hshort (p 0))).2.2.1 (p 1) htime |
| 118 | have hnonneg : 0 ≤ g.tangentNorm (f p) |
| 119 | (mfderiv (𝓡 2) (𝓡 n) f p (EuclideanSpace.basisFun (Fin 2) ℝ 0)) := |
| 120 | Real.sqrt_nonneg _ |
| 121 | have hsquare := mul_self_le_mul_self hnonneg hhor |
| 122 | have hgram (i : Fin 2) : m60AreaGram g f p i i = |
| 123 | (g.tangentNorm (f p) |
| 124 | (mfderiv (𝓡 2) (𝓡 n) f p (EuclideanSpace.basisFun (Fin 2) ℝ i))) ^ 2 := by |
| 125 | change inner ℝ (mfderiv (𝓡 2) (𝓡 n) f p (EuclideanSpace.basisFun (Fin 2) ℝ i)) |
| 126 | (mfderiv (𝓡 2) (𝓡 n) f p (EuclideanSpace.basisFun (Fin 2) ℝ i)) = |
| 127 | ‖mfderiv (𝓡 2) (𝓡 n) f p (EuclideanSpace.basisFun (Fin 2) ℝ i)‖ ^ 2 |
| 128 | exact real_inner_self_eq_norm_sq _ |
| 129 | rw [m60EnergyDensity, Matrix.trace_fin_two, hgram 0, hgram 1, hver] |
| 130 | nlinarith |
| 131 | |
| 132 | end PoincareMT |