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 Mathlib.Geometry.Manifold.IntegralCurve.ExistUnique |
| 2 | import Mathlib.Geometry.Manifold.MFDeriv.FDeriv |
| 3 | import Mathlib.Analysis.SpecialFunctions.ExpDeriv |
| 4 | |
| 5 | /-! |
| 6 | # Backward radial conjugacy from the vector-field equation |
| 7 | |
| 8 | If a smooth map pushes the Euler field forward to a smooth manifold field, |
| 9 | its exponentially contracting radial curves agree with the field's global |
| 10 | flow. The strict ball condition supplies a short extension past time zero, |
| 11 | so uniqueness on an open interval applies. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter Metric |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | namespace Poincare.Manifold |
| 22 | |
| 23 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 24 | {H : Type*} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} |
| 25 | {M : Type*} [TopologicalSpace M] [T2Space M] [ChartedSpace H M] |
| 26 | [IsManifold I ∞ M] [BoundarylessManifold I M] |
| 27 | |
| 28 | /-- A map intertwining the Euler field with a smooth field intertwines |
| 29 | backward exponential scaling with every global integral flow of that field. -/ |
| 30 | theorem flow_eq_exp_smul_of_radial_field |
| 31 | {Y : (x : M) → TangentSpace I x} |
| 32 | (hY : ContMDiff I (I.prod 𝓘(ℝ, E)) ∞ (T% Y)) |
| 33 | {Φ : ℝ → M → M} (hzero : ∀ x, Φ 0 x = x) |
| 34 | (horbit : ∀ x, IsMIntegralCurve (I := I) (fun t => Φ t x) Y) |
| 35 | {e : E → M} {r : ℝ} |
| 36 | (he : ContMDiffOn 𝓘(ℝ, E) I ∞ e (ball (0 : E) r)) |
| 37 | (hradial : ∀ v ∈ ball (0 : E) r, Y (e v) = mfderiv 𝓘(ℝ, E) I e v v) : |
| 38 | ∀ t ≤ 0, ∀ v ∈ ball (0 : E) r, Φ t (e v) = e (Real.exp t • v) := by |
| 39 | intro t ht v hv |
| 40 | have hnear : ∀ᶠ s : ℝ in 𝓝 0, Real.exp s • v ∈ ball (0 : E) r := by |
| 41 | apply (Real.continuous_exp.smul continuous_const).continuousAt.preimage_mem_nhds |
| 42 | exact isOpen_ball.mem_nhds (by |
| 43 | change Real.exp 0 • v ∈ ball (0 : E) r |
| 44 | simpa only [Real.exp_zero, one_smul] using hv) |
| 45 | obtain ⟨δ, hδ, hδball⟩ := Metric.eventually_nhds_iff.mp hnear |
| 46 | let ε : ℝ := δ / 2 |
| 47 | have hε : 0 < ε := half_pos hδ |
| 48 | have hεball : Real.exp ε • v ∈ ball (0 : E) r := |
| 49 | hδball (by simpa only [Real.dist_eq, sub_zero, abs_of_pos hε] using |
| 50 | (half_lt_self hδ : δ / 2 < δ)) |
| 51 | have hball (s : ℝ) (hs : s < ε) : Real.exp s • v ∈ ball (0 : E) r := by |
| 52 | rw [mem_ball, dist_zero_right, norm_smul, Real.norm_of_nonneg (Real.exp_pos s).le] |
| 53 | have hεnorm : Real.exp ε * ‖v‖ < r := by |
| 54 | simpa only [mem_ball, dist_zero_right, norm_smul, |
| 55 | Real.norm_of_nonneg (Real.exp_pos ε).le] using hεball |
| 56 | exact (mul_le_mul_of_nonneg_right (Real.exp_le_exp.mpr hs.le) |
| 57 | (norm_nonneg v)).trans_lt hεnorm |
| 58 | have hcurve : IsMIntegralCurveOn (I := I) (fun s => e (Real.exp s • v)) Y |
| 59 | (Ioo (t - 1) ε) := by |
| 60 | intro s hs |
| 61 | have hev := he.contMDiffAt (isOpen_ball.mem_nhds (hball s hs.2)) |
| 62 | have hds : HasMFDerivAt 𝓘(ℝ, ℝ) 𝓘(ℝ, E) (fun u : ℝ => Real.exp u • v) s |
| 63 | ((1 : ℝ →L[ℝ] ℝ).smulRight (Real.exp s • v)) := |
| 64 | ((Real.hasDerivAt_exp s).smul_const v).hasFDerivAt.hasMFDerivAt |
| 65 | have hd := (hev.mdifferentiableAt (by simp)).hasMFDerivAt.comp s hds |
| 66 | have hmap : |
| 67 | (mfderiv 𝓘(ℝ, E) I e (Real.exp s • v)).comp |
| 68 | ((1 : ℝ →L[ℝ] ℝ).smulRight (Real.exp s • v)) = |
| 69 | (1 : ℝ →L[ℝ] ℝ).smulRight (Y (e (Real.exp s • v))) := by |
| 70 | ext |
| 71 | simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.smulRight_apply, |
| 72 | map_smul, hradial _ (hball s hs.2)] |
| 73 | rw [hmap] at hd |
| 74 | exact hd.hasMFDerivWithinAt |
| 75 | have heq := isMIntegralCurveOn_Ioo_eqOn_of_contMDiff_boundaryless |
| 76 | (show (0 : ℝ) ∈ Ioo (t - 1) ε from ⟨by linarith, hε⟩) |
| 77 | (hY.of_le (show (1 : ℕ∞ω) ≤ ∞ by simp)) |
| 78 | ((horbit (e v)).isMIntegralCurveOn (Ioo (t - 1) ε)) hcurve |
| 79 | (by simp only [hzero, Real.exp_zero, one_smul]) |
| 80 | exact heq (show t ∈ Ioo (t - 1) ε from ⟨by linarith, ht.trans_lt hε⟩) |
| 81 | |
| 82 | end Poincare.Manifold |