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.Curvature.Reaction |
| 2 | import PoincareLib.Geometry.RicciFlow.Curvature.Energy.Time |
| 3 | import PoincareLib.Geometry.RicciFlow.Curvature.Energy.Bochner |
| 4 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Scalar.Coefficients |
| 5 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Tensor.Within |
| 6 | import Mathlib.Algebra.BigOperators.Fin |
| 7 | import Mathlib.Algebra.Order.BigOperators.Ring.Finset |
| 8 | import Mathlib.Data.Fintype.BigOperators |
| 9 | import Mathlib.Tactic.Linarith |
| 10 | import Mathlib.Analysis.Calculus.TangentCone.Real |
| 11 | import Mathlib.Analysis.Calculus.ContDiff.Deriv |
| 12 | import Mathlib.Analysis.Convex.Topology |
| 13 | import Mathlib.Topology.Order.OrderClosed |
| 14 | |
| 15 | /-! Adapted from Mapher `PoincareMT/Proofs/M04/CurvatureEnergyHeat.lean` at |
| 16 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 17 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 18 | |
| 19 | /-! |
| 20 | # Zeroth curvature energy reaction bound |
| 21 | |
| 22 | The four quadratic contractions are kept in their frozen order. Their |
| 23 | energy contribution is bounded using the actual full component norm. |
| 24 | -/ |
| 25 | |
| 26 | set_option autoImplicit false |
| 27 | |
| 28 | open scoped Manifold ContDiff Bundle BigOperators |
| 29 | open Set Topology Filter |
| 30 | |
| 31 | universe u |
| 32 | |
| 33 | namespace PoincareMT.RicciFlowAnalysis |
| 34 | |
| 35 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 36 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 37 | {J : Set ℝ} |
| 38 | |
| 39 | private noncomputable def curvatureBfour {g : RiemannianMetric n M} |
| 40 | (D : LeviCivitaData g) (x : M) (v : Fin 4 → TangentSpace (𝓡 n) x) : ℝ := |
| 41 | D.curvatureB x (v 0) (v 1) (v 2) (v 3) - |
| 42 | D.curvatureB x (v 0) (v 1) (v 3) (v 2) - |
| 43 | D.curvatureB x (v 0) (v 3) (v 1) (v 2) + |
| 44 | D.curvatureB x (v 0) (v 2) (v 1) (v 3) |
| 45 | |
| 46 | private theorem curvatureReaction_eq_Bfour_sub_slots |
| 47 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x : M) |
| 48 | (v : Fin 4 → TangentSpace (𝓡 n) x) : |
| 49 | let b := g.orthonormalBasis x |
| 50 | let d := Module.finrank ℝ (TangentSpace (𝓡 n) x) |
| 51 | D.curvatureReaction x (v 0) (v 1) (v 2) (v 3) = |
| 52 | 2 * curvatureBfour D x v - |
| 53 | ∑ j : Fin 4, ∑ l : Fin d, |
| 54 | D.ricci x (v j) (b l) * |
| 55 | D.riemannEvaluation x (Function.update v j (b l)) := by |
| 56 | classical |
| 57 | simp [LeviCivitaData.curvatureReaction, curvatureBfour, |
| 58 | Fin.sum_univ_four, LeviCivitaData.riemannEvaluation, |
| 59 | Finset.sum_add_distrib, Function.update] |
| 60 | |
| 61 | set_option maxHeartbeats 1200000 in |
| 62 | private theorem abs_curvatureTensor_basis_le |
| 63 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x : M) |
| 64 | (i j k l : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x))) : |
| 65 | let b := g.orthonormalBasis x |
| 66 | |D.curvatureTensor x (b i) (b j) (b k) (b l)| ≤ D.curvatureTensorNorm x := by |
| 67 | classical |
| 68 | let b := g.orthonormalBasis x |
| 69 | let d := Module.finrank ℝ (TangentSpace (𝓡 n) x) |
| 70 | let R (i j k l : Fin d) := D.curvatureTensor x (b i) (b j) (b k) (b l) |
| 71 | have hN : 0 ≤ D.curvatureTensorNorm x := Real.sqrt_nonneg _ |
| 72 | have hNonneg1 (p q r : Fin d) : 0 ≤ ∑ s : Fin d, (R p q r s) ^ 2 := |
| 73 | Finset.sum_nonneg fun s _ => sq_nonneg (R p q r s) |
| 74 | have hNonneg2 (p q : Fin d) : |
| 75 | 0 ≤ ∑ r : Fin d, ∑ s : Fin d, (R p q r s) ^ 2 := |
| 76 | Finset.sum_nonneg fun r _ => hNonneg1 p q r |
| 77 | have hNonneg3 (p : Fin d) : |
| 78 | 0 ≤ ∑ q : Fin d, ∑ r : Fin d, ∑ s : Fin d, (R p q r s) ^ 2 := |
| 79 | Finset.sum_nonneg fun q _ => hNonneg2 p q |
| 80 | have hNorm : (D.curvatureTensorNorm x) ^ 2 = |
| 81 | ∑ i : Fin d, ∑ j : Fin d, ∑ k : Fin d, ∑ l : Fin d, (R i j k l) ^ 2 := by |
| 82 | change (Real.sqrt (∑ i : Fin d, ∑ j : Fin d, ∑ k : Fin d, |
| 83 | ∑ l : Fin d, (R i j k l) ^ 2)) ^ 2 = _ |
| 84 | exact Real.sq_sqrt (Finset.sum_nonneg fun p _ => hNonneg3 p) |
| 85 | have hTerm : (R i j k l) ^ 2 ≤ |
| 86 | ∑ p : Fin d, ∑ q : Fin d, ∑ r : Fin d, ∑ s : Fin d, (R p q r s) ^ 2 := by |
| 87 | calc |
| 88 | _ ≤ ∑ s : Fin d, (R i j k s) ^ 2 := |
| 89 | Finset.single_le_sum (s := Finset.univ) |
| 90 | (f := fun s : Fin d => (R i j k s) ^ 2) |
| 91 | (fun s _ => sq_nonneg (R i j k s)) (Finset.mem_univ l) |
| 92 | _ ≤ ∑ r : Fin d, ∑ s : Fin d, (R i j r s) ^ 2 := |
| 93 | Finset.single_le_sum (s := Finset.univ) |
| 94 | (f := fun r : Fin d => ∑ s : Fin d, (R i j r s) ^ 2) |
| 95 | (fun r _ => hNonneg1 i j r) (Finset.mem_univ k) |
| 96 | _ ≤ ∑ q : Fin d, ∑ r : Fin d, ∑ s : Fin d, (R i q r s) ^ 2 := |
| 97 | Finset.single_le_sum (s := Finset.univ) |
| 98 | (f := fun q : Fin d => ∑ r : Fin d, ∑ s : Fin d, (R i q r s) ^ 2) |
| 99 | (fun q _ => hNonneg2 i q) (Finset.mem_univ j) |
| 100 | _ ≤ ∑ p : Fin d, ∑ q : Fin d, ∑ r : Fin d, ∑ s : Fin d, (R p q r s) ^ 2 := |
| 101 | Finset.single_le_sum (s := Finset.univ) |
| 102 | (f := fun p : Fin d => ∑ q : Fin d, ∑ r : Fin d, ∑ s : Fin d, |
| 103 | (R p q r s) ^ 2) |
| 104 | (fun p _ => hNonneg3 p) |
| 105 | (Finset.mem_univ i) |
| 106 | have hAbs : |R i j k l| ^ 2 ≤ (D.curvatureTensorNorm x) ^ 2 := by |
| 107 | rw [sq_abs] |
| 108 | exact hTerm.trans_eq hNorm.symm |
| 109 | change |R i j k l| ≤ D.curvatureTensorNorm x |
| 110 | nlinarith only [hAbs, abs_nonneg (R i j k l), hN] |
| 111 | |
| 112 | private theorem abs_curvatureB_basis_le |
| 113 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x : M) |
| 114 | (i j k l : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x))) : |
| 115 | let b := g.orthonormalBasis x |
| 116 | |D.curvatureB x (b i) (b j) (b k) (b l)| ≤ |
| 117 | (n : ℝ) ^ 2 * (D.curvatureTensorNorm x) ^ 2 := by |
| 118 | classical |
| 119 | let b := g.orthonormalBasis x |
| 120 | let d := Module.finrank ℝ (TangentSpace (𝓡 n) x) |
| 121 | let N := D.curvatureTensorNorm x |
| 122 | have hN : 0 ≤ N := Real.sqrt_nonneg _ |
| 123 | have hdim : d = n := by |
| 124 | change Module.finrank ℝ (EuclideanSpace ℝ (Fin n)) = n |
| 125 | simp |
| 126 | have hTerm (p q : Fin d) : |
| 127 | |D.curvatureTensor x (b i) (b p) (b j) (b q) * |
| 128 | D.curvatureTensor x (b k) (b p) (b l) (b q)| ≤ N ^ 2 := by |
| 129 | rw [abs_mul, pow_two] |
| 130 | exact mul_le_mul (abs_curvatureTensor_basis_le D x i p j q) |
| 131 | (abs_curvatureTensor_basis_le D x k p l q) (abs_nonneg _) hN |
| 132 | change |D.curvatureB x (b i) (b j) (b k) (b l)| ≤ (n : ℝ) ^ 2 * N ^ 2 |
| 133 | calc |
| 134 | _ = |∑ p : Fin d, ∑ q : Fin d, |
| 135 | D.curvatureTensor x (b i) (b p) (b j) (b q) * |
| 136 | D.curvatureTensor x (b k) (b p) (b l) (b q)| := rfl |
| 137 | _ ≤ ∑ p : Fin d, |∑ q : Fin d, |
| 138 | D.curvatureTensor x (b i) (b p) (b j) (b q) * |
| 139 | D.curvatureTensor x (b k) (b p) (b l) (b q)| := |
| 140 | Finset.abs_sum_le_sum_abs _ _ |
| 141 | _ ≤ ∑ p : Fin d, ∑ q : Fin d, |
| 142 | |D.curvatureTensor x (b i) (b p) (b j) (b q) * |
| 143 | D.curvatureTensor x (b k) (b p) (b l) (b q)| := |
| 144 | Finset.sum_le_sum fun _ _ => Finset.abs_sum_le_sum_abs _ _ |
| 145 | _ ≤ ∑ _p : Fin d, ∑ _q : Fin d, N ^ 2 := |
| 146 | Finset.sum_le_sum fun p _ => Finset.sum_le_sum fun q _ => hTerm p q |
| 147 | _ = _ := by |
| 148 | simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, |
| 149 | hdim] |
| 150 | ring |
| 151 | |
| 152 | private theorem abs_curvatureBfour_basis_le |
| 153 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x : M) |
| 154 | (a : Fin 4 → Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x))) : |
| 155 | let b := g.orthonormalBasis x |
| 156 | |curvatureBfour D x (fun i => b (a i))| ≤ |
| 157 | 4 * (n : ℝ) ^ 2 * (D.curvatureTensorNorm x) ^ 2 := by |
| 158 | let b := g.orthonormalBasis x |
| 159 | obtain ⟨h1l, h1u⟩ := abs_le.mp (abs_curvatureB_basis_le D x (a 0) (a 1) (a 2) (a 3)) |
| 160 | obtain ⟨h2l, h2u⟩ := abs_le.mp (abs_curvatureB_basis_le D x (a 0) (a 1) (a 3) (a 2)) |
| 161 | obtain ⟨h3l, h3u⟩ := abs_le.mp (abs_curvatureB_basis_le D x (a 0) (a 3) (a 1) (a 2)) |
| 162 | obtain ⟨h4l, h4u⟩ := abs_le.mp (abs_curvatureB_basis_le D x (a 0) (a 2) (a 1) (a 3)) |
| 163 | change |D.curvatureB x (b (a 0)) (b (a 1)) (b (a 2)) (b (a 3)) - |
| 164 | D.curvatureB x (b (a 0)) (b (a 1)) (b (a 3)) (b (a 2)) - |
| 165 | D.curvatureB x (b (a 0)) (b (a 3)) (b (a 1)) (b (a 2)) + |
| 166 | D.curvatureB x (b (a 0)) (b (a 2)) (b (a 1)) (b (a 3))| ≤ _ |
| 167 | apply abs_le.mpr |
| 168 | constructor <;> nlinarith only [h1l, h1u, h2l, h2u, h3l, h3u, h4l, h4u] |
| 169 | |
| 170 | private theorem curvature_energy_reaction_le |
| 171 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x : M) : |
| 172 | let b := g.orthonormalBasis x |
| 173 | let d := Module.finrank ℝ (TangentSpace (𝓡 n) x) |
| 174 | 4 * (∑ a : Fin 4 → Fin d, |
| 175 | D.riemannEvaluation x (fun i => b (a i)) * |
| 176 | curvatureBfour D x (fun i => b (a i))) ≤ |
| 177 | 16 * (n : ℝ) ^ 6 * (D.curvatureTensorNorm x) ^ 3 := by |
| 178 | classical |
| 179 | let b := g.orthonormalBasis x |
| 180 | let d := Module.finrank ℝ (TangentSpace (𝓡 n) x) |
| 181 | let N := D.curvatureTensorNorm x |
| 182 | have hN : 0 ≤ N := Real.sqrt_nonneg _ |
| 183 | have hdim : d = n := by |
| 184 | change Module.finrank ℝ (EuclideanSpace ℝ (Fin n)) = n |
| 185 | simp |
| 186 | have hTerm (a : Fin 4 → Fin d) : |
| 187 | D.riemannEvaluation x (fun i => b (a i)) * |
| 188 | curvatureBfour D x (fun i => b (a i)) ≤ |
| 189 | N * (4 * (n : ℝ) ^ 2 * N ^ 2) := by |
| 190 | calc |
| 191 | _ ≤ |D.riemannEvaluation x (fun i => b (a i)) * |
| 192 | curvatureBfour D x (fun i => b (a i))| := le_abs_self _ |
| 193 | _ = |D.riemannEvaluation x (fun i => b (a i))| * |
| 194 | |curvatureBfour D x (fun i => b (a i))| := abs_mul _ _ |
| 195 | _ ≤ _ := mul_le_mul |
| 196 | (abs_curvatureTensor_basis_le D x (a 0) (a 1) (a 2) (a 3)) |
| 197 | (abs_curvatureBfour_basis_le D x a) (abs_nonneg _) hN |
| 198 | change 4 * (∑ a : Fin 4 → Fin d, |
| 199 | D.riemannEvaluation x (fun i => b (a i)) * |
| 200 | curvatureBfour D x (fun i => b (a i))) ≤ 16 * (n : ℝ) ^ 6 * N ^ 3 |
| 201 | calc |
| 202 | _ ≤ 4 * (∑ _a : Fin 4 → Fin d, N * (4 * (n : ℝ) ^ 2 * N ^ 2)) := |
| 203 | mul_le_mul_of_nonneg_left (Finset.sum_le_sum fun a _ => hTerm a) (by norm_num) |
| 204 | _ = _ := by |
| 205 | simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fun, |
| 206 | Fintype.card_fin, hdim, nsmul_eq_mul, Nat.cast_pow] |
| 207 | ring |
| 208 | |
| 209 | private theorem hasDerivAt_curvatureEnergy |
| 210 | (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) (x : M) : |
| 211 | let D := F.connection t |
| 212 | let b := (F.metric t).orthonormalBasis x |
| 213 | let d := Module.finrank ℝ (TangentSpace (𝓡 n) x) |
| 214 | HasDerivAt (fun s => ((F.connection s).curvatureTensorNorm x) ^ 2) |
| 215 | (2 * tensorPairing (F.metric t) D.riemannEvaluation |
| 216 | (D.tensorLaplacian D.riemannEvaluation) x + |
| 217 | 4 * (∑ a : Fin 4 -> Fin d, |
| 218 | D.riemannEvaluation x (fun i => b (a i)) * |
| 219 | curvatureBfour D x (fun i => b (a i)))) t := by |
| 220 | classical |
| 221 | let D := F.connection t |
| 222 | let b := (F.metric t).orthonormalBasis x |
| 223 | let d := Module.finrank ℝ (TangentSpace (𝓡 n) x) |
| 224 | let P : (Fin 4 -> TangentSpace (𝓡 n) x) -> ℝ := fun v => |
| 225 | D.tensorLaplacian D.riemannEvaluation x v + |
| 226 | D.curvatureReaction x (v 0) (v 1) (v 2) (v 3) |
| 227 | have htime (v : Fin 4 -> TangentSpace (𝓡 n) x) : |
| 228 | HasDerivAt (fun s => (F.connection s).riemannEvaluation x v) (P v) t := by |
| 229 | have hvtuple : ![v 0, v 1, v 2, v 3] = v := by |
| 230 | funext i |
| 231 | fin_cases i <;> rfl |
| 232 | have hv := (F.hasDerivWithinAt_curvatureTensor t (interior_subset ht) x |
| 233 | (v 0) (v 1) (v 2) (v 3)).hasDerivAt (mem_interior_iff_mem_nhds.mp ht) |
| 234 | simpa only [LeviCivitaData.riemannEvaluation, P, D, hvtuple] using hv |
| 235 | have hnorm := hasDerivAt_flow_tensorNorm_sq F |
| 236 | (fun s => (F.connection s).riemannEvaluation) |
| 237 | (fun s => isSmoothCovariantTensor_riemannEvaluation (F.connection s)) ht x P htime |
| 238 | change HasDerivAt (fun s => ((F.connection s).curvatureDerivativeNorm 0 x) ^ 2) |
| 239 | _ t at hnorm |
| 240 | have hfun : (fun s => ((F.connection s).curvatureDerivativeNorm 0 x) ^ 2) = |
| 241 | (fun s => ((F.connection s).curvatureTensorNorm x) ^ 2) := by |
| 242 | funext s |
| 243 | rw [(F.connection s).curvatureDerivativeNorm_zero x] |
| 244 | rw [hfun] at hnorm |
| 245 | apply hnorm.congr_deriv |
| 246 | change |
| 247 | 2 * (∑ a : Fin 4 → Fin d, |
| 248 | D.riemannEvaluation x (fun i => b (a i)) * |
| 249 | (D.tensorLaplacian D.riemannEvaluation x (fun i => b (a i)) + |
| 250 | D.curvatureReaction x (b (a 0)) (b (a 1)) (b (a 2)) (b (a 3)))) + |
| 251 | 2 * (∑ j : Fin 4, ∑ a : Fin 4 → Fin d, ∑ l : Fin d, |
| 252 | D.ricci x (b (a j)) (b l) * |
| 253 | D.riemannEvaluation x (fun i => b (a i)) * |
| 254 | D.riemannEvaluation x (fun i => b (Function.update a j l i))) = _ |
| 255 | have hupdate (a : Fin 4 → Fin d) (j : Fin 4) (l : Fin d) : |
| 256 | Function.update (fun i => b (a i)) j (b l) = |
| 257 | (fun i => b (Function.update a j l i)) := by |
| 258 | exact (Function.comp_update b a j l).symm |
| 259 | have hreact0 (a : Fin 4 → Fin d) : |
| 260 | D.curvatureReaction x (b (a 0)) (b (a 1)) (b (a 2)) (b (a 3)) = |
| 261 | 2 * curvatureBfour D x (fun i => b (a i)) - |
| 262 | ∑ j : Fin 4, ∑ l : Fin d, |
| 263 | D.ricci x (b (a j)) (b l) * |
| 264 | D.riemannEvaluation x (Function.update (fun i => b (a i)) j (b l)) := by |
| 265 | simpa only [b] using |
| 266 | (curvatureReaction_eq_Bfour_sub_slots D x (fun i => b (a i))) |
| 267 | have hreact (a : Fin 4 → Fin d) : |
| 268 | D.curvatureReaction x (b (a 0)) (b (a 1)) (b (a 2)) (b (a 3)) = |
| 269 | 2 * curvatureBfour D x (fun i => b (a i)) - |
| 270 | ∑ j : Fin 4, ∑ l : Fin d, |
| 271 | D.ricci x (b (a j)) (b l) * |
| 272 | D.riemannEvaluation x (fun i => b (Function.update a j l i)) := by |
| 273 | rw [hreact0] |
| 274 | simp only [hupdate] |
| 275 | simp_rw [hreact] |
| 276 | have hsum : |
| 277 | (∑ a : Fin 4 → Fin d, |
| 278 | D.riemannEvaluation x (fun i => b (a i)) * |
| 279 | (∑ j : Fin 4, ∑ l : Fin d, |
| 280 | D.ricci x (b (a j)) (b l) * |
| 281 | D.riemannEvaluation x (fun i => b (Function.update a j l i)))) = |
| 282 | ∑ j : Fin 4, ∑ a : Fin 4 → Fin d, ∑ l : Fin d, |
| 283 | D.ricci x (b (a j)) (b l) * |
| 284 | D.riemannEvaluation x (fun i => b (a i)) * |
| 285 | D.riemannEvaluation x (fun i => b (Function.update a j l i)) := by |
| 286 | simp only [Finset.mul_sum] |
| 287 | rw [Finset.sum_comm] |
| 288 | apply Finset.sum_congr rfl |
| 289 | intro j hj |
| 290 | apply Finset.sum_congr rfl |
| 291 | intro a ha |
| 292 | apply Finset.sum_congr rfl |
| 293 | intro l hl |
| 294 | ring |
| 295 | simp only [mul_add, mul_sub, Finset.sum_add_distrib, |
| 296 | Finset.sum_sub_distrib] |
| 297 | rw [hsum] |
| 298 | have hB : |
| 299 | (∑ a : Fin 4 → Fin d, |
| 300 | D.riemannEvaluation x (fun i => b (a i)) * |
| 301 | (2 * curvatureBfour D x (fun i => b (a i)))) = |
| 302 | 2 * (∑ a : Fin 4 → Fin d, |
| 303 | D.riemannEvaluation x (fun i => b (a i)) * |
| 304 | curvatureBfour D x (fun i => b (a i))) := by |
| 305 | rw [Finset.mul_sum] |
| 306 | apply Finset.sum_congr rfl |
| 307 | intro a ha |
| 308 | ring |
| 309 | simp only [tensorPairing] |
| 310 | rw [hB] |
| 311 | ring |
| 312 | |
| 313 | private theorem curvatureEnergy_heat_inequality_interior |
| 314 | (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) (x : M) : |
| 315 | derivWithin |
| 316 | (fun s => ((F.connection s).curvatureTensorNorm x) ^ 2) J t <= |
| 317 | (F.connection t).laplacian |
| 318 | (fun y => ((F.connection t).curvatureTensorNorm y) ^ 2) x - |
| 319 | 2 * ((F.connection t).curvatureDerivativeNorm 1 x) ^ 2 + |
| 320 | 16 * (n : ℝ) ^ 6 * ((F.connection t).curvatureTensorNorm x) ^ 3 := by |
| 321 | classical |
| 322 | let hconv : Convex ℝ J := F.interval.convex |
| 323 | let hne : (interior J).Nonempty := |
| 324 | hconv.nontrivial_iff_nonempty_interior.mp F.nontrivial |
| 325 | let hJ : UniqueDiffOn ℝ J := uniqueDiffOn_convex hconv hne |
| 326 | have hderiv := (hasDerivAt_curvatureEnergy F ht x).hasDerivWithinAt.derivWithin |
| 327 | (hJ t (interior_subset ht)) |
| 328 | have hbochner := laplacian_tensorNorm_sq |
| 329 | (D := F.connection t) |
| 330 | (isSmoothCovariantTensor_riemannEvaluation (F.connection t)) x |
| 331 | change (F.connection t).laplacian |
| 332 | (fun y => ((F.connection t).curvatureDerivativeNorm 0 y) ^ 2) x = _ at hbochner |
| 333 | simp only [LeviCivitaData.curvatureDerivativeNorm_zero] at hbochner |
| 334 | change (F.connection t).laplacian |
| 335 | (fun y => ((F.connection t).curvatureTensorNorm y) ^ 2) x = |
| 336 | 2 * tensorPairing (F.metric t) (F.connection t).riemannEvaluation |
| 337 | ((F.connection t).tensorLaplacian (F.connection t).riemannEvaluation) x + |
| 338 | 2 * ((F.connection t).curvatureDerivativeNorm 1 x) ^ 2 at hbochner |
| 339 | have hreaction := curvature_energy_reaction_le (F.connection t) x |
| 340 | dsimp only at hderiv hreaction |
| 341 | linarith |
| 342 | |
| 343 | private theorem contDiffOn_curvatureEnergy_timeSlice |
| 344 | (F : RicciFlow n M J) (x : M) : |
| 345 | ContDiffOn ℝ ∞ |
| 346 | (fun s => ((F.connection s).curvatureTensorNorm x) ^ 2) J := by |
| 347 | have hslice : ContMDiff 𝓘(ℝ, ℝ) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 348 | (fun s : ℝ => (s, x)) := contMDiff_id.prodMk contMDiff_const |
| 349 | have h := (contMDiffOn_flow_curvatureDerivativeEnergy F 0).comp hslice.contMDiffOn |
| 350 | (show Set.MapsTo (fun s : ℝ => (s, x)) J (J ×ˢ Set.univ) from |
| 351 | fun _ hs => ⟨hs, Set.mem_univ x⟩) |
| 352 | simpa only [Function.comp_def, LeviCivitaData.curvatureDerivativeNorm_zero] using h.contDiffOn |
| 353 | |
| 354 | private theorem continuousOn_curvatureEnergy_derivWithin |
| 355 | (F : RicciFlow n M J) (x : M) : |
| 356 | ContinuousOn |
| 357 | (fun t => derivWithin |
| 358 | (fun s => ((F.connection s).curvatureTensorNorm x) ^ 2) J t) J := by |
| 359 | have hconv : Convex ℝ J := F.interval.convex |
| 360 | have hne : (interior J).Nonempty := |
| 361 | hconv.nontrivial_iff_nonempty_interior.mp F.nontrivial |
| 362 | exact (contDiffOn_curvatureEnergy_timeSlice F x).continuousOn_derivWithin |
| 363 | (uniqueDiffOn_convex hconv hne) (by simp) |
| 364 | |
| 365 | set_option maxHeartbeats 800000 in |
| 366 | private theorem continuousOn_curvatureEnergy_heatRHS |
| 367 | (F : RicciFlow n M J) (x : M) : |
| 368 | ContinuousOn |
| 369 | (fun t => (F.connection t).laplacian |
| 370 | (fun y => ((F.connection t).curvatureTensorNorm y) ^ 2) x - |
| 371 | 2 * ((F.connection t).curvatureDerivativeNorm 1 x) ^ 2 + |
| 372 | 16 * (n : ℝ) ^ 6 * ((F.connection t).curvatureTensorNorm x) ^ 3) J := by |
| 373 | have hE0 := contMDiffOn_flow_curvatureDerivativeEnergy F 0 |
| 374 | have hE1 := contMDiffOn_flow_curvatureDerivativeEnergy F 1 |
| 375 | have hE0' : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 376 | (fun p : ℝ × M => ((F.connection p.1).curvatureTensorNorm p.2) ^ 2) |
| 377 | (J ×ˢ Set.univ) := by |
| 378 | simpa only [LeviCivitaData.curvatureDerivativeNorm_zero] using hE0 |
| 379 | have hLap := continuousOn_flow_timeDependentLaplacian F (q := |
| 380 | fun p : ℝ × M => ((F.connection p.1).curvatureTensorNorm p.2) ^ 2) hE0' |
| 381 | have hsliceMD : ContMDiff 𝓘(ℝ, ℝ) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 382 | (fun t : ℝ => (t, x)) := contMDiff_id.prodMk contMDiff_const |
| 383 | have hslice : ContinuousOn (fun t : ℝ => (t, x)) J := |
| 384 | hsliceMD.continuous.continuousOn |
| 385 | have hLapx := hLap.comp hslice (fun _ ht => ⟨ht, Set.mem_univ x⟩) |
| 386 | have hE1x : ContinuousOn |
| 387 | (fun t : ℝ => ((F.connection t).curvatureDerivativeNorm 1 x) ^ 2) J := |
| 388 | (hE1.comp hsliceMD.contMDiffOn (fun _ ht => ⟨ht, Set.mem_univ x⟩)).continuousOn |
| 389 | have hE0x : ContinuousOn |
| 390 | (fun t : ℝ => ((F.connection t).curvatureTensorNorm x) ^ 2) J := |
| 391 | (hE0'.comp hsliceMD.contMDiffOn (fun _ ht => ⟨ht, Set.mem_univ x⟩)).continuousOn |
| 392 | have hNx : ContinuousOn |
| 393 | (fun t : ℝ => (F.connection t).curvatureTensorNorm x) J := by |
| 394 | have hsqrt := hE0x.sqrt |
| 395 | apply hsqrt.congr |
| 396 | intro t ht |
| 397 | change (F.connection t).curvatureTensorNorm x = |
| 398 | Real.sqrt (((F.connection t).curvatureTensorNorm x) ^ 2) |
| 399 | rw [Real.sqrt_sq_eq_abs] |
| 400 | exact (abs_of_nonneg (show 0 ≤ (F.connection t).curvatureTensorNorm x |
| 401 | from Real.sqrt_nonneg _)).symm |
| 402 | have hNcube : ContinuousOn |
| 403 | (fun t : ℝ => ((F.connection t).curvatureTensorNorm x) ^ 3) J := by |
| 404 | have hprod := hNx.mul hE0x |
| 405 | apply hprod.congr |
| 406 | intro t ht |
| 407 | change (F.connection t).curvatureTensorNorm x ^ 3 = |
| 408 | (F.connection t).curvatureTensorNorm x * |
| 409 | (F.connection t).curvatureTensorNorm x ^ 2 |
| 410 | ring |
| 411 | have htwo : ContinuousOn (fun _ : ℝ => (2 : ℝ)) J := continuousOn_const |
| 412 | have hcoef : ContinuousOn (fun _ : ℝ => 16 * (n : ℝ) ^ 6) J := continuousOn_const |
| 413 | exact (hLapx.sub (htwo.mul hE1x)).add (hcoef.mul hNcube) |
| 414 | |
| 415 | theorem curvatureEnergy_heat_inequality |
| 416 | (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ J) (x : M) : |
| 417 | derivWithin |
| 418 | (fun s => ((F.connection s).curvatureTensorNorm x) ^ 2) J t <= |
| 419 | (F.connection t).laplacian |
| 420 | (fun y => ((F.connection t).curvatureTensorNorm y) ^ 2) x - |
| 421 | 2 * ((F.connection t).curvatureDerivativeNorm 1 x) ^ 2 + |
| 422 | 16 * (n : ℝ) ^ 6 * ((F.connection t).curvatureTensorNorm x) ^ 3 := by |
| 423 | have hconv : Convex ℝ J := F.interval.convex |
| 424 | have hne : (interior J).Nonempty := |
| 425 | hconv.nontrivial_iff_nonempty_interior.mp F.nontrivial |
| 426 | have hdense : J ⊆ closure (interior J) := by |
| 427 | rw [hconv.closure_interior_eq_closure_of_nonempty_interior hne] |
| 428 | exact subset_closure |
| 429 | have hderivcont : ContinuousWithinAt |
| 430 | (fun t => derivWithin |
| 431 | (fun s => ((F.connection s).curvatureTensorNorm x) ^ 2) J t) |
| 432 | (interior J) t := |
| 433 | ((continuousOn_curvatureEnergy_derivWithin F x) t ht).mono |
| 434 | (interior_subset : interior J ⊆ J) |
| 435 | have hRHScont : ContinuousWithinAt |
| 436 | (fun t => (F.connection t).laplacian |
| 437 | (fun y => ((F.connection t).curvatureTensorNorm y) ^ 2) x - |
| 438 | 2 * ((F.connection t).curvatureDerivativeNorm 1 x) ^ 2 + |
| 439 | 16 * (n : ℝ) ^ 6 * ((F.connection t).curvatureTensorNorm x) ^ 3) |
| 440 | (interior J) t := |
| 441 | ((continuousOn_curvatureEnergy_heatRHS F x) t ht).mono |
| 442 | (interior_subset : interior J ⊆ J) |
| 443 | exact ContinuousWithinAt.closure_le (hdense ht) hderivcont hRHScont |
| 444 | (fun s hs => curvatureEnergy_heat_inequality_interior F hs x) |
| 445 | |
| 446 | end PoincareMT.RicciFlowAnalysis |
| 447 | |
| 448 | #print axioms PoincareMT.RicciFlowAnalysis.curvatureBfour |
| 449 | #print axioms PoincareMT.RicciFlowAnalysis.curvatureReaction_eq_Bfour_sub_slots |
| 450 | #print axioms PoincareMT.RicciFlowAnalysis.abs_curvatureTensor_basis_le |
| 451 | #print axioms PoincareMT.RicciFlowAnalysis.abs_curvatureB_basis_le |
| 452 | #print axioms PoincareMT.RicciFlowAnalysis.abs_curvatureBfour_basis_le |
| 453 | #print axioms PoincareMT.RicciFlowAnalysis.curvature_energy_reaction_le |
| 454 | #print axioms PoincareMT.RicciFlowAnalysis.hasDerivAt_curvatureEnergy |
| 455 | #print axioms PoincareMT.RicciFlowAnalysis.curvatureEnergy_heat_inequality_interior |
| 456 | #print axioms PoincareMT.RicciFlowAnalysis.contDiffOn_curvatureEnergy_timeSlice |
| 457 | #print axioms PoincareMT.RicciFlowAnalysis.continuousOn_curvatureEnergy_derivWithin |
| 458 | #print axioms PoincareMT.RicciFlowAnalysis.continuousOn_curvatureEnergy_heatRHS |
| 459 | #print axioms PoincareMT.RicciFlowAnalysis.curvatureEnergy_heat_inequality |