English
If f is ContDiffWithinAt on s at x, then y ↦ ‖f(y)‖^2 is ContDiffWithinAt on s at x.
Русский
Если f — ContDiffWithinAt на s в x, то y ↦ ‖f(y)‖^2 также принадлежит ContDiffWithinAt на s в x.
LaTeX
$$$$\text{ContDiffWithinAt}_{\mathbb{R}}^n f \;s\;x \Rightarrow \text{ContDiffWithinAt}_{\mathbb{R}}^n \big(y \mapsto \|f(y)\|^2\big)\;s\;x.$$$$
Lean4
theorem dist (hf : ContDiffWithinAt ℝ n f s x) (hg : ContDiffWithinAt ℝ n g s x) (hne : f x ≠ g x) :
ContDiffWithinAt ℝ n (fun y => dist (f y) (g y)) s x := by simp only [dist_eq_norm];
exact (hf.sub hg).norm 𝕜 (sub_ne_zero.2 hne)