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.ReducedGeometry.ReducedLength.Action.ActionCoercivity |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Action.GeometricEnergyBound |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Action.ExponentialAction |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Exponential.FamilySquareRegularization |
| 5 | |
| 6 | /-! |
| 7 | # Coercivity of the actual L-exponential action |
| 8 | |
| 9 | The constants are uniform on a strict time slab. Reversing the actual |
| 10 | energy estimate retains the scalar-curvature error at zero initial vector. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option maxSynthPendingDepth 3 |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.ReducedLength |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 24 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T3Space M] [SecondCountableTopology M] |
| 25 | |
| 26 | set_option backward.isDefEq.respectTransparency false in |
| 27 | theorem exists_uniform_lExponentialFamily_action_coercive {J : Set ℝ} |
| 28 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 29 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 30 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 31 | (b : ℝ) (hb : 0 < b) (hbmax : b < τmax) : |
| 32 | ∃ B C : ℝ, 0 < B ∧ 0 ≤ C ∧ ∀ (p : M) (A : LExponentialFamily F T τmax p) |
| 33 | (Z : TangentSpace (𝓡 n) p) (τ : ℝ), 0 < τ → τ ≤ b → |
| 34 | Real.sqrt τ * (4 * (F.metric T).inner p Z Z + 1) ≤ |
| 35 | Real.exp (B * Real.sqrt τ) * |
| 36 | (2 * A.action Z τ + 4 * C * (Real.sqrt τ) ^ 3 + Real.sqrt τ) := by |
| 37 | obtain ⟨B, hB, hbound⟩ := exists_uniform_geometricEnergy_bound F hM04 T τmax hτmax |
| 38 | hwindow hcurvature b hb.le hbmax |
| 39 | obtain ⟨C0, hC0, hcurv⟩ := hcurvature.2 |
| 40 | let C : ℝ := (n : ℝ) ^ 2 * C0 |
| 41 | have hC : 0 ≤ C := mul_nonneg (sq_nonneg _) hC0 |
| 42 | refine ⟨B, C, hB, hC, ?_⟩ |
| 43 | intro p A Z τ hτ hτb |
| 44 | have hmax : τ < τmax := hτb.trans_lt hbmax |
| 45 | let R := lExponentialFamily_squareRegularization hM04 hτmax hwindow A Z τ hτ hmax |
| 46 | let I : Set ℝ := Set.Icc 0 (Real.sqrt τ) |
| 47 | have hIeq : I = sqrtParameterInterval 0 τ := by |
| 48 | simp only [I, sqrtParameterInterval, Real.sqrt_zero] |
| 49 | have hId : UniqueDiffOn ℝ I := uniqueDiffOn_Icc (Real.sqrt_pos.mpr hτ) |
| 50 | have hIU : I ⊆ R.path.domain := by rw [hIeq]; exact R.path.interval_subset |
| 51 | have htime (s : ℝ) (hs : s ∈ I) : |
| 52 | s ∈ Set.Ioo (-Real.sqrt τmax) (Real.sqrt τmax) := |
| 53 | ⟨(neg_lt_zero.mpr (Real.sqrt_pos.mpr hτmax)).trans_le hs.1, |
| 54 | hs.2.trans_lt (Real.sqrt_lt_sqrt hτ.le hmax)⟩ |
| 55 | let e := regularizedCurveEnergy F T R.path.curve |
| 56 | let e' : ℝ → ℝ := fun s ↦ |
| 57 | 4 * s ^ 2 * mvfderiv (𝓡 n) (F.connection (T - s ^ 2)).scalarCurvature |
| 58 | (R.path.curve s) (curveVelocity R.path.curve s) - |
| 59 | 4 * s * (F.connection (T - s ^ 2)).ricci (R.path.curve s) |
| 60 | (curveVelocity R.path.curve s) (curveVelocity R.path.curve s) |
| 61 | have hd : ∀ s ∈ I, HasDerivAt e (e' s) s := by |
| 62 | intro s hs |
| 63 | have hs' : s ∈ sqrtParameterInterval 0 τ := hIeq ▸ hs |
| 64 | exact regularizedCurveEnergy_hasDerivAt F hM04 T τmax hτmax hwindow |
| 65 | R.path.curve R.path.domain (sqrtParameterInterval 0 τ) R.path.open_domain |
| 66 | R.path.interval_subset (hIeq ▸ hId) R.path.smooth R.velocity_extension s hs' |
| 67 | (htime s hs) (R.equation s hs') |
| 68 | have he : ∀ s ∈ I, 0 ≤ e s := by |
| 69 | intro s _ |
| 70 | rcases eq_or_ne (curveVelocity (n := n) R.path.curve s) 0 with hzero | hne |
| 71 | · simp [e, regularizedCurveEnergy, hzero] |
| 72 | · exact ((F.metric (T - s ^ 2)).pos _ _ hne).le |
| 73 | have hbe : ∀ s ∈ I, |e' s| ≤ B * (e s + 1) := by |
| 74 | intro s hs |
| 75 | exact hbound s ⟨hs.1, hs.2.trans (Real.sqrt_le_sqrt hτb)⟩ |
| 76 | (R.path.curve s) (curveVelocity R.path.curve s) |
| 77 | let S : ℝ → ℝ := fun s ↦ (F.connection (T - s ^ 2)).scalarCurvature (R.path.curve s) |
| 78 | have hSc : ContinuousOn S I := by |
| 79 | have hg : ContMDiffOn (𝓘(ℝ, ℝ)) ((𝓘(ℝ, ℝ)).prod (𝓡 n)) ∞ |
| 80 | (fun s ↦ (s, R.path.curve s)) I := |
| 81 | contMDiffOn_id.prodMk (R.path.smooth.mono hIU) |
| 82 | exact ((squareTime_scalar_smooth F hM04 T τmax hτmax hwindow).comp hg |
| 83 | (fun s hs ↦ ⟨htime s hs, Set.mem_univ _⟩)).continuousOn |
| 84 | have hSbound : ∀ s ∈ I, |S s| ≤ C := by |
| 85 | intro s hs |
| 86 | exact scalar_abs_le_of_curvature_bound hM04 (F.metric (T - s ^ 2)) |
| 87 | (F.connection (T - s ^ 2)) (R.path.curve s) C0 |
| 88 | ((le_abs_self _).trans (hcurv (T - s ^ 2) |
| 89 | (squareTime_mem_window T hτmax (htime s hs)) (R.path.curve s))) |
| 90 | have hcoercive := nonnegativeEnergy_action_reverse_bound e e' S (Real.sqrt τ) B C |
| 91 | (Real.sqrt_nonneg τ) hB.le hC (fun s hs ↦ (hd s hs).continuousAt.continuousWithinAt) |
| 92 | he hd hbe hSc hSbound |
| 93 | have henergy0 : e 0 = 4 * (F.metric T).inner p Z Z := by |
| 94 | have hinit := A.initial_derivative Z |
| 95 | have hcast (x y : M) (h : x = y) (v : TangentSpace (𝓡 n) x) : |
| 96 | (h ▸ v : TangentSpace (𝓡 n) y) = (show TangentSpace (𝓡 n) y from v) := by |
| 97 | cases h |
| 98 | rfl |
| 99 | simp only [hcast] at hinit |
| 100 | change (F.metric (T - (0 : ℝ) ^ 2)).inner (A.squareFamily Z 0) |
| 101 | (curveVelocity (A.squareFamily Z) 0) (curveVelocity (A.squareFamily Z) 0) = _ |
| 102 | rw [hinit] |
| 103 | rw [A.square_at_zero] |
| 104 | simp only [zero_pow (by norm_num : (2 : ℕ) ≠ 0), sub_zero, |
| 105 | map_smul, smul_apply, smul_eq_mul] |
| 106 | ring |
| 107 | have haction : (∫ s in (0 : ℝ)..Real.sqrt τ, 2 * s ^ 2 * S s + (1 / 2 : ℝ) * e s) = |
| 108 | A.action Z τ := by |
| 109 | rw [lExponentialFamily_action_square_eq A Z τ hτ hmax] |
| 110 | rfl |
| 111 | rw [henergy0, haction] at hcoercive |
| 112 | exact hcoercive |
| 113 | |
| 114 | end PoincareMT.ReducedLength |