/- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/ConjugatorPullbackDerivativeNative.lean` at f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See `references/ricci-flow/mapher/local-theory/port.json`. -/ import PoincareLib.Geometry.RicciFlow.Local.Gauge.Flow.ConjugatorChartLie import PoincareLib.Geometry.RicciFlow.Local.Gauge.Flow.ConjugatorWithinDerivative import Mathlib.Geometry.Manifold.Diffeomorph /-! # The actual fixed-metric pullback derivative Local coordinates turn the manifold orbit equation into the Euclidean one. The within-product variational equation and the intrinsic chart Lie identity then compute the pullback derivative, including time zero. -/ set_option autoImplicit false set_option maxHeartbeats 2400000 set_option backward.isDefEq.respectTransparency false open scoped Manifold ContDiff Bundle Topology noncomputable section universe u namespace PoincareMT.ConjugatorLieDerivativeNative variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] local notation "E" => EuclideanSpace ℝ (Fin n) theorem chartMap_spatial_derivative (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) (p q : M) {x : M} (hp : x ∈ (chartAt E p).source) (hq : Ξ¦ x ∈ (chartAt E q).source) (u : TangentSpace (𝓑 n) x) : fderiv ℝ (fun z => chartAt E q (Ξ¦ ((chartAt E p).symm z))) (chartAt E p x) (mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E p) x u) = mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E q) (Ξ¦ x) (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x u) := by have hback := (chartAt E p).left_inv hp have hi := (mdifferentiable_chart (I := 𝓑 n) p).mdifferentiableAt_symm ((chartAt E p).map_source hp) have hPhi := Ξ¦.mdifferentiable (by simp) x have hiPhi : MDifferentiableAt π“˜(ℝ, E) (𝓑 n) (Ξ¦ ∘ (chartAt E p).symm) (chartAt E p x) := by exact hPhi.comp_of_eq (chartAt E p x) hi hback have houter := mfderiv_comp_apply_of_eq (chartAt E p x) ((mdifferentiable_chart (I := 𝓑 n) q).mdifferentiableAt hq) hiPhi (show (Ξ¦ ∘ (chartAt E p).symm) (chartAt E p x) = Ξ¦ x by simp only [Function.comp_apply, hback]) (mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E p) x u) have hinner := mfderiv_comp_apply_of_eq (chartAt E p x) hPhi hi hback (mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E p) x u) have hinv := congrArg (fun L : TangentSpace (𝓑 n) x β†’L[ℝ] TangentSpace (𝓑 n) x => L u) ((mdifferentiable_chart (I := 𝓑 n) p).symm_comp_deriv hp) have hinv' : mfderiv π“˜(ℝ, E) (𝓑 n) (chartAt E p).symm (chartAt E p x) (mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E p) x u) = u := hinv rw [hinv'] at hinner rw [hinner, mfderiv_eq_fderiv] at houter exact houter theorem chartMetricForm_chartMap (g : RiemannianMetric n M) (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) (p q : M) {x : M} (hp : x ∈ (chartAt E p).source) (hq : Ξ¦ x ∈ (chartAt E q).source) (u v : TangentSpace (𝓑 n) x) : chartMetricForm g q (chartAt E q (Ξ¦ x)) (fderiv ℝ (fun z => chartAt E q (Ξ¦ ((chartAt E p).symm z))) (chartAt E p x) (mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E p) x u)) (fderiv ℝ (fun z => chartAt E q (Ξ¦ ((chartAt E p).symm z))) (chartAt E p x) (mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E p) x v)) = g.inner (Ξ¦ x) (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x u) (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x v) := by rw [chartMetricForm_apply, (chartAt E q).left_inv hq, chartMap_spatial_derivative Ξ¦ p q hp hq u, chartMap_spatial_derivative Ξ¦ p q hp hq v] have hinv := (mdifferentiable_chart (I := 𝓑 n) q).symm_comp_deriv hq have hu := congrArg (fun L : TangentSpace (𝓑 n) (Ξ¦ x) β†’L[ℝ] TangentSpace (𝓑 n) (Ξ¦ x) => L (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x u)) hinv have hv := congrArg (fun L : TangentSpace (𝓑 n) (Ξ¦ x) β†’L[ℝ] TangentSpace (𝓑 n) (Ξ¦ x) => L (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x v)) hinv exact congrArgβ‚‚ (fun a b => g.inner (Ξ¦ x) a b) hu hv theorem hasDerivWithinAt_fixedMetric_pullback_neg {T t : ℝ} (hT : 0 < T) (ht : t ∈ Set.Ico 0 T) {g : RiemannianMetric n M} (D : LeviCivitaData g) (Ξ¦ : ℝ β†’ Diffeomorph (𝓑 n) (𝓑 n) M M ∞) (W : (y : M) β†’ TangentSpace (𝓑 n) y) (hΞ¦ : ContMDiffOn (π“˜(ℝ, ℝ).prod (𝓑 n)) (𝓑 n) ∞ (fun q : ℝ Γ— M => Ξ¦ q.1 q.2) (Set.Ico 0 T Γ—Λ’ Set.univ)) (hW : βˆ€ y, ContMDiffAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, E)) ∞ (T% W) y) (hgen : βˆ€ y : M, HasMFDerivWithinAt π“˜(ℝ, ℝ) (𝓑 n) (fun s => Ξ¦ s y) (Set.Ico 0 T) t ((1 : ℝ β†’L[ℝ] ℝ).smulRight (-W (Ξ¦ t y)))) (x : M) (u v : TangentSpace (𝓑 n) x) : HasDerivWithinAt (fun s => g.inner (Ξ¦ s x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ s) x u) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ s) x v)) (-DeTurckNative.metricLieDerivative D W (Ξ¦ t x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x u) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x v)) (Set.Ico 0 T) t := by let p := x let q := Ξ¦ t x let zβ‚€ := chartAt E p x let F : ℝ Γ— E β†’ E := fun a => chartAt E q (Ξ¦ a.1 ((chartAt E p).symm a.2)) let U := (chartAt E p).target let J := Set.Ico 0 T let V : E β†’ E := fun z => -chartVector q W z have hp : x ∈ (chartAt E p).source := mem_chart_source E x have hq : Ξ¦ t x ∈ (chartAt E q).source := mem_chart_source E (Ξ¦ t x) have hzβ‚€ : zβ‚€ ∈ U := (chartAt E p).map_source hp have hback : (chartAt E p).symm zβ‚€ = x := (chartAt E p).left_inv hp have hFval : F (t, zβ‚€) = chartAt E q (Ξ¦ t x) := by simp only [F, hback] have hFtgt : F (t, zβ‚€) ∈ (chartAt E q).target := by rw [hFval] exact (chartAt E q).map_source hq have hFback : (chartAt E q).symm (F (t, zβ‚€)) = Ξ¦ t x := by rw [hFval, (chartAt E q).left_inv hq] have hcoord : ContDiffWithinAt ℝ 2 F (J Γ—Λ’ U) (t, zβ‚€) := by have hinverse : ContMDiffWithinAt π“˜(ℝ, E) (𝓑 n) ∞ (chartAt E p).symm U zβ‚€ := contMDiffOn_chart_symm (I := 𝓑 n) (x := p) zβ‚€ hzβ‚€ have hparam : ContMDiffWithinAt (π“˜(ℝ, ℝ).prod π“˜(ℝ, E)) (π“˜(ℝ, ℝ).prod (𝓑 n)) ∞ (fun a : ℝ Γ— E => (a.1, (chartAt E p).symm a.2)) (J Γ—Λ’ U) (t, zβ‚€) := by exact contMDiffWithinAt_fst.prodMk (hinverse.comp (t, zβ‚€) contMDiffWithinAt_snd (fun _ ha => ha.2)) have hflow := (hΞ¦ (t, x) ⟨ht, Set.mem_univ x⟩).comp_of_eq hparam (fun _ ha => ⟨ha.1, Set.mem_univ _⟩) (by simp only [hback]) have hchart : ContMDiffAt (𝓑 n) π“˜(ℝ, E) ∞ (chartAt E q) (Ξ¦ t x) := (contMDiffOn_chart (I := 𝓑 n) (x := q) (Ξ¦ t x) hq).contMDiffAt ((chartAt E q).open_source.mem_nhds hq) have hc := hchart.comp_contMDiffWithinAt_of_eq hflow (by simp only [Function.comp_apply, hback]) rw [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] at hc exact hc.contDiffWithinAt.of_le (WithTop.coe_le_coe.mpr (le_top : (2 : β„•βˆž) ≀ ⊀)) have hV : DifferentiableAt ℝ V (F (t, zβ‚€)) := by have h := (chartVector_contDiffAt q hFtgt (by rw [hFback]; exact hW _)).differentiableAt (by simp) exact h.neg have hG : DifferentiableAt ℝ (chartMetricForm g q) (F (t, zβ‚€)) := ((chartMetricForm_contDiffOn g q).contDiffAt ((chartAt E q).open_target.mem_nhds hFtgt)).differentiableAt (by simp) have htarget : βˆ€αΆ  z in 𝓝 zβ‚€, Ξ¦ t ((chartAt E p).symm z) ∈ (chartAt E q).source := by have hc : ContinuousAt (fun z => Ξ¦ t ((chartAt E p).symm z)) zβ‚€ := (Ξ¦ t).continuous.continuousAt.comp ((chartAt E p).continuousOn_symm.continuousAt ((chartAt E p).open_target.mem_nhds hzβ‚€)) exact hc (by simpa only [hback] using (chartAt E q).open_source.mem_nhds hq) have horbit : βˆ€αΆ  z in 𝓝 zβ‚€, HasDerivWithinAt (fun s => F (s, z)) (V (F (t, z))) J t := by filter_upwards [htarget] with z hz have hc := HasMFDerivAt.comp_hasMFDerivWithinAt t (f := fun s => Ξ¦ s ((chartAt E p).symm z)) ((mdifferentiable_chart (I := 𝓑 n) q).mdifferentiableAt hz).hasMFDerivAt (hgen ((chartAt E p).symm z)) have hd := hc.hasFDerivWithinAt.hasDerivWithinAt have hv : V (F (t, z)) = -mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E q) (Ξ¦ t ((chartAt E p).symm z)) (W (Ξ¦ t ((chartAt E p).symm z))) := by dsimp only [V, F] rw [chartVector_chart q W hz] rw [hv] have hraw : HasDerivWithinAt (fun s => F (s, z)) (mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E q) (Ξ¦ t ((chartAt E p).symm z)) ((1 : ℝ) β€’ (-W (Ξ¦ t ((chartAt E p).symm z))))) J t := hd simpa only [one_smul, map_neg] using hraw let cu := mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E p) x u let cv := mfderiv (𝓑 n) π“˜(ℝ, E) (chartAt E p) x v have hcalc := hasDerivWithinAt_pullback_coefficient_of_contDiffWithinAt (chartAt E p).open_target (uniqueDiffOn_Ico 0 T) ht hzβ‚€ (mem_closure_interior_Ico_prod (chartAt E p).open_target hT ht hzβ‚€) hcoord hV hG horbit cu cv have htimeTarget : βˆ€αΆ  s in 𝓝[J] t, Ξ¦ s x ∈ (chartAt E q).source := by exact (hgen x).continuousWithinAt ((chartAt E q).open_source.mem_nhds hq) have heq : (fun s => g.inner (Ξ¦ s x) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ s) x u) (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ s) x v)) =αΆ [𝓝[J] t] (fun s => chartMetricForm g q (F (s, zβ‚€)) (fderiv ℝ (fun z => F (s, z)) zβ‚€ cu) (fderiv ℝ (fun z => F (s, z)) zβ‚€ cv)) := by filter_upwards [htimeTarget] with s hs simpa only [F, hback] using (chartMetricForm_chartMap g (Ξ¦ s) p q hp hs u v).symm have htransport := hcalc.congr_of_eventuallyEq_of_mem heq ht apply htransport.congr_deriv rw [coordinateLieMetric_neg] congr 1 rw [coordinateLieMetric_chart_eq D q hFtgt (by rw [hFback]; exact hW _), hFback] have hu := chartMap_spatial_derivative (Ξ¦ t) p q hp hq u have hv := chartMap_spatial_derivative (Ξ¦ t) p q hp hq v change fderiv ℝ (fun z => F (t, z)) zβ‚€ cu = _ at hu change fderiv ℝ (fun z => F (t, z)) zβ‚€ cv = _ at hv rw [hu, hv, hFval] have hinv := (mdifferentiable_chart (I := 𝓑 n) q).symm_comp_deriv hq exact congrArgβ‚‚ (fun a b => DeTurckNative.metricLieDerivative D W (Ξ¦ t x) a b) (congrArg (fun L : TangentSpace (𝓑 n) (Ξ¦ t x) β†’L[ℝ] TangentSpace (𝓑 n) (Ξ¦ t x) => L (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x u)) hinv) (congrArg (fun L : TangentSpace (𝓑 n) (Ξ¦ t x) β†’L[ℝ] TangentSpace (𝓑 n) (Ξ¦ t x) => L (mfderiv (𝓑 n) (𝓑 n) (Ξ¦ t) x v)) hinv) end PoincareMT.ConjugatorLieDerivativeNative end