/- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/PullbackConnectionNative.lean` at f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See `references/ricci-flow/mapher/local-theory/port.json`. -/ import PoincareLib.Geometry.RicciFlow.Local.Gauge.Pullback.PullbackMetric import PoincareLib.Geometry.RicciFlow.Local.Connection.Koszul import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.CurvatureExtension import Mathlib.Geometry.Manifold.VectorField.LieBracket /-! # Levi-Civita naturality in native tangent fibers The vector fields below are pulled back by the inverse of the differential. The scalar chain rule and naturality of the Lie bracket identify the two Koszul formulas, so any retained Levi-Civita data obey the same transport identity on differentiable fields. -/ set_option autoImplicit false set_option maxHeartbeats 1600000 set_option backward.isDefEq.respectTransparency false open Set Filter open scoped Manifold ContDiff Bundle Topology BigOperators noncomputable section universe u namespace PoincareMT.DiffeomorphNative variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] local notation "Vec" => EuclideanSpace ℝ (Fin n) def pullField (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) (Y : (x : M) β†’ TangentSpace (𝓑 n) x) : (x : M) β†’ TangentSpace (𝓑 n) x := VectorField.mpullback (𝓑 n) (𝓑 n) Ξ¦ Y theorem mfderiv_isInvertible (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) (x : M) : (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x).IsInvertible := by exact ⟨Φ.mfderivToContinuousLinearEquiv (by simp) x, rfl⟩ theorem mfderiv_pullField (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) (Y : (x : M) β†’ TangentSpace (𝓑 n) x) (x : M) : mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (pullField Ξ¦ Y x) = Y (Ξ¦ x) := by exact (mfderiv_isInvertible Ξ¦ x).self_apply_inverse _ theorem mdifferentiableAt_pullField (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) {Y : (x : M) β†’ TangentSpace (𝓑 n) x} {x : M} (hY : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% Y) (Ξ¦ x)) : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% (pullField Ξ¦ Y)) x := by exact hY.mpullback_vectorField (Ξ¦.contMDiffAt) (mfderiv_isInvertible Ξ¦ x) (by exact WithTop.coe_le_coe.mpr (le_top : (2 : β„•βˆž) ≀ ⊀)) theorem contMDiffOn_pullField (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) {Y : (x : M) β†’ TangentSpace (𝓑 n) x} {U : Set M} (hY : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% Y) U) : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% (pullField Ξ¦ Y)) (Ξ¦ ⁻¹' U) := hY.mpullback_vectorField_preimage Ξ¦.contMDiff (fun x _ => mfderiv_isInvertible Ξ¦ x) (by simp) theorem pullField_mlieBracket (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) {X Y : (x : M) β†’ TangentSpace (𝓑 n) x} {x : M} (hX : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% X) (Ξ¦ x)) (hY : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% Y) (Ξ¦ x)) : pullField Ξ¦ (VectorField.mlieBracket (𝓑 n) X Y) x = VectorField.mlieBracket (𝓑 n) (pullField Ξ¦ X) (pullField Ξ¦ Y) x := by letI : IsManifold (𝓑 n) (minSmoothness ℝ 2) M := IsManifold.of_le (n := ∞) (by simpa using (WithTop.coe_le_coe.mpr (le_top : (2 : β„•βˆž) ≀ ⊀))) exact VectorField.mpullback_mlieBracket hX hY (Ξ¦.contMDiffAt) (by simpa using (WithTop.coe_le_coe.mpr (le_top : (2 : β„•βˆž) ≀ ⊀))) variable (g : RiemannianMetric n M) (Ξ¦ : Diffeomorph (𝓑 n) (𝓑 n) M M ∞) theorem pullbackMetric_pullField_inner (hsmooth : ContMDiff (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ)) ∞ (fun x : M => Bundle.TotalSpace.mk' (Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ) x (pinner g Ξ¦ x))) (Y Z : (x : M) β†’ TangentSpace (𝓑 n) x) (x : M) : (pullbackMetric g Ξ¦ hsmooth).inner x (pullField Ξ¦ Y x) (pullField Ξ¦ Z x) = g.inner (Ξ¦ x) (Y (Ξ¦ x)) (Z (Ξ¦ x)) := by rw [pullbackMetric_inner, mfderiv_pullField, mfderiv_pullField] theorem pullbackMetric_mvfderiv_inner (hsmooth : ContMDiff (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ)) ∞ (fun x : M => Bundle.TotalSpace.mk' (Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ) x (pinner g Ξ¦ x))) (X Y Z : (x : M) β†’ TangentSpace (𝓑 n) x) {x : M} (hY : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% Y) (Ξ¦ x)) (hZ : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% Z) (Ξ¦ x)) : mvfderiv (𝓑 n) (fun y => (pullbackMetric g Ξ¦ hsmooth).inner y (pullField Ξ¦ Y y) (pullField Ξ¦ Z y)) x (pullField Ξ¦ X x) = mvfderiv (𝓑 n) (fun y => g.inner y (Y y) (Z y)) (Ξ¦ x) (X (Ξ¦ x)) := by letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨g.toRiemannianMetric⟩ have hpair : MDifferentiableAt (𝓑 n) π“˜(ℝ, ℝ) (fun y => g.inner y (Y y) (Z y)) (Ξ¦ x) := hY.inner_bundle hZ have heq : (fun y => (pullbackMetric g Ξ¦ hsmooth).inner y (pullField Ξ¦ Y y) (pullField Ξ¦ Z y)) = (fun y => g.inner y (Y y) (Z y)) ∘ Ξ¦ := by funext y exact pullbackMetric_pullField_inner g Ξ¦ hsmooth Y Z y rw [heq, mvfderiv_comp_apply x hpair (Ξ¦.mdifferentiable (by simp) x), mfderiv_pullField] theorem connection_pullField (hsmooth : ContMDiff (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ)) ∞ (fun x : M => Bundle.TotalSpace.mk' (Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ) x (pinner g Ξ¦ x))) (D : LeviCivitaData g) (P : LeviCivitaData (pullbackMetric g Ξ¦ hsmooth)) (X Y : (x : M) β†’ TangentSpace (𝓑 n) x) {x : M} (hX : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% X) (Ξ¦ x)) (hY : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% Y) (Ξ¦ x)) : mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (P.connection (pullField Ξ¦ Y) x (pullField Ξ¦ X x)) = D.connection Y (Ξ¦ x) (X (Ξ¦ x)) := by letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨g.toRiemannianMetric⟩ apply ext_inner_right ℝ intro z let Z : (y : M) β†’ TangentSpace (𝓑 n) y := FiberBundle.extend Vec z have hZ : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% Z) (Ξ¦ x) := FiberBundle.mdifferentiableAt_extend (𝓑 n) Vec z have hZx : Z (Ξ¦ x) = z := FiberBundle.extend_apply_self Vec z have hp := P.koszul (pullField Ξ¦ X) (pullField Ξ¦ Y) (pullField Ξ¦ Z) (mdifferentiableAt_pullField Ξ¦ hX) (mdifferentiableAt_pullField Ξ¦ hY) (mdifferentiableAt_pullField Ξ¦ hZ) have hg := D.koszul X Y Z hX hY hZ rw [pullbackMetric_mvfderiv_inner g Ξ¦ hsmooth X Y Z hY hZ, pullbackMetric_mvfderiv_inner g Ξ¦ hsmooth Y Z X hZ hX, pullbackMetric_mvfderiv_inner g Ξ¦ hsmooth Z X Y hX hY, ← pullField_mlieBracket Ξ¦ hX hY, ← pullField_mlieBracket Ξ¦ hX hZ, ← pullField_mlieBracket Ξ¦ hY hZ] at hp simp_rw [pullbackMetric_pullField_inner g Ξ¦ hsmooth] at hp rw [pullbackMetric_inner] at hp rw [mfderiv_pullField, hZx] at hp rw [hZx] at hg change g.inner (Ξ¦ x) (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (P.connection (pullField Ξ¦ Y) x (pullField Ξ¦ X x))) z = g.inner (Ξ¦ x) (D.connection Y (Ξ¦ x) (X (Ξ¦ x))) z linarith only [hp, hg] /-- Inverting the actual differential transports the covariant derivative field. -/ theorem pullField_connection (hPull : ContMDiff (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ)) ∞ (fun x : M => Bundle.TotalSpace.mk' (Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ) x (pinner g Ξ¦ x))) (D : LeviCivitaData g) (P : LeviCivitaData (pullbackMetric g Ξ¦ hPull)) (X Y : (x : M) β†’ TangentSpace (𝓑 n) x) {x : M} (hX : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% X) (Ξ¦ x)) (hY : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% Y) (Ξ¦ x)) : pullField Ξ¦ (fun y => D.connection Y y (X y)) x = P.connection (pullField Ξ¦ Y) x (pullField Ξ¦ X x) := by apply (Ξ¦.mfderivToContinuousLinearEquiv (by simp) x).injective change mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (pullField Ξ¦ (fun y => D.connection Y y (X y)) x) = mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (P.connection (pullField Ξ¦ Y) x (pullField Ξ¦ X x)) rw [mfderiv_pullField] exact (connection_pullField g Ξ¦ hPull D P X Y hX hY).symm /-- Only the differentiated field needs regularity; the direction is any tangent vector. -/ theorem connection_pullField_apply (hPull : ContMDiff (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ)) ∞ (fun x : M => Bundle.TotalSpace.mk' (Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ) x (pinner g Ξ¦ x))) (D : LeviCivitaData g) (P : LeviCivitaData (pullbackMetric g Ξ¦ hPull)) (Y : (x : M) β†’ TangentSpace (𝓑 n) x) {x : M} (hY : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% Y) (Ξ¦ x)) (v : TangentSpace (𝓑 n) x) : mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (P.connection (pullField Ξ¦ Y) x v) = D.connection Y (Ξ¦ x) (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x v) := by let X : (y : M) β†’ TangentSpace (𝓑 n) y := FiberBundle.extend Vec (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x v) have hX : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% X) (Ξ¦ x) := FiberBundle.mdifferentiableAt_extend (𝓑 n) Vec _ have hXx : X (Ξ¦ x) = mfderiv (𝓑 n) (𝓑 n) Ξ¦ x v := FiberBundle.extend_apply_self Vec _ have hpX : pullField Ξ¦ X x = v := by apply (Ξ¦.mfderivToContinuousLinearEquiv (by simp) x).injective exact (mfderiv_pullField Ξ¦ X x).trans hXx simpa only [hpX, hXx] using connection_pullField g Ξ¦ hPull D P X Y hX hY /-- The curvature commutator transports on genuinely smooth local fields. -/ theorem curvatureOnFields_pullField (hPull : ContMDiff (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ)) ∞ (fun x : M => Bundle.TotalSpace.mk' (Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ) x (pinner g Ξ¦ x))) (D : LeviCivitaData g) (P : LeviCivitaData (pullbackMetric g Ξ¦ hPull)) {U : Set M} (hU : IsOpen U) (X Y Z : (x : M) β†’ TangentSpace (𝓑 n) x) (hX : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% X) U) (hY : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% Y) U) (hZ : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% Z) U) {x : M} (hx : Ξ¦ x ∈ U) : mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (P.curvatureOnFields (pullField Ξ¦ X) (pullField Ξ¦ Y) (pullField Ξ¦ Z) x) = D.curvatureOnFields X Y Z (Ξ¦ x) := by have hpre : IsOpen (Ξ¦ ⁻¹' U) := hU.preimage Ξ¦.continuous have hpx : x ∈ Ξ¦ ⁻¹' U := hx have hpZ := contMDiffOn_pullField Ξ¦ hZ have hmd (A : (y : M) β†’ TangentSpace (𝓑 n) y) (hA : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% A) U) {y : M} (hy : y ∈ U) : MDifferentiableAt (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) (T% A) y := (hA.contMDiffAt (hU.mem_nhds hy)).mdifferentiableAt (by simp) have hsecond (A B : (y : M) β†’ TangentSpace (𝓑 n) y) (hA : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% A) U) (hB : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% B) U) : mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (P.connection (fun y => P.connection (pullField Ξ¦ Z) y (pullField Ξ¦ B y)) x (pullField Ξ¦ A x)) = D.connection (fun y => D.connection Z y (B y)) (Ξ¦ x) (A (Ξ¦ x)) := by have hDZ := D.contMDiffOn_connection_apply hU B Z hB hZ have hpDZ := contMDiffOn_pullField Ξ¦ hDZ have hPZ := P.contMDiffOn_connection_apply hpre (pullField Ξ¦ B) (pullField Ξ¦ Z) (contMDiffOn_pullField Ξ¦ hB) hpZ have hconn : P.connection (fun y => P.connection (pullField Ξ¦ Z) y (pullField Ξ¦ B y)) x = P.connection (pullField Ξ¦ (fun y => D.connection Z y (B y))) x := by apply P.connection.isCovariantDerivativeOn.congr_of_eqOn ((hPZ.contMDiffAt (hpre.mem_nhds hpx)).mdifferentiableAt (by simp)) ((hpDZ.contMDiffAt (hpre.mem_nhds hpx)).mdifferentiableAt (by simp)) (hpre.mem_nhds hpx) intro y hy exact (pullField_connection g Ξ¦ hPull D P B Z (hmd B hB hy) (hmd Z hZ hy)).symm rw [hconn] exact connection_pullField g Ξ¦ hPull D P A _ (hmd A hA hx) (hmd _ hDZ hx) have hbracket : mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (VectorField.mlieBracket (𝓑 n) (pullField Ξ¦ X) (pullField Ξ¦ Y) x) = VectorField.mlieBracket (𝓑 n) X Y (Ξ¦ x) := by rw [← pullField_mlieBracket Ξ¦ (hmd X hX hx) (hmd Y hY hx), mfderiv_pullField] unfold LeviCivitaData.curvatureOnFields rw [map_sub, map_sub, hsecond X Y hX hY, hsecond Y X hY hX, connection_pullField_apply g Ξ¦ hPull D P Z (hmd Z hZ hx), hbracket] /-- The frozen fixed-extension curvature is natural under the actual differential. -/ theorem curvature_pullback (hPull : ContMDiff (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ)) ∞ (fun x : M => Bundle.TotalSpace.mk' (Vec β†’L[ℝ] Vec β†’L[ℝ] ℝ) x (pinner g Ξ¦ x))) (D : LeviCivitaData g) (P : LeviCivitaData (pullbackMetric g Ξ¦ hPull)) (x : M) (u v w : TangentSpace (𝓑 n) x) : mfderiv (𝓑 n) (𝓑 n) Ξ¦ x (P.curvature x u v w) = D.curvature (Ξ¦ x) (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x u) (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x v) (mfderiv (𝓑 n) (𝓑 n) Ξ¦ x w) := by let A := Ξ¦.mfderivToContinuousLinearEquiv (by simp) x let X := FiberBundle.extend Vec (A u) let Y := FiberBundle.extend Vec (A v) let Z := FiberBundle.extend Vec (A w) obtain ⟨Ux, hUx, hX⟩ := FiberBundle.exists_contMDiffOn_extend (k := ∞) (𝓑 n) Vec (A u) obtain ⟨Uy, hUy, hY⟩ := FiberBundle.exists_contMDiffOn_extend (k := ∞) (𝓑 n) Vec (A v) obtain ⟨Uz, hUz, hZ⟩ := FiberBundle.exists_contMDiffOn_extend (k := ∞) (𝓑 n) Vec (A w) obtain ⟨U, hUsub, hU, hxU⟩ := mem_nhds_iff.mp (inter_mem hUx (inter_mem hUy hUz)) have hXU : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% X) U := hX.mono (fun _ hy => (hUsub hy).1) have hYU : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% Y) U := hY.mono (fun _ hy => (hUsub hy).2.1) have hZU : ContMDiffOn (𝓑 n) ((𝓑 n).prod π“˜(ℝ, Vec)) ∞ (T% Z) U := hZ.mono (fun _ hy => (hUsub hy).2.2) have hpX : pullField Ξ¦ X x = u := by apply A.injective exact (mfderiv_pullField Ξ¦ X x).trans (FiberBundle.extend_apply_self Vec _) have hpY : pullField Ξ¦ Y x = v := by apply A.injective exact (mfderiv_pullField Ξ¦ Y x).trans (FiberBundle.extend_apply_self Vec _) have hpZ : pullField Ξ¦ Z x = w := by apply A.injective exact (mfderiv_pullField Ξ¦ Z x).trans (FiberBundle.extend_apply_self Vec _) have hpcurv := RicciFlow.Local.curvature_eq_curvatureOnFields P (hU.preimage Ξ¦.continuous) (pullField Ξ¦ X) (pullField Ξ¦ Y) (pullField Ξ¦ Z) (contMDiffOn_pullField Ξ¦ hXU) (contMDiffOn_pullField Ξ¦ hYU) (contMDiffOn_pullField Ξ¦ hZU) (show x ∈ Ξ¦ ⁻¹' U from hxU) rw [hpX, hpY, hpZ] at hpcurv rw [hpcurv, curvatureOnFields_pullField g Ξ¦ hPull D P hU X Y Z hXU hYU hZU hxU, ← RicciFlow.Local.curvature_eq_curvatureOnFields D hU X Y Z hXU hYU hZU hxU] simp only [X, Y, Z, FiberBundle.extend_apply_self, A, Diffeomorph.mfderivToContinuousLinearEquiv_coe] rfl end PoincareMT.DiffeomorphNative