/- Adapted from Mapher `PoincareMT/Proofs/M03/ScalarCommutator.lean` at f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See `references/ricci-flow/mapher/local-theory/port.json`. -/ import PoincareLib.Geometry.RicciFlow.Local.Connection.Family /-! # Scalar differentiation along the Lie bracket Transport Mathlib's Euclidean commutator identity through the extended chart at the evaluation point. The local chain-rule identities hold on a whole neighborhood, so their derivatives agree there. The sign is the convention used in Morgan-Tian, printed pp. 5-7: [X,Y]f = X(Yf) - Y(Xf). -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle Topology open Bundle Manifold Set universe u namespace PoincareMT.RicciFlow.Local variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] theorem mvfderiv_mlieBracket_eq_commutator {U : Set M} (hU : IsOpen U) {f : M โ†’ โ„} (hf : ContMDiffOn (๐“ก n) ๐“˜(โ„, โ„) โˆž f U) (X Y : (x : M) โ†’ TangentSpace (๐“ก n) x) (hX : ContMDiffOn (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) โˆž (T% X) U) (hY : ContMDiffOn (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) โˆž (T% Y) U) {x : M} (hx : x โˆˆ U) : mvfderiv (๐“ก n) f x (VectorField.mlieBracket (๐“ก n) X Y x) = mvfderiv (๐“ก n) (fun y => mvfderiv (๐“ก n) f y (Y y)) x (X x) - mvfderiv (๐“ก n) (fun y => mvfderiv (๐“ก n) f y (X y)) x (Y x) := by let : IsManifold (๐“ก n) (โˆž + 1) M := by simpa using (inferInstance : IsManifold (๐“ก n) โˆž M) let e := extChartAt (๐“ก n) x have hex : e.symm (e x) = x := e.left_inv (mem_extChartAt_source x) have he0 : e x โˆˆ e.target := mem_extChartAt_target x have he (q : EuclideanSpace โ„ (Fin n)) (hq : q โˆˆ e.target) : ContMDiffAt ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) โˆž e.symm q := (contMDiffOn_extChartAt_symm (I := ๐“ก n) x).contMDiffAt (extChartAt_target_mem_nhds' hq) have hei (q : EuclideanSpace โ„ (Fin n)) (hq : q โˆˆ e.target) : (mfderiv ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm q).IsInvertible := by simpa only [(๐“ก n).range_eq_univ, mfderivWithin_univ] using (isInvertible_mfderivWithin_extChartAt_symm (I := ๐“ก n) hq) have heid : mfderiv ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm (e x) = ContinuousLinearMap.id โ„ (TangentSpace (๐“ก n) (e x)) := by simpa only [(๐“ก n).range_eq_univ, mfderivWithin_univ] using! (mfderivWithin_range_extChartAt_symm (I := ๐“ก n) (x := x)) have hfx := hf.contMDiffAt (hU.mem_nhds hx) have hfex : ContMDiffAt (๐“ก n) ๐“˜(โ„, โ„) โˆž f (e.symm (e x)) := by simpa only [hex] using hfx let h : EuclideanSpace โ„ (Fin n) โ†’ โ„ := f โˆ˜ e.symm let V : EuclideanSpace โ„ (Fin n) โ†’ EuclideanSpace โ„ (Fin n) := fun q => VectorField.mpullback ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm X q let W : EuclideanSpace โ„ (Fin n) โ†’ EuclideanSpace โ„ (Fin n) := fun q => VectorField.mpullback ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm Y q have hh : ContDiffAt โ„ โˆž h (e x) := (hfex.comp (e x) (he _ he0)).contDiffAt have hfield (Z : (y : M) โ†’ TangentSpace (๐“ก n) y) (hZ : ContMDiffOn (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) โˆž (T% Z) U) : ContDiffAt โ„ โˆž (VectorField.mpullback ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm Z) (e x) := by have hZex : ContMDiffAt (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) โˆž (T% Z) (e.symm (e x)) := by simpa only [hex] using hZ.contMDiffAt (hU.mem_nhds hx) exact contMDiffAt_vectorSpace_iff_contDiffAt.mp (hZex.mpullback_vectorField_preimage (he _ he0) (hei _ he0) (by simp)) have hdir (Z : (y : M) โ†’ TangentSpace (๐“ก n) y) (hZ : ContMDiffOn (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) โˆž (T% Z) U) : ContMDiffAt (๐“ก n) ๐“˜(โ„, โ„) โˆž (fun y => mvfderiv (๐“ก n) f y (Z y)) x := by have hd := ContMDiffAt.clm_apply_of_inCoordinates (bโ‚ := id) (bโ‚‚ := f) (hfx.mfderiv_const (m := โˆž) (n := โˆž) (by simp)) (hZ.contMDiffAt (hU.mem_nhds hx)) hfx convert (Bundle.contMDiffAt_totalSpace.mp hd).2 using 1 funext y simp only [trivializationAt_model_space_apply] rfl have hU' : e.symm โปยน' U โˆˆ ๐“ (e x) := (he _ he0).continuousAt.preimage_mem_nhds (by simpa only [hex] using hU.mem_nhds hx) have htransport (Z : (y : M) โ†’ TangentSpace (๐“ก n) y) : (fun q => fderiv โ„ h q (VectorField.mpullback ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm Z q)) =แถ [๐“ (e x)] (fun q => mvfderiv (๐“ก n) f (e.symm q) (Z (e.symm q))) := by filter_upwards [hU', extChartAt_target_mem_nhds (I := ๐“ก n) x] with q hqU hq have hfd := (hf.contMDiffAt (hU.mem_nhds hqU)).mdifferentiableAt (by simp) rw [โ† mfderiv_eq_fderiv] change mvfderiv ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (f โˆ˜ e.symm) q _ = _ rw [mvfderiv_comp q hfd ((he q hq).mdifferentiableAt (by simp)), VectorField.mpullback_apply, ContinuousLinearMap.comp_apply, (hei q hq).self_apply_inverse] have houter (Z : (y : M) โ†’ TangentSpace (๐“ก n) y) (hZ : ContMDiffOn (๐“ก n) ((๐“ก n).prod ๐“˜(โ„, EuclideanSpace โ„ (Fin n))) โˆž (T% Z) U) (a : EuclideanSpace โ„ (Fin n)) : fderiv โ„ (fun q => fderiv โ„ h q (VectorField.mpullback ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm Z q)) (e x) a = mvfderiv (๐“ก n) (fun y => mvfderiv (๐“ก n) f y (Z y)) x a := by rw [(htransport Z).fderiv_eq, โ† mfderiv_eq_fderiv] change mvfderiv ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) ((fun y => mvfderiv (๐“ก n) f y (Z y)) โˆ˜ e.symm) (e x) a = _ rw [mvfderiv_comp_apply_of_eq (e x) ((hdir Z hZ).mdifferentiableAt (by simp)) ((he _ he0).mdifferentiableAt (by simp)) hex a, heid] rfl have hval (Z : (y : M) โ†’ TangentSpace (๐“ก n) y) : VectorField.mpullback ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm Z (e x) = Z x := by have hinv : ((mfderiv ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (๐“ก n) e.symm (e x)).inverse (Z (e.symm (e x))) : EuclideanSpace โ„ (Fin n)) = Z (e.symm (e x)) := by simpa only [(๐“ก n).range_eq_univ, mfderivWithin_univ] using! (mfderivWithin_extChartAt_symm_inverse_apply (I := ๐“ก n) (x := x) (Z (e.symm (e x)))) have hvalue : (Z (e.symm (e x)) : EuclideanSpace โ„ (Fin n)) = Z x := congrArg (fun y => (Z y : EuclideanSpace โ„ (Fin n))) hex exact hinv.trans hvalue have hdf : fderiv โ„ h (e x) = mvfderiv (๐“ก n) f x := by rw [โ† mfderiv_eq_fderiv] change mvfderiv ๐“˜(โ„, EuclideanSpace โ„ (Fin n)) (f โˆ˜ e.symm) (e x) = _ rw [mvfderiv_comp (e x) (hfex.mdifferentiableAt (by simp)) ((he _ he0).mdifferentiableAt (by simp)), heid] change mvfderiv (๐“ก n) f (e.symm (e x)) = mvfderiv (๐“ก n) f x rw [hex] have hbr : VectorField.mlieBracket (๐“ก n) X Y x = VectorField.lieBracket โ„ V W (e x) := by delta VectorField.mlieBracket rw [VectorField.mlieBracketWithin_apply] simp only [(๐“ก n).range_eq_univ, Set.preimage_univ, Set.inter_univ, VectorField.mpullbackWithin_univ, mfderiv_extChartAt_self] change (ContinuousLinearMap.id โ„ (EuclideanSpace โ„ (Fin n))).inverse (VectorField.lieBracketWithin โ„ V W Set.univ (e x)) = _ rw [ContinuousLinearMap.inverse_id] change VectorField.lieBracketWithin โ„ V W Set.univ (e x) = _ rw [VectorField.lieBracketWithin_univ] have hEuclid := VectorField.fderiv_apply_lieBracket (V := V) (W := W) hh (by rw [minSmoothness_of_isRCLikeNormedField] exact WithTop.coe_le_coe.mpr (le_top : (2 : โ„•โˆž) โ‰ค โŠค)) ((hfield Y hY).differentiableAt (by simp)) ((hfield X hX).differentiableAt (by simp)) have houterY := houter Y hY (V (e x)) have houterX := houter X hX (W (e x)) change fderiv โ„ (fun q => fderiv โ„ h q (W q)) (e x) (V (e x)) = _ at houterY change fderiv โ„ (fun q => fderiv โ„ h q (V q)) (e x) (W (e x)) = _ at houterX rw [houterY, houterX] at hEuclid have hV : V (e x) = X x := hval X have hW : W (e x) = Y x := hval Y rw [hV, hW] at hEuclid rw [hbr, โ† hdf] exact hEuclid end PoincareMT.RicciFlow.Local