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.Harnack.Matrix.Positivity.BlockContact |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Matrix.Positivity.PerturbedReaction |
| 3 | import PoincareLib.Geometry.Riemannian.Tensor.MaximumPrinciple.Transport.Isometry |
| 4 | import PoincareLib.Geometry.Riemannian.Tensor.Laplacian.Linearity |
| 5 | |
| 6 | /-! # Spatial contact for the metric-perturbed Hamilton block |
| 7 | |
| 8 | Radial metric-preserving frames identify the scalar barrier Laplacian and |
| 9 | the parallel normalized identity on two-forms in the spatial contact formula. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | set_option maxHeartbeats 800000 |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 17 | open Matrix Filter Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace Poincare.RicciFlow.Harnack |
| 22 | |
| 23 | open PoincareMT |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | {g : RiemannianMetric n M} |
| 28 | |
| 29 | /-- The normalized metric identity acting on alternating two-tensors. -/ |
| 30 | noncomputable def metricTwoFormIdentity (g : RiemannianMetric n M) : |
| 31 | CovariantTensorEvaluation n M 4 := fun x v => |
| 32 | (g.inner x (v 0) (v 2) * g.inner x (v 1) (v 3) - |
| 33 | g.inner x (v 0) (v 3) * g.inner x (v 1) (v 2)) / 2 |
| 34 | |
| 35 | lemma metric_isSmoothCovariantTensor (g : RiemannianMetric n M) : |
| 36 | IsSmoothCovariantTensor (fun x (v : Fin 2 → TangentSpace (𝓡 n) x) => |
| 37 | g.inner x (v 0) (v 1)) := by |
| 38 | constructor |
| 39 | · intro x |
| 40 | refine ⟨{ toFun := fun v => g.inner x (v 0) (v 1) |
| 41 | map_update_add' := ?_ |
| 42 | map_update_smul' := ?_ }, fun _ => rfl⟩ |
| 43 | · intro _ v i a b |
| 44 | fin_cases i <;> simp [Function.update, map_add] |
| 45 | · intro _ v i c a |
| 46 | fin_cases i <;> simp [Function.update, map_smul] |
| 47 | · intro U hU X hX x hx |
| 48 | have h := ((g.contMDiff x).clm_bundle_apply |
| 49 | ((hX 0 x hx).contMDiffAt (hU.mem_nhds hx))).clm_bundle_apply |
| 50 | ((hX 1 x hx).contMDiffAt (hU.mem_nhds hx)) |
| 51 | exact (contMDiffAt_totalSpace.mp h).2.contMDiffWithinAt |
| 52 | |
| 53 | lemma scalar_metric_isSmoothCovariantTensor {φ : M → ℝ} |
| 54 | (hφ : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ φ) : |
| 55 | IsSmoothCovariantTensor (fun x (v : Fin 2 → TangentSpace (𝓡 n) x) => |
| 56 | φ x * g.inner x (v 0) (v 1)) := by |
| 57 | constructor |
| 58 | · intro x |
| 59 | obtain ⟨A, hA⟩ := (metric_isSmoothCovariantTensor g).1 x |
| 60 | exact ⟨φ x • A, fun v => by simp only [_root_.smul_apply, smul_eq_mul, ← hA]⟩ |
| 61 | · intro U hU X hX |
| 62 | exact hφ.contMDiffOn.mul ((metric_isSmoothCovariantTensor g).2 U hU X hX) |
| 63 | |
| 64 | lemma metricTwoFormIdentity_isSmooth (g : RiemannianMetric n M) : |
| 65 | IsSmoothCovariantTensor (metricTwoFormIdentity g) := by |
| 66 | have hG := metric_isSmoothCovariantTensor g |
| 67 | have hGG := isSmoothCovariantTensor_tensorProduct hG hG |
| 68 | have h := ((hGG.perm (Equiv.swap 1 2)).sub |
| 69 | (hGG.perm (Equiv.swap 1 3))).const_mul (1 / 2) |
| 70 | convert h using 1 |
| 71 | funext x v |
| 72 | simp only [tensorProduct, Function.comp_apply] |
| 73 | change metricTwoFormIdentity g x v = |
| 74 | 1 / 2 * (g.inner x (v 0) (v 2) * g.inner x (v 1) (v 3) - |
| 75 | g.inner x (v 0) (v 3) * g.inner x (v 2) (v 1)) |
| 76 | dsimp only [metricTwoFormIdentity] |
| 77 | rw [g.symm x (v 2) (v 1)] |
| 78 | ring |
| 79 | |
| 80 | private lemma exists_metric_radial_fields (D : LeviCivitaData g) (x : M) : |
| 81 | ∃ E : TangentSpace (𝓡 n) x → (y : M) → TangentSpace (𝓡 n) y, |
| 82 | (∀ v, E v x = v) ∧ |
| 83 | (∀ v, ContMDiffAt (𝓡 n) ((𝓡 n).prod (𝓡 n)) ∞ (T% (E v)) x) ∧ |
| 84 | (∀ v a, D.connection (E v) x a = 0) ∧ |
| 85 | (∀ v a, D.connection (D.covariantDerivativeOnFields |
| 86 | (FiberBundle.extend (EuclideanSpace ℝ (Fin n)) a) (E v)) x a = 0) ∧ |
| 87 | (∀ᶠ y in 𝓝 x, ∀ v w, g.inner y (E v y) (E w y) = g.inner x v w) := by |
| 88 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 89 | ⟨g.toRiemannianMetric⟩ |
| 90 | obtain ⟨r, Y, hr, _, hY, hinit, _, hfirst, hsecond, P, hP⟩ := |
| 91 | D.exists_radialParallelIsometries_with_jets x |
| 92 | refine ⟨fun v => LeviCivitaData.fieldFromCenteredCoordinates x (Y v), |
| 93 | hinit, ?_, hfirst, hsecond, ?_⟩ |
| 94 | · intro v |
| 95 | exact LeviCivitaData.contMDiffAt_fieldFromCenteredCoordinates x |
| 96 | (hY v).contDiffAt (mem_extChartAt_source x) |
| 97 | · filter_upwards [(LeviCivitaData.isOpen_radialNeighborhood (n := n) x r).mem_nhds |
| 98 | (LeviCivitaData.mem_radialNeighborhood (n := n) x hr)] with y hy v w |
| 99 | rw [← hP ⟨y, hy⟩ v, ← hP ⟨y, hy⟩ w] |
| 100 | exact (P ⟨y, hy⟩).inner_map_map v w |
| 101 | |
| 102 | /-- Spatial variation of the scalar metric barrier contributes only its |
| 103 | scalar Laplacian to the rough two-tensor Laplacian. -/ |
| 104 | lemma tensorLaplacian_scalar_metric (D : LeviCivitaData g) {φ : M → ℝ} |
| 105 | (hφ : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ φ) (x : M) |
| 106 | (v : Fin 2 → TangentSpace (𝓡 n) x) : |
| 107 | D.tensorLaplacian (fun y (z : Fin 2 → TangentSpace (𝓡 n) y) => |
| 108 | φ y * g.inner y (z 0) (z 1)) x v = |
| 109 | D.laplacian φ x * g.inner x (v 0) (v 1) := by |
| 110 | obtain ⟨E, hinit, hE, hfirst, hsecond, hinner⟩ := exists_metric_radial_fields D x |
| 111 | have h := D.tensorLaplacian_eq_laplacian_of_zero_jets |
| 112 | (scalar_metric_isSmoothCovariantTensor (g := g) hφ) (fun i => E (v i)) x |
| 113 | (fun i => hE (v i)) (fun i => hfirst (v i)) (fun i => hsecond (v i)) |
| 114 | simp only [hinit] at h |
| 115 | rw [h] |
| 116 | have he : (fun y => φ y * g.inner y (E (v 0) y) (E (v 1) y)) =ᶠ[𝓝 x] |
| 117 | (fun y => g.inner x (v 0) (v 1) * φ y) := by |
| 118 | filter_upwards [hinner] with y hy |
| 119 | rw [hy] |
| 120 | exact mul_comm _ _ |
| 121 | rw [D.laplacian_eq_of_eventuallyEq he, D.laplacian_const_mul, mul_comm] |
| 122 | |
| 123 | /-- The normalized two-form identity is covariantly parallel. -/ |
| 124 | lemma covariantTensorDerivative_metricTwoFormIdentity (D : LeviCivitaData g) : |
| 125 | D.covariantTensorDerivative (metricTwoFormIdentity g) = fun _ _ => 0 := by |
| 126 | funext x v |
| 127 | obtain ⟨E, hinit, hE, hfirst, _, hinner⟩ := exists_metric_radial_fields D x |
| 128 | have h := covariantTensorDerivative_eq_mvfderiv_of_zero_jets D |
| 129 | (metricTwoFormIdentity_isSmooth g) (fun i => E (v i.succ)) x |
| 130 | (fun i => hE (v i.succ)) (fun i => hfirst (v i.succ)) (v 0) |
| 131 | have hv : Fin.cons (v 0) (fun i => v i.succ) = v := by ext i; fin_cases i <;> rfl |
| 132 | simp only [hinit, hv] at h |
| 133 | rw [h] |
| 134 | have he : (fun y => metricTwoFormIdentity g y (fun i => E (v i.succ) y)) =ᶠ[𝓝 x] |
| 135 | (fun _ => metricTwoFormIdentity g x (fun i => v i.succ)) := by |
| 136 | filter_upwards [hinner] with y hy |
| 137 | simp only [metricTwoFormIdentity, hy] |
| 138 | unfold mvfderiv |
| 139 | rw [he.mfderiv_eq] |
| 140 | simp |
| 141 | |
| 142 | lemma tensorLaplacian_metricTwoFormIdentity (D : LeviCivitaData g) : |
| 143 | D.tensorLaplacian (metricTwoFormIdentity g) = fun _ _ => 0 := by |
| 144 | funext x v |
| 145 | simp only [LeviCivitaData.tensorLaplacian, |
| 146 | LeviCivitaData.iteratedCovariantTensorDerivative, |
| 147 | covariantTensorDerivative_metricTwoFormIdentity] |
| 148 | simp [LeviCivitaData.covariantTensorDerivative, mvfderiv] |
| 149 | |
| 150 | /-- The spatial contraction, including the freely prescribed first jets of |
| 151 | the two-form test direction. -/ |
| 152 | noncomputable def tensorBlockDiffusion {I : Type} [Fintype I] |
| 153 | (D : LeviCivitaData g) (R : CovariantTensorEvaluation n M 4) |
| 154 | (P : CovariantTensorEvaluation n M 3) (B : CovariantTensorEvaluation n M 2) |
| 155 | (x : M) (v : I → TangentSpace (𝓡 n) x) (U : I → I → ℝ) (W : I → ℝ) |
| 156 | (A : I → I → TangentSpace (𝓡 n) x) : ℝ := |
| 157 | (∑ a, ∑ b, D.tensorLaplacian B x ![v a, v b] * W a * W b) + |
| 158 | 2 * (∑ a, ∑ b, ∑ c, D.tensorLaplacian P x ![v a, v b, v c] * U a b * W c) + |
| 159 | (∑ a, ∑ b, ∑ c, ∑ d, |
| 160 | D.tensorLaplacian R x ![v a, v b, v c, v d] * U a b * U c d) + |
| 161 | 4 * (∑ a, ∑ b, ∑ c, ∑ d, |
| 162 | U a b * D.covariantTensorDerivative R x ![A c d, v a, v b, v c, v d]) + |
| 163 | 4 * (∑ a, ∑ b, ∑ c, |
| 164 | W c * D.covariantTensorDerivative P x ![A a b, v a, v b, v c]) + |
| 165 | 2 * (∑ a, ∑ b, ∑ c, ∑ d, |
| 166 | R x ![v a, v b, v c, v d] * g.inner x (A a b) (A c d)) |
| 167 | |
| 168 | /-- Exact diffusion expansion for the actual metric perturbations. The |
| 169 | constant two-form perturbation contributes no tensor derivatives. -/ |
| 170 | lemma tensorBlockDiffusion_perturb {I : Type} [Fintype I] |
| 171 | (D : LeviCivitaData g) {R : CovariantTensorEvaluation n M 4} |
| 172 | {P : CovariantTensorEvaluation n M 3} {B : CovariantTensorEvaluation n M 2} |
| 173 | (hR : IsSmoothCovariantTensor R) (hB : IsSmoothCovariantTensor B) |
| 174 | {φ : M → ℝ} (hφ : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ φ) (ψ : ℝ) |
| 175 | (x : M) (v : I → TangentSpace (𝓡 n) x) (U : I → I → ℝ) (W : I → ℝ) |
| 176 | (A : I → I → TangentSpace (𝓡 n) x) : |
| 177 | tensorBlockDiffusion D (fun y z => R y z + ψ * metricTwoFormIdentity g y z) P |
| 178 | (fun y z => B y z + φ y * g.inner y (z 0) (z 1)) x v U W A = |
| 179 | tensorBlockDiffusion D R P B x v U W A + |
| 180 | D.laplacian φ x * (∑ a, ∑ b, g.inner x (v a) (v b) * W a * W b) + |
| 181 | 2 * ψ * (∑ a, ∑ b, ∑ c, ∑ d, |
| 182 | metricTwoFormIdentity g x ![v a, v b, v c, v d] * |
| 183 | g.inner x (A a b) (A c d)) := by |
| 184 | have hI := metricTwoFormIdentity_isSmooth g |
| 185 | have hφg := scalar_metric_isSmoothCovariantTensor (g := g) hφ |
| 186 | have hψI := hI.const_mul ψ |
| 187 | have hDR := D.covariantTensorDerivative_isSmooth hR |
| 188 | have hDB := D.covariantTensorDerivative_isSmooth hB |
| 189 | have hDI := D.covariantTensorDerivative_isSmooth hI |
| 190 | have hDφg := D.covariantTensorDerivative_isSmooth hφg |
| 191 | have hDψI := D.covariantTensorDerivative_isSmooth hψI |
| 192 | unfold tensorBlockDiffusion |
| 193 | simp only [D.tensorLaplacian_add hB hφg hDB hDφg, |
| 194 | D.tensorLaplacian_add hR hψI hDR hDψI, |
| 195 | D.tensorLaplacian_const_mul hI hDI, |
| 196 | tensorLaplacian_scalar_metric D hφ, tensorLaplacian_metricTwoFormIdentity, |
| 197 | D.covariantTensorDerivative_add hR hψI, |
| 198 | D.covariantTensorDerivative_const_mul hI, |
| 199 | covariantTensorDerivative_metricTwoFormIdentity, |
| 200 | mul_zero, add_zero, Matrix.cons_val_zero, Matrix.cons_val_one] |
| 201 | simp only [add_mul, Finset.sum_add_distrib, mul_assoc, ← Finset.mul_sum] |
| 202 | ring |
| 203 | |
| 204 | /-- A locally positive perturbed block obeys the spatial contact inequality |
| 205 | with explicitly computed barrier errors. -/ |
| 206 | theorem perturbed_tensor_block_diffusion_nonneg_at_null [T2Space M] |
| 207 | {I : Type} [Fintype I] (D : LeviCivitaData g) |
| 208 | {R : CovariantTensorEvaluation n M 4} {P : CovariantTensorEvaluation n M 3} |
| 209 | {B : CovariantTensorEvaluation n M 2} |
| 210 | (hR : IsSmoothCovariantTensor R) (hP : IsSmoothCovariantTensor P) |
| 211 | (hB : IsSmoothCovariantTensor B) |
| 212 | {φ : M → ℝ} (hφ : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ φ) (ψ : ℝ) |
| 213 | (x : M) (v : I → TangentSpace (𝓡 n) x) |
| 214 | (hpos : ∀ᶠ y in 𝓝 x, ∀ e : I → TangentSpace (𝓡 n) y, |
| 215 | (Matrix.fromBlocks (fun ab cd : I × I => |
| 216 | R y ![e ab.1, e ab.2, e cd.1, e cd.2] + |
| 217 | ψ * metricTwoFormIdentity g y ![e ab.1, e ab.2, e cd.1, e cd.2]) |
| 218 | (fun ab c => P y ![e ab.1, e ab.2, e c]) |
| 219 | (fun a bc => P y ![e bc.1, e bc.2, e a]) |
| 220 | (fun a b => B y ![e a, e b] + φ y * g.inner y (e a) (e b))).PosSemidef) |
| 221 | (U : I → I → ℝ) (W : I → ℝ) |
| 222 | (hnull : (∑ a, ∑ b, (B x ![v a, v b] + φ x * g.inner x (v a) (v b)) * W a * W b) + |
| 223 | 2 * (∑ a, ∑ b, ∑ c, P x ![v a, v b, v c] * U a b * W c) + |
| 224 | (∑ a, ∑ b, ∑ c, ∑ d, |
| 225 | (R x ![v a, v b, v c, v d] + |
| 226 | ψ * metricTwoFormIdentity g x ![v a, v b, v c, v d]) * U a b * U c d) = 0) |
| 227 | (A : I → I → TangentSpace (𝓡 n) x) : |
| 228 | 0 ≤ tensorBlockDiffusion D R P B x v U W A + |
| 229 | D.laplacian φ x * (∑ a, ∑ b, g.inner x (v a) (v b) * W a * W b) + |
| 230 | 2 * ψ * (∑ a, ∑ b, ∑ c, ∑ d, |
| 231 | metricTwoFormIdentity g x ![v a, v b, v c, v d] * |
| 232 | g.inner x (A a b) (A c d)) := by |
| 233 | have h := tensor_block_diffusion_nonneg_at_null D |
| 234 | (hR.add ((metricTwoFormIdentity_isSmooth g).const_mul ψ)) hP |
| 235 | (hB.add (scalar_metric_isSmoothCovariantTensor (g := g) hφ)) x v hpos U W hnull A |
| 236 | change 0 ≤ tensorBlockDiffusion D _ P _ x v U W A at h |
| 237 | rwa [tensorBlockDiffusion_perturb D hR hB hφ ψ] at h |
| 238 | |
| 239 | lemma metric_inner_orthonormalBasis (g : RiemannianMetric n M) (x : M) |
| 240 | (a b : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x))) : |
| 241 | g.inner x (g.orthonormalBasis x a) (g.orthonormalBasis x b) = |
| 242 | if a = b then 1 else 0 := by |
| 243 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 244 | ⟨g.toRiemannianMetric⟩ |
| 245 | exact (g.orthonormalBasis x).inner_eq_ite a b |
| 246 | |
| 247 | lemma metricTwoFormIdentity_orthonormalBasis (g : RiemannianMetric n M) (x : M) |
| 248 | (a b c d : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x))) : |
| 249 | metricTwoFormIdentity g x ![g.orthonormalBasis x a, g.orthonormalBasis x b, |
| 250 | g.orthonormalBasis x c, g.orthonormalBasis x d] = twoFormIdentity a b c d := by |
| 251 | simp only [metricTwoFormIdentity, Matrix.cons_val_zero, Matrix.cons_val_one, |
| 252 | Matrix.cons_val, metric_inner_orthonormalBasis, twoFormIdentity] |
| 253 | split_ifs <;> simp_all |
| 254 | |
| 255 | private lemma metric_basis_quadratic (g : RiemannianMetric n M) (x : M) |
| 256 | (W : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) : |
| 257 | (∑ a, ∑ b, g.inner x (g.orthonormalBasis x a) (g.orthonormalBasis x b) * W a * W b) = |
| 258 | ∑ a, W a ^ 2 := by |
| 259 | simp only [metric_inner_orthonormalBasis, ite_mul, zero_mul, one_mul, |
| 260 | Finset.sum_ite_eq, Finset.mem_univ, if_true, pow_two] |
| 261 | |
| 262 | private lemma metric_inner_basis_sums (g : RiemannianMetric n M) (x : M) |
| 263 | (v w : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) : |
| 264 | g.inner x (∑ e, v e • g.orthonormalBasis x e) |
| 265 | (∑ e, w e • g.orthonormalBasis x e) = ∑ e, v e * w e := by |
| 266 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 267 | ⟨g.toRiemannianMetric⟩ |
| 268 | change inner ℝ (∑ e, v e • g.orthonormalBasis x e) |
| 269 | (∑ e, w e • g.orthonormalBasis x e) = _ |
| 270 | simp only [sum_inner, inner_sum, real_inner_smul_left, real_inner_smul_right, |
| 271 | (g.orthonormalBasis x).inner_eq_ite, mul_ite, mul_zero, mul_one, |
| 272 | Finset.sum_ite_eq', Finset.mem_univ, if_true] |
| 273 | apply Finset.sum_congr rfl |
| 274 | intro e _ |
| 275 | ring |
| 276 | |
| 277 | private lemma sum_four_last' {I : Type} [Fintype I] (f : I → I → I → I → ℝ) : |
| 278 | (∑ a, ∑ c, ∑ d, ∑ e, f a c d e) = ∑ e, ∑ a, ∑ c, ∑ d, f a c d e := by |
| 279 | calc |
| 280 | _ = ∑ a, ∑ e, ∑ c, ∑ d, f a c d e := by |
| 281 | apply Finset.sum_congr rfl |
| 282 | intro a _ |
| 283 | exact Finset.sum_comm_cycle |
| 284 | _ = _ := Finset.sum_comm |
| 285 | |
| 286 | private lemma sum_five_last' {I : Type} [Fintype I] (f : I → I → I → I → I → ℝ) : |
| 287 | (∑ a, ∑ c, ∑ d, ∑ f', ∑ e, f a c d f' e) = |
| 288 | ∑ e, ∑ a, ∑ c, ∑ d, ∑ f', f a c d f' e := by |
| 289 | calc |
| 290 | _ = ∑ a, ∑ e, ∑ c, ∑ d, ∑ f', f a c d f' e := by |
| 291 | apply Finset.sum_congr rfl |
| 292 | intro a _ |
| 293 | exact sum_four_last' (f a) |
| 294 | _ = _ := Finset.sum_comm |
| 295 | |
| 296 | /-- The metric-identity contribution of skew two-form jets is their squared |
| 297 | norm, in precisely the ordered-pair normalization of Hamilton's block. -/ |
| 298 | lemma metricTwoFormIdentity_jet_quadratic (g : RiemannianMetric n M) (x : M) |
| 299 | (V : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 300 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 301 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 302 | (hV : ∀ e a b, V e a b = -V e b a) : |
| 303 | (∑ a, ∑ b, ∑ c, ∑ d, |
| 304 | metricTwoFormIdentity g x ![g.orthonormalBasis x a, g.orthonormalBasis x b, |
| 305 | g.orthonormalBasis x c, g.orthonormalBasis x d] * |
| 306 | g.inner x (∑ e, V e a b • g.orthonormalBasis x e) |
| 307 | (∑ e, V e c d • g.orthonormalBasis x e)) = ∑ e, ∑ a, ∑ b, (V e a b) ^ 2 := by |
| 308 | simp only [metricTwoFormIdentity_orthonormalBasis, metric_inner_basis_sums, Finset.mul_sum] |
| 309 | rw [sum_five_last'] |
| 310 | apply Finset.sum_congr rfl |
| 311 | intro e _ |
| 312 | simpa only [mul_assoc] using twoFormIdentity_quadratic (V e) (hV e) |
| 313 | |
| 314 | /-- Canonical-basis form of perturbed spatial contact, with no frame or |
| 315 | metric-derivative assumptions supplied by the caller. -/ |
| 316 | theorem perturbed_tensor_block_diffusion_nonneg_in_basis [T2Space M] |
| 317 | (D : LeviCivitaData g) |
| 318 | {R : CovariantTensorEvaluation n M 4} {P : CovariantTensorEvaluation n M 3} |
| 319 | {B : CovariantTensorEvaluation n M 2} |
| 320 | (hR : IsSmoothCovariantTensor R) (hP : IsSmoothCovariantTensor P) |
| 321 | (hB : IsSmoothCovariantTensor B) |
| 322 | {φ : M → ℝ} (hφ : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ φ) (ψ : ℝ) (x : M) |
| 323 | (hpos : ∀ᶠ y in 𝓝 x, let b := g.orthonormalBasis y |
| 324 | (Matrix.fromBlocks |
| 325 | (fun ac de : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) y)) × |
| 326 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) y)) => |
| 327 | R y ![b ac.1, b ac.2, b de.1, b de.2] + ψ * twoFormIdentity ac.1 ac.2 de.1 de.2) |
| 328 | (fun ac d => P y ![b ac.1, b ac.2, b d]) |
| 329 | (fun c de => P y ![b de.1, b de.2, b c]) |
| 330 | (fun a c => B y ![b a, b c] + φ y * (if a = c then 1 else 0))).PosSemidef) |
| 331 | (U : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 332 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 333 | (W : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 334 | (hU : ∀ a b, U a b = -U b a) |
| 335 | (hnull : let b := g.orthonormalBasis x |
| 336 | (∑ a, ∑ b', B x ![b a, b b'] * W a * W b') + |
| 337 | 2 * (∑ a, ∑ b', ∑ c, P x ![b a, b b', b c] * U a b' * W c) + |
| 338 | (∑ a, ∑ b', ∑ c, ∑ d, R x ![b a, b b', b c, b d] * U a b' * U c d) + |
| 339 | φ x * (∑ a, W a ^ 2) + ψ * (∑ a, ∑ b', (U a b') ^ 2) = 0) |
| 340 | (V : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 341 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 342 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 343 | (hV : ∀ e a b, V e a b = -V e b a) : |
| 344 | 0 ≤ tensorBlockDiffusion D R P B x (g.orthonormalBasis x) U W |
| 345 | (fun a b => ∑ e, V e a b • g.orthonormalBasis x e) + |
| 346 | D.laplacian φ x * (∑ a, W a ^ 2) + 2 * ψ * (∑ e, ∑ a, ∑ b, (V e a b) ^ 2) := by |
| 347 | let R' : CovariantTensorEvaluation n M 4 := fun y z => R y z + ψ * metricTwoFormIdentity g y z |
| 348 | let B' : CovariantTensorEvaluation n M 2 := fun y z => B y z + φ y * g.inner y (z 0) (z 1) |
| 349 | have hR' : IsSmoothCovariantTensor R' := hR.add ((metricTwoFormIdentity_isSmooth g).const_mul ψ) |
| 350 | have hB' : IsSmoothCovariantTensor B' := hB.add (scalar_metric_isSmoothCovariantTensor (g := g) hφ) |
| 351 | have hp : ∀ᶠ y in 𝓝 x, ∀ e : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 352 | TangentSpace (𝓡 n) y, |
| 353 | (Matrix.fromBlocks (fun ab cd : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) × |
| 354 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 355 | R' y ![e ab.1, e ab.2, e cd.1, e cd.2]) |
| 356 | (fun ab c => P y ![e ab.1, e ab.2, e c]) |
| 357 | (fun a bc => P y ![e bc.1, e bc.2, e a]) |
| 358 | (fun a b => B' y ![e a, e b])).PosSemidef := by |
| 359 | filter_upwards [hpos] with y hy e |
| 360 | apply tensor_block_posSemidef_of_basis g hR' hP hB' y _ e |
| 361 | simpa only [R', B', metricTwoFormIdentity_orthonormalBasis, |
| 362 | Matrix.cons_val_zero, Matrix.cons_val_one, metric_inner_orthonormalBasis] using hy |
| 363 | let b := g.orthonormalBasis x |
| 364 | have hn : (∑ a, ∑ c, B' x ![b a, b c] * W a * W c) + |
| 365 | 2 * (∑ a, ∑ c, ∑ d, P x ![b a, b c, b d] * U a c * W d) + |
| 366 | (∑ a, ∑ c, ∑ d, ∑ e, R' x ![b a, b c, b d, b e] * U a c * U d e) = 0 := by |
| 367 | dsimp only [R', B', b, Matrix.cons_val_zero, Matrix.cons_val_one] |
| 368 | simp only [metricTwoFormIdentity_orthonormalBasis, add_mul, Finset.sum_add_distrib] |
| 369 | have hg := metric_basis_quadratic g x W |
| 370 | have hi := twoFormIdentity_quadratic U hU |
| 371 | have hg' : (∑ a, ∑ c, φ x * g.inner x (b a) (b c) * W a * W c) = |
| 372 | φ x * (∑ a, W a ^ 2) := by |
| 373 | rw [← hg] |
| 374 | simp only [b, Finset.mul_sum, mul_assoc] |
| 375 | have hi' : (∑ a, ∑ c, ∑ d, ∑ e, ψ * twoFormIdentity a c d e * U a c * U d e) = |
| 376 | ψ * (∑ a, ∑ c, (U a c) ^ 2) := by |
| 377 | rw [← hi] |
| 378 | simp only [Finset.mul_sum, mul_assoc] |
| 379 | rw [hg', hi'] |
| 380 | dsimp only at hnull |
| 381 | linarith only [hnull] |
| 382 | have h := perturbed_tensor_block_diffusion_nonneg_at_null D hR hP hB hφ ψ x b hp U W hn |
| 383 | (fun a b => ∑ e, V e a b • g.orthonormalBasis x e) |
| 384 | simpa only [b, metric_basis_quadratic, metricTwoFormIdentity_jet_quadratic g x V hV] using h |
| 385 | |
| 386 | /-- Hamilton's spatial diffusion and prescribed jet terms, in the same index |
| 387 | ordering as the geometric heat-operator contraction. -/ |
| 388 | noncomputable def hamiltonSpatialJetQuadratic (D : LeviCivitaData g) (τ : ℝ) (x : M) |
| 389 | (U : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 390 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 391 | (W : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 392 | (V : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 393 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 394 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) : ℝ := |
| 395 | let b := g.orthonormalBasis x |
| 396 | (∑ a, ∑ c, D.tensorLaplacian (fun y z => |
| 397 | hamiltonM D τ y (z 0) (z 1)) x ![b a, b c] * W a * W c) + |
| 398 | 2 * (∑ a, ∑ c, ∑ d, |
| 399 | D.tensorLaplacian (fun y z => hamiltonP D y |
| 400 | (z 0) (z 1) (z 2)) x ![b a, b c, b d] * U a c * W d) + |
| 401 | (∑ a, ∑ c, ∑ d, ∑ e, |
| 402 | D.tensorLaplacian D.riemannEvaluation x ![b a, b c, b d, b e] * U a c * U d e) + |
| 403 | 4 * (∑ e, ∑ a, ∑ c, ∑ d, |
| 404 | D.covariantTensorDerivative (fun y z => hamiltonP D y (z 0) (z 1) (z 2)) |
| 405 | x ![b e, b a, b c, b d] * V e a c * W d) + |
| 406 | 4 * (∑ e, ∑ a, ∑ c, ∑ d, ∑ f, |
| 407 | D.covariantTensorDerivative D.riemannEvaluation x ![b e, b a, b c, b d, b f] * |
| 408 | V e a c * U d f) + |
| 409 | 2 * (∑ e, ∑ a, ∑ c, ∑ d, ∑ f, |
| 410 | D.curvatureTensor x (b a) (b c) (b d) (b f) * V e a c * V e d f) |
| 411 | |
| 412 | private lemma covariantTensorDerivative_cons_sum' |
| 413 | (D : LeviCivitaData g) {k : ℕ} {T : CovariantTensorEvaluation n M k} |
| 414 | (hT : IsSmoothCovariantTensor T) (x : M) |
| 415 | (w : Fin k → TangentSpace (𝓡 n) x) |
| 416 | (c : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) : |
| 417 | D.covariantTensorDerivative T x |
| 418 | (Fin.cons (∑ e, c e • g.orthonormalBasis x e) w) = |
| 419 | ∑ e, c e * D.covariantTensorDerivative T x (Fin.cons (g.orthonormalBasis x e) w) := by |
| 420 | classical |
| 421 | obtain ⟨L, hL⟩ := (D.covariantTensorDerivative_isSmooth hT).1 x |
| 422 | rw [← Fin.update_cons_zero (x := (0 : TangentSpace (𝓡 n) x)), hL, |
| 423 | L.map_update_sum] |
| 424 | apply Finset.sum_congr rfl |
| 425 | intro e _ |
| 426 | rw [L.map_update_smul] |
| 427 | simp only [smul_eq_mul, Fin.update_cons_zero, ← hL] |
| 428 | |
| 429 | lemma hamiltonSpatialJetQuadratic_eq_tensorBlockDiffusion |
| 430 | (D : LeviCivitaData g) (hD : D.CurvatureTensorCalculus) (τ : ℝ) (x : M) |
| 431 | (U : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 432 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 433 | (W : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 434 | (V : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 435 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 436 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) : |
| 437 | hamiltonSpatialJetQuadratic D τ x U W V = |
| 438 | tensorBlockDiffusion D D.riemannEvaluation |
| 439 | (fun y z => hamiltonP D y (z 0) (z 1) (z 2)) |
| 440 | (fun y z => hamiltonM D τ y (z 0) (z 1)) x (g.orthonormalBasis x) U W |
| 441 | (fun a c => ∑ e, V e a c • g.orthonormalBasis x e) := by |
| 442 | let b := g.orthonormalBasis x |
| 443 | let P : CovariantTensorEvaluation n M 3 := fun y z => hamiltonP D y (z 0) (z 1) (z 2) |
| 444 | let A := fun a c => ∑ e, V e a c • b e |
| 445 | have hP : IsSmoothCovariantTensor P := hamiltonP_isSmoothCovariantTensor D hD |
| 446 | have hfirstP (a c d) : D.covariantTensorDerivative P x ![A a c, b a, b c, b d] = |
| 447 | ∑ e, V e a c * D.covariantTensorDerivative P x ![b e, b a, b c, b d] := |
| 448 | covariantTensorDerivative_cons_sum' D hP x ![b a, b c, b d] (fun e => V e a c) |
| 449 | have hfirstR (a c d f) : D.covariantTensorDerivative D.riemannEvaluation x |
| 450 | ![A d f, b a, b c, b d, b f] = |
| 451 | ∑ e, V e d f * D.covariantTensorDerivative D.riemannEvaluation x |
| 452 | ![b e, b d, b f, b a, b c] := by |
| 453 | rw [D.covariantTensorDerivative_riemannEvaluation_pair_swap hD] |
| 454 | exact covariantTensorDerivative_cons_sum' D hD.1 x ![b d, b f, b a, b c] |
| 455 | (fun e => V e d f) |
| 456 | have hinner (a c d f) : g.inner x (A a c) (A d f) = ∑ e, V e a c * V e d f := |
| 457 | metric_inner_basis_sums g x (fun e => V e a c) (fun e => V e d f) |
| 458 | have hPorder : (∑ a, ∑ c, ∑ d, |
| 459 | W d * D.covariantTensorDerivative P x ![A a c, b a, b c, b d]) = |
| 460 | ∑ e, ∑ a, ∑ c, ∑ d, |
| 461 | D.covariantTensorDerivative P x ![b e, b a, b c, b d] * V e a c * W d := by |
| 462 | simp only [hfirstP, Finset.mul_sum] |
| 463 | rw [sum_four_last'] |
| 464 | apply Finset.sum_congr rfl |
| 465 | intro e _ |
| 466 | apply Finset.sum_congr rfl |
| 467 | intro a _ |
| 468 | apply Finset.sum_congr rfl |
| 469 | intro c _ |
| 470 | apply Finset.sum_congr rfl |
| 471 | intro d _ |
| 472 | ring |
| 473 | have hRorder : (∑ a, ∑ c, ∑ d, ∑ f, |
| 474 | U a c * D.covariantTensorDerivative D.riemannEvaluation x ![A d f, b a, b c, b d, b f]) = |
| 475 | ∑ e, ∑ a, ∑ c, ∑ d, ∑ f, |
| 476 | D.covariantTensorDerivative D.riemannEvaluation x ![b e, b a, b c, b d, b f] * |
| 477 | V e a c * U d f := by |
| 478 | simp only [hfirstR, Finset.mul_sum] |
| 479 | rw [sum_five_last'] |
| 480 | apply Finset.sum_congr rfl |
| 481 | intro e _ |
| 482 | rw [Finset.sum_comm_cycle] |
| 483 | apply Finset.sum_congr rfl |
| 484 | intro d _ |
| 485 | rw [Finset.sum_comm_cycle] |
| 486 | apply Finset.sum_congr rfl |
| 487 | intro f _ |
| 488 | apply Finset.sum_congr rfl |
| 489 | intro a _ |
| 490 | apply Finset.sum_congr rfl |
| 491 | intro c _ |
| 492 | ring |
| 493 | have hVorder : (∑ a, ∑ c, ∑ d, ∑ f, |
| 494 | D.riemannEvaluation x ![b a, b c, b d, b f] * g.inner x (A a c) (A d f)) = |
| 495 | ∑ e, ∑ a, ∑ c, ∑ d, ∑ f, |
| 496 | D.curvatureTensor x (b a) (b c) (b d) (b f) * V e a c * V e d f := by |
| 497 | simp only [hinner, Finset.mul_sum] |
| 498 | rw [sum_five_last'] |
| 499 | simp only [mul_assoc, LeviCivitaData.riemannEvaluation, Matrix.cons_val_zero, |
| 500 | Matrix.cons_val_one, Matrix.cons_val] |
| 501 | unfold hamiltonSpatialJetQuadratic tensorBlockDiffusion |
| 502 | rw [hPorder, hRorder, hVorder] |
| 503 | ring |
| 504 | |
| 505 | /-- Spatial contact for the actual perturbed Hamilton block, with the |
| 506 | barrier error and two-form jet norm fully expanded. -/ |
| 507 | theorem hamiltonSpatialJetQuadratic_nonneg_perturbed_null [T2Space M] |
| 508 | (D : LeviCivitaData g) (hD : D.CurvatureTensorCalculus) (τ : ℝ) |
| 509 | {φ : M → ℝ} (hφ : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ φ) (ψ : ℝ) (x : M) |
| 510 | (hpos : ∀ᶠ y in 𝓝 x, let b := g.orthonormalBasis y |
| 511 | (Matrix.fromBlocks |
| 512 | (fun ac de : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) y)) × |
| 513 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) y)) => |
| 514 | D.curvatureTensor y (b ac.1) (b ac.2) (b de.1) (b de.2) + |
| 515 | ψ * twoFormIdentity ac.1 ac.2 de.1 de.2) |
| 516 | (fun ac d => hamiltonP D y (b ac.1) (b ac.2) (b d)) |
| 517 | (fun c de => hamiltonP D y (b de.1) (b de.2) (b c)) |
| 518 | (fun a c => hamiltonM D τ y (b a) (b c) + φ y * (if a = c then 1 else 0))).PosSemidef) |
| 519 | (U : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 520 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 521 | (W : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 522 | (hU : ∀ a b, U a b = -U b a) |
| 523 | (hnull : let b := g.orthonormalBasis x |
| 524 | (∑ a, ∑ c, hamiltonM D τ x (b a) (b c) * W a * W c) + |
| 525 | 2 * (∑ a, ∑ c, ∑ d, hamiltonP D x (b a) (b c) (b d) * U a c * W d) + |
| 526 | (∑ a, ∑ c, ∑ d, ∑ e, D.curvatureTensor x (b a) (b c) (b d) (b e) * U a c * U d e) + |
| 527 | φ x * (∑ a, W a ^ 2) + ψ * (∑ a, ∑ c, (U a c) ^ 2) = 0) |
| 528 | (V : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 529 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 530 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) |
| 531 | (hV : ∀ e a b, V e a b = -V e b a) : |
| 532 | 0 ≤ hamiltonSpatialJetQuadratic D τ x U W V + |
| 533 | D.laplacian φ x * (∑ a, W a ^ 2) + 2 * ψ * (∑ e, ∑ a, ∑ b, (V e a b) ^ 2) := by |
| 534 | rw [hamiltonSpatialJetQuadratic_eq_tensorBlockDiffusion D hD] |
| 535 | exact perturbed_tensor_block_diffusion_nonneg_in_basis D hD.1 |
| 536 | (hamiltonP_isSmoothCovariantTensor D hD) (hamiltonM_isSmoothCovariantTensor D hD τ) |
| 537 | hφ ψ x hpos U W hU hnull V hV |
| 538 | |
| 539 | end Poincare.RicciFlow.Harnack |