Skip to content

Commit

Permalink
feat: add HasDerivAt.norm_sq (#8268)
Browse files Browse the repository at this point in the history
This is just a special case of the `HasFDerivAt` version
  • Loading branch information
eric-wieser committed Nov 8, 2023
1 parent 18da044 commit 8b9e98d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Mathlib/Analysis/InnerProductSpace/Calculus.lean
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,19 @@ theorem HasFDerivAt.norm_sq {f : G → F} {f' : G →L[ℝ] F} (hf : HasFDerivAt
HasFDerivAt (‖f ·‖ ^ 2) (2 • (innerSL ℝ (f x)).comp f') x :=
(hasStrictFDerivAt_norm_sq _).hasFDerivAt.comp x hf

theorem HasDerivAt.norm_sq {f : ℝ → F} {f' : F} {x : ℝ} (hf : HasDerivAt f f' x) :
HasDerivAt (‖f ·‖ ^ 2) (2 * Inner.inner (f x) f') x := by
simpa using hf.hasFDerivAt.norm_sq.hasDerivAt

theorem HasFDerivWithinAt.norm_sq {f : G → F} {f' : G →L[ℝ] F} (hf : HasFDerivWithinAt f f' s x) :
HasFDerivWithinAt (‖f ·‖ ^ 2) (2 • (innerSL ℝ (f x)).comp f') s x :=
(hasStrictFDerivAt_norm_sq _).hasFDerivAt.comp_hasFDerivWithinAt x hf

theorem HasDerivWithinAt.norm_sq {f : ℝ → F} {f' : F} {s : Set ℝ} {x : ℝ}
(hf : HasDerivWithinAt f f' s x) :
HasDerivWithinAt (‖f ·‖ ^ 2) (2 * Inner.inner (f x) f') s x := by
simpa using hf.hasFDerivWithinAt.norm_sq.hasDerivWithinAt

theorem DifferentiableAt.norm_sq (hf : DifferentiableAt ℝ f x) :
DifferentiableAt ℝ (fun y => ‖f y‖ ^ 2) x :=
((contDiffAt_id.norm_sq 𝕜).differentiableAt le_rfl).comp x hf
Expand Down

0 comments on commit 8b9e98d

Please sign in to comment.