import PoincareLib.Geometry.Riemannian.Connection import Mathlib.Geometry.Manifold.VectorBundle.LocalFrame /-! # The connection in a differentiable local frame Finite-section linearity and the actual Leibniz rule give a local coefficient formula, with differentiability retained for germ congruence. -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle BigOperators Topology open Filter universe u namespace PoincareMT.ReducedLength variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] {g : RiemannianMetric n M} theorem connection_finset_sum (D : LeviCivitaData g) {ฮน : Type*} (S : Finset ฮน) (ฯƒ : ฮน โ†’ (q : M) โ†’ TangentSpace (๐“ก n) q) (q : M) (hฯƒ : โˆ€ i โˆˆ S, MDifferentiableAt (๐“ก n) ((๐“ก n).prod (๐“ก n)) (T% (ฯƒ i)) q) (X : TangentSpace (๐“ก n) q) : D.connection (fun x โ†ฆ โˆ‘ i โˆˆ S, ฯƒ i x) q X = โˆ‘ i โˆˆ S, D.connection (ฯƒ i) q X := by classical induction S using Finset.induction_on with | empty => simp only [Finset.sum_empty] exact congrArg (fun f : (x : M) โ†’ TangentSpace (๐“ก n) x โ†’L[โ„] TangentSpace (๐“ก n) x โ†ฆ f q X) D.connection.zero | insert a S ha ih => simp only [Finset.mem_insert, forall_eq_or_imp] at hฯƒ simp only [Finset.sum_insert ha] change D.connection (ฯƒ a + (fun x โ†ฆ โˆ‘ i โˆˆ S, ฯƒ i x)) q X = _ rw [D.connection.isCovariantDerivativeOnUniv.add hฯƒ.1 (MDifferentiableAt.sum_section hฯƒ.2)] simp only [add_apply] rw [ih hฯƒ.2] theorem connection_germ_expansion (D : LeviCivitaData g) {ฮน : Type*} [Fintype ฮน] (ฯƒ : (q : M) โ†’ TangentSpace (๐“ก n) q) (frame : ฮน โ†’ (q : M) โ†’ TangentSpace (๐“ก n) q) (c : ฮน โ†’ M โ†’ โ„) (q : M) (X : TangentSpace (๐“ก n) q) (hฯƒ : MDifferentiableAt (๐“ก n) ((๐“ก n).prod (๐“ก n)) (T% ฯƒ) q) (hframe : โˆ€ i, MDifferentiableAt (๐“ก n) ((๐“ก n).prod (๐“ก n)) (T% (frame i)) q) (hc : โˆ€ i, MDifferentiableAt (๐“ก n) (๐“˜(โ„, โ„)) (c i) q) (heq : ฯƒ =แถ [๐“ q] (fun x โ†ฆ โˆ‘ i, c i x โ€ข frame i x)) : D.connection ฯƒ q X = โˆ‘ i, (c i q โ€ข D.connection (frame i) q X + mvfderiv (๐“ก n) (c i) q X โ€ข frame i q) := by have hterm (i : ฮน) := (hc i).smul_section (hframe i) have hcongr := D.connection.isCovariantDerivativeOnUniv.congr_of_eventuallyEq hฯƒ (MDifferentiableAt.sum_section (fun i _ โ†ฆ hterm i)) (by simp) heq rw [hcongr, connection_finset_sum D Finset.univ _ q (fun i _ โ†ฆ hterm i)] apply Finset.sum_congr rfl intro i _ change D.connection ((c i) โ€ข frame i) q X = _ rw [D.connection.isCovariantDerivativeOnUniv.leibniz (hframe i) (hc i)] rfl theorem connection_localFrame (D : LeviCivitaData g) {ฮน : Type*} [Fintype ฮน] (b : Module.Basis ฮน โ„ (EuclideanSpace โ„ (Fin n))) (p q : M) (hq : q โˆˆ (trivializationAt (EuclideanSpace โ„ (Fin n)) (TangentSpace (๐“ก n) : M โ†’ Type _) p).baseSet) (ฯƒ : (x : M) โ†’ TangentSpace (๐“ก n) x) (hฯƒ : MDifferentiableAt (๐“ก n) ((๐“ก n).prod (๐“ก n)) (T% ฯƒ) q) (X : TangentSpace (๐“ก n) q) : let e := trivializationAt (EuclideanSpace โ„ (Fin n)) (TangentSpace (๐“ก n) : M โ†’ Type _) p D.connection ฯƒ q X = โˆ‘ i, ((e.localFrameCoeff (๐“ก n) b i q (ฯƒ q)) โ€ข D.connection (e.localFrame b i) q X + mvfderiv (๐“ก n) (fun x โ†ฆ e.localFrameCoeff (๐“ก n) b i x (ฯƒ x)) q X โ€ข e.localFrame b i q) := by let e := trivializationAt (EuclideanSpace โ„ (Fin n)) (TangentSpace (๐“ก n) : M โ†’ Type _) p apply connection_germ_expansion D ฯƒ (e.localFrame b) (fun i x โ†ฆ e.localFrameCoeff (๐“ก n) b i x (ฯƒ x)) q X hฯƒ ยท intro i exact (contMDiffAt_localFrame_of_mem 1 e b i hq).mdifferentiableAt (by simp) ยท intro i exact mdifferentiableAt_localFrameCoeff b hq hฯƒ i ยท exact e.eventually_eq_localFrame_sum_coeff_smul b hq end PoincareMT.ReducedLength