/- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/CoordinateCurvatureNative.lean` at f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See `references/ricci-flow/mapher/local-theory/port.json`. -/ import PoincareLib.Geometry.RicciFlow.Local.Existence.CoordinateConnection import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.CurvatureTrace /-! # Curvature coefficients of a commuting local frame The covariant-derivative Leibniz rule gives the derivative and quadratic Christoffel terms. The Ricci contraction then follows from the native curvature trace theorem, so the signs agree with the frozen PoincareMT curvature convention. -/ set_option autoImplicit false set_option maxHeartbeats 1600000 open scoped Manifold ContDiff Bundle BigOperators Topology noncomputable section universe u namespace PoincareMT.DeTurckNative variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] private theorem connection_sum_at {g : RiemannianMetric n M} (D : LeviCivitaData g) (Z : Fin n โ†’ (y : M) โ†’ TangentSpace (๐“ก n) y) {x : M} (hZ : โˆ€ a, MDifferentiableAt (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) (T% (Z a)) x) (v : TangentSpace (๐“ก n) x) : D.connection (fun y => โˆ‘ a, Z a y) x v = โˆ‘ a, D.connection (Z a) x v := by classical have hc := D.connection.isCovariantDerivativeOn (s := Set.univ) have hsum (s : Finset (Fin n)) : D.connection (fun y => โˆ‘ a โˆˆ s, Z a y) x v = โˆ‘ a โˆˆ s, D.connection (Z a) x v := by induction s using Finset.induction_on with | empty => simp only [Finset.sum_empty] change D.connection 0 x v = 0 rw [hc.zero, ContinuousLinearMap.zero_apply] | @insert a s ha ih => simp only [Finset.sum_insert ha] change D.connection (Z a + fun y => โˆ‘ c โˆˆ s, Z c y) x v = _ rw [hc.add (hZ a) (MDifferentiableAt.sum_section fun c _ => hZ c), ContinuousLinearMap.add_apply, ih] exact hsum Finset.univ theorem connection_frame_expansion {g : RiemannianMetric n M} (D : LeviCivitaData g) (F : Fin n โ†’ (y : M) โ†’ TangentSpace (๐“ก n) y) (f : Fin n โ†’ M โ†’ โ„) (Q : (y : M) โ†’ TangentSpace (๐“ก n) y) {x : M} (hF : โˆ€ a, MDifferentiableAt (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) (T% (F a)) x) (hf : โˆ€ a, MDifferentiableAt (๐“ก n) ๐“˜(โ„, โ„) (f a) x) (hQ : MDifferentiableAt (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) (T% Q) x) (hrep : โˆ€แถ  y in ๐“ x, Q y = โˆ‘ a, f a y โ€ข F a y) (v : TangentSpace (๐“ก n) x) : D.connection Q x v = โˆ‘ a, (f a x โ€ข D.connection (F a) x v + mvfderiv (๐“ก n) (f a) x v โ€ข F a x) := by have hc := D.connection.isCovariantDerivativeOn (s := Set.univ) have hterm (a : Fin n) : MDifferentiableAt (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) (T% ((f a) โ€ข F a)) x := (hf a).smul_section (hF a) have heq := hc.congr_of_eventuallyEq hQ (MDifferentiableAt.sum_section fun a _ => hterm a) Filter.univ_mem hrep calc D.connection Q x v = D.connection (fun y => โˆ‘ a, f a y โ€ข F a y) x v := congrArg (fun L => L v) heq _ = โˆ‘ a, D.connection ((f a) โ€ข F a) x v := connection_sum_at D (fun a => (f a) โ€ข F a) hterm v _ = _ := by apply Finset.sum_congr rfl intro a _ exact congrArg (fun L => L v) (hc.leibniz (hF a) (hf a)) def frameCurvatureCoefficient (F : Fin n โ†’ (y : M) โ†’ TangentSpace (๐“ก n) y) (ฮ“ : Fin n โ†’ Fin n โ†’ Fin n โ†’ M โ†’ โ„) (x : M) (i j k l : Fin n) : โ„ := mvfderiv (๐“ก n) (ฮ“ l j k) x (F i x) - mvfderiv (๐“ก n) (ฮ“ l i k) x (F j x) + โˆ‘ a, (ฮ“ a j k x * ฮ“ l i a x - ฮ“ a i k x * ฮ“ l j a x) theorem curvature_repr_eq_frameCurvatureCoefficient {g : RiemannianMetric n M} (D : LeviCivitaData g) {U : Set M} (hU : IsOpen U) (F : Fin n โ†’ (y : M) โ†’ TangentSpace (๐“ก n) y) (hF : โˆ€ a, ContMDiffOn (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) โˆž (T% (F a)) U) (ฮ“ : Fin n โ†’ Fin n โ†’ Fin n โ†’ M โ†’ โ„) (hcoeff : โˆ€ y โˆˆ U, โˆ€ a c, D.connection (F c) y (F a y) = โˆ‘ l, ฮ“ l a c y โ€ข F l y) {x : M} (hx : x โˆˆ U) (hฮ“ : โˆ€ l a c, MDifferentiableAt (๐“ก n) ๐“˜(โ„, โ„) (ฮ“ l a c) x) (b : Module.Basis (Fin n) โ„ (TangentSpace (๐“ก n) x)) (hpoint : โˆ€ a, F a x = b a) (hbracket : โˆ€ a c, VectorField.mlieBracket (๐“ก n) (F a) (F c) x = 0) (i j k l : Fin n) : b.repr (D.curvature x (F i x) (F j x) (F k x)) l = frameCurvatureCoefficient F ฮ“ x i j k l := by classical have hFmd (a : Fin n) := ((hF a).contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp) have hcoord (a c r : Fin n) : b.coord r (D.connection (F c) x (F a x)) = ฮ“ r a c x := by rw [hcoeff x hx a c, map_sum] simp [map_smul, hpoint, Module.Basis.coord_apply, Module.Basis.repr_self_apply, Finsupp.single_apply, smul_eq_mul] have houter (a c d r : Fin n) : b.coord r (D.connection (fun y => D.connection (F d) y (F c y)) x (F a x)) = mvfderiv (๐“ก n) (ฮ“ r c d) x (F a x) + โˆ‘ m, ฮ“ m c d x * ฮ“ r a m x := by have hNs := D.contMDiffOn_connection_apply hU (F c) (F d) (hF c) (hF d) have hN := (hNs.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp) have hrep : โˆ€แถ  y in ๐“ x, D.connection (F d) y (F c y) = โˆ‘ m, ฮ“ m c d y โ€ข F m y := Filter.eventuallyEq_of_mem (hU.mem_nhds hx) (fun y hy => hcoeff y hy c d) have hexp := connection_frame_expansion D F (fun m => ฮ“ m c d) (fun y => D.connection (F d) y (F c y)) hFmd (fun m => hฮ“ m c d) hN hrep (F a x) rw [hexp, map_sum] simp only [map_add, map_smul, smul_eq_mul, hcoord, Finset.sum_add_distrib] have hbasis (m : Fin n) : b.coord r (F m x) = if m = r then 1 else 0 := by rw [hpoint m, Module.Basis.coord_apply, Module.Basis.repr_self_apply] simp [hbasis, add_comm] change b.coord l (D.curvature x (F i x) (F j x) (F k x)) = _ rw [RicciFlow.Local.curvature_eq_curvatureOnFields D hU (F i) (F j) (F k) (hF i) (hF j) (hF k) hx] unfold LeviCivitaData.curvatureOnFields rw [hbracket i j, map_zero, sub_zero, map_sub, houter i j k l, houter j i k l] simp only [frameCurvatureCoefficient, Finset.sum_sub_distrib] ring theorem ricci_eq_sum_frameCurvatureCoefficient {g : RiemannianMetric n M} (D : LeviCivitaData g) {U : Set M} (hU : IsOpen U) (F : Fin n โ†’ (y : M) โ†’ TangentSpace (๐“ก n) y) (hF : โˆ€ a, ContMDiffOn (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) โˆž (T% (F a)) U) (ฮ“ : Fin n โ†’ Fin n โ†’ Fin n โ†’ M โ†’ โ„) (hcoeff : โˆ€ y โˆˆ U, โˆ€ a c, D.connection (F c) y (F a y) = โˆ‘ l, ฮ“ l a c y โ€ข F l y) {x : M} (hx : x โˆˆ U) (hฮ“ : โˆ€ l a c, MDifferentiableAt (๐“ก n) ๐“˜(โ„, โ„) (ฮ“ l a c) x) (b : Module.Basis (Fin n) โ„ (TangentSpace (๐“ก n) x)) (hpoint : โˆ€ a, F a x = b a) (hbracket : โˆ€ a c, VectorField.mlieBracket (๐“ก n) (F a) (F c) x = 0) (i j : Fin n) : D.ricci x (F i x) (F j x) = โˆ‘ k, frameCurvatureCoefficient F ฮ“ x k i j k := by rw [RicciFlow.Local.ricci_eq_sum_basis D x (F i x) (F j x) b] apply Finset.sum_congr rfl intro k _ rw [โ† hpoint k] exact curvature_repr_eq_frameCurvatureCoefficient D hU F hF ฮ“ hcoeff hx hฮ“ b hpoint hbracket k i j k end PoincareMT.DeTurckNative end