import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Measure.Distance.IntrinsicLipschitz import Mathlib.Analysis.Normed.Module.HahnBanach /-! Adapted from Mapher `PoincareMT/Proofs/M10/VectorDistance.lean` at revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. # Vector-valued comparison in intrinsic balls A norming real functional reduces the two-point estimate to the scalar upper-support theorem. Its short-path confinement argument preserves the sharp differential bound, without a dimension-dependent factor. -/ set_option autoImplicit false open Set Filter open scoped Manifold ContDiff Bundle Topology ENNReal NNReal universe u namespace PoincareMT.SurgeryVolume.Measure variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] set_option backward.isDefEq.respectTransparency false in /-- A vector-valued differential bound gives the same intrinsic two-point bound. -/ theorem edist_le_mul_riemannianEDist_of_vector_differential (g : RiemannianMetric n M) {f : M β†’ E} {U : Set M} (hf : ContinuousOn f U) (hfd : βˆ€ q ∈ U, MDifferentiableAt (𝓑 n) π“˜(ℝ, E) f q) {C : ℝβ‰₯0} (hbound : βˆ€ q ∈ U, βˆ€ v : TangentSpace (𝓑 n) q, β€–mvfderiv (𝓑 n) f q vβ€– ≀ C * g.tangentNorm q v) {xβ‚€ x y : M} {r : ℝβ‰₯0} (hball : βˆ€ q, g.edist xβ‚€ q < (r : ℝβ‰₯0∞) + r + r β†’ q ∈ U) (hx : g.edist xβ‚€ x < r) (hy : g.edist xβ‚€ y < r) : edist (f x) (f y) ≀ (C : ℝβ‰₯0∞) * g.edist x y := by obtain βŸ¨β„“, hβ„“, heval⟩ := exists_dual_vector'' ℝ (f x - f y) rw [RCLike.ofReal_real_eq_id, id_eq] at heval have h := edist_le_mul_riemannianEDist_of_upper_supports g (β„“.continuous.comp_continuousOn hf) (C := C) (fun q hq ↦ ?_) hball hx hy Β· have hdist : edist (β„“ (f x)) (β„“ (f y)) = edist (f x) (f y) := by rw [edist_dist, edist_dist, Real.dist_eq, dist_eq_norm, ← map_sub, heval, abs_of_nonneg (norm_nonneg _)] exact hdist β–Έ h refine βŸ¨β„“ ∘ f, β„“.differentiableAt.mdifferentiableAt.comp q (hfd q hq), rfl, Filter.Eventually.of_forall (fun _ ↦ le_rfl), ?_⟩ intro v have hchain : mvfderiv (𝓑 n) (β„“ ∘ f) q v = β„“ (mvfderiv (𝓑 n) f q v) := by rw [mvfderiv_comp q β„“.differentiableAt.mdifferentiableAt (hfd q hq)] simp only [mvfderiv, mfderiv_eq_fderiv, β„“.fderiv, ContinuousLinearMap.comp_apply] rfl rw [hchain, ← Real.norm_eq_abs] exact (β„“.le_opNorm _).trans <| calc β€–β„“β€– * β€–mvfderiv (𝓑 n) f q vβ€– ≀ 1 * β€–mvfderiv (𝓑 n) f q vβ€– := mul_le_mul_of_nonneg_right hβ„“ (norm_nonneg _) _ ≀ C * g.tangentNorm q v := by simpa only [one_mul] using hbound q hq v end PoincareMT.SurgeryVolume.Measure