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.IntrinsicEnergy |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Action.GeometricEnergyBound |
| 3 | |
| 4 | /-! |
| 5 | # A uniform energy bound independent of the chart |
| 6 | |
| 7 | The intrinsic derivative identity supplies the same Gronwall estimate |
| 8 | for every smooth regularized geodesic on a strict backward time slab. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.ReducedLength |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 21 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T3Space M] [SecondCountableTopology M] |
| 22 | |
| 23 | theorem exists_uniform_regularizedCurveEnergy_exp_bound {J : Set ℝ} |
| 24 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 25 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 26 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 27 | (b : ℝ) (hb : 0 < b) (hbmax : b < τmax) : |
| 28 | ∃ A : ℝ, 0 < A ∧ ∀ (γ : ℝ → M) (U : Set ℝ) (h : ℝ), |
| 29 | 0 ≤ h → h < Real.sqrt b → IsOpen U → Set.Icc 0 h ⊆ U → |
| 30 | ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ γ U → |
| 31 | ∀ E : ParametricAlongCurveExtensionOn (n := n) (Set.Icc 0 h) γ |
| 32 | (curveVelocityWithin (n := n) γ (Set.Icc 0 h)), |
| 33 | (∀ s ∈ Set.Icc 0 h, regularizedLGeodesicEquation F T γ (Set.Icc 0 h) E s) → |
| 34 | ∀ s ∈ Set.Icc 0 h, regularizedCurveEnergy F T γ s + 1 ≤ |
| 35 | (regularizedCurveEnergy F T γ 0 + 1) * Real.exp (A * s) := by |
| 36 | obtain ⟨A, hA, hbound⟩ := exists_uniform_geometricEnergy_bound F hM04 T τmax |
| 37 | hτmax hwindow hcurvature b hb.le hbmax |
| 38 | refine ⟨A, hA, ?_⟩ |
| 39 | intro γ U h hh hhb hU hIU hγ E heq |
| 40 | rcases eq_or_lt_of_le hh with hzero | hpos |
| 41 | · intro s hs |
| 42 | have hs0 : s = 0 := by linarith [hs.1, hs.2] |
| 43 | simp only [hs0, mul_zero, Real.exp_zero, mul_one, le_refl] |
| 44 | have hI : UniqueDiffOn ℝ (Set.Icc 0 h) := uniqueDiffOn_Icc hpos |
| 45 | have hw : Set.Icc (T - b) T ⊆ J := by |
| 46 | intro t ht |
| 47 | exact hwindow ⟨by linarith [ht.1], ht.2⟩ |
| 48 | let e := regularizedCurveEnergy F T γ |
| 49 | let e' : ℝ → ℝ := fun s ↦ |
| 50 | 4 * s ^ 2 * mvfderiv (𝓡 n) (F.connection (T - s ^ 2)).scalarCurvature |
| 51 | (γ s) (curveVelocity γ s) - |
| 52 | 4 * s * (F.connection (T - s ^ 2)).ricci (γ s) |
| 53 | (curveVelocity γ s) (curveVelocity γ s) |
| 54 | have hd : ∀ s ∈ Set.Icc 0 h, HasDerivAt e (e' s) s := by |
| 55 | intro s hs |
| 56 | apply regularizedCurveEnergy_hasDerivAt F hM04 T b hb hw γ U (Set.Icc 0 h) |
| 57 | hU hIU hI hγ E s hs |
| 58 | · exact ⟨lt_of_lt_of_le (neg_lt_zero.mpr (Real.sqrt_pos.mpr hb)) hs.1, |
| 59 | hs.2.trans_lt hhb⟩ |
| 60 | · exact heq s hs |
| 61 | apply nonnegativeEnergy_exp_bound e e' h A hh hA.le |
| 62 | · exact fun s hs ↦ (hd s hs).continuousAt.continuousWithinAt |
| 63 | · intro s hs |
| 64 | rcases eq_or_ne (curveVelocity (n := n) γ s) 0 with hv | hv |
| 65 | · simp [e, regularizedCurveEnergy, hv] |
| 66 | · exact ((F.metric (T - s ^ 2)).pos (γ s) (curveVelocity γ s) hv).le |
| 67 | · exact fun s hs ↦ hd s ⟨hs.1, hs.2.le⟩ |
| 68 | · intro s hs |
| 69 | exact hbound s ⟨hs.1, hs.2.le.trans hhb.le⟩ (γ s) (curveVelocity γ s) |
| 70 | |
| 71 | end PoincareMT.ReducedLength |