English
For Frechet derivatives, HasFDerivWithinAt is equivalent to HasGradientWithinAt under the dual identification.
Русский
Для Фредх производной HasFDerivWithinAt эквивалентно HasGradientWithinAt через двойственный тождественный вид.
LaTeX
$$$ HasFDerivWithinAt f frechet s x \\iff HasGradientWithinAt f (toDual 𝕜 F).symm frechet s x $$$
Lean4
/-- Gradient of `f` at the point `x` within the set `s`, if it exists. Zero otherwise.
If the derivative exists (i.e., `∃ f', HasGradientWithinAt f f' s x`), then
`f x' = f x + ⟨f', x' - x⟩ + o (x' - x)` where `x'` converges to `x` inside `s`. -/
def gradientWithin (f : F → 𝕜) (s : Set F) (x : F) : F :=
(toDual 𝕜 F).symm (fderivWithin 𝕜 f s x)