import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.GeometryImports import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.NeckGeometry.FixedCylinderJets import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.FiniteHessian.PullbackTails /-! # Forward errors in the coordinates of a fixed neck The forward stage map is differentiated only inside its source. The exact chart inverse identity first holds on an open neighborhood. Consequently uniform atlas errors give uniform errors of the actual forward metric in the fixed neck coordinates. Source: Morgan--Tian Proposition 9.79, pp. 232-234, and Proposition 10.7, pp. 253-254; M28 derivation 109. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter open scoped Manifold ContDiff Topology universe u v namespace PoincareMT.Proofs.M28.NeckTransfer open PoincareMT.M28.tube FiniteHessian variable {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓑 3) ∞ M] {g : RiemannianMetric 3 M} /-- The literal forward metric equals the chart coefficient field pulled back by the fixed neck coordinates. All chart and stage guards are actual open domains. Source: Proposition 10.7; M28 derivation 109. -/ theorem forwardCylinderCoordinates_source_coefficients {X : Type v} [TopologicalSpace X] [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓑 3) ∞ X] (gX : RiemannianMetric 3 X) (e : PartialDiffeomorph (𝓑 3) (𝓑 3) M X ∞) (N : EpsilonNeck g) (hcapture : N.carrier βŠ† e.source) (q : UnitTwoSphere) (s : ℝ) (p : M) {x : EuclideanSpace ℝ (Fin 3)} (hx : x ∈ cylinderNeckChartDomain N q s) (hp : cylinderNeckChart N q s x ∈ (extChartAt (𝓑 3) p).source) : gX.pullbackCoefficients (e ∘ cylinderNeckChart N q s) x = (gX.pullbackCoefficients (e ∘ (extChartAt (𝓑 3) p).symm) ((extChartAt (𝓑 3) p) (cylinderNeckChart N q s x))).bilinearComp (fderiv ℝ ((extChartAt (𝓑 3) p) ∘ cylinderNeckChart N q s) x) (fderiv ℝ ((extChartAt (𝓑 3) p) ∘ cylinderNeckChart N q s) x) := by let c := extChartAt (𝓑 3) p let f := cylinderNeckChart N q s let psi := c ∘ f let eβ‚€ := (Diffeomorph.refl (𝓑 3) M ∞).toPartialDiffeomorph have hcapβ‚€ : N.carrier βŠ† eβ‚€.target := fun _ _ => mem_univ _ have hxβ‚€ : x ∈ capturedCylinderChartDomain eβ‚€ N q s p := ⟨hx, hp⟩ have hU := isOpen_capturedCylinderChartDomain eβ‚€ N hcapβ‚€ q s p have hpsi : ContDiffAt ℝ ∞ psi x := (contDiffOn_capturedCylinderCoordinates eβ‚€ N hcapβ‚€ q s p).contDiffAt (hU.mem_nhds hxβ‚€) have hcinv : ContMDiffAt (𝓑 3) (𝓑 3) ∞ c.symm (psi x) := (contMDiffOn_extChartAt_symm p).contMDiffAt ((isOpen_extChartAt_target p).mem_nhds (c.map_source hp)) have he : ContMDiffAt (𝓑 3) (𝓑 3) ∞ e (c.symm (psi x)) := by rw [show c.symm (psi x) = f x from c.left_inv hp] exact e.contMDiffOn_toFun.contMDiffAt (e.open_source.mem_nhds (hcapture (cylinderNeckChart_mem_carrier N q s hx))) have heq : (e ∘ c.symm) ∘ psi =αΆ [𝓝 x] e ∘ f := by filter_upwards [hU.mem_nhds hxβ‚€] with y hy change e (c.symm (c (f y))) = e (f y) have hfy : f y ∈ c.source := hy.2 rw [c.left_inv hfy] rw [← gX.pullbackCoefficients_eq_of_eventuallyEq heq] exact gX.pullbackCoefficients_comp ((he.comp (psi x) hcinv).mdifferentiableAt (by simp)) (hpsi.differentiableAt (by simp)) /-- The forward error is the bilinear pullback of the actual atlas error on a neighborhood before any derivative is taken. Source: Proposition 9.79; M28 derivation 109. -/ theorem forwardCylinderCoordinates_error_germ {X : Type v} [TopologicalSpace X] [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓑 3) ∞ X] (gX : RiemannianMetric 3 X) (e : PartialDiffeomorph (𝓑 3) (𝓑 3) M X ∞) (N : EpsilonNeck g) (hcapture : N.carrier βŠ† e.source) (q : UnitTwoSphere) {s : ℝ} (p : M) (hs : s ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) (hp : N.coordinate_map (q, s) ∈ (extChartAt (𝓑 3) p).source) : (fun x => gX.pullbackCoefficients (e ∘ cylinderNeckChart N q s) x - g.pullbackCoefficients (cylinderNeckChart N q s) x) =αΆ [𝓝 0] (fun x => (gX.pullbackCoefficients (e ∘ (extChartAt (𝓑 3) p).symm) ((extChartAt (𝓑 3) p) (cylinderNeckChart N q s x)) - g.pullbackCoefficients (extChartAt (𝓑 3) p).symm ((extChartAt (𝓑 3) p) (cylinderNeckChart N q s x))).bilinearComp (fderiv ℝ ((extChartAt (𝓑 3) p) ∘ cylinderNeckChart N q s) x) (fderiv ℝ ((extChartAt (𝓑 3) p) ∘ cylinderNeckChart N q s) x)) := by let eβ‚€ := (Diffeomorph.refl (𝓑 3) M ∞).toPartialDiffeomorph have hcapβ‚€ : N.carrier βŠ† eβ‚€.target := fun _ _ => mem_univ _ have hzero := zero_mem_capturedCylinderChartDomain eβ‚€ N q hs p hp filter_upwards [(isOpen_capturedCylinderChartDomain eβ‚€ N hcapβ‚€ q s p).mem_nhds hzero] with x hx rw [forwardCylinderCoordinates_source_coefficients gX e N hcapture q s p hx.1 hx.2] have hlimit := capturedCylinderCoordinates_limit_coefficients g eβ‚€ N hcapβ‚€ q s p hx change g.pullbackCoefficients (cylinderNeckChart N q s) x = _ at hlimit rw [hlimit] rfl /-- Finite uniform atlas convergence controls the actual forward metric error throughout a family of fixed-neck chart points. Source manifolds may vary; the coordinate maps are fixed by the original neck and chosen charts. Source: Proposition 10.7, pp. 253-254; M28 derivation 109. -/ theorem exists_forwardCylinder_metric_error_tail {ΞΉ : Type*} {X : ΞΉ β†’ Type v} [βˆ€ i, TopologicalSpace (X i)] [βˆ€ i, ChartedSpace (EuclideanSpace ℝ (Fin 3)) (X i)] [βˆ€ i, IsManifold (𝓑 3) ∞ (X i)] (gX : βˆ€ i, RiemannianMetric 3 (X i)) (e : βˆ€ i, PartialDiffeomorph (𝓑 3) (𝓑 3) M (X i) ∞) (N : EpsilonNeck g) (hcapture : βˆ€ i, N.carrier βŠ† (e i).source) (q : ΞΉ β†’ UnitTwoSphere) (s : ΞΉ β†’ ℝ) (p : ΞΉ β†’ M) (hs : βˆ€ i, s i ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) (hp : βˆ€ i, N.coordinate_map (q i, s i) ∈ (extChartAt (𝓑 3) (p i)).source) (m : β„•) (stage : ΞΉ β†’ β„•) (hmap : HasUniformJetBoundsAt m (fun i => fderiv ℝ ((extChartAt (𝓑 3) (p i)) ∘ cylinderNeckChart N (q i) (s i))) (fun _ => 0)) (herror : βˆ€ delta : ℝ, 0 < delta β†’ βˆƒ K : β„•, βˆ€ i, K ≀ stage i β†’ βˆ€ r ≀ m, β€–iteratedFDeriv ℝ r ((gX i).pullbackCoefficients ((e i) ∘ (extChartAt (𝓑 3) (p i)).symm)) ((extChartAt (𝓑 3) (p i)) (N.coordinate_map (q i, s i))) - iteratedFDeriv ℝ r (g.pullbackCoefficients (extChartAt (𝓑 3) (p i)).symm) ((extChartAt (𝓑 3) (p i)) (N.coordinate_map (q i, s i)))β€– ≀ delta) : βˆ€ rho : ℝ, 0 < rho β†’ βˆƒ K : β„•, βˆ€ i, K ≀ stage i β†’ βˆ€ r ≀ m, β€–iteratedFDeriv ℝ r (fun x => (gX i).pullbackCoefficients ((e i) ∘ cylinderNeckChart N (q i) (s i)) x - g.pullbackCoefficients (cylinderNeckChart N (q i) (s i)) x) 0β€– ≀ rho := by let eβ‚€ := (Diffeomorph.refl (𝓑 3) M ∞).toPartialDiffeomorph have hcapβ‚€ : N.carrier βŠ† eβ‚€.target := fun _ _ => mem_univ _ let psi := fun i => (extChartAt (𝓑 3) (p i)) ∘ cylinderNeckChart N (q i) (s i) let B := fun i => (gX i).pullbackCoefficients ((e i) ∘ (extChartAt (𝓑 3) (p i)).symm) let L := fun i => g.pullbackCoefficients (extChartAt (𝓑 3) (p i)).symm have hpsi (i : ΞΉ) : ContDiffAt ℝ ∞ (psi i) 0 := (contDiffOn_capturedCylinderCoordinates eβ‚€ N hcapβ‚€ (q i) (s i) (p i)).contDiffAt ((isOpen_capturedCylinderChartDomain eβ‚€ N hcapβ‚€ (q i) (s i) (p i)).mem_nhds (zero_mem_capturedCylinderChartDomain eβ‚€ N (q i) (hs i) (p i) (hp i))) have hzero (i : ΞΉ) : psi i 0 = (extChartAt (𝓑 3) (p i)) (N.coordinate_map (q i, s i)) := by dsimp only [psi, Function.comp_apply] rw [cylinderNeckChart_zero] have hcinv (i : ΞΉ) : ContMDiffAt (𝓑 3) (𝓑 3) ∞ (extChartAt (𝓑 3) (p i)).symm (psi i 0) := by apply (contMDiffOn_extChartAt_symm (p i)).contMDiffAt apply (isOpen_extChartAt_target (p i)).mem_nhds rw [hzero] exact (extChartAt (𝓑 3) (p i)).map_source (hp i) have hB (i : ΞΉ) : ContDiffAt ℝ ∞ (B i) (psi i 0) := by apply (gX i).contDiffAt_pullbackCoefficients apply ContMDiffAt.comp _ _ (hcinv i) apply (e i).contMDiffOn_toFun.contMDiffAt apply (e i).open_source.mem_nhds rw [hzero, (extChartAt (𝓑 3) (p i)).left_inv (hp i)] exact hcapture i (N.coordinate_map_mem_of_axial _ (hs i)) have hL (i : ΞΉ) : ContDiffAt ℝ ∞ (L i) (psi i 0) := g.contDiffAt_pullbackCoefficients (hcinv i) have hE : βˆ€ delta : ℝ, 0 < delta β†’ βˆƒ K : β„•, βˆ€ i, K ≀ stage i β†’ βˆ€ r ≀ m, β€–iteratedFDeriv ℝ r (fun y => B i y - L i y) (psi i 0)β€– ≀ delta := by intro delta hdelta obtain ⟨K, hK⟩ := herror delta hdelta refine ⟨K, fun i hi r hr => ?_⟩ change β€–iteratedFDeriv ℝ r (B i - L i) (psi i 0)β€– ≀ delta rw [iteratedFDeriv_sub_apply ((hB i).of_le (by exact_mod_cast le_top)) ((hL i).of_le (by exact_mod_cast le_top)), hzero] exact hK i hi r hr have htail := exists_bilinear_pullback_error_tail m stage hmap hpsi (fun i => (hB i).sub (hL i)) hE intro rho hrho obtain ⟨K, hK⟩ := htail rho hrho refine ⟨K, fun i hi r hr => ?_⟩ rw [((forwardCylinderCoordinates_error_germ (gX i) (e i) N (hcapture i) (q i) (p i) (hs i) (hp i)).iteratedFDeriv ℝ r).eq_of_nhds] exact hK i hi r hr end PoincareMT.Proofs.M28.NeckTransfer