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.Calculus.ScalarDifferentialBound |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.BufferedDerivatives |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.CurvatureWindow |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Action.EnergyBound |
| 5 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Action.CoordinateEnergy |
| 6 | |
| 7 | /-! |
| 8 | # Uniform energy estimates for actual regularized solutions |
| 9 | |
| 10 | Buffered Shi estimates and the corrected scalar contraction bound the |
| 11 | geometric energy derivative. The constructed coordinate ODE then satisfies |
| 12 | the corresponding Gronwall estimate, uniformly across charts. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option maxSynthPendingDepth 3 |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.ReducedLength |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 26 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T3Space M] [SecondCountableTopology M] |
| 27 | |
| 28 | theorem exists_uniform_geometricEnergy_bound {J : Set ℝ} (F : RicciFlow n M J) |
| 29 | (hM04 : RicciFlowCurvatureTheory.{u}) (T τmax : ℝ) (hτmax : 0 < τmax) |
| 30 | (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 31 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 32 | (b : ℝ) (hb : 0 ≤ b) (hbmax : b < τmax) : |
| 33 | ∃ A : ℝ, 0 < A ∧ ∀ s ∈ Set.Icc 0 (Real.sqrt b), ∀ (x : M) |
| 34 | (V : TangentSpace (𝓡 n) x), |
| 35 | |4 * s ^ 2 * mvfderiv (𝓡 n) (F.connection (T - s ^ 2)).scalarCurvature x V - |
| 36 | 4 * s * (F.connection (T - s ^ 2)).ricci x V V| ≤ |
| 37 | A * ((F.metric (T - s ^ 2)).inner x V V + 1) := by |
| 38 | obtain ⟨C1, hC1, hderiv⟩ := |
| 39 | exists_uniform_curvatureDerivative_bound F hM04 T τmax hτmax hwindow hcurvature |
| 40 | 1 b hb hbmax |
| 41 | obtain ⟨K, hK, hbound⟩ := hcurvature.2 |
| 42 | let B : ℝ := (n : ℝ) * K |
| 43 | let C : ℝ := (n : ℝ) ^ 2 * C1 |
| 44 | let H : ℝ := Real.sqrt b |
| 45 | let A0 : ℝ := 2 * H ^ 2 * C + 4 * H * B |
| 46 | have hB : 0 ≤ B := mul_nonneg (Nat.cast_nonneg n) hK |
| 47 | have hC : 0 ≤ C := mul_nonneg (sq_nonneg _) hC1.le |
| 48 | have hA0 : 0 ≤ A0 := by dsimp [A0, H]; positivity |
| 49 | refine ⟨A0 + 1, by linarith, ?_⟩ |
| 50 | intro s hs x V |
| 51 | have hs2 : s ^ 2 ∈ Set.Icc 0 b := by |
| 52 | refine ⟨sq_nonneg s, ?_⟩ |
| 53 | nlinarith [Real.sq_sqrt hb, hs.1, hs.2, Real.sqrt_nonneg b] |
| 54 | have ht : T - s ^ 2 ∈ Set.Icc (T - τmax) T := by |
| 55 | constructor <;> linarith [hs2.1, hs2.2] |
| 56 | let g := F.metric (T - s ^ 2) |
| 57 | let D := F.connection (T - s ^ 2) |
| 58 | let e : ℝ := g.inner x V V |
| 59 | have he : 0 ≤ e := by |
| 60 | rcases eq_or_ne V 0 with rfl | hV |
| 61 | · simp [e] |
| 62 | · exact (g.pos x V hV).le |
| 63 | have hdR : |mvfderiv (𝓡 n) D.scalarCurvature x V| ≤ C * Real.sqrt e := by |
| 64 | apply (scalarCurvature_mvfderiv_abs_le hM04 g D x V).trans |
| 65 | exact mul_le_mul_of_nonneg_right |
| 66 | (mul_le_mul_of_nonneg_left (hderiv (s ^ 2) hs2 x) (sq_nonneg _)) |
| 67 | (Real.sqrt_nonneg _) |
| 68 | have hric : |D.ricci x V V| ≤ B * e := |
| 69 | ricci_quadratic_abs_le_of_curvature_bound hM04 g D x V K |
| 70 | ((le_abs_self _).trans (hbound (T - s ^ 2) ht x)) |
| 71 | have h := regularizedEnergy_abs_bound s H B C e _ _ hs.1 hs.2 hB hC he hdR hric |
| 72 | exact h.trans (mul_le_mul_of_nonneg_right (by dsimp [A0]; linarith) (by linarith)) |
| 73 | |
| 74 | theorem exists_uniform_squareChartEnergy_exp_bound {J : Set ℝ} (F : RicciFlow n M J) |
| 75 | (hM04 : RicciFlowCurvatureTheory.{u}) (T τmax : ℝ) (hτmax : 0 < τmax) |
| 76 | (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 77 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 78 | (b : ℝ) (hb : 0 < b) (hbmax : b < τmax) : |
| 79 | ∃ A : ℝ, 0 < A ∧ ∀ (p : M) (a v : ℝ → EuclideanSpace ℝ (Fin n)) |
| 80 | (h : ℝ), 0 ≤ h → h < Real.sqrt b → |
| 81 | (∀ s ∈ Set.Icc 0 h, a s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) p).target) → |
| 82 | (∀ s ∈ Set.Icc 0 h, HasDerivAt a (v s) s) → |
| 83 | (∀ s ∈ Set.Icc 0 h, HasDerivAt v |
| 84 | (regularizedCoordinatePhase (squareChartMetric F T p) (squareChartScalar F T p) |
| 85 | (s, (a s, v s))).2 s) → |
| 86 | ∀ s ∈ Set.Icc 0 h, |
| 87 | squareChartMetric F T p (s, a s) (v s) (v s) + 1 ≤ |
| 88 | (squareChartMetric F T p (0, a 0) (v 0) (v 0) + 1) * Real.exp (A * s) := by |
| 89 | obtain ⟨A, hA, hbound⟩ := |
| 90 | exists_uniform_geometricEnergy_bound F hM04 T τmax hτmax hwindow hcurvature b hb.le hbmax |
| 91 | refine ⟨A, hA, ?_⟩ |
| 92 | intro p a v h hh hhb hy ha hv |
| 93 | have hw : Set.Icc (T - b) T ⊆ J := by |
| 94 | intro t ht |
| 95 | exact hwindow ⟨by linarith [ht.1], ht.2⟩ |
| 96 | let e : ℝ → ℝ := fun s ↦ squareChartMetric F T p (s, a s) (v s) (v s) |
| 97 | let x : ℝ → M := fun s ↦ (chartAt (EuclideanSpace ℝ (Fin n)) p).symm (a s) |
| 98 | let V := fun s ↦ mfderiv (𝓡 n) (𝓡 n) |
| 99 | (chartAt (EuclideanSpace ℝ (Fin n)) p).symm (a s) (v s) |
| 100 | let e' : ℝ → ℝ := fun s ↦ |
| 101 | 4 * s ^ 2 * mvfderiv (𝓡 n) (F.connection (T - s ^ 2)).scalarCurvature (x s) (V s) - |
| 102 | 4 * s * (F.connection (T - s ^ 2)).ricci (x s) (V s) (V s) |
| 103 | have hd : ∀ s ∈ Set.Icc 0 h, HasDerivAt e (e' s) s := by |
| 104 | intro s hs |
| 105 | apply squareChartEnergy_hasDerivAt F hM04 T b hb hw p a v s |
| 106 | · exact ⟨lt_of_lt_of_le (neg_lt_zero.mpr (Real.sqrt_pos.mpr hb)) hs.1, |
| 107 | hs.2.trans_lt hhb⟩ |
| 108 | · exact hy s hs |
| 109 | · exact ha s hs |
| 110 | · exact hv s hs |
| 111 | apply nonnegativeEnergy_exp_bound e e' h A hh hA.le |
| 112 | · exact fun s hs ↦ (hd s hs).continuousAt.continuousWithinAt |
| 113 | · intro s hs |
| 114 | rcases eq_or_ne (v s) 0 with hv0 | hv0 |
| 115 | · simp [e, hv0] |
| 116 | · exact (squareChartMetric_pos F T p (s, a s) (hy s hs) (v s) hv0).le |
| 117 | · exact fun s hs ↦ hd s ⟨hs.1, hs.2.le⟩ |
| 118 | · intro s hs |
| 119 | exact hbound s ⟨hs.1, hs.2.le.trans hhb.le⟩ (x s) (V s) |
| 120 | |
| 121 | end PoincareMT.ReducedLength |