import PoincareLib.Geometry.RicciFlow.Curvature.Calculus import PoincareLib.Geometry.RicciFlow.Harnack.Matrix.Evolution.Quadratic import PoincareLib.Geometry.RicciFlow.Harnack.Matrix.Evolution.QuadraticReaction import PoincareLib.Geometry.RicciFlow.Harnack.Matrix.Evolution.M import PoincareLib.Geometry.RicciFlow.Harnack.Finite /-! # Heat contractions of Hamilton's quadratic The geometric tensor heat equations and the prescribed first jets give the reaction in Chow et al., Part II, Theorem 15.16, (15.56)-(15.58), pp. 278-279. The first jets are evaluated in the metric's orthonormal basis at the point. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false set_option maxHeartbeats 800000 open scoped Manifold ContDiff Bundle BigOperators universe u namespace Poincare.RicciFlow.Harnack open PoincareMT variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] {J : Set โ„} /-- The mixed heat contraction loses its curvature derivatives when the two-form has Hamilton's prescribed first jet. -/ lemma hamiltonP_heat_quadratic_cancellation (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow n M J) {t : โ„} (ht : t โˆˆ interior J) (k : โ„) (x : M) (U : Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ โ„) (W : Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ โ„) : let D := F.connection t let b := (F.metric t).orthonormalBasis x let R := fun a c d e => D.curvatureTensor x (b a) (b c) (b d) (b e) let Ric := fun a c => D.ricci x (b a) (b c) let P := fun a c d => hamiltonP D x (b a) (b c) (b d) let V := fun e a c => ((Ric e a + k * (if e = a then 1 else 0)) * W c - W a * (Ric e c + k * (if e = c then 1 else 0))) / 2 2 * (โˆ‘ a, โˆ‘ c, โˆ‘ d, F.tensorHeatOperator (fun s y z => hamiltonP (F.connection s) y (z 0) (z 1) (z 2)) t x ![b a, b c, b d] * U a c * W d) + 4 * k * (โˆ‘ a, โˆ‘ c, โˆ‘ d, P a c d * U a c * W d) - 4 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ f, D.covariantTensorDerivative D.riemannEvaluation x ![b e, b a, b c, b d, b f] * V e a c * U d f) = 4 * (โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ e, โˆ‘ f, (R a e c f * P e f d + R a e d f * P e c f + R c e d f * P a e f) * U a c * W d) := by have hc := hamiltonP_geometric_prescribed_jet_cancellation (F.connection t) (hC.tensor_calculus n M (F.metric t) (F.connection t)) k x U W dsimp only at hc โŠข rw [tensorHeatOperator_hamiltonP hC F ht] simp only [hamiltonPReaction, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_two, Matrix.head_cons, Matrix.tail_cons, add_mul, sub_mul, Finset.sum_add_distrib, Finset.sum_sub_distrib, Finset.sum_mul, mul_assoc, โ† Finset.mul_sum] at hc โŠข linarith only [hc] /-- The two-tensor heat contraction and prescribed spatial jets cancel the derivative, Ricci-square, and reciprocal-time terms. -/ lemma hamiltonM_heat_quadratic_cancellation (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow n M J) (Tโ‚€ : โ„) {t : โ„} (ht : t โˆˆ interior J) (hฯ„ : t - Tโ‚€ โ‰  0) (x : M) (W : Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ โ„) : let D := F.connection t let b := (F.metric t).orthonormalBasis x let R := fun a c d e => D.curvatureTensor x (b a) (b c) (b d) (b e) let Ric := fun a c => D.ricci x (b a) (b c) let P := fun a c d => hamiltonP D x (b a) (b c) (b d) let Q := fun a c => hamiltonM D (t - Tโ‚€) x (b a) (b c) let dP := fun e a c d => D.covariantTensorDerivative (fun y z => hamiltonP D y (z 0) (z 1) (z 2)) x ![b e, b a, b c, b d] let k := (2 * (t - Tโ‚€))โปยน let V := fun e a c => ((Ric e a + k * (if e = a then 1 else 0)) * W c - W a * (Ric e c + k * (if e = c then 1 else 0))) / 2 (โˆ‘ a, โˆ‘ c, F.tensorHeatOperator (fun s y z => hamiltonM (F.connection s) (s - Tโ‚€) y (z 0) (z 1)) t x ![b a, b c] * W a * W c) + 4 * k * (โˆ‘ a, โˆ‘ c, Q a c * W a * W c) - 4 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, dP e a c d * V e a c * W d) - 2 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ f, R a c d f * V e a c * V e d f) = 2 * (โˆ‘ a, โˆ‘ c, โˆ‘ b, โˆ‘ d, R a c b d * Q c d * W a * W b) - 2 * (โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ b, P a c d * P b d c * W a * W b) + (โˆ‘ a, โˆ‘ b, โˆ‘ c, โˆ‘ d, P c d a * P c d b * W a * W b) := by let I := Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) let D := F.connection t let b := (F.metric t).orthonormalBasis x let R := fun a c d e => D.curvatureTensor x (b a) (b c) (b d) (b e) let Ric := fun a c => D.ricci x (b a) (b c) let P := fun a c d => hamiltonP D x (b a) (b c) (b d) let Q := fun a c => hamiltonM D (t - Tโ‚€) x (b a) (b c) let dP := fun e a c d => D.covariantTensorDerivative (fun y z => hamiltonP D y (z 0) (z 1) (z 2)) x ![b e, b a, b c, b d] have hc := hamiltonM_geometric_prescribed_jet_cancellation D (hC.tensor_calculus n M (F.metric t) D) (t - Tโ‚€) x W have hheat := congrArg (fun A : I โ†’ I โ†’ โ„ => โˆ‘ a, โˆ‘ c, A a c * W a * W c) (funext fun a => funext fun c => tensorHeatOperator_hamiltonM hC F Tโ‚€ ht hฯ„ x (b a) (b c)) have hderiv : (โˆ‘ a, โˆ‘ b, โˆ‘ c, โˆ‘ d, Ric c d * (dP c d a b + dP c d b a) * W a * W b) = โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, Ric e a * (dP e a c d + dP e a d c) * W c * W d := by let ฯƒ : (I ร— I ร— I ร— I) โ‰ƒ (I ร— I ร— I ร— I) := { toFun := fun (a, b, c, d) => (c, d, a, b) invFun := fun (a, b, c, d) => (c, d, a, b) left_inv := by rintro โŸจa, b, c, dโŸฉ; rfl right_inv := by rintro โŸจa, b, c, dโŸฉ; rfl } have he := Fintype.sum_equiv ฯƒ (fun (a, b, c, d) => Ric c d * (dP c d a b + dP c d b a) * W a * W b) (fun (e, a, c, d) => Ric e a * (dP e a c d + dP e a d c) * W c * W d) (by rintro โŸจa, b, c, dโŸฉ; rfl) simpa only [Fintype.sum_prod_type] using he have hcube : (โˆ‘ a, โˆ‘ b, โˆ‘ e, โˆ‘ c, โˆ‘ d, Ric e c * Ric e d * R a d b c * W a * W b) = โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ f, R a c d f * Ric e a * W c * Ric e d * W f := by let ฯƒ : (I ร— I ร— I ร— I ร— I) โ‰ƒ (I ร— I ร— I ร— I ร— I) := { toFun := fun (a, b, e, c, d) => (e, d, a, c, b) invFun := fun (e, a, c, d, f) => (c, f, e, d, a) left_inv := by rintro โŸจa, b, e, c, dโŸฉ; rfl right_inv := by rintro โŸจe, a, c, d, fโŸฉ; rfl } have hswap (a c d f) : R a c d f = R c a f d := by have hs := (hC.tensor_calculus n M (F.metric t) D).2.2.2.1 dsimp only [R] rw [(hs x _ _ _ _).2.1, (hs x _ _ _ _).1, (hs x _ _ _ _).2.1, (hs x _ _ _ _).1, neg_neg] have he := Fintype.sum_equiv ฯƒ (fun (a, b, e, c, d) => Ric e c * Ric e d * R a d b c * W a * W b) (fun (e, a, c, d, f) => R a c d f * Ric e a * W c * Ric e d * W f) (by rintro โŸจa, b, e, c, dโŸฉ; dsimp [ฯƒ]; rw [hswap a d b c]; ring) simpa only [Fintype.sum_prod_type] using he have hlinear : (โˆ‘ a, โˆ‘ b, โˆ‘ c, โˆ‘ d, R a c b d * Q c d * W a * W b) = โˆ‘ a, โˆ‘ c, โˆ‘ b, โˆ‘ d, R a c b d * Q c d * W a * W b := by exact Finset.sum_congr rfl fun _ _ => Finset.sum_comm have hnegative : (โˆ‘ a, โˆ‘ b, โˆ‘ c, โˆ‘ d, P a c d * P b d c * W a * W b) = โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ b, P a c d * P b d c * W a * W b := by apply Finset.sum_congr rfl intro a _ rw [Finset.sum_comm] apply Finset.sum_congr rfl intro c _ exact Finset.sum_comm have htime : (2 * (t - Tโ‚€) ^ 2)โปยน = 2 * ((2 * (t - Tโ‚€))โปยน) ^ 2 := by field_simp have htime_term (r w v : โ„) : r / (2 * (t - Tโ‚€) ^ 2) * w * v = 2 * ((2 * (t - Tโ‚€))โปยน) ^ 2 * (r * w * v) := by rw [div_eq_mul_inv, htime] ring dsimp only [D, b, R, Ric, P, Q, dP] at hderiv hcube hlinear hnegative hc hheat dsimp only at hc hheat โŠข simp only [add_mul, sub_mul, Finset.sum_add_distrib, Finset.sum_sub_distrib, htime_term, โ† Finset.mul_sum] at hheat simp only [div_eq_mul_inv, add_mul, sub_mul, Finset.sum_add_distrib, Finset.sum_mul, mul_assoc, โ† Finset.mul_sum] at hc hheat hderiv hcube hlinear hnegative โŠข linarith only [hc, hheat, hderiv, hcube, hlinear, hnegative] /-- At a point of the Hamilton cone, the actual geometric heat contractions, with Hamilton's prescribed test jets, have nonnegative reaction. -/ lemma hamilton_heat_quadratic_nonneg_of_block (hC : RicciFlowCurvatureTheory.{u}) {Tโ‚€ Tโ‚ : โ„} (F : RicciFlow n M (Set.Ioo Tโ‚€ Tโ‚)) {t : โ„} (ht : t โˆˆ Set.Ioo Tโ‚€ Tโ‚) (x : M) (U : Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ โ„) (W : Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ โ„) (hU : โˆ€ a c, U a c = -U c a) (hQ : HamiltonBlockPos F t x (t - Tโ‚€)) : let D := F.connection t let b := (F.metric t).orthonormalBasis x let R := fun a c d e => D.curvatureTensor x (b a) (b c) (b d) (b e) let Ric := fun a c => D.ricci x (b a) (b c) let P := fun a c d => hamiltonP D x (b a) (b c) (b d) let Q := fun a c => hamiltonM D (t - Tโ‚€) x (b a) (b c) let dP := fun e a c d => D.covariantTensorDerivative (fun y z => hamiltonP D y (z 0) (z 1) (z 2)) x ![b e, b a, b c, b d] let k := (2 * (t - Tโ‚€))โปยน let V := fun e a c => ((Ric e a + k * (if e = a then 1 else 0)) * W c - W a * (Ric e c + k * (if e = c then 1 else 0))) / 2 0 โ‰ค (โˆ‘ a, โˆ‘ c, F.tensorHeatOperator (fun s y z => hamiltonM (F.connection s) (s - Tโ‚€) y (z 0) (z 1)) t x ![b a, b c] * W a * W c) + 2 * (โˆ‘ a, โˆ‘ c, โˆ‘ d, F.tensorHeatOperator (fun s y z => hamiltonP (F.connection s) y (z 0) (z 1) (z 2)) t x ![b a, b c, b d] * U a c * W d) + (โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ e, F.tensorHeatOperator (fun s => (F.connection s).riemannEvaluation) t x ![b a, b c, b d, b e] * U a c * U d e) + 4 * k * ((โˆ‘ a, โˆ‘ c, Q a c * W a * W c) + (โˆ‘ a, โˆ‘ c, โˆ‘ d, P a c d * U a c * W d)) - 4 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, dP e a c d * V e a c * W d) - 4 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ f, D.covariantTensorDerivative D.riemannEvaluation x ![b e, b a, b c, b d, b f] * V e a c * U d f) - 2 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ f, R a c d f * V e a c * V e d f) := by let D := F.connection t let b := (F.metric t).orthonormalBasis x let R := fun a c d e => D.curvatureTensor x (b a) (b c) (b d) (b e) let P := fun a c d => hamiltonP D x (b a) (b c) (b d) let Q := fun a c => hamiltonM D (t - Tโ‚€) x (b a) (b c) have hD := hC.tensor_calculus n M (F.metric t) D have hfirst (a c d e) : R a c d e = -R c a d e := by dsimp only [R] rw [(hD.2.2.2.1 x _ _ _ _).2.1, (hD.2.2.2.1 x _ _ _ _).1, (hD.2.2.2.1 x _ _ _ _).2.1] have hlast (a c d e) : R a c d e = -R a c e d := (hD.2.2.2.1 x _ _ _ _).1 have hpair (a c d e) : R a c d e = R d e a c := (hD.2.2.2.1 x _ _ _ _).2.1 have hbianchi (a c d e) : R a c d e + R c d a e + R d a c e = 0 := (hD.2.2.2.1 x _ _ _ _).2.2.1 have hP (a c d) : P a c d = -P c a d := hamiltonP_skew D x _ _ _ have hn := hamilton_reaction_collected_nonneg R P Q U W hfirst hlast hpair hbianchi hP hU hQ have ht' : t โˆˆ interior (Set.Ioo Tโ‚€ Tโ‚) := by simpa only [interior_Ioo] using ht have hm := hamiltonM_heat_quadratic_cancellation hC F Tโ‚€ ht' (ne_of_gt (sub_pos.mpr ht.1)) x W have hp := hamiltonP_heat_quadratic_cancellation hC F ht' ((2 * (t - Tโ‚€))โปยน) x U W dsimp only [R, P, Q, D, b] at hn dsimp only at hn hm hp โŠข simp_rw [F.tensorHeatOperator_riemann hC ht'] simp only [LeviCivitaData.curvatureB, mul_assoc, โ† Finset.mul_sum] at hn hm hp โŠข linarith only [hn, hm, hp] /-- In a null Hamilton direction the test-field time correction vanishes, leaving precisely the heat and spatial-jet contractions. -/ lemma hamilton_heat_quadratic_nonneg_at_null (hC : RicciFlowCurvatureTheory.{u}) {Tโ‚€ Tโ‚ : โ„} (F : RicciFlow n M (Set.Ioo Tโ‚€ Tโ‚)) {t : โ„} (ht : t โˆˆ Set.Ioo Tโ‚€ Tโ‚) (x : M) (U : Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ โ„) (W : Fin (Module.finrank โ„ (TangentSpace (๐“ก n) x)) โ†’ โ„) (hU : โˆ€ a c, U a c = -U c a) (hQ : HamiltonBlockPos F t x (t - Tโ‚€)) (hnull : let D := F.connection t let b := (F.metric t).orthonormalBasis x (โˆ‘ a, โˆ‘ c, hamiltonM D (t - Tโ‚€) x (b a) (b c) * W a * W c) + 2 * (โˆ‘ a, โˆ‘ c, โˆ‘ d, hamiltonP D x (b a) (b c) (b d) * U a c * W d) + (โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ e, D.curvatureTensor x (b a) (b c) (b d) (b e) * U a c * U d e) = 0) : let D := F.connection t let b := (F.metric t).orthonormalBasis x let Ric := fun a c => D.ricci x (b a) (b c) let k := (2 * (t - Tโ‚€))โปยน let V := fun e a c => ((Ric e a + k * (if e = a then 1 else 0)) * W c - W a * (Ric e c + k * (if e = c then 1 else 0))) / 2 0 โ‰ค (โˆ‘ a, โˆ‘ c, F.tensorHeatOperator (fun s y z => hamiltonM (F.connection s) (s - Tโ‚€) y (z 0) (z 1)) t x ![b a, b c] * W a * W c) + 2 * (โˆ‘ a, โˆ‘ c, โˆ‘ d, F.tensorHeatOperator (fun s y z => hamiltonP (F.connection s) y (z 0) (z 1) (z 2)) t x ![b a, b c, b d] * U a c * W d) + (โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ e, F.tensorHeatOperator (fun s => (F.connection s).riemannEvaluation) t x ![b a, b c, b d, b e] * U a c * U d e) - 4 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, D.covariantTensorDerivative (fun y z => hamiltonP D y (z 0) (z 1) (z 2)) x ![b e, b a, b c, b d] * V e a c * W d) - 4 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ f, D.covariantTensorDerivative D.riemannEvaluation x ![b e, b a, b c, b d, b f] * V e a c * U d f) - 2 * (โˆ‘ e, โˆ‘ a, โˆ‘ c, โˆ‘ d, โˆ‘ f, D.curvatureTensor x (b a) (b c) (b d) (b f) * V e a c * V e d f) := by have h := hamilton_heat_quadratic_nonneg_of_block hC F ht x U W hU hQ have hz := hamiltonBlock_vector_contraction_zero (fun a c d e => (F.connection t).curvatureTensor x ((F.metric t).orthonormalBasis x a) ((F.metric t).orthonormalBasis x c) ((F.metric t).orthonormalBasis x d) ((F.metric t).orthonormalBasis x e)) (fun a c d => hamiltonP (F.connection t) x ((F.metric t).orthonormalBasis x a) ((F.metric t).orthonormalBasis x c) ((F.metric t).orthonormalBasis x d)) (fun a c => hamiltonM (F.connection t) (t - Tโ‚€) x ((F.metric t).orthonormalBasis x a) ((F.metric t).orthonormalBasis x c)) U W hQ hnull dsimp only at h โŠข simpa only [hz, mul_zero, add_zero] using h end Poincare.RicciFlow.Harnack