import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Variation.Fields.FiniteFieldSum import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Variation.Fields.CompactFieldVariation import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Variation.Adapted.AdaptedOrthonormalFrame import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.VelocityChainRules /-! # A finite-parameter family realizing the whole adapted frame The terminal differential is the actual synthesis map of the transported orthonormal basis. Its inverse is constructed without nonconjugacy. -/ set_option autoImplicit false set_option maxSynthPendingDepth 3 open scoped Manifold ContDiff Bundle Topology BigOperators 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) local notation "V" => Fin n β†’ ℝ set_option maxHeartbeats 1200000 in -- The terminal basis and the actual endpoint equality are retained before comparing model maps. set_option backward.isDefEq.respectTransparency false in theorem exists_scaled_frame_comparison_family {J : Set ℝ} (F : RicciFlow n M J) (T c : ℝ) (hc : 0 < c) (Ξ± : ℝ β†’ M) (P : Fin n β†’ βˆ€ s, TangentSpace (𝓑 n) (Ξ± s)) (U : Set ℝ) (hU : IsOpen U) (hKU : Set.Icc 0 c βŠ† U) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) ∞ Ξ± U) (hP : βˆ€ i, ContMDiffOn (π“˜(ℝ, ℝ)) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ (⟨α s, P i s⟩ : TangentBundle (𝓑 n) M)) U) (hpair : βˆ€ i j, (F.metric (T - c ^ 2)).inner (Ξ± c) (P i c) (P j c) = if i = j then 1 else 0) : βˆƒ (f : V Γ— ℝ β†’ M) (Ξ© : Set (V Γ— ℝ)) (N : Set V), IsOpen Ξ© ∧ IsOpen N ∧ (0 : V) ∈ N ∧ N Γ—Λ’ Set.Icc 0 c βŠ† Ξ© ∧ ContMDiffOn (π“˜(ℝ, V Γ— ℝ)) (𝓑 n) ∞ f Ξ© ∧ (βˆ€ s, f (0, s) = Ξ± s) ∧ (βˆ€ x, f (x, 0) = Ξ± 0) ∧ (βˆ€ s ∈ Set.Icc 0 c, βˆ€ x : V, (curveVelocity (n := n) (fun r : ℝ ↦ f (r β€’ x, s)) 0 : E) = βˆ‘ i, x i β€’ ((s / c) β€’ P i s)) ∧ Function.Bijective (mfderiv (π“˜(ℝ, V)) (𝓑 n) (fun x ↦ f (x, c)) 0) := by classical let Y : βˆ€ s, V β†’L[ℝ] TangentSpace (𝓑 n) (Ξ± s) := fun s ↦ βˆ‘ i : Fin n, (ContinuousLinearMap.toSpanSingleton ℝ ((s / c) β€’ P i s)).comp (ContinuousLinearMap.proj i) have hYval (s : ℝ) (x : V) : Y s x = βˆ‘ i, x i β€’ ((s / c) β€’ P i s) := by simp only [Y, ContinuousLinearMap.sum_apply, ContinuousLinearMap.comp_apply, ContinuousLinearMap.proj_apply, ContinuousLinearMap.toSpanSingleton_apply] have hY (x : V) : ContMDiffOn (π“˜(ℝ, ℝ)) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ (⟨α s, Y s x⟩ : TangentBundle (𝓑 n) M)) U := by have hi (i : Fin n) : ContMDiffOn (π“˜(ℝ, ℝ)) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ (⟨α s, x i β€’ ((s / c) β€’ P i s)⟩ : TangentBundle (𝓑 n) M)) U := by simpa only [smul_smul] using field_smul_smooth Ξ± (P i) (fun s ↦ x i * (s / c)) U hU hΞ± (contDiffOn_const.mul (contDiffOn_id.div_const c)) (hP i) simpa only [hYval] using field_sum_smooth Ξ± (fun i s ↦ x i β€’ ((s / c) β€’ P i s)) U hU hΞ± hi obtain ⟨g, W, N, hW, hN, h0N, hKN, hg, hcenter, hfixed, hvelocity⟩ := exists_smooth_family_of_compact_linear_field Ξ± Y U (Set.Icc 0 c) hU isCompact_Icc hKU hΞ± hY let f : V Γ— ℝ β†’ M := fun z ↦ g (z.2, z.1) let Ξ© : Set (V Γ— ℝ) := Prod.swap ⁻¹' W have hΞ© : IsOpen Ξ© := hW.preimage continuous_swap have hf : ContMDiffOn (π“˜(ℝ, V Γ— ℝ)) (𝓑 n) ∞ f Ξ© := hg.comp (contDiff_snd.prodMk contDiff_fst).contMDiff.contMDiffOn (fun _ hz ↦ hz) have hNΞ© : N Γ—Λ’ Set.Icc 0 c βŠ† Ξ© := fun z hz ↦ hKN ⟨hz.2, hz.1⟩ have hYzero : Y 0 = 0 := by ext x simp only [hYval, zero_div, zero_smul, smul_zero, Finset.sum_const_zero, ContinuousLinearMap.zero_apply] refine ⟨f, Ξ©, N, hΞ©, hN, h0N, hNΞ©, hf, hcenter, (fun x ↦ hfixed 0 hYzero x), (fun s hs x ↦ (hvelocity s hs x).trans (hYval s x)), ?_⟩ have hcK : c ∈ Set.Icc 0 c := ⟨hc.le, le_rfl⟩ have hfc : ContMDiffAt (π“˜(ℝ, V)) (𝓑 n) ∞ (fun x ↦ f (x, c)) 0 := (hf.contMDiffAt (hΞ©.mem_nhds (hNΞ© ⟨h0N, hcK⟩))).comp 0 (contDiffAt_id.prodMk contDiffAt_const).contMDiffAt have hder (x : V) : (mfderiv (π“˜(ℝ, V)) (𝓑 n) (fun y ↦ f (y, c)) 0 x : E) = βˆ‘ i, x i β€’ P i c := by have hchain := curveVelocity_comp_initial_line (fun y ↦ f (y, c)) 0 x (hfc.mdifferentiableAt (by simp)) have hcurve : (fun r : ℝ ↦ f (0 + r β€’ x, c)) = (fun r ↦ g (c, r β€’ x)) := by funext r change g (c, 0 + r β€’ x) = g (c, r β€’ x) rw [zero_add] have hcv := congrArg (fun Ξ³ : ℝ β†’ M ↦ (curveVelocity Ξ³ 0 : E)) hcurve have hv := (hvelocity c hcK x).trans (hYval c x) simpa only [div_self hc.ne', one_smul] using hchain.symm.trans (hcv.trans hv) have hbase : f (0, c) = Ξ± c := hcenter c letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric (T - c ^ 2)).toRiemannianMetric⟩ have hterminalPair (i j : Fin n) : (F.metric (T - c ^ 2)).inner (f (0, c)) (P i c) (P j c) = if i = j then 1 else 0 := by rw [hbase] exact hpair i j obtain ⟨e, he⟩ := exists_orthonormalBasis_of_metric_pairing (F.metric (T - c ^ 2)) (f (0, c)) (fun i ↦ P i c) hterminalPair have hmap : (fun x : V ↦ (mfderiv (π“˜(ℝ, V)) (𝓑 n) (fun y ↦ f (y, c)) 0 x : E)) = (fun x : V ↦ (e.toBasis.equivFun.symm x : E)) := by funext x rw [hder, e.toBasis.equivFun_symm_apply] exact Finset.sum_congr rfl (fun i _ ↦ congrArg (fun v : E ↦ x i β€’ v) (he i).symm) change Function.Bijective (fun x : V ↦ (mfderiv (π“˜(ℝ, V)) (𝓑 n) (fun y ↦ f (y, c)) 0 x : E)) rw [hmap] exact e.toBasis.equivFun.symm.bijective end PoincareMT.ReducedLength