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.Soliton.TwoDimensional.Compact.Rigidity.Jacobi.NoInteriorZero |
| 2 | |
| 3 | /-! |
| 4 | # No turning point before the end of a minimizing soliton geodesic |
| 5 | |
| 6 | Starting at a nondegenerate critical point of the soliton potential, a |
| 7 | minimizing geodesic has no interior zero of the derivative of the potential. |
| 8 | The scalar Jacobi equation and the second variation prove this directly. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | |
| 17 | namespace PoincareMT.LeviCivitaData |
| 18 | |
| 19 | variable {M : Type*} [TopologicalSpace M] [T2Space M] [PreconnectedSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 21 | {g : RiemannianMetric 2 M} |
| 22 | |
| 23 | omit [T2Space M] [PreconnectedSpace M] [IsManifold (𝓡 2) ∞ M] in |
| 24 | /-- Differentiation of a scalar function along a smooth manifold curve. -/ |
| 25 | theorem deriv_comp_eq_mvfderiv_velocity |
| 26 | {f : M → ℝ} {γ : ℝ → M} {t : ℝ} |
| 27 | (hf : MDifferentiableAt (𝓡 2) 𝓘(ℝ, ℝ) f (γ t)) |
| 28 | (hγ : MDifferentiableAt 𝓘(ℝ, ℝ) (𝓡 2) γ t) : |
| 29 | deriv (f ∘ γ) t = mvfderiv (𝓡 2) f (γ t) |
| 30 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 2) γ t 1) := by |
| 31 | have hd := congrArg (fun L => L (1 : ℝ)) (mfderiv_comp t hf hγ) |
| 32 | rw [mfderiv_eq_fderiv] at hd |
| 33 | change fderiv ℝ (f ∘ γ) t 1 = mvfderiv (𝓡 2) f (γ t) |
| 34 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 2) γ t 1) at hd |
| 35 | simpa only [fderiv_eq_smul_deriv, one_smul] using hd |
| 36 | |
| 37 | theorem deriv_potential_ne_zero_inside_minimizing (D : LeviCivitaData g) |
| 38 | {f : M → ℝ} {lambda : ℝ} (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) |
| 39 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 40 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 41 | {γ : ℝ → M} {ε C c : ℝ} (hε : 0 < ε) (hC : 0 < C) |
| 42 | (hgeo : g.IsGeodesicOn γ (Ioo (-ε) (1 + ε))) |
| 43 | (hspeed : ∀ t ∈ Ioo (-ε) (1 + ε), |
| 44 | g.tangentNorm (γ t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 2) γ t 1) = C) |
| 45 | (hmin : g.edist (γ 0) (γ 1) = ENNReal.ofReal C) |
| 46 | (hcrit : D.gradient f (γ 0) = 0) (hR : D.scalarCurvature (γ 0) ≠ 2 * lambda) |
| 47 | (hc : c ∈ Ioo (0 : ℝ) 1) : deriv (f ∘ γ) c ≠ 0 := by |
| 48 | have hfs := D.contMDiff_of_C2_surface_soliton hf hsol |
| 49 | have h0 : (0 : ℝ) ∈ Ioo (-ε) (1 + ε) := by constructor <;> linarith |
| 50 | have hF : ContDiffOn ℝ ∞ (f ∘ γ) (Ioo (-ε) (1 + ε)) := by |
| 51 | intro t ht |
| 52 | exact (contMDiffAt_iff_contDiffAt.mp ((hfs (γ t)).comp t |
| 53 | (Conjugate.Realization.contMDiffAt_of_isGeodesicOn hgeo ht))).contDiffWithinAt |
| 54 | have hφ : ContDiffOn ℝ ∞ (deriv (f ∘ γ)) (Ioo (-ε) (1 + ε)) := by |
| 55 | intro t ht |
| 56 | exact (((hF.contDiffAt (isOpen_Ioo.mem_nhds ht)).fderiv_right (by simp)).clm_apply |
| 57 | contDiffAt_const).contDiffWithinAt |
| 58 | apply D.scalar_jacobi_ne_zero_of_minimizing hε hC hgeo hspeed hmin hφ |
| 59 | · intro t ht |
| 60 | exact (D.hasDerivAt_second_deriv_potential_geodesic hf hsol isOpen_Ioo hgeo |
| 61 | hspeed (by constructor <;> linarith [ht.1, ht.2])).deriv |
| 62 | · rw [deriv_comp_eq_mvfderiv_velocity ((hfs (γ 0)).mdifferentiableAt (by simp)) |
| 63 | ((hgeo.contMDiffAt h0).mdifferentiableAt (by simp)), ← D.inner_gradient, hcrit] |
| 64 | simp |
| 65 | · rw [(D.hasDerivAt_deriv_potential_geodesic hf hsol hgeo h0 (hspeed 0 h0)).deriv] |
| 66 | apply mul_ne_zero |
| 67 | · intro h |
| 68 | apply hR |
| 69 | linarith |
| 70 | · exact pow_ne_zero 2 hC.ne' |
| 71 | · exact hc |
| 72 | |
| 73 | end PoincareMT.LeviCivitaData |