import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variation.Frame.Local import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variation.Geometry.Pullback.Chart /-! # Intrinsic adapted fields and their local equations The coordinate equation is required in each chart, making locality and uniqueness available for continuation. It is equivalent to the actual pullback covariant equation, independently of the chosen smooth extension. Adapted from Mapher `Proofs/M09/AdaptedFieldCoordinates.lean`, `LocalAdaptedEquation.lean` and `AdaptedFieldOn.lean`, commit `49331b7d7ecad38f53e4300c3b35d6a84b2cc648`. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter Topology open scoped Manifold ContDiff Bundle noncomputable section universe u namespace PoincareMT.ReducedLengthMinimum.Variation.Frame open PoincareMT.ReducedLengthMinimum.Variational open PoincareMT.ReducedLengthMinimum.Variation.Geometry variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] local notation "E" => EuclideanSpace ℝ (Fin n) def fieldChartCoordinates (x : M) (Ξ³ : ℝ β†’ M) (P : βˆ€ s, TangentSpace (𝓑 n) (Ξ³ s)) (s : ℝ) : E := (trivializationAt E (TangentSpace (𝓑 n)) x).continuousLinearMapAt ℝ (Ξ³ s) (P s) theorem fieldChartCoordinates_smooth (x : M) (Ξ³ : ℝ β†’ M) (P : βˆ€ s, TangentSpace (𝓑 n) (Ξ³ s)) (U : Set ℝ) (hP : ContMDiffOn π“˜(ℝ, ℝ) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ Bundle.TotalSpace.mk' E (Ξ³ s) (P s)) U) (hchart : βˆ€ s ∈ U, Ξ³ s ∈ (chartAt E x).source) : ContDiffOn ℝ ∞ (fieldChartCoordinates x Ξ³ P) U := by let e := trivializationAt E (TangentSpace (𝓑 n)) x have hpair := e.contMDiffOn.comp hP (fun s hs ↦ e.mem_source.mpr (hchart s hs)) have hcoord : ContMDiffOn π“˜(ℝ, ℝ) (𝓑 n) ∞ (fun s ↦ (e (Bundle.TotalSpace.mk' E (Ξ³ s) (P s))).2) U := fun s hs ↦ (hpair s hs).snd apply hcoord.contDiffOn.congr intro s hs exact Bundle.Trivialization.continuousLinearMapAt_apply_of_mem (R := ℝ) e (hchart s hs) (P s) theorem chartFrame_fieldChartCoordinates (x : M) (Ξ³ : ℝ β†’ M) (P : βˆ€ s, TangentSpace (𝓑 n) (Ξ³ s)) {s : ℝ} (hchart : Ξ³ s ∈ (chartAt E x).source) : chartFrame x (fieldChartCoordinates x Ξ³ P s) (Ξ³ s) = P s := (trivializationAt E (TangentSpace (𝓑 n)) x).symmL_continuousLinearMapAt hchart (P s) def LocalAdaptedEquation {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (Ξ³ : ℝ β†’ M) (P : βˆ€ s, TangentSpace (𝓑 n) (Ξ³ s)) (s : ℝ) : Prop := βˆ€ x : M, Ξ³ s ∈ (chartAt E x).source β†’ HasDerivAt (fieldChartCoordinates x Ξ³ P) (chartTransportOperator (chartActionMetric F T x) (s, extChartAt (𝓑 n) x (Ξ³ s)) (deriv ((extChartAt (𝓑 n) x) ∘ Ξ³) s) (fieldChartCoordinates x Ξ³ P s)) s structure IsAdaptedFieldOn {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (Ξ³ : ℝ β†’ M) (P : βˆ€ s, TangentSpace (𝓑 n) (Ξ³ s)) (U : Set ℝ) : Prop where smooth : ContMDiffOn π“˜(ℝ, ℝ) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ Bundle.TotalSpace.mk' E (Ξ³ s) (P s)) U equation : βˆ€ s ∈ U, LocalAdaptedEquation F T Ξ³ P s set_option maxHeartbeats 800000 in theorem localAdaptedEquation_of_pullback {J C U : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (Ξ³ : ℝ β†’ M) (P : βˆ€ s, TangentSpace (𝓑 n) (Ξ³ s)) (H : ParametricAlongCurveExtensionOn C Ξ³ P) (hU : IsOpen U) (hΞ³ : ContMDiffOn π“˜(ℝ, ℝ) (𝓑 n) ∞ Ξ³ U) (hP : ContMDiffOn π“˜(ℝ, ℝ) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ Bundle.TotalSpace.mk' E (Ξ³ s) (P s)) U) {s : ℝ} (hs : s ∈ C) (hsU : s ∈ U) (hC : UniqueDiffWithinAt ℝ C s) (htime : s ∈ interior ((fun r : ℝ ↦ T - r ^ 2) ⁻¹' J)) (heq : βˆ€ Z : TangentSpace (𝓑 n) (Ξ³ s), (F.metric (T - s ^ 2)).inner (Ξ³ s) (pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) Ξ³ P C H s) Z = -(2 * s) * (F.connection (T - s ^ 2)).ricci (Ξ³ s) (P s) Z) : LocalAdaptedEquation F T Ξ³ P s := by intro x hx let V := U ∩ Ξ³ ⁻¹' (chartAt E x).source have hV : IsOpen V := hΞ³.continuousOn.isOpen_inter_preimage hU (chartAt E x).open_source have hsV : s ∈ V := ⟨hsU, hx⟩ let v := fieldChartCoordinates x Ξ³ P have hv : ContDiffOn ℝ ∞ v V := fieldChartCoordinates_smooth x Ξ³ P V (hP.mono inter_subset_left) (fun _ ht ↦ ht.2) have hrep (r : ℝ) (hr : r ∈ V) : chartFrame x (v r) (Ξ³ r) = P r := chartFrame_fieldChartCoordinates x Ξ³ P hr.2 have hΞ³s := ((hΞ³ s hsU).contMDiffAt (hU.mem_nhds hsU)).mdifferentiableAt (by simp) have hpull := pullbackCovariantDerivative_chart_formula_local F (fun r ↦ T - r ^ 2) hV x Ξ³ v hv (fun _ hr ↦ hr.2.2) P (fun r hr ↦ hrep r hr.2) H hs hsV hC hΞ³s let B := chartTransportOperator (chartActionMetric F T x) (s, extChartAt (𝓑 n) x (Ξ³ s)) (deriv ((extChartAt (𝓑 n) x) ∘ Ξ³) s) (v s) have href (Z : TangentSpace (𝓑 n) (Ξ³ s)) := chartTransportOperator_adapted_pairing_squareDomain F T s x (Ξ³ s) hx htime (deriv ((extChartAt (𝓑 n) x) ∘ Ξ³) s) (v s) Z have hz (Z : TangentSpace (𝓑 n) (Ξ³ s)) : (F.metric (T - s ^ 2)).inner (Ξ³ s) (chartFrame x (deriv v s - B) (Ξ³ s)) Z = 0 := by have h₁ := heq Z rw [hpull] at h₁ have hβ‚‚ := href Z rw [hrep s hsV] at hβ‚‚ change (F.metric (T - s ^ 2)).inner (Ξ³ s) (chartFrame x B (Ξ³ s) + _) Z = _ at hβ‚‚ simp only [map_add, add_apply] at h₁ hβ‚‚ change (F.metric (T - s ^ 2)).inner (Ξ³ s) ((trivializationAt E (TangentSpace (𝓑 n)) x).symmL ℝ (Ξ³ s) (deriv v s - B)) Z = 0 simp only [map_sub, sub_apply] change (F.metric (T - s ^ 2)).inner (Ξ³ s) (chartFrame x (deriv v s) (Ξ³ s)) Z - (F.metric (T - s ^ 2)).inner (Ξ³ s) (chartFrame x B (Ξ³ s)) Z = 0 linarith only [h₁, hβ‚‚] have hzero : chartFrame x (deriv v s - B) (Ξ³ s) = 0 := by by_contra hne exact (ne_of_gt ((F.metric (T - s ^ 2)).pos (Ξ³ s) _ hne)) (hz (chartFrame x (deriv v s - B) (Ξ³ s))) have hd : deriv v s = B := by let e := trivializationAt E (TangentSpace (𝓑 n)) x have h := congrArg (e.continuousLinearMapAt ℝ (Ξ³ s)) hzero change e.continuousLinearMapAt ℝ (Ξ³ s) (e.symmL ℝ (Ξ³ s) (deriv v s - B)) = _ at h rw [e.continuousLinearMapAt_symmL hx, map_zero] at h exact sub_eq_zero.mp h exact ((hv s hsV).contDiffAt (hV.mem_nhds hsV)).differentiableAt (by simp) |>.hasDerivAt.congr_deriv hd theorem pullback_adapted_of_localAdaptedEquation {J C U : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (Ξ³ : ℝ β†’ M) (P : βˆ€ s, TangentSpace (𝓑 n) (Ξ³ s)) (H : ParametricAlongCurveExtensionOn C Ξ³ P) (hU : IsOpen U) (hΞ³ : ContMDiffOn π“˜(ℝ, ℝ) (𝓑 n) ∞ Ξ³ U) (hP : ContMDiffOn π“˜(ℝ, ℝ) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ Bundle.TotalSpace.mk' E (Ξ³ s) (P s)) U) {s : ℝ} (hs : s ∈ C) (hsU : s ∈ U) (hC : UniqueDiffWithinAt ℝ C s) (htime : s ∈ interior ((fun r : ℝ ↦ T - r ^ 2) ⁻¹' J)) (heq : LocalAdaptedEquation F T Ξ³ P s) (Z : TangentSpace (𝓑 n) (Ξ³ s)) : (F.metric (T - s ^ 2)).inner (Ξ³ s) (pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) Ξ³ P C H s) Z = -(2 * s) * (F.connection (T - s ^ 2)).ricci (Ξ³ s) (P s) Z := by let x := Ξ³ s let V := U ∩ Ξ³ ⁻¹' (chartAt E x).source have hV : IsOpen V := hΞ³.continuousOn.isOpen_inter_preimage hU (chartAt E x).open_source have hsV : s ∈ V := ⟨hsU, mem_chart_source E x⟩ let v := fieldChartCoordinates x Ξ³ P have hv : ContDiffOn ℝ ∞ v V := fieldChartCoordinates_smooth x Ξ³ P V (hP.mono inter_subset_left) (fun _ ht ↦ ht.2) have hrep (r : ℝ) (hr : r ∈ V) : chartFrame x (v r) (Ξ³ r) = P r := chartFrame_fieldChartCoordinates x Ξ³ P hr.2 have hΞ³s := ((hΞ³ s hsU).contMDiffAt (hU.mem_nhds hsU)).mdifferentiableAt (by simp) rw [pullbackCovariantDerivative_chart_formula_local F (fun r ↦ T - r ^ 2) hV x Ξ³ v hv (fun _ hr ↦ hr.2.2) P (fun r hr ↦ hrep r hr.2) H hs hsV hC hΞ³s, (heq x hsV.2).deriv] have h := chartTransportOperator_adapted_pairing_squareDomain F T s x (Ξ³ s) hsV.2 htime (deriv ((extChartAt (𝓑 n) x) ∘ Ξ³) s) (v s) Z rwa [hrep s hsV] at h theorem LocalAdaptedEquation.congr {J : Set ℝ} {F : RicciFlow n M J} {T s : ℝ} {Ξ³ : ℝ β†’ M} {P Q : βˆ€ t, TangentSpace (𝓑 n) (Ξ³ t)} (h : LocalAdaptedEquation F T Ξ³ P s) (heq : βˆ€αΆ  t in 𝓝 s, P t = Q t) : LocalAdaptedEquation F T Ξ³ Q s := by intro x hx have hv : fieldChartCoordinates x Ξ³ P =αΆ [𝓝 s] fieldChartCoordinates x Ξ³ Q := by filter_upwards [heq] with t ht simp only [fieldChartCoordinates, ht] have hd := (h x hx).congr_of_eventuallyEq hv.symm simpa only [hv.eq_of_nhds] using hd theorem IsAdaptedFieldOn.mono {J : Set ℝ} {F : RicciFlow n M J} {T : ℝ} {Ξ³ : ℝ β†’ M} {P : βˆ€ t, TangentSpace (𝓑 n) (Ξ³ t)} {U V : Set ℝ} (h : IsAdaptedFieldOn F T Ξ³ P U) (hVU : V βŠ† U) : IsAdaptedFieldOn F T Ξ³ P V := ⟨h.smooth.mono hVU, fun s hs ↦ h.equation s (hVU hs)⟩ theorem IsAdaptedFieldOn.congr {J : Set ℝ} {F : RicciFlow n M J} {T : ℝ} {Ξ³ : ℝ β†’ M} {P Q : βˆ€ t, TangentSpace (𝓑 n) (Ξ³ t)} {U : Set ℝ} (h : IsAdaptedFieldOn F T Ξ³ P U) (hU : IsOpen U) (heq : βˆ€ t ∈ U, P t = Q t) : IsAdaptedFieldOn F T Ξ³ Q U := by refine ⟨h.smooth.congr (fun t ht ↦ ?_), ?_⟩ Β· rw [heq t ht] Β· intro s hs apply (h.equation s hs).congr filter_upwards [hU.mem_nhds hs] with t ht using heq t ht theorem IsAdaptedFieldOn.of_locally {J : Set ℝ} {F : RicciFlow n M J} {T : ℝ} {Ξ³ : ℝ β†’ M} {P : βˆ€ t, TangentSpace (𝓑 n) (Ξ³ t)} {U : Set ℝ} (h : βˆ€ s ∈ U, βˆƒ (Q : βˆ€ t, TangentSpace (𝓑 n) (Ξ³ t)) (V : Set ℝ), IsOpen V ∧ s ∈ V ∧ IsAdaptedFieldOn F T Ξ³ Q V ∧ βˆ€αΆ  t in 𝓝 s, P t = Q t) : IsAdaptedFieldOn F T Ξ³ P U := by have hp (s : ℝ) (hs : s ∈ U) : ContMDiffAt π“˜(ℝ, ℝ) ((𝓑 n).prod (𝓑 n)) ∞ (fun t ↦ Bundle.TotalSpace.mk' E (Ξ³ t) (P t)) s ∧ LocalAdaptedEquation F T Ξ³ P s := by obtain ⟨Q, V, hV, hsV, hQ, heq⟩ := h s hs have he : (fun t ↦ Bundle.TotalSpace.mk' E (Ξ³ t) (P t)) =αΆ [𝓝 s] (fun t ↦ Bundle.TotalSpace.mk' E (Ξ³ t) (Q t)) := by filter_upwards [heq] with t ht rw [ht] exact ⟨((hQ.smooth s hsV).contMDiffAt (hV.mem_nhds hsV)).congr_of_eventuallyEq he, (hQ.equation s hsV).congr (heq.mono (fun _ ht ↦ ht.symm))⟩ exact ⟨fun s hs ↦ (hp s hs).1.contMDiffWithinAt, fun s hs ↦ (hp s hs).2⟩ end PoincareMT.ReducedLengthMinimum.Variation.Frame