import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.CenteredConnection /-! # Connection calculations at every point of a fixed chart Finite frame expansion keeps the chart fixed while the evaluation point varies. The coefficient map in the connection formula is explicit. -/ set_option autoImplicit false set_option maxSynthPendingDepth 3 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] local notation "E" => EuclideanSpace โ„ (Fin n) theorem mdifferentiableAt_chartVectorField_variable_on_source (p q : M) (hq : q โˆˆ (chartAt E p).source) (c : M โ†’ E) (hc : MDifferentiableAt (๐“ก n) (๐“ก n) c q) : MDifferentiableAt (๐“ก n) ((๐“ก n).prod (๐“ก n)) (T% (fun x โ†ฆ chartVectorField p (c x) x)) q := by let b := (stdOrthonormalBasis โ„ E).toBasis have hsum : MDifferentiableAt (๐“ก n) ((๐“ก n).prod (๐“ก n)) (T% (fun x โ†ฆ โˆ‘ i, b.repr (c x) i โ€ข chartVectorField p (b i) x)) q := by apply MDifferentiableAt.sum_section intro i _ have ha : MDifferentiableAt (๐“ก n) (๐“˜(โ„, โ„)) (fun x โ†ฆ b.repr (c x) i) q := (b.coord i).toContinuousLinearMap.mdifferentiableAt.comp q hc have hv := ((chartVectorField_smooth p (b i)).contMDiffAt ((chartAt E p).open_source.mem_nhds hq)).mdifferentiableAt (by simp) exact ha.smul_section hv apply hsum.congr_of_eventuallyEq exact Filter.Eventually.of_forall fun x โ†ฆ congrArg (Bundle.TotalSpace.mk x) (congrFun (chartVectorField_variable_expansion p c b) x) set_option backward.isDefEq.respectTransparency false in theorem connection_chartVectorField_variable_on_source {g : RiemannianMetric n M} (D : LeviCivitaData g) (p q : M) (hq : q โˆˆ (chartAt E p).source) (c : M โ†’ E) (hc : MDifferentiableAt (๐“ก n) (๐“ก n) c q) (X : TangentSpace (๐“ก n) q) (A : E โ†’L[โ„] E) (hA : โˆ€ v : E, D.connection (chartVectorField p v) q X = chartVectorField p (A v) q) : D.connection (fun x โ†ฆ chartVectorField p (c x) x) q X = chartVectorField p (A (c q) + mvfderiv (๐“ก n) c q X) q := by let b := (stdOrthonormalBasis โ„ E).toBasis let a := fun i x โ†ฆ b.repr (c x) i have ha (i : Fin (Module.finrank โ„ E)) : MDifferentiableAt (๐“ก n) (๐“˜(โ„, โ„)) (a i) q := (b.coord i).toContinuousLinearMap.mdifferentiableAt.comp q hc have hframe (i : Fin (Module.finrank โ„ E)) : MDifferentiableAt (๐“ก n) ((๐“ก n).prod (๐“ก n)) (T% (chartVectorField p (b i))) q := ((chartVectorField_smooth p (b i)).contMDiffAt ((chartAt E p).open_source.mem_nhds hq)).mdifferentiableAt (by simp) have h := connection_germ_expansion D (fun x โ†ฆ chartVectorField p (c x) x) (fun i โ†ฆ chartVectorField p (b i)) a q X (mdifferentiableAt_chartVectorField_variable_on_source p q hq c hc) hframe ha (Filter.Eventually.of_forall (congrFun (chartVectorField_variable_expansion p c b))) have hder (i : Fin (Module.finrank โ„ E)) : mvfderiv (๐“ก n) (a i) q X = b.repr (mvfderiv (๐“ก n) c q X) i := mvfderiv_const_clm (b.coord i).toContinuousLinearMap c q hc X rw [h] simp only [hA, hder, Finset.sum_add_distrib] let L : E โ†’L[โ„] TangentSpace (๐“ก n) q := (mfderiv (๐“ก n) (๐“ก n) (chartAt E p) q).inverse change (โˆ‘ i, a i q โ€ข L (A (b i))) + (โˆ‘ i, b.repr (mvfderiv (๐“ก n) c q X) i โ€ข L (b i)) = L (A (c q) + mvfderiv (๐“ก n) c q X) simp only [a, โ† map_smul, โ† map_sum, b.sum_repr, map_add] theorem connection_of_eventuallyEq_chartVectorField_on_source {g : RiemannianMetric n M} (D : LeviCivitaData g) (p q : M) (hq : q โˆˆ (chartAt E p).source) (c : M โ†’ E) (hc : MDifferentiableAt (๐“ก n) (๐“ก n) c q) (ฯƒ : (x : M) โ†’ TangentSpace (๐“ก n) x) (heq : ฯƒ =แถ [๐“ q] (fun x โ†ฆ chartVectorField p (c x) x)) (X : TangentSpace (๐“ก n) q) (A : E โ†’L[โ„] E) (hA : โˆ€ v : E, D.connection (chartVectorField p v) q X = chartVectorField p (A v) q) : D.connection ฯƒ q X = chartVectorField p (A (c q) + mvfderiv (๐“ก n) c q X) q := by have hv := mdifferentiableAt_chartVectorField_variable_on_source p q hq c hc have hฯƒ : MDifferentiableAt (๐“ก n) ((๐“ก n).prod (๐“ก n)) (T% ฯƒ) q := by apply hv.congr_of_eventuallyEq filter_upwards [heq] with x hx exact congrArg (Bundle.TotalSpace.mk x) hx rw [D.connection.isCovariantDerivativeOnUniv.congr_of_eventuallyEq hฯƒ hv (by simp) heq] exact connection_chartVectorField_variable_on_source D p q hq c hc X A hA theorem mvfderiv_vector_chartVectorField (p : M) (f : M โ†’ E) (y v : E) (hy : y โˆˆ (chartAt E p).target) (hf : MDifferentiableAt (๐“ก n) (๐“ก n) f ((chartAt E p).symm y)) : mvfderiv (๐“ก n) f ((chartAt E p).symm y) (chartVectorField p v ((chartAt E p).symm y)) = fderiv โ„ (fun z โ†ฆ f ((chartAt E p).symm z)) y v := by rw [chartVectorField_at_inverse p v y hy] have h := mfderiv_comp y hf ((mdifferentiable_chart (I := ๐“ก n) p).mdifferentiableAt_symm hy) rw [mfderiv_eq_fderiv] at h exact (congrArg (fun L โ†ฆ L v) h).symm end PoincareMT.ReducedLength