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.ThreeDimensional.Noncompact.Rigidity.PotentialLevels |
| 2 | import PoincareLib.Geometry.RicciFlow.Soliton.Flow.Bounds |
| 3 | import PoincareLib.Geometry.RicciFlow.Soliton.Flow.Regularity.Potential |
| 4 | import PoincareLib.Geometry.Riemannian.Comparison.Hessian.Locality |
| 5 | import PoincareLib.Geometry.Riemannian.ScalarOperators.Scaling |
| 6 | |
| 7 | /-! |
| 8 | # Normalized shrinking potentials along escaping centers |
| 9 | |
| 10 | The original potential is centered at the selected point and divided by |
| 11 | its actual gradient norm there. Quadratic potential growth forces this |
| 12 | normalizing scale to infinity along escaping sequences. The soliton equation |
| 13 | then makes the normalized Hessians uniformly small on the entire source. |
| 14 | |
| 15 | Reference: Morgan--Tian, Proposition 9.46, pp. 209-213. |
| 16 | -/ |
| 17 | |
| 18 | noncomputable section |
| 19 | set_option autoImplicit false |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | |
| 22 | open Set Filter |
| 23 | open scoped Manifold ContDiff Bundle Topology |
| 24 | |
| 25 | namespace PoincareMT.GradientShrinkingSolitonData |
| 26 | |
| 27 | variable {M : Type*} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 29 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 30 | [SecondCountableTopology M] [ConnectedSpace M] |
| 31 | |
| 32 | def potentialGradientScale (S : GradientShrinkingSolitonData 3 M) (q : M) : ℝ := |
| 33 | S.metric.tangentNorm q (S.connection.gradient S.potential q) |
| 34 | |
| 35 | def normalizedPotential (S : GradientShrinkingSolitonData 3 M) (q x : M) : ℝ := |
| 36 | (S.potential x - S.potential q) / S.potentialGradientScale q |
| 37 | |
| 38 | theorem potentialGradientScale_nonneg (S : GradientShrinkingSolitonData 3 M) (q : M) : |
| 39 | 0 ≤ S.potentialGradientScale q := Real.sqrt_nonneg _ |
| 40 | |
| 41 | theorem potentialGradientScale_sq (S : GradientShrinkingSolitonData 3 M) (q : M) : |
| 42 | S.potentialGradientScale q ^ 2 = S.metric.inner q |
| 43 | (S.connection.gradient S.potential q) (S.connection.gradient S.potential q) := by |
| 44 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 45 | ⟨S.metric.toRiemannianMetric⟩ |
| 46 | change ‖S.connection.gradient S.potential q‖ ^ 2 = |
| 47 | inner ℝ (S.connection.gradient S.potential q) (S.connection.gradient S.potential q) |
| 48 | exact (real_inner_self_eq_norm_sq _).symm |
| 49 | |
| 50 | @[simp] theorem normalizedPotential_center (S : GradientShrinkingSolitonData 3 M) (q : M) : |
| 51 | S.normalizedPotential q q = 0 := by simp [normalizedPotential] |
| 52 | |
| 53 | theorem normalizedPotential_contMDiff (S : GradientShrinkingSolitonData 3 M) (q : M) : |
| 54 | ContMDiff (𝓡 3) 𝓘(ℝ, ℝ) ∞ (S.normalizedPotential q) := by |
| 55 | change ContMDiff (𝓡 3) 𝓘(ℝ, ℝ) ∞ |
| 56 | (fun x => (S.potential x - S.potential q) / S.potentialGradientScale q) |
| 57 | exact (S.potential_contMDiff.sub contMDiff_const).div_const (S.potentialGradientScale q) |
| 58 | |
| 59 | theorem gradient_normalizedPotential (S : GradientShrinkingSolitonData 3 M) (q x : M) : |
| 60 | S.connection.gradient (S.normalizedPotential q) x = |
| 61 | (S.potentialGradientScale q)⁻¹ • S.connection.gradient S.potential x := by |
| 62 | apply (S.metric.inner_isInvertible x).injective |
| 63 | ext v |
| 64 | rw [S.connection.inner_gradient] |
| 65 | have heq : S.normalizedPotential q = fun y => |
| 66 | (S.potentialGradientScale q)⁻¹ * (S.potential y - S.potential q) := by |
| 67 | funext y |
| 68 | simp only [normalizedPotential, div_eq_mul_inv, mul_comm] |
| 69 | rw [heq, mvfderiv_const_mul, |
| 70 | mvfderiv_fun_sub ((S.potential_contMDiff x).mdifferentiableAt (by simp)) |
| 71 | mdifferentiableAt_const] |
| 72 | simp only [mvfderiv_const, sub_zero, map_smul, smul_apply, smul_eq_mul, |
| 73 | S.connection.inner_gradient] |
| 74 | |
| 75 | theorem normalizedPotential_gradient_sq_center (S : GradientShrinkingSolitonData 3 M) |
| 76 | {q : M} (hq : 0 < S.potentialGradientScale q) : |
| 77 | S.metric.inner q (S.connection.gradient (S.normalizedPotential q) q) |
| 78 | (S.connection.gradient (S.normalizedPotential q) q) = 1 := by |
| 79 | simp only [S.gradient_normalizedPotential, map_smul, smul_apply, |
| 80 | smul_eq_mul, ← S.potentialGradientScale_sq] |
| 81 | field_simp [hq.ne'] |
| 82 | |
| 83 | theorem hessian_normalizedPotential (S : GradientShrinkingSolitonData 3 M) (q x : M) |
| 84 | (u v : TangentSpace (𝓡 3) x) : |
| 85 | S.connection.hessian (S.normalizedPotential q) x u v = |
| 86 | (S.potentialGradientScale q)⁻¹ * S.connection.hessian S.potential x u v := by |
| 87 | have heq : S.normalizedPotential q = fun y => |
| 88 | (S.potentialGradientScale q)⁻¹ * (-S.potential q + S.potential y) := by |
| 89 | funext y |
| 90 | simp only [normalizedPotential, div_eq_mul_inv] |
| 91 | ring |
| 92 | rw [heq, S.connection.hessian_const_mul, |
| 93 | S.connection.hessian_const_add_at (S.potential_contMDiff x)] |
| 94 | |
| 95 | /-- The original potential tends to infinity along every metrically escaping |
| 96 | sequence, without passing to a new sequence. -/ |
| 97 | theorem potential_tendsto_atTop_of_escape (S : GradientShrinkingSolitonData 3 M) |
| 98 | (p : M) (q : ℕ → M) |
| 99 | (hescape : Tendsto (fun k => (S.metric.edist p (q k)).toReal) atTop atTop) : |
| 100 | Tendsto (fun k => S.potential (q k)) atTop atTop := by |
| 101 | obtain ⟨C, hC, hbound⟩ := S.exists_potential_distance_lower_bound p |
| 102 | apply tendsto_atTop.mpr |
| 103 | intro B |
| 104 | filter_upwards [hescape.eventually_ge_atTop (8 * C + 8 * |B - S.potential p| + 1)] |
| 105 | with k hk |
| 106 | have hd : 0 ≤ (S.metric.edist p (q k)).toReal := ENNReal.toReal_nonneg |
| 107 | have hCd : 0 ≤ (S.metric.edist p (q k)).toReal * |
| 108 | ((S.metric.edist p (q k)).toReal - 8 * C) := |
| 109 | mul_nonneg hd (by linarith [abs_nonneg (B - S.potential p)]) |
| 110 | have hdd : 0 ≤ (S.metric.edist p (q k)).toReal * |
| 111 | ((S.metric.edist p (q k)).toReal - 1) := |
| 112 | mul_nonneg hd (by linarith [abs_nonneg (B - S.potential p)]) |
| 113 | have ha := le_abs_self (B - S.potential p) |
| 114 | have hb := hbound (q k) |
| 115 | nlinarith |
| 116 | |
| 117 | /-- The exact basepoint gradient scales diverge on every escaping sequence. -/ |
| 118 | theorem potentialGradientScale_tendsto_atTop_of_escape |
| 119 | (S : GradientShrinkingSolitonData 3 M) (hD : S.connection.CurvatureTensorCalculus) |
| 120 | (p : M) (q : ℕ → M) |
| 121 | (hescape : Tendsto (fun k => (S.metric.edist p (q k)).toReal) atTop atTop) : |
| 122 | Tendsto (fun k => S.potentialGradientScale (q k)) atTop atTop := by |
| 123 | have hf := S.potential_tendsto_atTop_of_escape p q hescape |
| 124 | apply tendsto_atTop.mpr |
| 125 | intro B |
| 126 | obtain ⟨a, ha⟩ := S.exists_gradient_sq_gt_on_superlevel hD ((max B 0) ^ 2) |
| 127 | filter_upwards [hf.eventually_ge_atTop a] with k hk |
| 128 | have h := ha (q k) hk |
| 129 | rw [← S.potentialGradientScale_sq] at h |
| 130 | have hn := S.potentialGradientScale_nonneg (q k) |
| 131 | have hm : 0 ≤ max B 0 := le_max_right _ _ |
| 132 | have hB : B ≤ max B 0 := le_max_left _ _ |
| 133 | nlinarith |
| 134 | |
| 135 | /-- The normalized source Hessian has a global bound tending to zero. -/ |
| 136 | theorem exists_normalizedPotential_hessian_bound |
| 137 | (S : GradientShrinkingSolitonData 3 M) : |
| 138 | ∃ C : ℝ, 0 ≤ C ∧ ∀ q x : M, ∀ v : TangentSpace (𝓡 3) x, |
| 139 | |S.connection.hessian (S.normalizedPotential q) x v v| ≤ |
| 140 | C / S.potentialGradientScale q * S.metric.inner x v v := by |
| 141 | obtain ⟨C, hC, hbound⟩ := S.exists_hessian_quadratic_bound |
| 142 | refine ⟨C, hC, fun q x v => ?_⟩ |
| 143 | rw [S.hessian_normalizedPotential, abs_mul, |
| 144 | abs_of_nonneg (inv_nonneg.mpr (S.potentialGradientScale_nonneg q))] |
| 145 | calc |
| 146 | (S.potentialGradientScale q)⁻¹ * |S.connection.hessian S.potential x v v| ≤ |
| 147 | (S.potentialGradientScale q)⁻¹ * (C * S.metric.inner x v v) := |
| 148 | mul_le_mul_of_nonneg_left (hbound x v) |
| 149 | (inv_nonneg.mpr (S.potentialGradientScale_nonneg q)) |
| 150 | _ = C / S.potentialGradientScale q * S.metric.inner x v v := by ring |
| 151 | |
| 152 | /-- Unit-vector evaluations of the normalized Hessians tend uniformly to |
| 153 | zero on the whole original manifold. -/ |
| 154 | theorem normalizedPotential_hessian_eventually_lt |
| 155 | (S : GradientShrinkingSolitonData 3 M) (hD : S.connection.CurvatureTensorCalculus) |
| 156 | (p : M) (q : ℕ → M) |
| 157 | (hescape : Tendsto (fun k => (S.metric.edist p (q k)).toReal) atTop atTop) |
| 158 | {ε : ℝ} (hε : 0 < ε) : |
| 159 | ∀ᶠ k in atTop, ∀ x : M, ∀ v : TangentSpace (𝓡 3) x, |
| 160 | S.metric.inner x v v ≤ 1 → |
| 161 | |S.connection.hessian (S.normalizedPotential (q k)) x v v| < ε := by |
| 162 | obtain ⟨C, hC, hbound⟩ := S.exists_normalizedPotential_hessian_bound |
| 163 | have ha := S.potentialGradientScale_tendsto_atTop_of_escape hD p q hescape |
| 164 | filter_upwards [ha.eventually_gt_atTop (C / ε + 1)] with k hk |
| 165 | have hscale : 0 < S.potentialGradientScale (q k) := by |
| 166 | linarith [div_nonneg hC hε.le] |
| 167 | have hsmall : C / S.potentialGradientScale (q k) < ε := by |
| 168 | apply (div_lt_iff₀ hscale).mpr |
| 169 | have hm := (div_lt_iff₀ hε).mp (show C / ε < S.potentialGradientScale (q k) by linarith) |
| 170 | nlinarith |
| 171 | intro x v hv |
| 172 | exact (hbound (q k) x v).trans_lt |
| 173 | ((mul_le_of_le_one_right (div_nonneg hC hscale.le) hv).trans_lt hsmall) |
| 174 | |
| 175 | end PoincareMT.GradientShrinkingSolitonData |