doc-next-gen

Mathlib.Analysis.Calculus.FDeriv.Basic

Module docstring

{"# The Fréchet derivative

Let E and F be normed spaces, f : E → F, and f' : E →L[𝕜] F a continuous 𝕜-linear map, where 𝕜 is a non-discrete normed field. Then

HasFDerivWithinAt f f' s x

says that f has derivative f' at x, where the domain of interest is restricted to s. We also have

HasFDerivAt f f' x := HasFDerivWithinAt f f' x univ

Finally,

HasStrictFDerivAt f f' x

means that f : E → F has derivative f' : E →L[𝕜] F in the sense of strict differentiability, i.e., f y - f z - f'(y - z) = o(y - z) as y, z → x. This notion is used in the inverse function theorem, and is defined here only to avoid proving theorems like IsBoundedBilinearMap.hasFDerivAt twice: first for HasFDerivAt, then for HasStrictFDerivAt.

Main results

In addition to the definition and basic properties of the derivative, the folder Analysis/Calculus/FDeriv/ contains the usual formulas (and existence assertions) for the derivative of * constants * the identity * bounded linear maps (Linear.lean) * bounded bilinear maps (Bilinear.lean) * sum of two functions (Add.lean) * sum of finitely many functions (Add.lean) * multiplication of a function by a scalar constant (Add.lean) * negative of a function (Add.lean) * subtraction of two functions (Add.lean) * multiplication of a function by a scalar function (Mul.lean) * multiplication of two scalar functions (Mul.lean) * composition of functions (the chain rule) (Comp.lean) * inverse function (Mul.lean) (assuming that it exists; the inverse function theorem is in ../Inverse.lean)

For most binary operations we also define const_op and op_const theorems for the cases when the first or second argument is a constant. This makes writing chains of HasDerivAt's easier, and they more frequently lead to the desired result.

One can also interpret the derivative of a function f : 𝕜 → E as an element of E (by identifying a linear function from 𝕜 to E with its value at 1). Results on the Fréchet derivative are translated to this more elementary point of view on the derivative in the file Deriv.lean. The derivative of polynomials is handled there, as it is naturally one-dimensional.

The simplifier is set up to prove automatically that some functions are differentiable, or differentiable at a point (but not differentiable on a set or within a set at a point, as checking automatically that the good domains are mapped one to the other when using composition is not something the simplifier can easily do). This means that one can write example (x : ℝ) : Differentiable ℝ (fun x ↦ sin (exp (3 + x^2)) - 5 * cos x) := by simp. If there are divisions, one needs to supply to the simplifier proofs that the denominators do not vanish, as in lean example (x : ℝ) (h : 1 + sin x ≠ 0) : DifferentiableAt ℝ (fun x ↦ exp x / (1 + sin x)) x := by simp [h] Of course, these examples only work once exp, cos and sin have been shown to be differentiable, in Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv.

The simplifier is not set up to compute the Fréchet derivative of maps (as these are in general complicated multidimensional linear maps), but it will compute one-dimensional derivatives, see Deriv.lean.

Implementation details

The derivative is defined in terms of the IsLittleOTVS relation to ensure the definition does not ingrain a choice of norm, and is then quickly translated to the more convenient IsLittleO in the subsequent theorems. It is also characterized in terms of the Tendsto relation.

We also introduce predicates DifferentiableWithinAt 𝕜 f s x (where 𝕜 is the base field, f the function to be differentiated, x the point at which the derivative is asserted to exist, and s the set along which the derivative is defined), as well as DifferentiableAt 𝕜 f x, DifferentiableOn 𝕜 f s and Differentiable 𝕜 f to express the existence of a derivative.

To be able to compute with derivatives, we write fderivWithin 𝕜 f s x and fderiv 𝕜 f x for some choice of a derivative if it exists, and the zero function otherwise. This choice only behaves well along sets for which the derivative is unique, i.e., those for which the tangent directions span a dense subset of the whole space. The predicates UniqueDiffWithinAt s x and UniqueDiffOn s, defined in TangentCone.lean express this property. We prove that indeed they imply the uniqueness of the derivative. This is satisfied for open subsets, and in particular for univ. This uniqueness only holds when the field is non-discrete, which we request at the very beginning: otherwise, a derivative can be defined, but it has no interesting properties whatsoever.

To make sure that the simplifier can prove automatically that functions are differentiable, we tag many lemmas with the simp attribute, for instance those saying that the sum of differentiable functions is differentiable, as well as their product, their cartesian product, and so on. A notable exception is the chain rule: we do not mark as a simp lemma the fact that, if f and g are differentiable, then their composition also is: simp would always be able to match this lemma, by taking f or g to be the identity. Instead, for every reasonable function (say, exp), we add a lemma that if f is differentiable then so is (fun x ↦ exp (f x)). This means adding some boilerplate lemmas, but these can also be useful in their own right.

Tests for this ability of the simplifier (with more examples) are provided in Tests/Differentiable.lean.

TODO

Generalize more results to topological vector spaces.

Tags

derivative, differentiable, Fréchet, calculus

","### Basic properties of the derivative ","### Deducing continuity from differentiability ","### congr properties of the derivative ","### Derivative of the identity ","### Derivative of constant functions

This include the constant functions 0, 1, Nat.cast n, Int.cast z, and other numerals. ","### Support of derivatives "}

HasFDerivAtFilter structure
(f : E → F) (f' : E →L[𝕜] F) (x : E) (L : Filter E)
Full source
/-- A function `f` has the continuous linear map `f'` as derivative along the filter `L` if
`f x' = f x + f' (x' - x) + o (x' - x)` when `x'` converges along the filter `L`. This definition
is designed to be specialized for `L = 𝓝 x` (in `HasFDerivAt`), giving rise to the usual notion
of Fréchet derivative, and for `L = 𝓝[s] x` (in `HasFDerivWithinAt`), giving rise to
the notion of Fréchet derivative along the set `s`. -/
@[mk_iff hasFDerivAtFilter_iff_isLittleOTVS]
structure HasFDerivAtFilter (f : E → F) (f' : E →L[𝕜] F) (x : E) (L : Filter E) : Prop where
  of_isLittleOTVS ::
    isLittleOTVS : (fun x' => f x' - f x - f' (x' - x)) =o[𝕜; L] (fun x' => x' - x)
Fréchet derivative along a filter
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) has the continuous linear map \( f' : E \toL[\mathbb{K}] F \) as derivative along the filter \( L \) at the point \( x \in E \) if \[ f(x') = f(x) + f'(x' - x) + o(\|x' - x\|) \] as \( x' \) converges to \( x \) along the filter \( L \). Here, \( o(\|x' - x\|) \) denotes a term that is negligible compared to \( \|x' - x\| \) as \( x' \to x \).
HasFDerivWithinAt definition
(f : E → F) (f' : E →L[𝕜] F) (s : Set E) (x : E)
Full source
/-- A function `f` has the continuous linear map `f'` as derivative at `x` within a set `s` if
`f x' = f x + f' (x' - x) + o (x' - x)` when `x'` tends to `x` inside `s`. -/
@[fun_prop]
def HasFDerivWithinAt (f : E → F) (f' : E →L[𝕜] F) (s : Set E) (x : E) :=
  HasFDerivAtFilter f f' x (𝓝[s] x)
Fréchet derivative within a set at a point
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) has the continuous linear map \( f' : E \toL[\mathbb{K}] F \) as derivative at a point \( x \in E \) within a set \( s \subseteq E \) if \[ f(x') = f(x) + f'(x' - x) + o(\|x' - x\|) \] as \( x' \) tends to \( x \) within \( s \). Here, \( o(\|x' - x\|) \) denotes a term that is negligible compared to \( \|x' - x\| \) as \( x' \to x \).
HasFDerivAt definition
(f : E → F) (f' : E →L[𝕜] F) (x : E)
Full source
/-- A function `f` has the continuous linear map `f'` as derivative at `x` if
`f x' = f x + f' (x' - x) + o (x' - x)` when `x'` tends to `x`. -/
@[fun_prop]
def HasFDerivAt (f : E → F) (f' : E →L[𝕜] F) (x : E) :=
  HasFDerivAtFilter f f' x (𝓝 x)
Fréchet differentiability at a point
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) has the continuous linear map \( f' : E \toL[\mathbb{K}] F \) as Fréchet derivative at the point \( x \in E \) if \[ f(x') = f(x) + f'(x' - x) + o(\|x' - x\|) \] as \( x' \) tends to \( x \). Here, \( o(\|x' - x\|) \) denotes a term that is negligible compared to \( \|x' - x\| \) as \( x' \to x \).
HasStrictFDerivAt structure
(f : E → F) (f' : E →L[𝕜] F) (x : E)
Full source
/-- A function `f` has derivative `f'` at `a` in the sense of *strict differentiability*
if `f x - f y - f' (x - y) = o(x - y)` as `x, y → a`. This form of differentiability is required,
e.g., by the inverse function theorem. Any `C^1` function on a vector space over `ℝ` is strictly
differentiable but this definition works, e.g., for vector spaces over `p`-adic numbers. -/
@[fun_prop, mk_iff hasStrictFDerivAt_iff_isLittleOTVS]
structure HasStrictFDerivAt (f : E → F) (f' : E →L[𝕜] F) (x : E) where
  of_isLittleOTVS ::
    isLittleOTVS :
      (fun p : E × E => f p.1 - f p.2 - f' (p.1 - p.2))
        =o[𝕜; 𝓝 (x, x)] (fun p : E × E => p.1 - p.2)
Strict Fréchet differentiability at a point
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) is said to have strict Fréchet derivative \( f' : E \toL[\mathbb{K}] F \) at a point \( x \in E \) if the difference \( f(y) - f(z) - f'(y - z) \) is \( o(y - z) \) as \( y, z \to x \). This means that the linear map \( f' \) approximates the difference \( f(y) - f(z) \) uniformly well as \( y \) and \( z \) approach \( x \).
DifferentiableWithinAt definition
(f : E → F) (s : Set E) (x : E)
Full source
/-- A function `f` is differentiable at a point `x` within a set `s` if it admits a derivative
there (possibly non-unique). -/
@[fun_prop]
def DifferentiableWithinAt (f : E → F) (s : Set E) (x : E) :=
  ∃ f' : E →L[𝕜] F, HasFDerivWithinAt f f' s x
Differentiability within a set at a point
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) is differentiable at a point \( x \in E \) within a set \( s \subseteq E \) if there exists a continuous linear map \( f' : E \toL[\mathbb{K}] F \) such that \( f \) has Fréchet derivative \( f' \) at \( x \) within \( s \). This means that \( f \) can be approximated by the affine function \( f(x) + f'(x' - x) \) up to an error term that is negligible compared to \( \|x' - x\| \) as \( x' \) tends to \( x \) within \( s \).
DifferentiableAt definition
(f : E → F) (x : E)
Full source
/-- A function `f` is differentiable at a point `x` if it admits a derivative there (possibly
non-unique). -/
@[fun_prop]
def DifferentiableAt (f : E → F) (x : E) :=
  ∃ f' : E →L[𝕜] F, HasFDerivAt f f' x
Differentiability at a point
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) is differentiable at a point \( x \in E \) if there exists a continuous \(\mathbb{K}\)-linear map \( f' : E \to F \) such that \( f \) has Fréchet derivative \( f' \) at \( x \). This means that \( f \) can be approximated near \( x \) by the affine function \( f(x) + f'( \cdot - x ) \), with the error term being negligible compared to the distance from \( x \).
fderivWithin definition
Full source
/-- If `f` has a derivative at `x` within `s`, then `fderivWithin 𝕜 f s x` is such a derivative.
Otherwise, it is set to `0`. We also set it to be zero, if zero is one of possible derivatives. -/
irreducible_def fderivWithin (f : E → F) (s : Set E) (x : E) : E →L[𝕜] F :=
  if HasFDerivWithinAt f (0 : E →L[𝕜] F) s x
    then 0
  else if h : DifferentiableWithinAt 𝕜 f s x
    then Classical.choose h
  else 0
Fréchet derivative within a set
Informal description
Given a function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \), and a point \( x \in E \) within a subset \( s \subseteq E \), the Fréchet derivative of \( f \) at \( x \) within \( s \), denoted \( \text{fderivWithin}_{\mathbb{K}} f s x \), is defined as follows: - If \( f \) has derivative \( 0 \) at \( x \) within \( s \), then \( \text{fderivWithin}_{\mathbb{K}} f s x = 0 \). - Otherwise, if \( f \) is differentiable at \( x \) within \( s \), then \( \text{fderivWithin}_{\mathbb{K}} f s x \) is some derivative of \( f \) at \( x \) within \( s \). - If neither condition holds, \( \text{fderivWithin}_{\mathbb{K}} f s x = 0 \).
fderivWithin_def theorem
: eta_helper Eq✝ @fderivWithin.{} @(delta% @definition✝)
Full source
/-- If `f` has a derivative at `x` within `s`, then `fderivWithin 𝕜 f s x` is such a derivative.
Otherwise, it is set to `0`. We also set it to be zero, if zero is one of possible derivatives. -/
irreducible_def fderivWithin (f : E → F) (s : Set E) (x : E) : E →L[𝕜] F :=
  if HasFDerivWithinAt f (0 : E →L[𝕜] F) s x
    then 0
  else if h : DifferentiableWithinAt 𝕜 f s x
    then Classical.choose h
  else 0
Definition of the Fréchet Derivative Within a Set
Informal description
The Fréchet derivative of a function $f : E \to F$ at a point $x$ within a set $s \subseteq E$ is defined as follows: - If $f$ has derivative $0$ at $x$ within $s$, then $\text{fderivWithin}_{\mathbb{K}} f s x = 0$. - Otherwise, if $f$ is differentiable at $x$ within $s$, then $\text{fderivWithin}_{\mathbb{K}} f s x$ is some derivative of $f$ at $x$ within $s$. - If neither condition holds, $\text{fderivWithin}_{\mathbb{K}} f s x = 0$.
fderiv definition
Full source
/-- If `f` has a derivative at `x`, then `fderiv 𝕜 f x` is such a derivative. Otherwise, it is
set to `0`. -/
irreducible_def fderiv (f : E → F) (x : E) : E →L[𝕜] F :=
  fderivWithin 𝕜 f univ x
Fréchet derivative of a function at a point
Informal description
Given a function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \), the Fréchet derivative \( \text{fderiv} \, \mathbb{K} \, f \, x \) at a point \( x \in E \) is defined as the continuous linear map \( f' : E \to F \) such that \( f \) has derivative \( f' \) at \( x \) within the entire space \( E \). If no such derivative exists, it is set to the zero map.
fderiv_def theorem
: eta_helper Eq✝ @fderiv.{} @(delta% @definition✝)
Full source
/-- If `f` has a derivative at `x`, then `fderiv 𝕜 f x` is such a derivative. Otherwise, it is
set to `0`. -/
irreducible_def fderiv (f : E → F) (x : E) : E →L[𝕜] F :=
  fderivWithin 𝕜 f univ x
Definition of Fréchet Derivative at a Point
Informal description
Given a function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$, the Fréchet derivative $\text{fderiv}_{\mathbb{K}} f x$ at a point $x \in E$ is equal to the derivative $f'$ of $f$ at $x$ if $f$ is differentiable at $x$, and is equal to the zero map otherwise.
DifferentiableOn definition
(f : E → F) (s : Set E)
Full source
/-- `DifferentiableOn 𝕜 f s` means that `f` is differentiable within `s` at any point of `s`. -/
@[fun_prop]
def DifferentiableOn (f : E → F) (s : Set E) :=
  ∀ x ∈ s, DifferentiableWithinAt 𝕜 f s x
Differentiability of a function on a set
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) is differentiable on a set \( s \subseteq E \) if it is differentiable within \( s \) at every point \( x \in s \). This means that for each \( x \in s \), there exists a continuous linear map \( f' : E \to F \) such that \( f \) has Fréchet derivative \( f' \) at \( x \) within \( s \).
Differentiable definition
(f : E → F)
Full source
/-- `Differentiable 𝕜 f` means that `f` is differentiable at any point. -/
@[fun_prop]
def Differentiable (f : E → F) :=
  ∀ x, DifferentiableAt 𝕜 f x
Differentiability of a function
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) is differentiable if it is differentiable at every point \( x \in E \). This means that for each \( x \in E \), there exists a continuous \(\mathbb{K}\)-linear map \( f' : E \to F \) such that \( f \) has Fréchet derivative \( f' \) at \( x \).
fderivWithin_zero_of_not_differentiableWithinAt theorem
(h : ¬DifferentiableWithinAt 𝕜 f s x) : fderivWithin 𝕜 f s x = 0
Full source
theorem fderivWithin_zero_of_not_differentiableWithinAt (h : ¬DifferentiableWithinAt 𝕜 f s x) :
    fderivWithin 𝕜 f s x = 0 := by
  simp [fderivWithin, h]
Fréchet derivative within a set is zero when not differentiable
Informal description
If a function $f : E \to F$ between normed spaces over a non-discrete normed field $\mathbb{K}$ is not differentiable at a point $x \in E$ within a set $s \subseteq E$, then the Fréchet derivative of $f$ at $x$ within $s$ is the zero map, i.e., $\text{fderivWithin}_{\mathbb{K}} f s x = 0$.
fderivWithin_univ theorem
: fderivWithin 𝕜 f univ = fderiv 𝕜 f
Full source
@[simp]
theorem fderivWithin_univ : fderivWithin 𝕜 f univ = fderiv 𝕜 f := by
  ext
  rw [fderiv]
Fréchet Derivative within Universal Set Equals Global Derivative
Informal description
For a function $f : E \to F$ between normed spaces over a non-discrete normed field $\mathbb{K}$, the Fréchet derivative of $f$ within the universal set $\text{univ} \subseteq E$ at any point $x \in E$ is equal to the Fréchet derivative of $f$ at $x$. In other words, $\text{fderivWithin}_{\mathbb{K}} f \text{univ} = \text{fderiv}_{\mathbb{K}} f$.
hasFDerivAtFilter_iff_isLittleO theorem
: HasFDerivAtFilter f f' x L ↔ (fun x' => f x' - f x - f' (x' - x)) =o[L] fun x' => x' - x
Full source
theorem hasFDerivAtFilter_iff_isLittleO :
    HasFDerivAtFilterHasFDerivAtFilter f f' x L ↔ (fun x' => f x' - f x - f' (x' - x)) =o[L] fun x' => x' - x :=
  (hasFDerivAtFilter_iff_isLittleOTVS ..).trans isLittleOTVS_iff_isLittleO
Characterization of Fréchet Derivative via Asymptotic Expansion: $f$ has derivative $f'$ at $x$ along $L$ iff $f(x') - f(x) - f'(x' - x) = o(\|x' - x\|)$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $L$ a filter on $E$. Then $f$ has Fréchet derivative $f'$ at $x$ along $L$ if and only if \[ f(x') - f(x) - f'(x' - x) = o(\|x' - x\|) \] as $x'$ tends to $x$ along $L$.
hasStrictFDerivAt_iff_isLittleO theorem
: HasStrictFDerivAt f f' x ↔ (fun p : E × E => f p.1 - f p.2 - f' (p.1 - p.2)) =o[𝓝 (x, x)] fun p : E × E => p.1 - p.2
Full source
theorem hasStrictFDerivAt_iff_isLittleO :
    HasStrictFDerivAtHasStrictFDerivAt f f' x ↔
      (fun p : E × E => f p.1 - f p.2 - f' (p.1 - p.2)) =o[𝓝 (x, x)] fun p : E × E => p.1 - p.2 :=
  (hasStrictFDerivAt_iff_isLittleOTVS ..).trans isLittleOTVS_iff_isLittleO
Characterization of Strict Fréchet Differentiability via Little-o Condition
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, and $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map. Then $f$ has strict Fréchet derivative $f'$ at $x \in E$ if and only if the function $(y,z) \mapsto f(y) - f(z) - f'(y - z)$ is $o(\|y - z\|)$ as $(y,z) \to (x,x)$ in $E \times E$.
HasFDerivWithinAt.lim theorem
(h : HasFDerivWithinAt f f' s x) {α : Type*} (l : Filter α) {c : α → 𝕜} {d : α → E} {v : E} (dtop : ∀ᶠ n in l, x + d n ∈ s) (clim : Tendsto (fun n => ‖c n‖) l atTop) (cdlim : Tendsto (fun n => c n • d n) l (𝓝 v)) : Tendsto (fun n => c n • (f (x + d n) - f x)) l (𝓝 (f' v))
Full source
/-- If a function f has a derivative f' at x, a rescaled version of f around x converges to f',
i.e., `n (f (x + (1/n) v) - f x)` converges to `f' v`. More generally, if `c n` tends to infinity
and `c n * d n` tends to `v`, then `c n * (f (x + d n) - f x)` tends to `f' v`. This lemma expresses
this fact, for functions having a derivative within a set. Its specific formulation is useful for
tangent cone related discussions. -/
theorem HasFDerivWithinAt.lim (h : HasFDerivWithinAt f f' s x) {α : Type*} (l : Filter α)
    {c : α → 𝕜} {d : α → E} {v : E} (dtop : ∀ᶠ n in l, x + d n ∈ s)
    (clim : Tendsto (fun n => ‖c n‖) l atTop) (cdlim : Tendsto (fun n => c n • d n) l (𝓝 v)) :
    Tendsto (fun n => c n • (f (x + d n) - f x)) l (𝓝 (f' v)) := by
  have tendsto_arg : Tendsto (fun n => x + d n) l (𝓝[s] x) := by
    conv in 𝓝[s] x => rw [← add_zero x]
    rw [nhdsWithin, tendsto_inf]
    constructor
    · apply tendsto_const_nhds.add (tangentConeAt.lim_zero l clim cdlim)
    · rwa [tendsto_principal]
  have : (fun y => f y - f x - f' (y - x)) =o[𝓝[s] x] fun y => y - x := h.isLittleO
  have : (fun n => f (x + d n) - f x - f' (x + d n - x)) =o[l] fun n => x + d n - x :=
    this.comp_tendsto tendsto_arg
  have : (fun n => f (x + d n) - f x - f' (d n)) =o[l] d := by simpa only [add_sub_cancel_left]
  have : (fun n => c n • (f (x + d n) - f x - f' (d n))) =o[l] fun n => c n • d n :=
    (isBigO_refl c l).smul_isLittleO this
  have : (fun n => c n • (f (x + d n) - f x - f' (d n))) =o[l] fun _ => (1 : ℝ) :=
    this.trans_isBigO (cdlim.isBigO_one )
  have L1 : Tendsto (fun n => c n • (f (x + d n) - f x - f' (d n))) l (𝓝 0) :=
    (isLittleO_one_iff ).1 this
  have L2 : Tendsto (fun n => f' (c n • d n)) l (𝓝 (f' v)) :=
    Tendsto.comp f'.cont.continuousAt cdlim
  have L3 :
    Tendsto (fun n => c n • (f (x + d n) - f x - f' (d n)) + f' (c n • d n)) l (𝓝 (0 + f' v)) :=
    L1.add L2
  have :
    (fun n => c n • (f (x + d n) - f x - f' (d n)) + f' (c n • d n)) = fun n =>
      c n • (f (x + d n) - f x) := by
    ext n
    simp [smul_add, smul_sub]
  rwa [this, zero_add] at L3
Limit Characterization of Fréchet Derivative Within a Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, and $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map. Suppose $f$ has Fréchet derivative $f'$ at $x \in E$ within a set $s \subseteq E$. Let $\alpha$ be a type, $l$ a filter on $\alpha$, and $c : \alpha \to \mathbb{K}$, $d : \alpha \to E$, $v \in E$ functions and a vector such that: 1. For all $n$ in a neighborhood of $l$, $x + d(n) \in s$; 2. The norms $\|c(n)\|$ tend to infinity along $l$; 3. The sequence $c(n) \cdot d(n)$ tends to $v$ along $l$. Then the sequence $c(n) \cdot (f(x + d(n)) - f(x))$ tends to $f'(v)$ along $l$.
HasFDerivWithinAt.unique_on theorem
(hf : HasFDerivWithinAt f f' s x) (hg : HasFDerivWithinAt f f₁' s x) : EqOn f' f₁' (tangentConeAt 𝕜 s x)
Full source
/-- If `f'` and `f₁'` are two derivatives of `f` within `s` at `x`, then they are equal on the
tangent cone to `s` at `x` -/
theorem HasFDerivWithinAt.unique_on (hf : HasFDerivWithinAt f f' s x)
    (hg : HasFDerivWithinAt f f₁' s x) : EqOn f' f₁' (tangentConeAt 𝕜 s x) :=
  fun _ ⟨_, _, dtop, clim, cdlim⟩ =>
  tendsto_nhds_unique (hf.lim atTop dtop clim cdlim) (hg.lim atTop dtop clim cdlim)
Uniqueness of Fréchet Derivative on Tangent Cone
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, and $s \subseteq E$ a subset. If $f$ has two Fréchet derivatives $f'$ and $f'_1$ at a point $x \in E$ within the set $s$, then $f'$ and $f'_1$ agree on the tangent cone to $s$ at $x$.
UniqueDiffWithinAt.eq theorem
(H : UniqueDiffWithinAt 𝕜 s x) (hf : HasFDerivWithinAt f f' s x) (hg : HasFDerivWithinAt f f₁' s x) : f' = f₁'
Full source
/-- `UniqueDiffWithinAt` achieves its goal: it implies the uniqueness of the derivative. -/
theorem UniqueDiffWithinAt.eq (H : UniqueDiffWithinAt 𝕜 s x) (hf : HasFDerivWithinAt f f' s x)
    (hg : HasFDerivWithinAt f f₁' s x) : f' = f₁' :=
  ContinuousLinearMap.ext_on H.1 (hf.unique_on hg)
Uniqueness of Fréchet Derivative at Uniquely Differentiable Points
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, let $s \subseteq E$ be a subset, and let $x \in s$ be a point where $s$ is uniquely differentiable (i.e., the tangent cone at $x$ spans a dense subspace of $E$). If a function $f : E \to F$ has two Fréchet derivatives $f'$ and $f'_1$ at $x$ within $s$, then $f' = f'_1$.
hasFDerivAtFilter_iff_tendsto theorem
: HasFDerivAtFilter f f' x L ↔ Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) L (𝓝 0)
Full source
theorem hasFDerivAtFilter_iff_tendsto :
    HasFDerivAtFilterHasFDerivAtFilter f f' x L ↔
      Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) L (𝓝 0) := by
  have h : ∀ x', ‖x' - x‖ = 0 → ‖f x' - f x - f' (x' - x)‖ = 0 := fun x' hx' => by
    rw [sub_eq_zero.1 (norm_eq_zero.1 hx')]
    simp
  rw [hasFDerivAtFilter_iff_isLittleO, ← isLittleO_norm_left, ← isLittleO_norm_right,
    isLittleO_iff_tendsto h]
  exact tendsto_congr fun _ => div_eq_inv_mul _ _
Characterization of Fréchet Derivative via Limit of Difference Quotient
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $L$ a filter on $E$. Then $f$ has Fréchet derivative $f'$ at $x$ along $L$ if and only if the function \[ x' \mapsto \frac{\|f(x') - f(x) - f'(x' - x)\|}{\|x' - x\|} \] tends to $0$ along the filter $L$.
hasFDerivWithinAt_iff_tendsto theorem
: HasFDerivWithinAt f f' s x ↔ Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) (𝓝[s] x) (𝓝 0)
Full source
theorem hasFDerivWithinAt_iff_tendsto :
    HasFDerivWithinAtHasFDerivWithinAt f f' s x ↔
      Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) (𝓝[s] x) (𝓝 0) :=
  hasFDerivAtFilter_iff_tendsto
Characterization of Fréchet Derivative Within a Set via Limit of Difference Quotient
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$. Then $f$ has Fréchet derivative $f'$ at $x$ within $s$ if and only if the function \[ x' \mapsto \frac{\|f(x') - f(x) - f'(x' - x)\|}{\|x' - x\|} \] tends to $0$ as $x'$ approaches $x$ within $s$.
hasFDerivAt_iff_tendsto theorem
: HasFDerivAt f f' x ↔ Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) (𝓝 x) (𝓝 0)
Full source
theorem hasFDerivAt_iff_tendsto :
    HasFDerivAtHasFDerivAt f f' x ↔ Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) (𝓝 x) (𝓝 0) :=
  hasFDerivAtFilter_iff_tendsto
Characterization of Fréchet Differentiability via Limit of Difference Quotient
Informal description
A function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at a point $x \in E$ if and only if the function \[ x' \mapsto \frac{\|f(x') - f(x) - f'(x' - x)\|}{\|x' - x\|} \] tends to $0$ as $x'$ approaches $x$ in $E$.
hasFDerivAt_iff_isLittleO_nhds_zero theorem
: HasFDerivAt f f' x ↔ (fun h : E => f (x + h) - f x - f' h) =o[𝓝 0] fun h => h
Full source
theorem hasFDerivAt_iff_isLittleO_nhds_zero :
    HasFDerivAtHasFDerivAt f f' x ↔ (fun h : E => f (x + h) - f x - f' h) =o[𝓝 0] fun h => h := by
  rw [HasFDerivAt, hasFDerivAtFilter_iff_isLittleO, ← map_add_left_nhds_zero x, isLittleO_map]
  simp [Function.comp_def]
Characterization of Fréchet Differentiability via Asymptotic Remainder: $f$ has derivative $f'$ at $x$ iff $f(x+h) - f(x) - f'(h) = o(\|h\|)$ as $h \to 0$
Informal description
A function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at a point $x \in E$ if and only if the remainder term $f(x + h) - f(x) - f'(h)$ is $o(\|h\|)$ as $h \to 0$ in $E$.
HasFDerivAtFilter.mono theorem
(h : HasFDerivAtFilter f f' x L₂) (hst : L₁ ≤ L₂) : HasFDerivAtFilter f f' x L₁
Full source
nonrec theorem HasFDerivAtFilter.mono (h : HasFDerivAtFilter f f' x L₂) (hst : L₁ ≤ L₂) :
    HasFDerivAtFilter f f' x L₁ :=
  .of_isLittleOTVS <| h.isLittleOTVS.mono hst
Monotonicity of Fréchet Differentiability with Respect to Filters
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, and $f' : E \toL[\mathbb{K}] F$ a continuous linear map. If $f$ has Fréchet derivative $f'$ at $x \in E$ along filter $L_2$, and $L_1$ is a finer filter than $L_2$ (i.e., $L_1 \leq L_2$), then $f$ also has Fréchet derivative $f'$ at $x$ along filter $L_1$.
HasFDerivWithinAt.mono_of_mem_nhdsWithin theorem
(h : HasFDerivWithinAt f f' t x) (hst : t ∈ 𝓝[s] x) : HasFDerivWithinAt f f' s x
Full source
theorem HasFDerivWithinAt.mono_of_mem_nhdsWithin
    (h : HasFDerivWithinAt f f' t x) (hst : t ∈ 𝓝[s] x) :
    HasFDerivWithinAt f f' s x :=
  h.mono <| nhdsWithin_le_iff.mpr hst
Localization of Fréchet Differentiability within Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, and $f' : E \toL[\mathbb{K}] F$ a continuous linear map. If $f$ has Fréchet derivative $f'$ at $x \in E$ within a set $t \subseteq E$, and $t$ is a neighborhood of $x$ within $s \subseteq E$, then $f$ also has Fréchet derivative $f'$ at $x$ within $s$.
HasFDerivWithinAt.mono theorem
(h : HasFDerivWithinAt f f' t x) (hst : s ⊆ t) : HasFDerivWithinAt f f' s x
Full source
nonrec theorem HasFDerivWithinAt.mono (h : HasFDerivWithinAt f f' t x) (hst : s ⊆ t) :
    HasFDerivWithinAt f f' s x :=
  h.mono <| nhdsWithin_mono _ hst
Restriction of Fréchet Differentiability to Smaller Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, and $f' : E \toL[\mathbb{K}] F$ a continuous linear map. If $f$ has Fréchet derivative $f'$ at $x \in E$ within a set $t \subseteq E$, and $s$ is a subset of $t$, then $f$ also has Fréchet derivative $f'$ at $x$ within $s$.
HasFDerivAt.hasFDerivAtFilter theorem
(h : HasFDerivAt f f' x) (hL : L ≤ 𝓝 x) : HasFDerivAtFilter f f' x L
Full source
theorem HasFDerivAt.hasFDerivAtFilter (h : HasFDerivAt f f' x) (hL : L ≤ 𝓝 x) :
    HasFDerivAtFilter f f' x L :=
  h.mono hL
Fréchet Differentiability at a Point Implies Differentiability Along Finer Filters
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at a point $x \in E$, then for any filter $L$ on $E$ that is finer than the neighborhood filter of $x$, $f$ has Fréchet derivative $f'$ at $x$ along $L$.
HasFDerivAt.hasFDerivWithinAt theorem
(h : HasFDerivAt f f' x) : HasFDerivWithinAt f f' s x
Full source
@[fun_prop]
theorem HasFDerivAt.hasFDerivWithinAt (h : HasFDerivAt f f' x) : HasFDerivWithinAt f f' s x :=
  h.hasFDerivAtFilter inf_le_left
Fréchet Differentiability at a Point Implies Differentiability Within Any Subset
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at a point $x \in E$, then for any subset $s \subseteq E$, $f$ has Fréchet derivative $f'$ at $x$ within $s$.
HasFDerivWithinAt.differentiableWithinAt theorem
(h : HasFDerivWithinAt f f' s x) : DifferentiableWithinAt 𝕜 f s x
Full source
@[fun_prop]
theorem HasFDerivWithinAt.differentiableWithinAt (h : HasFDerivWithinAt f f' s x) :
    DifferentiableWithinAt 𝕜 f s x :=
  ⟨f', h⟩
Differentiability from Fréchet Differentiability Within a Set
Informal description
If a function $f : E \to F$ between normed spaces over a non-discrete normed field $\mathbb{K}$ has Fréchet derivative $f'$ at a point $x \in E$ within a set $s \subseteq E$, then $f$ is differentiable at $x$ within $s$.
HasFDerivAt.differentiableAt theorem
(h : HasFDerivAt f f' x) : DifferentiableAt 𝕜 f x
Full source
@[fun_prop]
theorem HasFDerivAt.differentiableAt (h : HasFDerivAt f f' x) : DifferentiableAt 𝕜 f x :=
  ⟨f', h⟩
Fréchet Differentiability Implies Differentiability at a Point
Informal description
If a function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$ has Fréchet derivative $f'$ at a point $x \in E$, then $f$ is differentiable at $x$.
hasFDerivWithinAt_univ theorem
: HasFDerivWithinAt f f' univ x ↔ HasFDerivAt f f' x
Full source
@[simp]
theorem hasFDerivWithinAt_univ : HasFDerivWithinAtHasFDerivWithinAt f f' univ x ↔ HasFDerivAt f f' x := by
  simp only [HasFDerivWithinAt, nhdsWithin_univ, HasFDerivAt]
Equivalence of Fréchet Differentiability on Entire Space and at a Point
Informal description
For a function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$, a continuous $\mathbb{K}$-linear map $f' : E \toL[\mathbb{K}] F$, and a point $x \in E$, the following are equivalent: 1. $f$ has Fréchet derivative $f'$ at $x$ within the entire space $E$ (i.e., $\text{HasFDerivWithinAt}\ f\ f'\ \text{univ}\ x$) 2. $f$ has Fréchet derivative $f'$ at $x$ (i.e., $\text{HasFDerivAt}\ f\ f'\ x$).
differentiableWithinAt_univ theorem
: DifferentiableWithinAt 𝕜 f univ x ↔ DifferentiableAt 𝕜 f x
Full source
theorem differentiableWithinAt_univ :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f univ x ↔ DifferentiableAt 𝕜 f x := by
  simp only [DifferentiableWithinAt, hasFDerivWithinAt_univ, DifferentiableAt]
Equivalence of Differentiability Within Universal Set and Differentiability at a Point
Informal description
For a function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \), and a point \( x \in E \), the following are equivalent: 1. \( f \) is differentiable at \( x \) within the universal set \( \text{univ} \) (i.e., the entire space \( E \)). 2. \( f \) is differentiable at \( x \).
fderiv_zero_of_not_differentiableAt theorem
(h : ¬DifferentiableAt 𝕜 f x) : fderiv 𝕜 f x = 0
Full source
theorem fderiv_zero_of_not_differentiableAt (h : ¬DifferentiableAt 𝕜 f x) : fderiv 𝕜 f x = 0 := by
  rw [fderiv, fderivWithin_zero_of_not_differentiableWithinAt]
  rwa [differentiableWithinAt_univ]
Fréchet derivative is zero at non-differentiable points
Informal description
If a function $f : E \to F$ between normed spaces over a non-discrete normed field $\mathbb{K}$ is not differentiable at a point $x \in E$, then its Fréchet derivative at $x$ is the zero map, i.e., $\text{fderiv}_{\mathbb{K}} f x = 0$.
hasFDerivWithinAt_of_mem_nhds theorem
(h : s ∈ 𝓝 x) : HasFDerivWithinAt f f' s x ↔ HasFDerivAt f f' x
Full source
theorem hasFDerivWithinAt_of_mem_nhds (h : s ∈ 𝓝 x) :
    HasFDerivWithinAtHasFDerivWithinAt f f' s x ↔ HasFDerivAt f f' x := by
  rw [HasFDerivAt, HasFDerivWithinAt, nhdsWithin_eq_nhds.mpr h]
Equivalence of Fréchet Differentiability Within a Neighborhood and at a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$ a subset. If $s$ is a neighborhood of $x$, then $f$ has Fréchet derivative $f'$ within $s$ at $x$ if and only if $f$ has Fréchet derivative $f'$ at $x$.
hasFDerivWithinAt_of_isOpen theorem
(h : IsOpen s) (hx : x ∈ s) : HasFDerivWithinAt f f' s x ↔ HasFDerivAt f f' x
Full source
lemma hasFDerivWithinAt_of_isOpen (h : IsOpen s) (hx : x ∈ s) :
    HasFDerivWithinAtHasFDerivWithinAt f f' s x ↔ HasFDerivAt f f' x :=
  hasFDerivWithinAt_of_mem_nhds (h.mem_nhds hx)
Fréchet Differentiability Within Open Set Equals Differentiability at Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$ an open set containing $x$. Then $f$ has Fréchet derivative $f'$ within $s$ at $x$ if and only if $f$ has Fréchet derivative $f'$ at $x$.
hasFDerivWithinAt_insert theorem
{y : E} : HasFDerivWithinAt f f' (insert y s) x ↔ HasFDerivWithinAt f f' s x
Full source
@[simp]
theorem hasFDerivWithinAt_insert {y : E} :
    HasFDerivWithinAtHasFDerivWithinAt f f' (insert y s) x ↔ HasFDerivWithinAt f f' s x := by
  rcases eq_or_ne x y with (rfl | h)
  · simp_rw [HasFDerivWithinAt, hasFDerivAtFilter_iff_isLittleOTVS]
    apply isLittleOTVS_insert
    simp only [sub_self, map_zero]
  refine ⟨fun h => h.mono <| subset_insert y s, fun hf => hf.mono_of_mem_nhdsWithin ?_⟩
  simp_rw [nhdsWithin_insert_of_ne h, self_mem_nhdsWithin]
Fréchet Differentiability at Point within Inserted Set iff within Original Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$ a subset. For any $y \in E$, the function $f$ has Fréchet derivative $f'$ at $x$ within the set $\{y\} \cup s$ if and only if $f$ has Fréchet derivative $f'$ at $x$ within $s$.
HasFDerivWithinAt.insert theorem
(h : HasFDerivWithinAt g g' s x) : HasFDerivWithinAt g g' (insert x s) x
Full source
protected theorem HasFDerivWithinAt.insert (h : HasFDerivWithinAt g g' s x) :
    HasFDerivWithinAt g g' (insert x s) x :=
  h.insert'
Preservation of Fréchet Differentiability When Adding Point to Domain
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $g : E \to F$ a function, $g' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$ a subset. If $g$ has Fréchet derivative $g'$ at $x$ within $s$, then $g$ also has Fréchet derivative $g'$ at $x$ within the set $\{x\} \cup s$.
hasFDerivWithinAt_diff_singleton theorem
(y : E) : HasFDerivWithinAt f f' (s \ { y }) x ↔ HasFDerivWithinAt f f' s x
Full source
@[simp]
theorem hasFDerivWithinAt_diff_singleton (y : E) :
    HasFDerivWithinAtHasFDerivWithinAt f f' (s \ {y}) x ↔ HasFDerivWithinAt f f' s x := by
  rw [← hasFDerivWithinAt_insert, insert_diff_singleton, hasFDerivWithinAt_insert]
Fréchet Differentiability at Point within Set Minus Singleton iff within Original Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$ a subset. For any $y \in E$, the function $f$ has Fréchet derivative $f'$ at $x$ within the set $s \setminus \{y\}$ if and only if $f$ has Fréchet derivative $f'$ at $x$ within $s$.
HasFDerivWithinAt.empty theorem
: HasFDerivWithinAt f f' ∅ x
Full source
@[simp]
protected theorem HasFDerivWithinAt.empty : HasFDerivWithinAt f f'  x := by
  simp [HasFDerivWithinAt, hasFDerivAtFilter_iff_isLittleOTVS]
Fréchet Derivative Within Empty Set is Trivially Satisfied
Informal description
For any function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$, any continuous $\mathbb{K}$-linear map $f' : E \toL[\mathbb{K}] F$, and any point $x \in E$, the function $f$ has Fréchet derivative $f'$ at $x$ within the empty set $\emptyset$.
DifferentiableWithinAt.empty theorem
: DifferentiableWithinAt 𝕜 f ∅ x
Full source
@[simp]
protected theorem DifferentiableWithinAt.empty : DifferentiableWithinAt 𝕜 f  x :=
  ⟨0, .empty⟩
Differentiability within the empty set is trivially satisfied
Informal description
For any function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \), and any point \( x \in E \), the function \( f \) is differentiable at \( x \) within the empty set \( \emptyset \).
HasFDerivWithinAt.of_finite theorem
(h : s.Finite) : HasFDerivWithinAt f f' s x
Full source
theorem HasFDerivWithinAt.of_finite (h : s.Finite) : HasFDerivWithinAt f f' s x := by
  induction s, h using Set.Finite.induction_on with
  | empty => exact .empty
  | insert _ _ ih => exact ih.insert'
Fréchet Differentiability on Finite Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $s \subseteq E$ a finite set, and $x \in E$. Then $f$ has Fréchet derivative $f'$ at $x$ within $s$.
DifferentiableWithinAt.of_finite theorem
(h : s.Finite) : DifferentiableWithinAt 𝕜 f s x
Full source
theorem DifferentiableWithinAt.of_finite (h : s.Finite) : DifferentiableWithinAt 𝕜 f s x :=
  ⟨0, .of_finite h⟩
Differentiability Within Finite Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $s \subseteq E$ a finite set, and $x \in E$. Then $f$ is differentiable at $x$ within $s$.
HasFDerivWithinAt.singleton theorem
{y} : HasFDerivWithinAt f f' { x } y
Full source
@[simp]
protected theorem HasFDerivWithinAt.singleton {y} : HasFDerivWithinAt f f' {x} y :=
  .of_finite <| finite_singleton _
Fréchet Differentiability at a Point within a Singleton Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, and $x, y \in E$. Then $f$ has Fréchet derivative $f'$ at $y$ within the singleton set $\{x\}$.
DifferentiableWithinAt.singleton theorem
{y} : DifferentiableWithinAt 𝕜 f { x } y
Full source
@[simp]
protected theorem DifferentiableWithinAt.singleton {y} : DifferentiableWithinAt 𝕜 f {x} y :=
  ⟨0, .singleton⟩
Differentiability at a Point within a Singleton Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. For any points $x, y \in E$, the function $f$ is differentiable at $y$ within the singleton set $\{x\}$.
HasFDerivWithinAt.of_subsingleton theorem
(h : s.Subsingleton) : HasFDerivWithinAt f f' s x
Full source
theorem HasFDerivWithinAt.of_subsingleton (h : s.Subsingleton) : HasFDerivWithinAt f f' s x :=
  .of_finite h.finite
Fréchet Differentiability on Subsingleton Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $s \subseteq E$ a subsingleton set (i.e., containing at most one element), and $x \in E$. Then $f$ has Fréchet derivative $f'$ at $x$ within $s$.
DifferentiableWithinAt.of_subsingleton theorem
(h : s.Subsingleton) : DifferentiableWithinAt 𝕜 f s x
Full source
theorem DifferentiableWithinAt.of_subsingleton (h : s.Subsingleton) :
    DifferentiableWithinAt 𝕜 f s x :=
  .of_finite h.finite
Differentiability on Subsingleton Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $s \subseteq E$ a subsingleton set (i.e., containing at most one element), and $x \in E$. Then $f$ is differentiable at $x$ within $s$.
HasStrictFDerivAt.isBigO_sub theorem
(hf : HasStrictFDerivAt f f' x) : (fun p : E × E => f p.1 - f p.2) =O[𝓝 (x, x)] fun p : E × E => p.1 - p.2
Full source
theorem HasStrictFDerivAt.isBigO_sub (hf : HasStrictFDerivAt f f' x) :
    (fun p : E × E => f p.1 - f p.2) =O[𝓝 (x, x)] fun p : E × E => p.1 - p.2 :=
  hf.isLittleO.isBigO.congr_of_sub.2 (f'.isBigO_comp _ _)
Asymptotic Bound for Differences under Strict Fréchet Differentiability: $f(y) - f(z) = O(y - z)$ near $(x, x)$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function that has a strict Fréchet derivative $f'$ at $x \in E$. Then the difference $f(y) - f(z)$ is asymptotically bounded by $y - z$ as $(y, z)$ approaches $(x, x)$, i.e., there exists a neighborhood $U$ of $(x, x)$ and a constant $C > 0$ such that for all $(y, z) \in U$, we have $\|f(y) - f(z)\| \leq C\|y - z\|$.
HasFDerivAtFilter.isBigO_sub theorem
(h : HasFDerivAtFilter f f' x L) : (fun x' => f x' - f x) =O[L] fun x' => x' - x
Full source
theorem HasFDerivAtFilter.isBigO_sub (h : HasFDerivAtFilter f f' x L) :
    (fun x' => f x' - f x) =O[L] fun x' => x' - x :=
  h.isLittleO.isBigO.congr_of_sub.2 (f'.isBigO_sub _ _)
Asymptotic Bound for Differentiable Functions: $f(x') - f(x) = O(x' - x)$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has a Fréchet derivative $f'$ at $x \in E$ along the filter $L$, then the difference $f(x') - f(x)$ is asymptotically bounded by $x' - x$ along $L$, i.e., $f(x') - f(x) = O(x' - x)$ as $x' \to L$.
HasStrictFDerivAt.hasFDerivAt theorem
(hf : HasStrictFDerivAt f f' x) : HasFDerivAt f f' x
Full source
@[fun_prop]
protected theorem HasStrictFDerivAt.hasFDerivAt (hf : HasStrictFDerivAt f f' x) :
    HasFDerivAt f f' x :=
  .of_isLittleOTVS <| by
    simpa only using hf.isLittleOTVS.comp_tendsto (tendsto_id.prodMk_nhds tendsto_const_nhds)
Strict Fréchet Differentiability Implies Fréchet Differentiability
Informal description
If a function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) has a strict Fréchet derivative \( f' : E \toL[\mathbb{K}] F \) at a point \( x \in E \), then \( f \) has \( f' \) as its Fréchet derivative at \( x \).
HasStrictFDerivAt.differentiableAt theorem
(hf : HasStrictFDerivAt f f' x) : DifferentiableAt 𝕜 f x
Full source
protected theorem HasStrictFDerivAt.differentiableAt (hf : HasStrictFDerivAt f f' x) :
    DifferentiableAt 𝕜 f x :=
  hf.hasFDerivAt.differentiableAt
Strict Fréchet Differentiability Implies Differentiability at a Point
Informal description
If a function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$ has a strict Fréchet derivative $f'$ at a point $x \in E$, then $f$ is differentiable at $x$.
HasStrictFDerivAt.exists_lipschitzOnWith_of_nnnorm_lt theorem
(hf : HasStrictFDerivAt f f' x) (K : ℝ≥0) (hK : ‖f'‖₊ < K) : ∃ s ∈ 𝓝 x, LipschitzOnWith K f s
Full source
/-- If `f` is strictly differentiable at `x` with derivative `f'` and `K > ‖f'‖₊`, then `f` is
`K`-Lipschitz in a neighborhood of `x`. -/
theorem HasStrictFDerivAt.exists_lipschitzOnWith_of_nnnorm_lt (hf : HasStrictFDerivAt f f' x)
    (K : ℝ≥0) (hK : ‖f'‖₊ < K) : ∃ s ∈ 𝓝 x, LipschitzOnWith K f s := by
  have := hf.isLittleO.add_isBigOWith (f'.isBigOWith_comp _ _) hK
  simp only [sub_add_cancel, IsBigOWith] at this
  rcases exists_nhds_square this with ⟨U, Uo, xU, hU⟩
  exact
    ⟨U, Uo.mem_nhds xU, lipschitzOnWith_iff_norm_sub_le.2 fun x hx y hy => hU (mk_mem_prod hx hy)⟩
Local Lipschitz Property for Strictly Differentiable Functions with Operator Norm Bound
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be strictly differentiable at $x \in E$ with derivative $f' : E \toL[\mathbb{K}] F$. If $K > \|f'\|_{\text{op}}$, then there exists a neighborhood $s$ of $x$ such that $f$ is $K$-Lipschitz on $s$.
HasStrictFDerivAt.exists_lipschitzOnWith theorem
(hf : HasStrictFDerivAt f f' x) : ∃ K, ∃ s ∈ 𝓝 x, LipschitzOnWith K f s
Full source
/-- If `f` is strictly differentiable at `x` with derivative `f'`, then `f` is Lipschitz in a
neighborhood of `x`. See also `HasStrictFDerivAt.exists_lipschitzOnWith_of_nnnorm_lt` for a
more precise statement. -/
theorem HasStrictFDerivAt.exists_lipschitzOnWith (hf : HasStrictFDerivAt f f' x) :
    ∃ K, ∃ s ∈ 𝓝 x, LipschitzOnWith K f s :=
  (exists_gt _).imp hf.exists_lipschitzOnWith_of_nnnorm_lt
Local Lipschitz Property for Strictly Differentiable Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be strictly differentiable at $x \in E$ with derivative $f' : E \toL[\mathbb{K}] F$. Then there exists a constant $K \geq 0$ and a neighborhood $s$ of $x$ such that $f$ is $K$-Lipschitz on $s$.
HasFDerivAt.lim theorem
(hf : HasFDerivAt f f' x) (v : E) {α : Type*} {c : α → 𝕜} {l : Filter α} (hc : Tendsto (fun n => ‖c n‖) l atTop) : Tendsto (fun n => c n • (f (x + (c n)⁻¹ • v) - f x)) l (𝓝 (f' v))
Full source
/-- Directional derivative agrees with `HasFDeriv`. -/
theorem HasFDerivAt.lim (hf : HasFDerivAt f f' x) (v : E) {α : Type*} {c : α → 𝕜} {l : Filter α}
    (hc : Tendsto (fun n => ‖c n‖) l atTop) :
    Tendsto (fun n => c n • (f (x + (c n)⁻¹ • v) - f x)) l (𝓝 (f' v)) := by
  refine (hasFDerivWithinAt_univ.2 hf).lim _ univ_mem hc ?_
  intro U hU
  refine (eventually_ne_of_tendsto_norm_atTop hc (0 : 𝕜)).mono fun y hy => ?_
  convert mem_of_mem_nhds hU
  dsimp only
  rw [← mul_smul, mul_inv_cancel₀ hy, one_smul]
Limit Characterization of Fréchet Derivative at a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be differentiable at $x \in E$ with Fréchet derivative $f' : E \toL[\mathbb{K}] F$. For any vector $v \in E$ and any sequence $(c_n)_{n \in \alpha}$ in $\mathbb{K}$ such that $\|c_n\| \to \infty$ as $n \to \infty$ (with respect to a filter $l$ on $\alpha$), the sequence \[ c_n \cdot \big(f(x + c_n^{-1} \cdot v) - f(x)\big) \] converges to $f'(v)$ as $n \to \infty$.
HasFDerivAt.unique theorem
(h₀ : HasFDerivAt f f₀' x) (h₁ : HasFDerivAt f f₁' x) : f₀' = f₁'
Full source
theorem HasFDerivAt.unique (h₀ : HasFDerivAt f f₀' x) (h₁ : HasFDerivAt f f₁' x) : f₀' = f₁' := by
  rw [← hasFDerivWithinAt_univ] at h₀ h₁
  exact uniqueDiffWithinAt_univ.eq h₀ h₁
Uniqueness of Fréchet Derivative at a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has two Fréchet derivatives $f'_0$ and $f'_1$ at a point $x \in E$, then $f'_0 = f'_1$.
hasFDerivWithinAt_inter' theorem
(h : t ∈ 𝓝[s] x) : HasFDerivWithinAt f f' (s ∩ t) x ↔ HasFDerivWithinAt f f' s x
Full source
theorem hasFDerivWithinAt_inter' (h : t ∈ 𝓝[s] x) :
    HasFDerivWithinAtHasFDerivWithinAt f f' (s ∩ t) x ↔ HasFDerivWithinAt f f' s x := by
  simp [HasFDerivWithinAt, nhdsWithin_restrict'' s h]
Fréchet Derivative within Intersection of Set and Neighborhood
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $f' : E \toL[\mathbb{K}] F$ be a continuous $\mathbb{K}$-linear map, $s \subseteq E$ be a subset, and $x \in E$ be a point. Given that $t$ is a neighborhood of $x$ within $s$ (i.e., $t \in \mathcal{N}_s(x)$), the function $f$ has Fréchet derivative $f'$ at $x$ within $s \cap t$ if and only if $f$ has Fréchet derivative $f'$ at $x$ within $s$.
hasFDerivWithinAt_inter theorem
(h : t ∈ 𝓝 x) : HasFDerivWithinAt f f' (s ∩ t) x ↔ HasFDerivWithinAt f f' s x
Full source
theorem hasFDerivWithinAt_inter (h : t ∈ 𝓝 x) :
    HasFDerivWithinAtHasFDerivWithinAt f f' (s ∩ t) x ↔ HasFDerivWithinAt f f' s x := by
  simp [HasFDerivWithinAt, nhdsWithin_restrict' s h]
Equivalence of Fréchet Derivatives on Intersection with Neighborhood
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $f' : E \toL[\mathbb{K}] F$ be a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$ be a subset. If $t$ is a neighborhood of $x$, then $f$ has derivative $f'$ within $s \cap t$ at $x$ if and only if $f$ has derivative $f'$ within $s$ at $x$.
HasFDerivWithinAt.union theorem
(hs : HasFDerivWithinAt f f' s x) (ht : HasFDerivWithinAt f f' t x) : HasFDerivWithinAt f f' (s ∪ t) x
Full source
theorem HasFDerivWithinAt.union (hs : HasFDerivWithinAt f f' s x)
    (ht : HasFDerivWithinAt f f' t x) : HasFDerivWithinAt f f' (s ∪ t) x := by
  simp only [HasFDerivWithinAt, nhdsWithin_union]
  exact .of_isLittleOTVS <| hs.isLittleOTVS.sup ht.isLittleOTVS
Fréchet Differentiability is Preserved under Union of Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $f' : E \toL[\mathbb{K}] F$ be a continuous $\mathbb{K}$-linear map, $x \in E$, and $s, t \subseteq E$ be subsets. If $f$ has Fréchet derivative $f'$ at $x$ within both $s$ and $t$, then $f$ has Fréchet derivative $f'$ at $x$ within the union $s \cup t$.
HasFDerivWithinAt.hasFDerivAt theorem
(h : HasFDerivWithinAt f f' s x) (hs : s ∈ 𝓝 x) : HasFDerivAt f f' x
Full source
theorem HasFDerivWithinAt.hasFDerivAt (h : HasFDerivWithinAt f f' s x) (hs : s ∈ 𝓝 x) :
    HasFDerivAt f f' x := by
  rwa [← univ_inter s, hasFDerivWithinAt_inter hs, hasFDerivWithinAt_univ] at h
Local Fréchet Differentiability Implies Pointwise Differentiability
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $f' : E \toL[\mathbb{K}] F$ be a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$ be a subset. If $f$ has Fréchet derivative $f'$ within $s$ at $x$ and $s$ is a neighborhood of $x$, then $f$ has Fréchet derivative $f'$ at $x$.
DifferentiableWithinAt.differentiableAt theorem
(h : DifferentiableWithinAt 𝕜 f s x) (hs : s ∈ 𝓝 x) : DifferentiableAt 𝕜 f x
Full source
theorem DifferentiableWithinAt.differentiableAt (h : DifferentiableWithinAt 𝕜 f s x)
    (hs : s ∈ 𝓝 x) : DifferentiableAt 𝕜 f x :=
  h.imp fun _ hf' => hf'.hasFDerivAt hs
Differentiability within a neighborhood implies pointwise differentiability
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), \( f : E \to F \) be a function, \( x \in E \), and \( s \subseteq E \) be a subset. If \( f \) is differentiable at \( x \) within \( s \) and \( s \) is a neighborhood of \( x \), then \( f \) is differentiable at \( x \).
HasFDerivWithinAt.of_not_accPt theorem
(h : ¬AccPt x (𝓟 s)) : HasFDerivWithinAt f f' s x
Full source
/-- If `x` is isolated in `s`, then `f` has any derivative at `x` within `s`,
as this statement is empty. -/
theorem HasFDerivWithinAt.of_not_accPt (h : ¬AccPt x (𝓟 s)) : HasFDerivWithinAt f f' s x := by
  rw [accPt_principal_iff_nhdsWithin, not_neBot] at h
  rw [← hasFDerivWithinAt_diff_singleton x, HasFDerivWithinAt, h,
    hasFDerivAtFilter_iff_isLittleOTVS]
  exact .bot
Fréchet Differentiability at Isolated Points
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), \( f : E \to F \) a function, \( f' : E \toL[\mathbb{K}] F \) a continuous \( \mathbb{K} \)-linear map, \( x \in E \), and \( s \subseteq E \) a subset. If \( x \) is not an accumulation point of \( s \), then \( f \) has Fréchet derivative \( f' \) at \( x \) within \( s \).
HasFDerivWithinAt.of_nhdsWithin_eq_bot theorem
(h : 𝓝[s \ { x }] x = ⊥) : HasFDerivWithinAt f f' s x
Full source
/-- If `x` is isolated in `s`, then `f` has any derivative at `x` within `s`,
as this statement is empty. -/
@[deprecated HasFDerivWithinAt.of_not_accPt (since := "2025-04-20")]
theorem HasFDerivWithinAt.of_nhdsWithin_eq_bot (h : 𝓝[s \ {x}] x = ) :
    HasFDerivWithinAt f f' s x :=
  .of_not_accPt <| by rwa [accPt_principal_iff_nhdsWithin, not_neBot]
Fréchet Differentiability at Points with Trivial Punctured Neighborhood Filter
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), \( f : E \to F \) a function, \( f' : E \toL[\mathbb{K}] F \) a continuous \( \mathbb{K} \)-linear map, \( x \in E \), and \( s \subseteq E \) a subset. If the neighborhood filter of \( x \) within \( s \setminus \{x\} \) is trivial (i.e., \( \mathcal{N}_{s \setminus \{x\}}(x) = \bot \)), then \( f \) has Fréchet derivative \( f' \) at \( x \) within \( s \).
HasFDerivWithinAt.of_not_mem_closure theorem
(h : x ∉ closure s) : HasFDerivWithinAt f f' s x
Full source
/-- If `x` is not in the closure of `s`, then `f` has any derivative at `x` within `s`,
as this statement is empty. -/
theorem HasFDerivWithinAt.of_not_mem_closure (h : x ∉ closure s) : HasFDerivWithinAt f f' s x :=
  .of_not_accPt (h ·.clusterPt.mem_closure)
Fréchet Differentiability Outside the Closure of a Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s \subseteq E$ a subset. If $x$ does not belong to the closure of $s$, then $f$ has Fréchet derivative $f'$ at $x$ within $s$.
fderivWithin_zero_of_not_accPt theorem
(h : ¬AccPt x (𝓟 s)) : fderivWithin 𝕜 f s x = 0
Full source
theorem fderivWithin_zero_of_not_accPt (h : ¬AccPt x (𝓟 s)) : fderivWithin 𝕜 f s x = 0 := by
  rw [fderivWithin, if_pos (.of_not_accPt h)]
Fréchet Derivative at Isolated Points is Zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$, and $s \subseteq E$ a subset. If $x$ is not an accumulation point of $s$, then the Fréchet derivative of $f$ at $x$ within $s$ is the zero continuous linear map, i.e., $\text{fderivWithin}_{\mathbb{K}} f s x = 0$.
fderivWithin_zero_of_isolated theorem
(h : 𝓝[s \ { x }] x = ⊥) : fderivWithin 𝕜 f s x = 0
Full source
@[deprecated fderivWithin_zero_of_not_accPt (since := "2025-04-20")]
theorem fderivWithin_zero_of_isolated (h : 𝓝[s \ {x}] x = ) : fderivWithin 𝕜 f s x = 0 := by
  rw [fderivWithin, if_pos (.of_nhdsWithin_eq_bot h)]
Fréchet Derivative at Isolated Points is Zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$, and $s \subseteq E$ a subset. If the neighborhood filter of $x$ within $s \setminus \{x\}$ is trivial (i.e., $x$ is an isolated point of $s$), then the Fréchet derivative of $f$ at $x$ within $s$ is the zero continuous linear map, i.e., $\text{fderivWithin}_{\mathbb{K}} f s x = 0$.
fderivWithin_zero_of_nmem_closure theorem
(h : x ∉ closure s) : fderivWithin 𝕜 f s x = 0
Full source
theorem fderivWithin_zero_of_nmem_closure (h : x ∉ closure s) : fderivWithin 𝕜 f s x = 0 :=
  fderivWithin_zero_of_not_accPt (h ·.clusterPt.mem_closure)
Fréchet Derivative Vanishes Outside Closure
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$, and $s \subseteq E$ a subset. If $x$ does not belong to the closure of $s$, then the Fréchet derivative of $f$ at $x$ within $s$ is the zero continuous linear map, i.e., $\text{fderivWithin}_{\mathbb{K}} f s x = 0$.
DifferentiableWithinAt.hasFDerivWithinAt theorem
(h : DifferentiableWithinAt 𝕜 f s x) : HasFDerivWithinAt f (fderivWithin 𝕜 f s x) s x
Full source
theorem DifferentiableWithinAt.hasFDerivWithinAt (h : DifferentiableWithinAt 𝕜 f s x) :
    HasFDerivWithinAt f (fderivWithin 𝕜 f s x) s x := by
  simp only [fderivWithin, dif_pos h]
  split_ifs with h₀
  exacts [h₀, Classical.choose_spec h]
Existence of Fréchet Derivative for Differentiable Functions Within a Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function differentiable at a point $x \in E$ within a subset $s \subseteq E$. Then $f$ has a Fréchet derivative at $x$ within $s$, given by $\text{fderivWithin}_{\mathbb{K}} f s x$.
DifferentiableAt.hasFDerivAt theorem
(h : DifferentiableAt 𝕜 f x) : HasFDerivAt f (fderiv 𝕜 f x) x
Full source
theorem DifferentiableAt.hasFDerivAt (h : DifferentiableAt 𝕜 f x) :
    HasFDerivAt f (fderiv 𝕜 f x) x := by
  rw [fderiv, ← hasFDerivWithinAt_univ]
  rw [← differentiableWithinAt_univ] at h
  exact h.hasFDerivWithinAt
Existence of Fréchet Derivative for Differentiable Functions at a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function differentiable at a point $x \in E$. Then $f$ has a Fréchet derivative at $x$, given by $\text{fderiv}_{\mathbb{K}} f x$.
DifferentiableOn.hasFDerivAt theorem
(h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) : HasFDerivAt f (fderiv 𝕜 f x) x
Full source
theorem DifferentiableOn.hasFDerivAt (h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) :
    HasFDerivAt f (fderiv 𝕜 f x) x :=
  ((h x (mem_of_mem_nhds hs)).differentiableAt hs).hasFDerivAt
Existence of Fréchet Derivative for Differentiable Functions on a Neighborhood
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), \( f : E \to F \) be a function, \( s \subseteq E \) be a subset, and \( x \in E \). If \( f \) is differentiable on \( s \) and \( s \) is a neighborhood of \( x \), then \( f \) has a Fréchet derivative at \( x \), given by \( \text{fderiv}_{\mathbb{K}} f x \).
DifferentiableOn.differentiableAt theorem
(h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) : DifferentiableAt 𝕜 f x
Full source
theorem DifferentiableOn.differentiableAt (h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) :
    DifferentiableAt 𝕜 f x :=
  (h.hasFDerivAt hs).differentiableAt
Differentiability at a Point from Differentiability on a Neighborhood
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), \( f : E \to F \) be a function, \( s \subseteq E \) be a subset, and \( x \in E \). If \( f \) is differentiable on \( s \) and \( s \) is a neighborhood of \( x \), then \( f \) is differentiable at \( x \).
DifferentiableOn.eventually_differentiableAt theorem
(h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) : ∀ᶠ y in 𝓝 x, DifferentiableAt 𝕜 f y
Full source
theorem DifferentiableOn.eventually_differentiableAt (h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) :
    ∀ᶠ y in 𝓝 x, DifferentiableAt 𝕜 f y :=
  (eventually_eventually_nhds.2 hs).mono fun _ => h.differentiableAt
Local Differentiability from Differentiability on a Neighborhood
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), \( f : E \to F \) be a function, \( s \subseteq E \) be a subset, and \( x \in E \). If \( f \) is differentiable on \( s \) and \( s \) is a neighborhood of \( x \), then \( f \) is differentiable at all points \( y \) in some neighborhood of \( x \).
HasFDerivAt.fderiv theorem
(h : HasFDerivAt f f' x) : fderiv 𝕜 f x = f'
Full source
protected theorem HasFDerivAt.fderiv (h : HasFDerivAt f f' x) : fderiv 𝕜 f x = f' := by
  ext
  rw [h.unique h.differentiableAt.hasFDerivAt]
Fréchet Derivative at a Point Equals Given Derivative
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has Fréchet derivative $f'$ at a point $x \in E$, then the Fréchet derivative of $f$ at $x$ is equal to $f'$, i.e., $\text{fderiv}_{\mathbb{K}} f x = f'$.
fderiv_eq theorem
{f' : E → E →L[𝕜] F} (h : ∀ x, HasFDerivAt f (f' x) x) : fderiv 𝕜 f = f'
Full source
theorem fderiv_eq {f' : E → E →L[𝕜] F} (h : ∀ x, HasFDerivAt f (f' x) x) : fderiv 𝕜 f = f' :=
  funext fun x => (h x).fderiv
Fréchet Derivative Equals Pointwise Derivative Function
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If for every point $x \in E$, the function $f$ has Fréchet derivative $f'(x)$ at $x$, then the Fréchet derivative of $f$ is equal to the function $f'$, i.e., $\text{fderiv}_{\mathbb{K}} f = f'$.
HasFDerivWithinAt.fderivWithin theorem
(h : HasFDerivWithinAt f f' s x) (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 f s x = f'
Full source
protected theorem HasFDerivWithinAt.fderivWithin (h : HasFDerivWithinAt f f' s x)
    (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 f s x = f' :=
  (hxs.eq h h.differentiableWithinAt.hasFDerivWithinAt).symm
Uniqueness of Fréchet derivative within a uniquely differentiable set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has Fréchet derivative $f'$ at a point $x \in E$ within a set $s \subseteq E$, and $s$ is uniquely differentiable at $x$ (i.e., the tangent cone at $x$ spans a dense subspace of $E$), then the Fréchet derivative of $f$ at $x$ within $s$ is equal to $f'$, i.e., $\text{fderivWithin}_{\mathbb{K}} f s x = f'$.
DifferentiableWithinAt.mono theorem
(h : DifferentiableWithinAt 𝕜 f t x) (st : s ⊆ t) : DifferentiableWithinAt 𝕜 f s x
Full source
theorem DifferentiableWithinAt.mono (h : DifferentiableWithinAt 𝕜 f t x) (st : s ⊆ t) :
    DifferentiableWithinAt 𝕜 f s x := by
  rcases h with ⟨f', hf'⟩
  exact ⟨f', hf'.mono st⟩
Differentiability within a Set is Preserved under Subset Restriction
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ is differentiable at a point $x \in E$ within a set $t \subseteq E$, and $s$ is a subset of $t$, then $f$ is also differentiable at $x$ within $s$.
DifferentiableWithinAt.mono_of_mem_nhdsWithin theorem
(h : DifferentiableWithinAt 𝕜 f s x) {t : Set E} (hst : s ∈ 𝓝[t] x) : DifferentiableWithinAt 𝕜 f t x
Full source
theorem DifferentiableWithinAt.mono_of_mem_nhdsWithin
    (h : DifferentiableWithinAt 𝕜 f s x) {t : Set E} (hst : s ∈ 𝓝[t] x) :
    DifferentiableWithinAt 𝕜 f t x :=
  (h.hasFDerivWithinAt.mono_of_mem_nhdsWithin hst).differentiableWithinAt
Differentiability within a set implies differentiability in a larger neighborhood set
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), and let \( f : E \to F \) be a function. If \( f \) is differentiable at a point \( x \in E \) within a set \( s \subseteq E \), and \( s \) is a neighborhood of \( x \) within another set \( t \subseteq E \), then \( f \) is also differentiable at \( x \) within \( t \).
DifferentiableWithinAt.congr_nhds theorem
(h : DifferentiableWithinAt 𝕜 f s x) {t : Set E} (hst : 𝓝[s] x = 𝓝[t] x) : DifferentiableWithinAt 𝕜 f t x
Full source
theorem DifferentiableWithinAt.congr_nhds (h : DifferentiableWithinAt 𝕜 f s x) {t : Set E}
    (hst : 𝓝[s] x = 𝓝[t] x) : DifferentiableWithinAt 𝕜 f t x :=
  h.mono_of_mem_nhdsWithin <| hst ▸ self_mem_nhdsWithin
Differentiability within a Set is Preserved under Equal Neighborhood Filters
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), and let \( f : E \to F \) be a function. If \( f \) is differentiable at a point \( x \in E \) within a set \( s \subseteq E \), and the neighborhood filters of \( x \) within \( s \) and \( t \) are equal (i.e., \( \mathcal{N}_s(x) = \mathcal{N}_t(x) \)), then \( f \) is also differentiable at \( x \) within \( t \).
differentiableWithinAt_congr_nhds theorem
{t : Set E} (hst : 𝓝[s] x = 𝓝[t] x) : DifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f t x
Full source
theorem differentiableWithinAt_congr_nhds {t : Set E} (hst : 𝓝[s] x = 𝓝[t] x) :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f t x :=
  ⟨fun h => h.congr_nhds hst, fun h => h.congr_nhds hst.symm⟩
Differentiability within Sets with Equal Neighborhood Filters
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $x \in E$ be a point, and $s, t \subseteq E$ be subsets. If the neighborhood filters of $x$ within $s$ and $t$ are equal (i.e., $\mathcal{N}_s(x) = \mathcal{N}_t(x)$), then $f$ is differentiable at $x$ within $s$ if and only if $f$ is differentiable at $x$ within $t$.
differentiableWithinAt_inter theorem
(ht : t ∈ 𝓝 x) : DifferentiableWithinAt 𝕜 f (s ∩ t) x ↔ DifferentiableWithinAt 𝕜 f s x
Full source
theorem differentiableWithinAt_inter (ht : t ∈ 𝓝 x) :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f (s ∩ t) x ↔ DifferentiableWithinAt 𝕜 f s x := by
  simp only [DifferentiableWithinAt, hasFDerivWithinAt_inter ht]
Differentiability within Intersection with Neighborhood
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $x \in E$, and $s, t \subseteq E$ be subsets. If $t$ is a neighborhood of $x$, then $f$ is differentiable at $x$ within $s \cap t$ if and only if $f$ is differentiable at $x$ within $s$.
differentiableWithinAt_inter' theorem
(ht : t ∈ 𝓝[s] x) : DifferentiableWithinAt 𝕜 f (s ∩ t) x ↔ DifferentiableWithinAt 𝕜 f s x
Full source
theorem differentiableWithinAt_inter' (ht : t ∈ 𝓝[s] x) :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f (s ∩ t) x ↔ DifferentiableWithinAt 𝕜 f s x := by
  simp only [DifferentiableWithinAt, hasFDerivWithinAt_inter' ht]
Differentiability within Intersection of Set and Neighborhood
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $s \subseteq E$ be a subset, and $x \in E$ be a point. Given that $t$ is a neighborhood of $x$ within $s$ (i.e., $t \in \mathcal{N}_s(x)$), the function $f$ is differentiable at $x$ within $s \cap t$ if and only if $f$ is differentiable at $x$ within $s$.
differentiableWithinAt_insert_self theorem
: DifferentiableWithinAt 𝕜 f (insert x s) x ↔ DifferentiableWithinAt 𝕜 f s x
Full source
theorem differentiableWithinAt_insert_self :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f (insert x s) x ↔ DifferentiableWithinAt 𝕜 f s x :=
  ⟨fun h ↦ h.mono (subset_insert x s), fun h ↦ h.hasFDerivWithinAt.insert.differentiableWithinAt⟩
Differentiability at a Point within a Set Extended by the Point Itself
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. For any point $x \in E$ and subset $s \subseteq E$, the function $f$ is differentiable at $x$ within the set $\{x\} \cup s$ if and only if it is differentiable at $x$ within $s$.
differentiableWithinAt_insert theorem
{y : E} : DifferentiableWithinAt 𝕜 f (insert y s) x ↔ DifferentiableWithinAt 𝕜 f s x
Full source
theorem differentiableWithinAt_insert {y : E} :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f (insert y s) x ↔ DifferentiableWithinAt 𝕜 f s x := by
  rcases eq_or_ne x y with (rfl | h)
  · exact differentiableWithinAt_insert_self
  apply differentiableWithinAt_congr_nhds
  exact nhdsWithin_insert_of_ne h
Differentiability within a Set Extended by a Point is Equivalent to Differentiability within the Original Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $x \in E$ be a point, and $s \subseteq E$ be a subset. For any point $y \in E$, the function $f$ is differentiable at $x$ within the set $\{y\} \cup s$ if and only if it is differentiable at $x$ within $s$.
DifferentiableWithinAt.insert theorem
(h : DifferentiableWithinAt 𝕜 f s x) : DifferentiableWithinAt 𝕜 f (insert x s) x
Full source
protected theorem DifferentiableWithinAt.insert (h : DifferentiableWithinAt 𝕜 f s x) :
    DifferentiableWithinAt 𝕜 f (insert x s) x :=
  h.insert'
Differentiability within a Set Extended by the Point of Differentiability
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ is differentiable at a point $x \in E$ within a subset $s \subseteq E$, then $f$ is also differentiable at $x$ within the extended subset $\{x\} \cup s$.
DifferentiableAt.differentiableWithinAt theorem
(h : DifferentiableAt 𝕜 f x) : DifferentiableWithinAt 𝕜 f s x
Full source
theorem DifferentiableAt.differentiableWithinAt (h : DifferentiableAt 𝕜 f x) :
    DifferentiableWithinAt 𝕜 f s x :=
  (differentiableWithinAt_univ.2 h).mono (subset_univ _)
Differentiability at a Point Implies Differentiability Within Any Subset
Informal description
If a function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) is differentiable at a point \( x \in E \), then it is differentiable at \( x \) within any subset \( s \subseteq E \).
Differentiable.differentiableAt theorem
(h : Differentiable 𝕜 f) : DifferentiableAt 𝕜 f x
Full source
@[fun_prop]
theorem Differentiable.differentiableAt (h : Differentiable 𝕜 f) : DifferentiableAt 𝕜 f x :=
  h x
Differentiability on Entire Space Implies Differentiability at Every Point
Informal description
If a function $f : E \to F$ between normed spaces is differentiable on the entire space $E$, then it is differentiable at every point $x \in E$.
DifferentiableAt.fderivWithin theorem
(h : DifferentiableAt 𝕜 f x) (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x
Full source
protected theorem DifferentiableAt.fderivWithin (h : DifferentiableAt 𝕜 f x)
    (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x :=
  h.hasFDerivAt.hasFDerivWithinAt.fderivWithin hxs
Equality of Fréchet Derivatives Within and At a Point for Differentiable Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function differentiable at a point $x \in E$. If the set $s \subseteq E$ is uniquely differentiable at $x$ (i.e., the tangent cone at $x$ spans a dense subspace of $E$), then the Fréchet derivative of $f$ at $x$ within $s$ equals the Fréchet derivative of $f$ at $x$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s x = \text{fderiv}_{\mathbb{K}} f x. \]
DifferentiableOn.mono theorem
(h : DifferentiableOn 𝕜 f t) (st : s ⊆ t) : DifferentiableOn 𝕜 f s
Full source
theorem DifferentiableOn.mono (h : DifferentiableOn 𝕜 f t) (st : s ⊆ t) : DifferentiableOn 𝕜 f s :=
  fun x hx => (h x (st hx)).mono st
Differentiability on a Subset Preserved under Subset Restriction
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ is differentiable on a set $t \subseteq E$ and $s$ is a subset of $t$, then $f$ is differentiable on $s$.
differentiableOn_univ theorem
: DifferentiableOn 𝕜 f univ ↔ Differentiable 𝕜 f
Full source
theorem differentiableOn_univ : DifferentiableOnDifferentiableOn 𝕜 f univ ↔ Differentiable 𝕜 f := by
  simp only [DifferentiableOn, Differentiable, differentiableWithinAt_univ, mem_univ,
    forall_true_left]
Differentiability on the Universal Set vs Global Differentiability
Informal description
A function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) is differentiable on the entire space \( E \) (i.e., on the universal set `univ`) if and only if it is differentiable at every point of \( E \).
Differentiable.differentiableOn theorem
(h : Differentiable 𝕜 f) : DifferentiableOn 𝕜 f s
Full source
@[fun_prop]
theorem Differentiable.differentiableOn (h : Differentiable 𝕜 f) : DifferentiableOn 𝕜 f s :=
  (differentiableOn_univ.2 h).mono (subset_univ _)
Global Differentiability Implies Differentiability on Any Subset
Informal description
If a function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \) is differentiable, then it is differentiable on any subset \( s \subseteq E \).
differentiableOn_of_locally_differentiableOn theorem
(h : ∀ x ∈ s, ∃ u, IsOpen u ∧ x ∈ u ∧ DifferentiableOn 𝕜 f (s ∩ u)) : DifferentiableOn 𝕜 f s
Full source
theorem differentiableOn_of_locally_differentiableOn
    (h : ∀ x ∈ s, ∃ u, IsOpen u ∧ x ∈ u ∧ DifferentiableOn 𝕜 f (s ∩ u)) :
    DifferentiableOn 𝕜 f s := by
  intro x xs
  rcases h x xs with ⟨t, t_open, xt, ht⟩
  exact (differentiableWithinAt_inter (IsOpen.mem_nhds t_open xt)).1 (ht x ⟨xs, xt⟩)
Local Differentiability Implies Global Differentiability on a Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, and $s \subseteq E$ be a subset. If for every point $x \in s$ there exists an open neighborhood $u$ of $x$ such that $f$ is differentiable on $s \cap u$, then $f$ is differentiable on the entire set $s$.
fderivWithin_of_mem_nhdsWithin theorem
(st : t ∈ 𝓝[s] x) (ht : UniqueDiffWithinAt 𝕜 s x) (h : DifferentiableWithinAt 𝕜 f t x) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x
Full source
theorem fderivWithin_of_mem_nhdsWithin (st : t ∈ 𝓝[s] x) (ht : UniqueDiffWithinAt 𝕜 s x)
    (h : DifferentiableWithinAt 𝕜 f t x) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x :=
  ((DifferentiableWithinAt.hasFDerivWithinAt h).mono_of_mem_nhdsWithin st).fderivWithin ht
Local Fréchet Derivative Equality within Neighborhoods
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $x \in E$, and $s, t \subseteq E$ be subsets. If $t$ is a neighborhood of $x$ within $s$ (i.e., $t \in \mathcal{N}_s(x)$), $s$ is uniquely differentiable at $x$, and $f$ is differentiable at $x$ within $t$, then the Fréchet derivative of $f$ at $x$ within $s$ equals the Fréchet derivative of $f$ at $x$ within $t$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s x = \text{fderivWithin}_{\mathbb{K}} f t x. \]
fderivWithin_subset theorem
(st : s ⊆ t) (ht : UniqueDiffWithinAt 𝕜 s x) (h : DifferentiableWithinAt 𝕜 f t x) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x
Full source
theorem fderivWithin_subset (st : s ⊆ t) (ht : UniqueDiffWithinAt 𝕜 s x)
    (h : DifferentiableWithinAt 𝕜 f t x) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x :=
  fderivWithin_of_mem_nhdsWithin (nhdsWithin_mono _ st self_mem_nhdsWithin) ht h
Fréchet Derivative Equality under Subset Inclusion
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $x \in E$, and $s, t \subseteq E$ be subsets with $s \subseteq t$. If $s$ is uniquely differentiable at $x$ and $f$ is differentiable at $x$ within $t$, then the Fréchet derivative of $f$ at $x$ within $s$ equals the Fréchet derivative of $f$ at $x$ within $t$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s x = \text{fderivWithin}_{\mathbb{K}} f t x. \]
fderivWithin_inter theorem
(ht : t ∈ 𝓝 x) : fderivWithin 𝕜 f (s ∩ t) x = fderivWithin 𝕜 f s x
Full source
theorem fderivWithin_inter (ht : t ∈ 𝓝 x) : fderivWithin 𝕜 f (s ∩ t) x = fderivWithin 𝕜 f s x := by
  classical
  simp [fderivWithin, hasFDerivWithinAt_inter ht, DifferentiableWithinAt]
Fréchet Derivative Within Intersection with Neighborhood Equals Derivative Within Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, $x \in E$, and $s \subseteq E$ be a subset. If $t$ is a neighborhood of $x$, then the Fréchet derivative of $f$ at $x$ within $s \cap t$ equals the Fréchet derivative of $f$ at $x$ within $s$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f (s \cap t) x = \text{fderivWithin}_{\mathbb{K}} f s x. \]
fderivWithin_of_mem_nhds theorem
(h : s ∈ 𝓝 x) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x
Full source
theorem fderivWithin_of_mem_nhds (h : s ∈ 𝓝 x) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x := by
  rw [← fderivWithin_univ, ← univ_inter s, fderivWithin_inter h]
Fréchet Derivative Within Neighborhood Equals Global Derivative
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, and $x \in E$. If $s$ is a neighborhood of $x$, then the Fréchet derivative of $f$ at $x$ within $s$ equals the Fréchet derivative of $f$ at $x$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s x = \text{fderiv}_{\mathbb{K}} f x. \]
fderivWithin_of_isOpen theorem
(hs : IsOpen s) (hx : x ∈ s) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x
Full source
theorem fderivWithin_of_isOpen (hs : IsOpen s) (hx : x ∈ s) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x :=
  fderivWithin_of_mem_nhds (hs.mem_nhds hx)
Fréchet Derivative Within Open Set Equals Global Derivative
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ be a function, and $x \in E$. If $s$ is an open subset of $E$ containing $x$, then the Fréchet derivative of $f$ at $x$ within $s$ equals the Fréchet derivative of $f$ at $x$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s x = \text{fderiv}_{\mathbb{K}} f x. \]
fderivWithin_eq_fderiv theorem
(hs : UniqueDiffWithinAt 𝕜 s x) (h : DifferentiableAt 𝕜 f x) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x
Full source
theorem fderivWithin_eq_fderiv (hs : UniqueDiffWithinAt 𝕜 s x) (h : DifferentiableAt 𝕜 f x) :
    fderivWithin 𝕜 f s x = fderiv 𝕜 f x := by
  rw [← fderivWithin_univ]
  exact fderivWithin_subset (subset_univ _) hs h.differentiableWithinAt
Fréchet Derivative Within Set Equals Global Derivative under Unique Differentiability
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function differentiable at a point $x \in E$. If the subset $s \subseteq E$ is uniquely differentiable at $x$ (i.e., the tangent directions at $x$ within $s$ span a dense subspace of $E$), then the Fréchet derivative of $f$ at $x$ within $s$ equals the Fréchet derivative of $f$ at $x$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s x = \text{fderiv}_{\mathbb{K}} f x. \]
fderiv_mem_iff theorem
{f : E → F} {s : Set (E →L[𝕜] F)} {x : E} : fderiv 𝕜 f x ∈ s ↔ DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ s ∨ ¬DifferentiableAt 𝕜 f x ∧ (0 : E →L[𝕜] F) ∈ s
Full source
theorem fderiv_mem_iff {f : E → F} {s : Set (E →L[𝕜] F)} {x : E} : fderivfderiv 𝕜 f x ∈ sfderiv 𝕜 f x ∈ s ↔
    DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ s ∨ ¬DifferentiableAt 𝕜 f x ∧ (0 : E →L[𝕜] F) ∈ s := by
  by_cases hx : DifferentiableAt 𝕜 f x <;> simp [fderiv_zero_of_not_differentiableAt, *]
Characterization of Fréchet Derivative Membership in a Set of Linear Maps
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$ a point, and $s \subseteq \mathcal{L}(E, F)$ a set of continuous linear maps. Then the Fréchet derivative of $f$ at $x$ belongs to $s$ if and only if either: 1. $f$ is differentiable at $x$ and its derivative $\text{fderiv}_{\mathbb{K}} f x$ belongs to $s$, or 2. $f$ is not differentiable at $x$ and the zero map belongs to $s$. In symbols: \[ \text{fderiv}_{\mathbb{K}} f x \in s \leftrightarrow \left(\text{DifferentiableAt}_{\mathbb{K}} f x \land \text{fderiv}_{\mathbb{K}} f x \in s\right) \lor \left(\neg \text{DifferentiableAt}_{\mathbb{K}} f x \land 0 \in s\right) \]
fderivWithin_mem_iff theorem
{f : E → F} {t : Set E} {s : Set (E →L[𝕜] F)} {x : E} : fderivWithin 𝕜 f t x ∈ s ↔ DifferentiableWithinAt 𝕜 f t x ∧ fderivWithin 𝕜 f t x ∈ s ∨ ¬DifferentiableWithinAt 𝕜 f t x ∧ (0 : E →L[𝕜] F) ∈ s
Full source
theorem fderivWithin_mem_iff {f : E → F} {t : Set E} {s : Set (E →L[𝕜] F)} {x : E} :
    fderivWithinfderivWithin 𝕜 f t x ∈ sfderivWithin 𝕜 f t x ∈ s ↔
      DifferentiableWithinAt 𝕜 f t x ∧ fderivWithin 𝕜 f t x ∈ s ∨
        ¬DifferentiableWithinAt 𝕜 f t x ∧ (0 : E →L[𝕜] F) ∈ s := by
  by_cases hx : DifferentiableWithinAt 𝕜 f t x <;>
    simp [fderivWithin_zero_of_not_differentiableWithinAt, *]
Characterization of Fréchet Derivative Membership Within a Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $t \subseteq E$ a subset, $x \in E$ a point, and $s \subseteq (E \toL[\mathbb{K}] F)$ a set of continuous linear maps. Then the Fréchet derivative of $f$ at $x$ within $t$ belongs to $s$ if and only if either: 1. $f$ is differentiable at $x$ within $t$ and its derivative $\text{fderivWithin}_{\mathbb{K}} f t x$ belongs to $s$, or 2. $f$ is not differentiable at $x$ within $t$ and the zero map belongs to $s$. In symbols: \[ \text{fderivWithin}_{\mathbb{K}} f t x \in s \leftrightarrow \left(\text{DifferentiableWithinAt}_{\mathbb{K}} f t x \land \text{fderivWithin}_{\mathbb{K}} f t x \in s\right) \lor \left(\neg \text{DifferentiableWithinAt}_{\mathbb{K}} f t x \land 0 \in s\right) \]
Asymptotics.IsBigO.hasFDerivWithinAt theorem
{s : Set E} {x₀ : E} {n : ℕ} (h : f =O[𝓝[s] x₀] fun x => ‖x - x₀‖ ^ n) (hx₀ : x₀ ∈ s) (hn : 1 < n) : HasFDerivWithinAt f (0 : E →L[𝕜] F) s x₀
Full source
theorem Asymptotics.IsBigO.hasFDerivWithinAt {s : Set E} {x₀ : E} {n : }
    (h : f =O[𝓝[s] x₀] fun x => ‖x - x₀‖ ^ n) (hx₀ : x₀ ∈ s) (hn : 1 < n) :
    HasFDerivWithinAt f (0 : E →L[𝕜] F) s x₀ := by
  simp_rw [HasFDerivWithinAt, hasFDerivAtFilter_iff_isLittleO,
    h.eq_zero_of_norm_pow_within hx₀ hn.ne_bot, zero_apply, sub_zero,
    h.trans_isLittleO ((isLittleO_pow_sub_sub x₀ hn).mono nhdsWithin_le_nhds)]
Big-O condition implies zero Fréchet derivative within a set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $s \subseteq E$ a subset, $x_0 \in s$ a point, and $n \in \mathbb{N}$ with $1 < n$. If a function $f : E \to F$ satisfies $f(x) = O(\|x - x_0\|^n)$ as $x \to x_0$ within $s$, then $f$ has Fréchet derivative $0$ at $x_0$ within $s$.
Asymptotics.IsBigO.hasFDerivAt theorem
{x₀ : E} {n : ℕ} (h : f =O[𝓝 x₀] fun x => ‖x - x₀‖ ^ n) (hn : 1 < n) : HasFDerivAt f (0 : E →L[𝕜] F) x₀
Full source
theorem Asymptotics.IsBigO.hasFDerivAt {x₀ : E} {n : } (h : f =O[𝓝 x₀] fun x => ‖x - x₀‖ ^ n)
    (hn : 1 < n) : HasFDerivAt f (0 : E →L[𝕜] F) x₀ := by
  rw [← nhdsWithin_univ] at h
  exact (h.hasFDerivWithinAt (mem_univ _) hn).hasFDerivAt_of_univ
Big-O condition implies zero Fréchet derivative at a point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f(x) = O(\|x - x_0\|^n)$ as $x \to x_0$ for some $n > 1$, then $f$ has Fréchet derivative $0$ at $x_0$.
HasFDerivWithinAt.isBigO_sub theorem
{f : E → F} {s : Set E} {x₀ : E} {f' : E →L[𝕜] F} (h : HasFDerivWithinAt f f' s x₀) : (f · - f x₀) =O[𝓝[s] x₀] (· - x₀)
Full source
nonrec theorem HasFDerivWithinAt.isBigO_sub {f : E → F} {s : Set E} {x₀ : E} {f' : E →L[𝕜] F}
    (h : HasFDerivWithinAt f f' s x₀) : (f · - f x₀) =O[𝓝[s] x₀] (· - x₀) :=
  h.isBigO_sub
Asymptotic Bound for Differentiable Functions within a Set: $f(x) - f(x_0) = O(x - x_0)$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has a Fréchet derivative $f'$ at $x_0 \in E$ within a set $s \subseteq E$, then the difference $f(x) - f(x_0)$ is asymptotically bounded by $x - x_0$ as $x$ approaches $x_0$ within $s$, i.e., $f(x) - f(x_0) = O(\|x - x_0\|)$ as $x \to x_0$ in $s$.
DifferentiableWithinAt.isBigO_sub theorem
{f : E → F} {s : Set E} {x₀ : E} (h : DifferentiableWithinAt 𝕜 f s x₀) : (f · - f x₀) =O[𝓝[s] x₀] (· - x₀)
Full source
lemma DifferentiableWithinAt.isBigO_sub {f : E → F} {s : Set E} {x₀ : E}
    (h : DifferentiableWithinAt 𝕜 f s x₀) : (f · - f x₀) =O[𝓝[s] x₀] (· - x₀) :=
  h.hasFDerivWithinAt.isBigO_sub
Asymptotic bound for differentiable functions within a set: $f(x) - f(x_0) = O(\|x - x_0\|)$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ is differentiable at a point $x_0 \in E$ within a subset $s \subseteq E$, then the difference $f(x) - f(x_0)$ is asymptotically bounded by $x - x_0$ as $x$ approaches $x_0$ within $s$, i.e., $f(x) - f(x_0) = O(\|x - x_0\|)$ as $x \to x_0$ in $s$.
HasFDerivAt.isBigO_sub theorem
{f : E → F} {x₀ : E} {f' : E →L[𝕜] F} (h : HasFDerivAt f f' x₀) : (f · - f x₀) =O[𝓝 x₀] (· - x₀)
Full source
nonrec theorem HasFDerivAt.isBigO_sub {f : E → F} {x₀ : E} {f' : E →L[𝕜] F}
    (h : HasFDerivAt f f' x₀) : (f · - f x₀) =O[𝓝 x₀] (· - x₀) :=
  h.isBigO_sub
Asymptotic bound for differentiable functions: $f(x) - f(x_0) = O(\|x - x_0\|)$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has a Fréchet derivative $f'$ at $x_0 \in E$, then the difference $f(x) - f(x_0)$ is asymptotically bounded by $x - x_0$ as $x \to x_0$, i.e., $f(x) - f(x_0) = O(\|x - x_0\|)$.
DifferentiableAt.isBigO_sub theorem
{f : E → F} {x₀ : E} (h : DifferentiableAt 𝕜 f x₀) : (f · - f x₀) =O[𝓝 x₀] (· - x₀)
Full source
nonrec theorem DifferentiableAt.isBigO_sub {f : E → F} {x₀ : E} (h : DifferentiableAt 𝕜 f x₀) :
    (f · - f x₀) =O[𝓝 x₀] (· - x₀) :=
  h.hasFDerivAt.isBigO_sub
Asymptotic bound for differentiable functions: $f(x) - f(x_0) = O(\|x - x_0\|)$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function differentiable at $x_0 \in E$. Then the difference $f(x) - f(x_0)$ is asymptotically bounded by $\|x - x_0\|$ as $x \to x_0$, i.e., there exists a constant $C > 0$ and a neighborhood $U$ of $x_0$ such that for all $x \in U$, $\|f(x) - f(x_0)\| \leq C \|x - x_0\|$.
HasFDerivAtFilter.tendsto_nhds theorem
(hL : L ≤ 𝓝 x) (h : HasFDerivAtFilter f f' x L) : Tendsto f L (𝓝 (f x))
Full source
theorem HasFDerivAtFilter.tendsto_nhds (hL : L ≤ 𝓝 x) (h : HasFDerivAtFilter f f' x L) :
    Tendsto f L (𝓝 (f x)) := by
  have : Tendsto (fun x' => f x' - f x) L (𝓝 0) := by
    refine h.isBigO_sub.trans_tendsto (Tendsto.mono_left ?_ hL)
    rw [← sub_self x]
    exact tendsto_id.sub tendsto_const_nhds
  have := this.add (tendsto_const_nhds (x := f x))
  rw [zero_add (f x)] at this
  exact this.congr (by simp only [sub_add_cancel, eq_self_iff_true, forall_const])
Differentiability Implies Continuity Along a Filter
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has a Fréchet derivative $f'$ at $x \in E$ along a filter $L$ with $L \leq \mathcal{N}(x)$ (where $\mathcal{N}(x)$ is the neighborhood filter of $x$), then $f$ tends to $f(x)$ along $L$, i.e., $\lim_{x' \to L} f(x') = f(x)$.
HasFDerivWithinAt.continuousWithinAt theorem
(h : HasFDerivWithinAt f f' s x) : ContinuousWithinAt f s x
Full source
theorem HasFDerivWithinAt.continuousWithinAt (h : HasFDerivWithinAt f f' s x) :
    ContinuousWithinAt f s x :=
  HasFDerivAtFilter.tendsto_nhds inf_le_left h
Continuity within a Set from Fréchet Differentiability
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has a Fréchet derivative $f'$ at $x \in E$ within a set $s \subseteq E$, then $f$ is continuous at $x$ within $s$.
HasFDerivAt.continuousAt theorem
(h : HasFDerivAt f f' x) : ContinuousAt f x
Full source
theorem HasFDerivAt.continuousAt (h : HasFDerivAt f f' x) : ContinuousAt f x :=
  HasFDerivAtFilter.tendsto_nhds le_rfl h
Fréchet Differentiability Implies Continuity at a Point
Informal description
If a function $f \colon E \to F$ between normed spaces over a non-discrete normed field $\mathbb{K}$ is Fréchet differentiable at a point $x \in E$ with derivative $f'$, then $f$ is continuous at $x$.
DifferentiableWithinAt.continuousWithinAt theorem
(h : DifferentiableWithinAt 𝕜 f s x) : ContinuousWithinAt f s x
Full source
@[fun_prop]
theorem DifferentiableWithinAt.continuousWithinAt (h : DifferentiableWithinAt 𝕜 f s x) :
    ContinuousWithinAt f s x :=
  let ⟨_, hf'⟩ := h
  hf'.continuousWithinAt
Differentiability within a Set Implies Continuity
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ is differentiable at a point $x \in E$ within a set $s \subseteq E$, then $f$ is continuous at $x$ within $s$.
DifferentiableAt.continuousAt theorem
(h : DifferentiableAt 𝕜 f x) : ContinuousAt f x
Full source
@[fun_prop]
theorem DifferentiableAt.continuousAt (h : DifferentiableAt 𝕜 f x) : ContinuousAt f x :=
  let ⟨_, hf'⟩ := h
  hf'.continuousAt
Differentiability Implies Continuity at a Point
Informal description
If a function $f \colon E \to F$ between normed spaces over a non-discrete normed field $\mathbb{K}$ is differentiable at a point $x \in E$, then $f$ is continuous at $x$.
DifferentiableOn.continuousOn theorem
(h : DifferentiableOn 𝕜 f s) : ContinuousOn f s
Full source
@[fun_prop]
theorem DifferentiableOn.continuousOn (h : DifferentiableOn 𝕜 f s) : ContinuousOn f s := fun x hx =>
  (h x hx).continuousWithinAt
Differentiability on a Set Implies Continuity on That Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ is differentiable on a set $s \subseteq E$, then $f$ is continuous on $s$.
Differentiable.continuous theorem
(h : Differentiable 𝕜 f) : Continuous f
Full source
@[fun_prop]
theorem Differentiable.continuous (h : Differentiable 𝕜 f) : Continuous f :=
  continuous_iff_continuousAt.2 fun x => (h x).continuousAt
Differentiability implies continuity
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$. If a function $f \colon E \to F$ is differentiable at every point $x \in E$, then $f$ is continuous.
HasStrictFDerivAt.continuousAt theorem
(hf : HasStrictFDerivAt f f' x) : ContinuousAt f x
Full source
protected theorem HasStrictFDerivAt.continuousAt (hf : HasStrictFDerivAt f f' x) :
    ContinuousAt f x :=
  hf.hasFDerivAt.continuousAt
Strict Fréchet Differentiability Implies Continuity at a Point
Informal description
If a function $f \colon E \to F$ between normed spaces over a non-discrete normed field $\mathbb{K}$ has a strict Fréchet derivative $f'$ at a point $x \in E$, then $f$ is continuous at $x$.
HasStrictFDerivAt.isBigO_sub_rev theorem
{f' : E ≃L[𝕜] F} (hf : HasStrictFDerivAt f (f' : E →L[𝕜] F) x) : (fun p : E × E => p.1 - p.2) =O[𝓝 (x, x)] fun p : E × E => f p.1 - f p.2
Full source
theorem HasStrictFDerivAt.isBigO_sub_rev {f' : E ≃L[𝕜] F}
    (hf : HasStrictFDerivAt f (f' : E →L[𝕜] F) x) :
    (fun p : E × E => p.1 - p.2) =O[𝓝 (x, x)] fun p : E × E => f p.1 - f p.2 :=
  ((f'.isBigO_comp_rev _ _).trans
      (hf.isLittleO.trans_isBigO (f'.isBigO_comp_rev _ _)).right_isBigO_add).congr
    (fun _ => rfl) fun _ => sub_add_cancel _ _
Asymptotic bound on differences under strict Fréchet differentiability with invertible derivative
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, and $f' : E \simeqL[\mathbb{K}] F$ a continuous linear equivalence. If $f$ has strict Fréchet derivative $f'$ at a point $x \in E$, then the difference function $(p_1, p_2) \mapsto p_1 - p_2$ is asymptotically bounded by $(p_1, p_2) \mapsto f(p_1) - f(p_2)$ as $(p_1, p_2)$ approaches $(x, x)$ in $E \times E$. In other words, there exists a neighborhood of $(x, x)$ and a constant $C > 0$ such that for all $(p_1, p_2)$ in this neighborhood, $\|p_1 - p_2\| \leq C \|f(p_1) - f(p_2)\|$.
HasFDerivAtFilter.isBigO_sub_rev theorem
(hf : HasFDerivAtFilter f f' x L) {C} (hf' : AntilipschitzWith C f') : (fun x' => x' - x) =O[L] fun x' => f x' - f x
Full source
theorem HasFDerivAtFilter.isBigO_sub_rev (hf : HasFDerivAtFilter f f' x L) {C}
    (hf' : AntilipschitzWith C f') : (fun x' => x' - x) =O[L] fun x' => f x' - f x :=
  have : (fun x' => x' - x) =O[L] fun x' => f' (x' - x) :=
    isBigO_iff.2 ⟨C, Eventually.of_forall fun _ => ZeroHomClass.bound_of_antilipschitz f' hf' _⟩
  (this.trans (hf.isLittleO.trans_isBigO this).right_isBigO_add).congr (fun _ => rfl) fun _ =>
    sub_add_cancel _ _
Big-O relation between displacement and function difference under Fréchet differentiability with antilipschitz derivative
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, and $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map. If $f$ has Fréchet derivative $f'$ at $x$ along the filter $L$, and $f'$ is antilipschitz with constant $C$, then the function $x' \mapsto x' - x$ is big-O of $x' \mapsto f(x') - f(x)$ along $L$.
hasFDerivWithinAt_congr_set' theorem
(y : E) (h : s =ᶠ[𝓝[{ y }ᶜ] x] t) : HasFDerivWithinAt f f' s x ↔ HasFDerivWithinAt f f' t x
Full source
theorem hasFDerivWithinAt_congr_set' (y : E) (h : s =ᶠ[𝓝[{y}ᶜ] x] t) :
    HasFDerivWithinAtHasFDerivWithinAt f f' s x ↔ HasFDerivWithinAt f f' t x :=
  calc
    HasFDerivWithinAt f f' s x ↔ HasFDerivWithinAt f f' (s \ {y}) x :=
      (hasFDerivWithinAt_diff_singleton _).symm
    _ ↔ HasFDerivWithinAt f f' (t \ {y}) xcalc
    HasFDerivWithinAt f f' s x ↔ HasFDerivWithinAt f f' (s \ {y}) x :=
      (hasFDerivWithinAt_diff_singleton _).symm
    _ ↔ HasFDerivWithinAt f f' (t \ {y}) x := by
      suffices 𝓝[s \ {y}] x = 𝓝[t \ {y}] x by simp only [HasFDerivWithinAt, this]
      simpa only [set_eventuallyEq_iff_inf_principal, ← nhdsWithin_inter', diff_eq,
        inter_comm] using h
    _ ↔ HasFDerivWithinAt f f' t x := hasFDerivWithinAt_diff_singleton _
Equivalence of Fréchet Differentiability within Sets Equal Near a Point Outside a Singleton
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s, t \subseteq E$ subsets. For any $y \in E$, if $s$ and $t$ are eventually equal in the neighborhood of $x$ within the complement of $\{y\}$, then $f$ has Fréchet derivative $f'$ at $x$ within $s$ if and only if $f$ has Fréchet derivative $f'$ at $x$ within $t$.
hasFDerivWithinAt_congr_set theorem
(h : s =ᶠ[𝓝 x] t) : HasFDerivWithinAt f f' s x ↔ HasFDerivWithinAt f f' t x
Full source
theorem hasFDerivWithinAt_congr_set (h : s =ᶠ[𝓝 x] t) :
    HasFDerivWithinAtHasFDerivWithinAt f f' s x ↔ HasFDerivWithinAt f f' t x :=
  hasFDerivWithinAt_congr_set' x <| h.filter_mono inf_le_left
Equivalence of Fréchet Differentiability within Sets Equal Near a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $f' : E \toL[\mathbb{K}] F$ a continuous $\mathbb{K}$-linear map, $x \in E$, and $s, t \subseteq E$ subsets. If $s$ and $t$ are eventually equal in the neighborhood of $x$, then $f$ has Fréchet derivative $f'$ at $x$ within $s$ if and only if $f$ has Fréchet derivative $f'$ at $x$ within $t$.
differentiableWithinAt_congr_set' theorem
(y : E) (h : s =ᶠ[𝓝[{ y }ᶜ] x] t) : DifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f t x
Full source
theorem differentiableWithinAt_congr_set' (y : E) (h : s =ᶠ[𝓝[{y}ᶜ] x] t) :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f t x :=
  exists_congr fun _ => hasFDerivWithinAt_congr_set' _ h
Equivalence of Differentiability within Sets Equal Near a Point Outside a Singleton
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$, and $s, t \subseteq E$ subsets. For any $y \in E$, if $s$ and $t$ are eventually equal in the neighborhood of $x$ within the complement of $\{y\}$, then $f$ is differentiable at $x$ within $s$ if and only if $f$ is differentiable at $x$ within $t$.
differentiableWithinAt_congr_set theorem
(h : s =ᶠ[𝓝 x] t) : DifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f t x
Full source
theorem differentiableWithinAt_congr_set (h : s =ᶠ[𝓝 x] t) :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f t x :=
  exists_congr fun _ => hasFDerivWithinAt_congr_set h
Equivalence of Differentiability within Sets Equal Near a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$, and $s, t \subseteq E$ subsets. If $s$ and $t$ are eventually equal in the neighborhood of $x$, then $f$ is differentiable at $x$ within $s$ if and only if $f$ is differentiable at $x$ within $t$.
fderivWithin_congr_set' theorem
(y : E) (h : s =ᶠ[𝓝[{ y }ᶜ] x] t) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x
Full source
theorem fderivWithin_congr_set' (y : E) (h : s =ᶠ[𝓝[{y}ᶜ] x] t) :
    fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x := by
  classical
  simp only [fderivWithin, differentiableWithinAt_congr_set' _ h, hasFDerivWithinAt_congr_set' _ h]
Equality of Fréchet Derivatives within Sets Equal Near a Point Outside a Singleton
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$, and $s, t \subseteq E$ subsets. For any $y \in E$, if $s$ and $t$ are eventually equal in the neighborhood of $x$ within the complement of $\{y\}$, then the Fréchet derivative of $f$ at $x$ within $s$ equals the Fréchet derivative of $f$ at $x$ within $t$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s x = \text{fderivWithin}_{\mathbb{K}} f t x. \]
fderivWithin_congr_set theorem
(h : s =ᶠ[𝓝 x] t) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x
Full source
theorem fderivWithin_congr_set (h : s =ᶠ[𝓝 x] t) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x :=
  fderivWithin_congr_set' x <| h.filter_mono inf_le_left
Equality of Fréchet Derivatives within Sets Equal Near a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$, and $s, t \subseteq E$ subsets. If $s$ and $t$ are eventually equal in the neighborhood of $x$, then the Fréchet derivative of $f$ at $x$ within $s$ equals the Fréchet derivative of $f$ at $x$ within $t$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s x = \text{fderivWithin}_{\mathbb{K}} f t x. \]
fderivWithin_eventually_congr_set theorem
(h : s =ᶠ[𝓝 x] t) : fderivWithin 𝕜 f s =ᶠ[𝓝 x] fderivWithin 𝕜 f t
Full source
theorem fderivWithin_eventually_congr_set (h : s =ᶠ[𝓝 x] t) :
    fderivWithinfderivWithin 𝕜 f s =ᶠ[𝓝 x] fderivWithin 𝕜 f t :=
  fderivWithin_eventually_congr_set' x <| h.filter_mono inf_le_left
Eventual Equality of Fréchet Derivatives within Eventually Equal Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, $f : E \to F$ a function, $x \in E$, and $s, t \subseteq E$ subsets. If $s$ and $t$ are eventually equal in the neighborhood of $x$, then the Fréchet derivatives of $f$ within $s$ and $t$ are eventually equal in the neighborhood of $x$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f s = \text{fderivWithin}_{\mathbb{K}} f t \text{ eventually at } x. \]
Filter.EventuallyEq.hasStrictFDerivAt_iff theorem
(h : f₀ =ᶠ[𝓝 x] f₁) (h' : ∀ y, f₀' y = f₁' y) : HasStrictFDerivAt f₀ f₀' x ↔ HasStrictFDerivAt f₁ f₁' x
Full source
theorem Filter.EventuallyEq.hasStrictFDerivAt_iff (h : f₀ =ᶠ[𝓝 x] f₁) (h' : ∀ y, f₀' y = f₁' y) :
    HasStrictFDerivAtHasStrictFDerivAt f₀ f₀' x ↔ HasStrictFDerivAt f₁ f₁' x := by
  rw [hasStrictFDerivAt_iff_isLittleOTVS, hasStrictFDerivAt_iff_isLittleOTVS]
  refine isLittleOTVS_congr ((h.prodMk_nhds h).mono ?_) .rfl
  rintro p ⟨hp₁, hp₂⟩
  simp only [*]
Equivalence of Strict Fréchet Differentiability for Eventually Equal Functions with Equal Derivatives
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f₀, f₁ : E \to F$ be functions that are eventually equal in a neighborhood of $x \in E$. Let $f₀', f₁' : E \toL[\mathbb{K}] F$ be continuous $\mathbb{K}$-linear maps such that $f₀'(y) = f₁'(y)$ for all $y \in E$. Then $f₀$ has strict Fréchet derivative $f₀'$ at $x$ if and only if $f₁$ has strict Fréchet derivative $f₁'$ at $x$.
HasStrictFDerivAt.congr_fderiv theorem
(h : HasStrictFDerivAt f f' x) (h' : f' = g') : HasStrictFDerivAt f g' x
Full source
theorem HasStrictFDerivAt.congr_fderiv (h : HasStrictFDerivAt f f' x) (h' : f' = g') :
    HasStrictFDerivAt f g' x :=
  h' ▸ h
Equality of Derivatives Implies Equality of Strict Fréchet Differentiability
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has a strict Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at a point $x \in E$, and $f' = g'$ as continuous $\mathbb{K}$-linear maps, then $f$ also has strict Fréchet derivative $g'$ at $x$.
HasFDerivAt.congr_fderiv theorem
(h : HasFDerivAt f f' x) (h' : f' = g') : HasFDerivAt f g' x
Full source
theorem HasFDerivAt.congr_fderiv (h : HasFDerivAt f f' x) (h' : f' = g') : HasFDerivAt f g' x :=
  h' ▸ h
Equality of Derivatives Implies Equality of Fréchet Differentiability
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has a Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at a point $x \in E$, and $f' = g'$ as continuous $\mathbb{K}$-linear maps, then $f$ also has Fréchet derivative $g'$ at $x$.
HasFDerivWithinAt.congr_fderiv theorem
(h : HasFDerivWithinAt f f' s x) (h' : f' = g') : HasFDerivWithinAt f g' s x
Full source
theorem HasFDerivWithinAt.congr_fderiv (h : HasFDerivWithinAt f f' s x) (h' : f' = g') :
    HasFDerivWithinAt f g' s x :=
  h' ▸ h
Equality of Derivatives Implies Equality of Fréchet Differentiability Within a Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If $f$ has a Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at a point $x \in E$ within a set $s \subseteq E$, and $f' = g'$ as continuous $\mathbb{K}$-linear maps, then $f$ also has Fréchet derivative $g'$ at $x$ within $s$.
HasStrictFDerivAt.congr_of_eventuallyEq theorem
(h : HasStrictFDerivAt f f' x) (h₁ : f =ᶠ[𝓝 x] f₁) : HasStrictFDerivAt f₁ f' x
Full source
theorem HasStrictFDerivAt.congr_of_eventuallyEq (h : HasStrictFDerivAt f f' x)
    (h₁ : f =ᶠ[𝓝 x] f₁) : HasStrictFDerivAt f₁ f' x :=
  (h₁.hasStrictFDerivAt_iff fun _ => rfl).1 h
Strict Fréchet Differentiability is Preserved Under Local Equality
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that are eventually equal in a neighborhood of $x \in E$. If $f$ has strict Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at $x$, then $f_1$ also has strict Fréchet derivative $f'$ at $x$.
Filter.EventuallyEq.hasFDerivAtFilter_iff theorem
(h₀ : f₀ =ᶠ[L] f₁) (hx : f₀ x = f₁ x) (h₁ : ∀ x, f₀' x = f₁' x) : HasFDerivAtFilter f₀ f₀' x L ↔ HasFDerivAtFilter f₁ f₁' x L
Full source
theorem Filter.EventuallyEq.hasFDerivAtFilter_iff (h₀ : f₀ =ᶠ[L] f₁) (hx : f₀ x = f₁ x)
    (h₁ : ∀ x, f₀' x = f₁' x) : HasFDerivAtFilterHasFDerivAtFilter f₀ f₀' x L ↔ HasFDerivAtFilter f₁ f₁' x L := by
  simp only [hasFDerivAtFilter_iff_isLittleOTVS]
  exact isLittleOTVS_congr (h₀.mono fun y hy => by simp only [hy, h₁, hx]) .rfl
Equivalence of Fréchet Differentiability Along a Filter for Eventually Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f_0, f_1 : E \to F$ be functions that are eventually equal along a filter $L$ at a point $x \in E$, with $f_0(x) = f_1(x)$. Let $f_0', f_1' : E \toL[\mathbb{K}] F$ be continuous $\mathbb{K}$-linear maps such that $f_0' = f_1'$ pointwise. Then $f_0$ has Fréchet derivative $f_0'$ at $x$ along $L$ if and only if $f_1$ has Fréchet derivative $f_1'$ at $x$ along $L$.
HasFDerivAtFilter.congr_of_eventuallyEq theorem
(h : HasFDerivAtFilter f f' x L) (hL : f₁ =ᶠ[L] f) (hx : f₁ x = f x) : HasFDerivAtFilter f₁ f' x L
Full source
theorem HasFDerivAtFilter.congr_of_eventuallyEq (h : HasFDerivAtFilter f f' x L) (hL : f₁ =ᶠ[L] f)
    (hx : f₁ x = f x) : HasFDerivAtFilter f₁ f' x L :=
  (hL.hasFDerivAtFilter_iff hx fun _ => rfl).2 h
Fréchet Differentiability Along a Filter is Preserved Under Eventual Equality
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions such that $f_1$ is eventually equal to $f$ along a filter $L$ at a point $x \in E$, with $f_1(x) = f(x)$. If $f$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at $x$ along $L$, then $f_1$ also has Fréchet derivative $f'$ at $x$ along $L$.
Filter.EventuallyEq.hasFDerivAt_iff theorem
(h : f₀ =ᶠ[𝓝 x] f₁) : HasFDerivAt f₀ f' x ↔ HasFDerivAt f₁ f' x
Full source
theorem Filter.EventuallyEq.hasFDerivAt_iff (h : f₀ =ᶠ[𝓝 x] f₁) :
    HasFDerivAtHasFDerivAt f₀ f' x ↔ HasFDerivAt f₁ f' x :=
  h.hasFDerivAtFilter_iff h.eq_of_nhds fun _ => _root_.rfl
Equivalence of Fréchet Differentiability at a Point for Eventually Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f₀, f₁ : E \to F$ be functions that are eventually equal in a neighborhood of $x \in E$. Then $f₀$ has a Fréchet derivative $f'$ at $x$ if and only if $f₁$ has a Fréchet derivative $f'$ at $x$.
Filter.EventuallyEq.differentiableAt_iff theorem
(h : f₀ =ᶠ[𝓝 x] f₁) : DifferentiableAt 𝕜 f₀ x ↔ DifferentiableAt 𝕜 f₁ x
Full source
theorem Filter.EventuallyEq.differentiableAt_iff (h : f₀ =ᶠ[𝓝 x] f₁) :
    DifferentiableAtDifferentiableAt 𝕜 f₀ x ↔ DifferentiableAt 𝕜 f₁ x :=
  exists_congr fun _ => h.hasFDerivAt_iff
Equivalence of Differentiability at a Point for Eventually Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f₀, f₁ : E \to F$ be functions that are eventually equal in a neighborhood of $x \in E$. Then $f₀$ is differentiable at $x$ if and only if $f₁$ is differentiable at $x$.
Filter.EventuallyEq.hasFDerivWithinAt_iff theorem
(h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : f₀ x = f₁ x) : HasFDerivWithinAt f₀ f' s x ↔ HasFDerivWithinAt f₁ f' s x
Full source
theorem Filter.EventuallyEq.hasFDerivWithinAt_iff (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : f₀ x = f₁ x) :
    HasFDerivWithinAtHasFDerivWithinAt f₀ f' s x ↔ HasFDerivWithinAt f₁ f' s x :=
  h.hasFDerivAtFilter_iff hx fun _ => _root_.rfl
Equivalence of Fréchet Differentiability Within a Set for Eventually Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f₀, f₁ : E \to F$ be functions that are eventually equal in a neighborhood of $x$ within $s \subseteq E$, with $f₀(x) = f₁(x)$. Then $f₀$ has Fréchet derivative $f'$ at $x$ within $s$ if and only if $f₁$ has Fréchet derivative $f'$ at $x$ within $s$.
Filter.EventuallyEq.hasFDerivWithinAt_iff_of_mem theorem
(h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : x ∈ s) : HasFDerivWithinAt f₀ f' s x ↔ HasFDerivWithinAt f₁ f' s x
Full source
theorem Filter.EventuallyEq.hasFDerivWithinAt_iff_of_mem (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : x ∈ s) :
    HasFDerivWithinAtHasFDerivWithinAt f₀ f' s x ↔ HasFDerivWithinAt f₁ f' s x :=
  h.hasFDerivWithinAt_iff (h.eq_of_nhdsWithin hx)
Equivalence of Fréchet Differentiability Within a Set for Eventually Equal Functions at a Point in the Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f₀, f₁ : E \to F$ be functions that are eventually equal in a neighborhood of $x$ within $s \subseteq E$, with $x \in s$. Then $f₀$ has Fréchet derivative $f'$ at $x$ within $s$ if and only if $f₁$ has Fréchet derivative $f'$ at $x$ within $s$.
Filter.EventuallyEq.differentiableWithinAt_iff theorem
(h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : f₀ x = f₁ x) : DifferentiableWithinAt 𝕜 f₀ s x ↔ DifferentiableWithinAt 𝕜 f₁ s x
Full source
theorem Filter.EventuallyEq.differentiableWithinAt_iff (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : f₀ x = f₁ x) :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f₀ s x ↔ DifferentiableWithinAt 𝕜 f₁ s x :=
  exists_congr fun _ => h.hasFDerivWithinAt_iff hx
Equivalence of Differentiability Within a Set for Eventually Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f₀, f₁ : E \to F$ be functions that are eventually equal in a neighborhood of $x$ within $s \subseteq E$, with $f₀(x) = f₁(x)$. Then $f₀$ is differentiable at $x$ within $s$ if and only if $f₁$ is differentiable at $x$ within $s$.
Filter.EventuallyEq.differentiableWithinAt_iff_of_mem theorem
(h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : x ∈ s) : DifferentiableWithinAt 𝕜 f₀ s x ↔ DifferentiableWithinAt 𝕜 f₁ s x
Full source
theorem Filter.EventuallyEq.differentiableWithinAt_iff_of_mem (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : x ∈ s) :
    DifferentiableWithinAtDifferentiableWithinAt 𝕜 f₀ s x ↔ DifferentiableWithinAt 𝕜 f₁ s x :=
  h.differentiableWithinAt_iff (h.eq_of_nhdsWithin hx)
Differentiability Within a Set is Equivalent for Eventually Equal Functions at a Point in the Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f₀, f₁ : E \to F$ be functions that are eventually equal in a neighborhood of $x$ within $s \subseteq E$ (i.e., $f₀(y) = f₁(y)$ for all $y$ in some neighborhood of $x$ intersected with $s$). If $x \in s$, then $f₀$ is differentiable at $x$ within $s$ if and only if $f₁$ is differentiable at $x$ within $s$.
HasFDerivWithinAt.congr_mono theorem
(h : HasFDerivWithinAt f f' s x) (ht : EqOn f₁ f t) (hx : f₁ x = f x) (h₁ : t ⊆ s) : HasFDerivWithinAt f₁ f' t x
Full source
theorem HasFDerivWithinAt.congr_mono (h : HasFDerivWithinAt f f' s x) (ht : EqOn f₁ f t)
    (hx : f₁ x = f x) (h₁ : t ⊆ s) : HasFDerivWithinAt f₁ f' t x :=
  HasFDerivAtFilter.congr_of_eventuallyEq (h.mono h₁) (Filter.mem_inf_of_right ht) hx
Fréchet Differentiability Within a Set is Preserved Under Restriction and Function Equality
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. Suppose that $f$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at $x \in E$ within a set $s \subseteq E$. If $f_1$ coincides with $f$ on a subset $t \subseteq s$ (i.e., $f_1(y) = f(y)$ for all $y \in t$), and $f_1(x) = f(x)$, then $f_1$ also has Fréchet derivative $f'$ at $x$ within $t$.
HasFDerivWithinAt.congr' theorem
(h : HasFDerivWithinAt f f' s x) (hs : EqOn f₁ f s) (hx : x ∈ s) : HasFDerivWithinAt f₁ f' s x
Full source
theorem HasFDerivWithinAt.congr' (h : HasFDerivWithinAt f f' s x) (hs : EqOn f₁ f s) (hx : x ∈ s) :
    HasFDerivWithinAt f₁ f' s x :=
  h.congr hs (hs hx)
Fréchet Differentiability Within a Set is Preserved Under Function Equality at a Point in the Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. Suppose that $f$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at $x \in E$ within a set $s \subseteq E$. If $f_1$ coincides with $f$ on $s$ (i.e., $f_1(y) = f(y)$ for all $y \in s$) and $x \in s$, then $f_1$ also has Fréchet derivative $f'$ at $x$ within $s$.
HasFDerivWithinAt.congr_of_eventuallyEq theorem
(h : HasFDerivWithinAt f f' s x) (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : HasFDerivWithinAt f₁ f' s x
Full source
theorem HasFDerivWithinAt.congr_of_eventuallyEq (h : HasFDerivWithinAt f f' s x)
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : HasFDerivWithinAt f₁ f' s x :=
  HasFDerivAtFilter.congr_of_eventuallyEq h h₁ hx
Fréchet Differentiability Within a Set is Preserved Under Local Equality
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. Suppose $f$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at $x \in E$ within a set $s \subseteq E$. If $f_1$ is eventually equal to $f$ within $s$ in a neighborhood of $x$ (i.e., $f_1 = f$ for all points sufficiently close to $x$ in $s$) and $f_1(x) = f(x)$, then $f_1$ also has Fréchet derivative $f'$ at $x$ within $s$.
HasFDerivAt.congr_of_eventuallyEq theorem
(h : HasFDerivAt f f' x) (h₁ : f₁ =ᶠ[𝓝 x] f) : HasFDerivAt f₁ f' x
Full source
theorem HasFDerivAt.congr_of_eventuallyEq (h : HasFDerivAt f f' x) (h₁ : f₁ =ᶠ[𝓝 x] f) :
    HasFDerivAt f₁ f' x :=
  HasFDerivAtFilter.congr_of_eventuallyEq h h₁ (mem_of_mem_nhds h₁ :)
Fréchet Differentiability at a Point is Preserved Under Local Equality
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that are eventually equal in a neighborhood of $x \in E$. If $f$ has Fréchet derivative $f' : E \toL[\mathbb{K}] F$ at $x$, then $f_1$ also has Fréchet derivative $f'$ at $x$.
DifferentiableWithinAt.congr_mono theorem
(h : DifferentiableWithinAt 𝕜 f s x) (ht : EqOn f₁ f t) (hx : f₁ x = f x) (h₁ : t ⊆ s) : DifferentiableWithinAt 𝕜 f₁ t x
Full source
theorem DifferentiableWithinAt.congr_mono (h : DifferentiableWithinAt 𝕜 f s x) (ht : EqOn f₁ f t)
    (hx : f₁ x = f x) (h₁ : t ⊆ s) : DifferentiableWithinAt 𝕜 f₁ t x :=
  (HasFDerivWithinAt.congr_mono h.hasFDerivWithinAt ht hx h₁).differentiableWithinAt
Differentiability within a subset under function equality
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), and let \( f, f_1 : E \to F \) be functions. Suppose \( f \) is differentiable at \( x \in E \) within a set \( s \subseteq E \). If \( f_1 \) coincides with \( f \) on a subset \( t \subseteq s \) (i.e., \( f_1(y) = f(y) \) for all \( y \in t \)) and \( f_1(x) = f(x) \), then \( f_1 \) is differentiable at \( x \) within \( t \).
DifferentiableWithinAt.congr theorem
(h : DifferentiableWithinAt 𝕜 f s x) (ht : ∀ x ∈ s, f₁ x = f x) (hx : f₁ x = f x) : DifferentiableWithinAt 𝕜 f₁ s x
Full source
theorem DifferentiableWithinAt.congr (h : DifferentiableWithinAt 𝕜 f s x) (ht : ∀ x ∈ s, f₁ x = f x)
    (hx : f₁ x = f x) : DifferentiableWithinAt 𝕜 f₁ s x :=
  DifferentiableWithinAt.congr_mono h ht hx (Subset.refl _)
Differentiability within a set is preserved under pointwise equality
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), and let \( f, f_1 : E \to F \) be functions. Suppose \( f \) is differentiable at a point \( x \in E \) within a set \( s \subseteq E \). If \( f_1 \) coincides with \( f \) on \( s \) (i.e., \( f_1(y) = f(y) \) for all \( y \in s \)) and \( f_1(x) = f(x) \), then \( f_1 \) is also differentiable at \( x \) within \( s \).
DifferentiableWithinAt.congr_of_eventuallyEq theorem
(h : DifferentiableWithinAt 𝕜 f s x) (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : DifferentiableWithinAt 𝕜 f₁ s x
Full source
theorem DifferentiableWithinAt.congr_of_eventuallyEq (h : DifferentiableWithinAt 𝕜 f s x)
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : DifferentiableWithinAt 𝕜 f₁ s x :=
  (h.hasFDerivWithinAt.congr_of_eventuallyEq h₁ hx).differentiableWithinAt
Differentiability within a set is preserved under local equality
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), and let \( f, f_1 : E \to F \) be functions. Suppose \( f \) is differentiable at a point \( x \in E \) within a set \( s \subseteq E \). If \( f_1 \) is eventually equal to \( f \) within \( s \) in a neighborhood of \( x \) (i.e., \( f_1 = f \) for all points sufficiently close to \( x \) in \( s \)) and \( f_1(x) = f(x) \), then \( f_1 \) is also differentiable at \( x \) within \( s \).
DifferentiableWithinAt.congr_of_eventuallyEq_of_mem theorem
(h : DifferentiableWithinAt 𝕜 f s x) (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : x ∈ s) : DifferentiableWithinAt 𝕜 f₁ s x
Full source
theorem DifferentiableWithinAt.congr_of_eventuallyEq_of_mem (h : DifferentiableWithinAt 𝕜 f s x)
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : x ∈ s) : DifferentiableWithinAt 𝕜 f₁ s x :=
  h.congr_of_eventuallyEq h₁ (mem_of_mem_nhdsWithin hx h₁ :)
Differentiability within a set is preserved under local equality when $x \in s$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. Suppose $f$ is differentiable at a point $x \in E$ within a set $s \subseteq E$. If $f_1$ is eventually equal to $f$ within $s$ in a neighborhood of $x$ (i.e., $f_1 = f$ for all points sufficiently close to $x$ in $s$) and $x \in s$, then $f_1$ is also differentiable at $x$ within $s$.
DifferentiableWithinAt.congr_of_eventuallyEq_insert theorem
(h : DifferentiableWithinAt 𝕜 f s x) (h₁ : f₁ =ᶠ[𝓝[insert x s] x] f) : DifferentiableWithinAt 𝕜 f₁ s x
Full source
theorem DifferentiableWithinAt.congr_of_eventuallyEq_insert (h : DifferentiableWithinAt 𝕜 f s x)
    (h₁ : f₁ =ᶠ[𝓝[insert x s] x] f) : DifferentiableWithinAt 𝕜 f₁ s x :=
  (h.insert.congr_of_eventuallyEq_of_mem h₁ (mem_insert _ _)).of_insert
Differentiability within a set is preserved under local equality on the extended set $\{x\} \cup s$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. If $f$ is differentiable at $x \in E$ within a set $s \subseteq E$, and $f_1$ is eventually equal to $f$ in a neighborhood of $x$ within $\{x\} \cup s$, then $f_1$ is also differentiable at $x$ within $s$.
DifferentiableOn.congr_mono theorem
(h : DifferentiableOn 𝕜 f s) (h' : ∀ x ∈ t, f₁ x = f x) (h₁ : t ⊆ s) : DifferentiableOn 𝕜 f₁ t
Full source
theorem DifferentiableOn.congr_mono (h : DifferentiableOn 𝕜 f s) (h' : ∀ x ∈ t, f₁ x = f x)
    (h₁ : t ⊆ s) : DifferentiableOn 𝕜 f₁ t := fun x hx => (h x (h₁ hx)).congr_mono h' (h' x hx) h₁
Differentiability on a Subset under Function Equality
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), and let \( f, f_1 : E \to F \) be functions. Suppose \( f \) is differentiable on a set \( s \subseteq E \). If \( f_1 \) coincides with \( f \) on a subset \( t \subseteq s \) (i.e., \( f_1(x) = f(x) \) for all \( x \in t \)), then \( f_1 \) is differentiable on \( t \).
DifferentiableOn.congr theorem
(h : DifferentiableOn 𝕜 f s) (h' : ∀ x ∈ s, f₁ x = f x) : DifferentiableOn 𝕜 f₁ s
Full source
theorem DifferentiableOn.congr (h : DifferentiableOn 𝕜 f s) (h' : ∀ x ∈ s, f₁ x = f x) :
    DifferentiableOn 𝕜 f₁ s := fun x hx => (h x hx).congr h' (h' x hx)
Differentiability on a Set is Preserved under Pointwise Equality
Informal description
Let \( E \) and \( F \) be normed spaces over a non-discrete normed field \( \mathbb{K} \), and let \( f, f_1 : E \to F \) be functions. If \( f \) is differentiable on a set \( s \subseteq E \) and \( f_1 \) coincides with \( f \) on \( s \) (i.e., \( f_1(x) = f(x) \) for all \( x \in s \)), then \( f_1 \) is also differentiable on \( s \).
differentiableOn_congr theorem
(h' : ∀ x ∈ s, f₁ x = f x) : DifferentiableOn 𝕜 f₁ s ↔ DifferentiableOn 𝕜 f s
Full source
theorem differentiableOn_congr (h' : ∀ x ∈ s, f₁ x = f x) :
    DifferentiableOnDifferentiableOn 𝕜 f₁ s ↔ DifferentiableOn 𝕜 f s :=
  ⟨fun h => DifferentiableOn.congr h fun y hy => (h' y hy).symm, fun h =>
    DifferentiableOn.congr h h'⟩
Differentiability on a Set is Equivalent under Pointwise Equality
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. For any set $s \subseteq E$, if $f_1(x) = f(x)$ for all $x \in s$, then $f_1$ is differentiable on $s$ if and only if $f$ is differentiable on $s$.
DifferentiableAt.congr_of_eventuallyEq theorem
(h : DifferentiableAt 𝕜 f x) (hL : f₁ =ᶠ[𝓝 x] f) : DifferentiableAt 𝕜 f₁ x
Full source
theorem DifferentiableAt.congr_of_eventuallyEq (h : DifferentiableAt 𝕜 f x) (hL : f₁ =ᶠ[𝓝 x] f) :
    DifferentiableAt 𝕜 f₁ x :=
  hL.differentiableAt_iff.2 h
Differentiability at a Point is Preserved under Eventual Equality
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. If $f$ is differentiable at $x \in E$ and $f_1$ is eventually equal to $f$ in a neighborhood of $x$, then $f_1$ is also differentiable at $x$.
DifferentiableWithinAt.fderivWithin_congr_mono theorem
(h : DifferentiableWithinAt 𝕜 f s x) (hs : EqOn f₁ f t) (hx : f₁ x = f x) (hxt : UniqueDiffWithinAt 𝕜 t x) (h₁ : t ⊆ s) : fderivWithin 𝕜 f₁ t x = fderivWithin 𝕜 f s x
Full source
theorem DifferentiableWithinAt.fderivWithin_congr_mono (h : DifferentiableWithinAt 𝕜 f s x)
    (hs : EqOn f₁ f t) (hx : f₁ x = f x) (hxt : UniqueDiffWithinAt 𝕜 t x) (h₁ : t ⊆ s) :
    fderivWithin 𝕜 f₁ t x = fderivWithin 𝕜 f s x :=
  (HasFDerivWithinAt.congr_mono h.hasFDerivWithinAt hs hx h₁).fderivWithin hxt
Equality of Fréchet Derivatives Under Function Restriction and Pointwise Equality
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. Suppose that: 1. $f$ is differentiable at $x \in E$ within a set $s \subseteq E$, 2. $f_1$ coincides with $f$ on a subset $t \subseteq s$ (i.e., $f_1(y) = f(y)$ for all $y \in t$), 3. $f_1(x) = f(x)$, 4. $t$ is uniquely differentiable at $x$ (i.e., the tangent cone at $x$ spans a dense subspace of $E$). Then the Fréchet derivative of $f_1$ at $x$ within $t$ equals the Fréchet derivative of $f$ at $x$ within $s$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} f_1 t x = \text{fderivWithin}_{\mathbb{K}} f s x. \]
Filter.EventuallyEq.fderivWithin_eq theorem
(hs : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x
Full source
theorem Filter.EventuallyEq.fderivWithin_eq (hs : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) :
    fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x := by
  classical
  simp only [fderivWithin, DifferentiableWithinAt, hs.hasFDerivWithinAt_iff hx]
Equality of Fréchet Derivatives Within a Set for Eventually Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that are eventually equal in a neighborhood of $x$ within $s \subseteq E$, i.e., $f_1 = f$ for all points sufficiently close to $x$ in $s$. If $f_1(x) = f(x)$, then the Fréchet derivatives of $f_1$ and $f$ at $x$ within $s$ are equal: \[ \text{fderivWithin}_{\mathbb{K}} f_1 s x = \text{fderivWithin}_{\mathbb{K}} f s x. \]
Filter.EventuallyEq.fderivWithin_eq_of_mem theorem
(hs : f₁ =ᶠ[𝓝[s] x] f) (hx : x ∈ s) : fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x
Full source
theorem Filter.EventuallyEq.fderivWithin_eq_of_mem (hs : f₁ =ᶠ[𝓝[s] x] f) (hx : x ∈ s) :
    fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x :=
  hs.fderivWithin_eq (mem_of_mem_nhdsWithin hx hs :)
Equality of Fréchet Derivatives Within a Set for Eventually Equal Functions at a Point in the Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that are eventually equal in a neighborhood of $x$ within $s \subseteq E$, i.e., $f_1 = f$ for all points sufficiently close to $x$ in $s$. If $x \in s$, then the Fréchet derivatives of $f_1$ and $f$ at $x$ within $s$ are equal: \[ \text{fderivWithin}_{\mathbb{K}} f_1 s x = \text{fderivWithin}_{\mathbb{K}} f s x. \]
Filter.EventuallyEq.fderivWithin_eq_of_insert theorem
(hs : f₁ =ᶠ[𝓝[insert x s] x] f) : fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x
Full source
theorem Filter.EventuallyEq.fderivWithin_eq_of_insert (hs : f₁ =ᶠ[𝓝[insert x s] x] f) :
    fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x := by
  apply Filter.EventuallyEq.fderivWithin_eq (nhdsWithin_mono _ (subset_insert x s) hs)
  exact (mem_of_mem_nhdsWithin (mem_insert x s) hs :)
Equality of Fréchet Derivatives Within a Set for Functions Eventually Equal Near Inserted Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. If $f_1$ and $f$ are eventually equal in a neighborhood of $x$ within the set $\{x\} \cup s$ (i.e., $f_1 = f$ for all points sufficiently close to $x$ in $\{x\} \cup s$), then their Fréchet derivatives at $x$ within $s$ are equal: \[ \text{fderivWithin}_{\mathbb{K}} f_1 s x = \text{fderivWithin}_{\mathbb{K}} f s x. \]
Filter.EventuallyEq.fderivWithin' theorem
(hs : f₁ =ᶠ[𝓝[s] x] f) (ht : t ⊆ s) : fderivWithin 𝕜 f₁ t =ᶠ[𝓝[s] x] fderivWithin 𝕜 f t
Full source
theorem Filter.EventuallyEq.fderivWithin' (hs : f₁ =ᶠ[𝓝[s] x] f) (ht : t ⊆ s) :
    fderivWithinfderivWithin 𝕜 f₁ t =ᶠ[𝓝[s] x] fderivWithin 𝕜 f t :=
  (eventually_eventually_nhdsWithin.2 hs).mp <|
    eventually_mem_nhdsWithin.mono fun _y hys hs =>
      EventuallyEq.fderivWithin_eq (hs.filter_mono <| nhdsWithin_mono _ ht)
        (hs.self_of_nhdsWithin hys)
Eventual Equality of Fréchet Derivatives Within Subset for Eventually Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. If $f_1$ and $f$ are eventually equal in a neighborhood of $x$ within $s$ (i.e., $f_1 = f$ for all points sufficiently close to $x$ in $s$), and if $t \subseteq s$, then the Fréchet derivatives of $f_1$ and $f$ within $t$ are eventually equal in a neighborhood of $x$ within $s$: \[ \text{fderivWithin}_{\mathbb{K}} f_1 t = \text{fderivWithin}_{\mathbb{K}} f t \text{ eventually near } x \text{ within } s. \]
Filter.EventuallyEq.fderivWithin theorem
(hs : f₁ =ᶠ[𝓝[s] x] f) : fderivWithin 𝕜 f₁ s =ᶠ[𝓝[s] x] fderivWithin 𝕜 f s
Full source
protected theorem Filter.EventuallyEq.fderivWithin (hs : f₁ =ᶠ[𝓝[s] x] f) :
    fderivWithinfderivWithin 𝕜 f₁ s =ᶠ[𝓝[s] x] fderivWithin 𝕜 f s :=
  hs.fderivWithin' Subset.rfl
Eventual Equality of Fréchet Derivatives Within a Set for Eventually Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions. If $f_1$ and $f$ are eventually equal in a neighborhood of $x$ within $s$ (i.e., $f_1(y) = f(y)$ for all $y$ sufficiently close to $x$ in $s$), then their Fréchet derivatives within $s$ are eventually equal in a neighborhood of $x$ within $s$: \[ \text{fderivWithin}_{\mathbb{K}} f_1 s = \text{fderivWithin}_{\mathbb{K}} f s \text{ eventually near } x \text{ within } s. \]
Filter.EventuallyEq.fderivWithin_eq_nhds theorem
(h : f₁ =ᶠ[𝓝 x] f) : fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x
Full source
theorem Filter.EventuallyEq.fderivWithin_eq_nhds (h : f₁ =ᶠ[𝓝 x] f) :
    fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x :=
  (h.filter_mono nhdsWithin_le_nhds).fderivWithin_eq h.self_of_nhds
Equality of Fréchet Derivatives Within a Set for Functions Equal Near a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that are eventually equal in a neighborhood of $x \in E$, i.e., $f_1 = f$ for all points sufficiently close to $x$. Then the Fréchet derivatives of $f_1$ and $f$ at $x$ within any subset $s \subseteq E$ are equal: \[ \text{fderivWithin}_{\mathbb{K}} f_1 s x = \text{fderivWithin}_{\mathbb{K}} f s x. \]
fderivWithin_congr theorem
(hs : EqOn f₁ f s) (hx : f₁ x = f x) : fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x
Full source
theorem fderivWithin_congr (hs : EqOn f₁ f s) (hx : f₁ x = f x) :
    fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x :=
  (hs.eventuallyEq.filter_mono inf_le_right).fderivWithin_eq hx
Equality of Fréchet Derivatives Within a Set for Pointwise Equal Functions
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that coincide on a subset $s \subseteq E$ (i.e., $f_1(y) = f(y)$ for all $y \in s$). If $f_1(x) = f(x)$ at a point $x \in E$, then their Fréchet derivatives at $x$ within $s$ are equal: \[ \text{fderivWithin}_{\mathbb{K}} f_1 s x = \text{fderivWithin}_{\mathbb{K}} f s x. \]
fderivWithin_congr' theorem
(hs : EqOn f₁ f s) (hx : x ∈ s) : fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x
Full source
theorem fderivWithin_congr' (hs : EqOn f₁ f s) (hx : x ∈ s) :
    fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x :=
  fderivWithin_congr hs (hs hx)
Equality of Fréchet Derivatives Within a Set for Pointwise Equal Functions at Interior Points
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that coincide on a subset $s \subseteq E$ (i.e., $f_1(y) = f(y)$ for all $y \in s$). If $x \in s$, then their Fréchet derivatives at $x$ within $s$ are equal: \[ \text{fderivWithin}_{\mathbb{K}} f_1 s x = \text{fderivWithin}_{\mathbb{K}} f s x. \]
Filter.EventuallyEq.fderiv_eq theorem
(h : f₁ =ᶠ[𝓝 x] f) : fderiv 𝕜 f₁ x = fderiv 𝕜 f x
Full source
theorem Filter.EventuallyEq.fderiv_eq (h : f₁ =ᶠ[𝓝 x] f) : fderiv 𝕜 f₁ x = fderiv 𝕜 f x := by
  rw [← fderivWithin_univ, ← fderivWithin_univ, h.fderivWithin_eq_nhds]
Equality of Fréchet Derivatives for Functions Equal Near a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that are eventually equal in a neighborhood of $x \in E$, i.e., $f_1(y) = f(y)$ for all $y$ sufficiently close to $x$. Then the Fréchet derivatives of $f_1$ and $f$ at $x$ are equal: \[ \text{fderiv}_{\mathbb{K}} f_1 x = \text{fderiv}_{\mathbb{K}} f x. \]
Filter.EventuallyEq.fderiv theorem
(h : f₁ =ᶠ[𝓝 x] f) : fderiv 𝕜 f₁ =ᶠ[𝓝 x] fderiv 𝕜 f
Full source
protected theorem Filter.EventuallyEq.fderiv (h : f₁ =ᶠ[𝓝 x] f) : fderivfderiv 𝕜 f₁ =ᶠ[𝓝 x] fderiv 𝕜 f :=
  h.eventuallyEq_nhds.mono fun _ h => h.fderiv_eq
Local Equality of Fréchet Derivatives for Functions Equal Near a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f, f_1 : E \to F$ be functions that are eventually equal in a neighborhood of $x \in E$, i.e., $f_1(y) = f(y)$ for all $y$ sufficiently close to $x$. Then the Fréchet derivatives of $f_1$ and $f$ are eventually equal in a neighborhood of $x$: \[ \text{fderiv}_{\mathbb{K}} f_1 = \text{fderiv}_{\mathbb{K}} f \text{ near } x. \]
hasStrictFDerivAt_id theorem
(x : E) : HasStrictFDerivAt id (id 𝕜 E) x
Full source
@[fun_prop]
theorem hasStrictFDerivAt_id (x : E) : HasStrictFDerivAt id (id 𝕜 E) x :=
  .of_isLittleOTVS <| (IsLittleOTVS.zero _ _).congr_left <| by simp
Strict Fréchet Differentiability of the Identity Map
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The identity map $\mathrm{id} : E \to E$ has itself (as a continuous linear map) as its strict Fréchet derivative at any point $x \in E$. This means that $\mathrm{id}(y) - \mathrm{id}(z) - \mathrm{id}(y - z) = o(y - z)$ as $y, z \to x$.
hasFDerivAtFilter_id theorem
(x : E) (L : Filter E) : HasFDerivAtFilter id (id 𝕜 E) x L
Full source
theorem hasFDerivAtFilter_id (x : E) (L : Filter E) : HasFDerivAtFilter id (id 𝕜 E) x L :=
  .of_isLittleOTVS <| (IsLittleOTVS.zero _ _).congr_left <| by simp
Identity map has itself as Fréchet derivative along any filter
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The identity map $\mathrm{id} : E \to E$ has itself (as a continuous linear map) as its Fréchet derivative at any point $x \in E$ along any filter $L$ on $E$.
hasFDerivWithinAt_id theorem
(x : E) (s : Set E) : HasFDerivWithinAt id (id 𝕜 E) s x
Full source
@[fun_prop]
theorem hasFDerivWithinAt_id (x : E) (s : Set E) : HasFDerivWithinAt id (id 𝕜 E) s x :=
  hasFDerivAtFilter_id _ _
Identity Map Has Itself as Fréchet Derivative Within Any Subset
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The identity map $\mathrm{id} : E \to E$ has itself (as a continuous linear map) as its Fréchet derivative at any point $x \in E$ within any subset $s \subseteq E$. That is, the derivative satisfies \[ \mathrm{id}(x') = \mathrm{id}(x) + \mathrm{id}(x' - x) + o(\|x' - x\|) \] as $x'$ tends to $x$ within $s$.
hasFDerivAt_id theorem
(x : E) : HasFDerivAt id (id 𝕜 E) x
Full source
@[fun_prop]
theorem hasFDerivAt_id (x : E) : HasFDerivAt id (id 𝕜 E) x :=
  hasFDerivAtFilter_id _ _
Identity Map Has Itself as Fréchet Derivative at Every Point
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The identity map $\mathrm{id} : E \to E$ has itself (as a continuous linear map) as its Fréchet derivative at any point $x \in E$.
differentiableAt_id theorem
: DifferentiableAt 𝕜 id x
Full source
@[simp, fun_prop]
theorem differentiableAt_id : DifferentiableAt 𝕜 id x :=
  (hasFDerivAt_id x).differentiableAt
Differentiability of the Identity Map at Every Point
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The identity map $\mathrm{id} : E \to E$ is differentiable at every point $x \in E$.
differentiableAt_id' theorem
: DifferentiableAt 𝕜 (fun x => x) x
Full source
/-- Variant with `fun x => x` rather than `id` -/
@[simp]
theorem differentiableAt_id' : DifferentiableAt 𝕜 (fun x => x) x :=
  (hasFDerivAt_id x).differentiableAt
Differentiability of the Identity Function at a Point
Informal description
The identity function $f(x) = x$ is differentiable at every point $x$ in a normed space $E$ over a non-discrete normed field $\mathbb{K}$.
differentiableWithinAt_id theorem
: DifferentiableWithinAt 𝕜 id s x
Full source
@[fun_prop]
theorem differentiableWithinAt_id : DifferentiableWithinAt 𝕜 id s x :=
  differentiableAt_id.differentiableWithinAt
Differentiability of the Identity Map Within Any Subset
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The identity map $\mathrm{id} : E \to E$ is differentiable at every point $x \in E$ within any subset $s \subseteq E$.
differentiableWithinAt_id' theorem
: DifferentiableWithinAt 𝕜 (fun x => x) s x
Full source
/-- Variant with `fun x => x` rather than `id` -/
@[fun_prop]
theorem differentiableWithinAt_id' : DifferentiableWithinAt 𝕜 (fun x => x) s x :=
  differentiableWithinAt_id
Differentiability of the Identity Function Within a Subset
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The identity function $f(x) = x$ is differentiable at every point $x \in E$ within any subset $s \subseteq E$.
differentiable_id theorem
: Differentiable 𝕜 (id : E → E)
Full source
@[simp, fun_prop]
theorem differentiable_id : Differentiable 𝕜 (id : E → E) := fun _ => differentiableAt_id
Differentiability of the Identity Function
Informal description
The identity function $\mathrm{id} : E \to E$ on a normed space $E$ over a non-discrete normed field $\mathbb{K}$ is differentiable everywhere.
differentiable_id' theorem
: Differentiable 𝕜 fun x : E => x
Full source
/-- Variant with `fun x => x` rather than `id` -/
@[simp]
theorem differentiable_id' : Differentiable 𝕜 fun x : E => x := fun _ => differentiableAt_id
Differentiability of the Identity Function on a Normed Space
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The identity function $f : E \to E$ defined by $f(x) = x$ is differentiable everywhere on $E$.
differentiableOn_id theorem
: DifferentiableOn 𝕜 id s
Full source
@[fun_prop]
theorem differentiableOn_id : DifferentiableOn 𝕜 id s :=
  differentiable_id.differentiableOn
Differentiability of the Identity Function on Any Subset
Informal description
The identity function $\mathrm{id} : E \to E$ on a normed space $E$ over a non-discrete normed field $\mathbb{K}$ is differentiable on any subset $s \subseteq E$.
fderiv_id theorem
: fderiv 𝕜 id x = id 𝕜 E
Full source
@[simp]
theorem fderiv_id : fderiv 𝕜 id x = id 𝕜 E :=
  HasFDerivAt.fderiv (hasFDerivAt_id x)
Fréchet Derivative of the Identity Map is the Identity
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The Fréchet derivative of the identity map $\mathrm{id} : E \to E$ at any point $x \in E$ is equal to the identity continuous linear map on $E$.
fderiv_id' theorem
: fderiv 𝕜 (fun x : E => x) x = ContinuousLinearMap.id 𝕜 E
Full source
@[simp]
theorem fderiv_id' : fderiv 𝕜 (fun x : E => x) x = ContinuousLinearMap.id 𝕜 E :=
  fderiv_id
Fréchet Derivative of Identity Function is Identity Map
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$. The Fréchet derivative of the identity function $x \mapsto x$ at any point $x \in E$ is equal to the identity continuous linear map on $E$.
fderivWithin_id theorem
(hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 id s x = id 𝕜 E
Full source
theorem fderivWithin_id (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 id s x = id 𝕜 E := by
  rw [DifferentiableAt.fderivWithin differentiableAt_id hxs]
  exact fderiv_id
Fréchet Derivative of Identity Map Within a Set is the Identity
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$, $s \subseteq E$ a subset, and $x \in E$ a point where $s$ is uniquely differentiable at $x$ (i.e., the tangent cone at $x$ spans a dense subspace of $E$). Then the Fréchet derivative of the identity map $\mathrm{id} : E \to E$ at $x$ within $s$ is equal to the identity continuous linear map on $E$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} \, \mathrm{id} \, s \, x = \mathrm{id}_{\mathbb{K}} E. \]
fderivWithin_id' theorem
(hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 (fun x : E => x) s x = ContinuousLinearMap.id 𝕜 E
Full source
theorem fderivWithin_id' (hxs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (fun x : E => x) s x = ContinuousLinearMap.id 𝕜 E :=
  fderivWithin_id hxs
Fréchet Derivative of Identity Function Within a Set is the Identity Map
Informal description
Let $E$ be a normed space over a non-discrete normed field $\mathbb{K}$, $s \subseteq E$ a subset, and $x \in E$ a point where $s$ is uniquely differentiable at $x$. Then the Fréchet derivative of the identity function $x \mapsto x$ at $x$ within $s$ is equal to the identity continuous linear map on $E$, i.e., \[ \text{fderivWithin}_{\mathbb{K}} \, (\lambda x, x) \, s \, x = \text{id}_{\mathbb{K}} E. \]
hasStrictFDerivAt_const theorem
(c : F) (x : E) : HasStrictFDerivAt (fun _ => c) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasStrictFDerivAt_const (c : F) (x : E) :
    HasStrictFDerivAt (fun _ => c) (0 : E →L[𝕜] F) x :=
  .of_isLittleOTVS <| (IsLittleOTVS.zero _ _).congr_left fun _ => by
    simp only [zero_apply, sub_self, Pi.zero_apply]
Strict Fréchet derivative of a constant function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$. For any constant function $f : E \to F$ defined by $f(y) = c$ for some fixed $c \in F$, and for any point $x \in E$, the function $f$ has strict Fréchet derivative $0$ at $x$. That is, the zero continuous linear map is the strict derivative of $f$ at $x$.
hasStrictFDerivAt_zero theorem
(x : E) : HasStrictFDerivAt (0 : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasStrictFDerivAt_zero (x : E) :
    HasStrictFDerivAt (0 : E → F) (0 : E →L[𝕜] F) x := hasStrictFDerivAt_const _ _
Strict Fréchet derivative of the zero function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$. The zero function $f : E \to F$ defined by $f(x) = 0$ for all $x \in E$ has strict Fréchet derivative $0$ (the zero continuous linear map) at every point $x \in E$.
hasStrictFDerivAt_one theorem
[One F] (x : E) : HasStrictFDerivAt (1 : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasStrictFDerivAt_one [One F] (x : E) :
    HasStrictFDerivAt (1 : E → F) (0 : E →L[𝕜] F) x := hasStrictFDerivAt_const _ _
Strict Fréchet derivative of the constant one function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ having a multiplicative identity element $1$. For any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = 1$ for all $y \in E$ has strict Fréchet derivative $0$ at $x$. That is, the zero continuous linear map is the strict derivative of $f$ at $x$.
hasStrictFDerivAt_natCast theorem
[NatCast F] (n : ℕ) (x : E) : HasStrictFDerivAt (n : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasStrictFDerivAt_natCast [NatCast F] (n : ) (x : E) :
    HasStrictFDerivAt (n : E → F) (0 : E →L[𝕜] F) x := hasStrictFDerivAt_const _ _
Strict Fréchet derivative of a constant natural number function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ equipped with a natural number cast operation. For any natural number $n \in \mathbb{N}$ and any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = n$ has strict Fréchet derivative $0$ at $x$.
hasStrictFDerivAt_intCast theorem
[IntCast F] (z : ℤ) (x : E) : HasStrictFDerivAt (z : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasStrictFDerivAt_intCast [IntCast F] (z : ) (x : E) :
    HasStrictFDerivAt (z : E → F) (0 : E →L[𝕜] F) x := hasStrictFDerivAt_const _ _
Strict Fréchet derivative of integer constant function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ having integer scalar multiplication. For any integer $z \in \mathbb{Z}$ and any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = z$ for all $y \in E$ has strict Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$.
hasStrictFDerivAt_ofNat theorem
(n : ℕ) [OfNat F n] (x : E) : HasStrictFDerivAt (ofNat(n) : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasStrictFDerivAt_ofNat (n : ) [OfNat F n] (x : E) :
    HasStrictFDerivAt (ofNat(n) : E → F) (0 : E →L[𝕜] F) x := hasStrictFDerivAt_const _ _
Strict Fréchet derivative of a constant function (of natural number type) is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ having a canonical element corresponding to the natural number $n$. For any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = n$ for all $y \in E$ has strict Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$.
hasFDerivAtFilter_const theorem
(c : F) (x : E) (L : Filter E) : HasFDerivAtFilter (fun _ => c) (0 : E →L[𝕜] F) x L
Full source
theorem hasFDerivAtFilter_const (c : F) (x : E) (L : Filter E) :
    HasFDerivAtFilter (fun _ => c) (0 : E →L[𝕜] F) x L :=
  .of_isLittleOTVS <| (IsLittleOTVS.zero _ _).congr_left fun _ => by
    simp only [zero_apply, sub_self, Pi.zero_apply]
Fréchet derivative of a constant function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $c \in F$ be a constant. Then the constant function $f : E \to F$ defined by $f(x) = c$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ along any filter $L$ on $E$.
hasFDerivAtFilter_zero theorem
(x : E) (L : Filter E) : HasFDerivAtFilter (0 : E → F) (0 : E →L[𝕜] F) x L
Full source
theorem hasFDerivAtFilter_zero (x : E) (L : Filter E) :
    HasFDerivAtFilter (0 : E → F) (0 : E →L[𝕜] F) x L := hasFDerivAtFilter_const _ _ _
Fréchet derivative of the zero function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$. The zero function $0 : E \to F$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ along any filter $L$ on $E$.
hasFDerivAtFilter_one theorem
[One F] (x : E) (L : Filter E) : HasFDerivAtFilter (1 : E → F) (0 : E →L[𝕜] F) x L
Full source
theorem hasFDerivAtFilter_one [One F] (x : E) (L : Filter E) :
    HasFDerivAtFilter (1 : E → F) (0 : E →L[𝕜] F) x L := hasFDerivAtFilter_const _ _ _
Fréchet derivative of the constant one function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, where $F$ has a multiplicative identity element $1$. Then the constant function $f : E \to F$ defined by $f(x) = 1$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ along any filter $L$ on $E$.
hasFDerivAtFilter_natCast theorem
[NatCast F] (n : ℕ) (x : E) (L : Filter E) : HasFDerivAtFilter (n : E → F) (0 : E →L[𝕜] F) x L
Full source
theorem hasFDerivAtFilter_natCast [NatCast F] (n : ) (x : E) (L : Filter E) :
    HasFDerivAtFilter (n : E → F) (0 : E →L[𝕜] F) x L :=
  hasFDerivAtFilter_const _ _ _
Fréchet derivative of a constant natural number function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ equipped with a natural number cast operation. For any natural number $n \in \mathbb{N}$, point $x \in E$, and filter $L$ on $E$, the constant function $f : E \to F$ defined by $f(y) = n$ for all $y \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$ along the filter $L$.
hasFDerivAtFilter_intCast theorem
[IntCast F] (z : ℤ) (x : E) (L : Filter E) : HasFDerivAtFilter (z : E → F) (0 : E →L[𝕜] F) x L
Full source
theorem hasFDerivAtFilter_intCast [IntCast F] (z : ) (x : E) (L : Filter E) :
    HasFDerivAtFilter (z : E → F) (0 : E →L[𝕜] F) x L :=
  hasFDerivAtFilter_const _ _ _
Fréchet derivative of an integer constant function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $z$ be an integer. The constant function $f : E \to F$ defined by $f(x) = z$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ along any filter $L$ on $E$.
hasFDerivAtFilter_ofNat theorem
(n : ℕ) [OfNat F n] (x : E) (L : Filter E) : HasFDerivAtFilter (ofNat(n) : E → F) (0 : E →L[𝕜] F) x L
Full source
theorem hasFDerivAtFilter_ofNat (n : ) [OfNat F n] (x : E) (L : Filter E) :
    HasFDerivAtFilter (ofNat(n) : E → F) (0 : E →L[𝕜] F) x L :=
  hasFDerivAtFilter_const _ _ _
Fréchet derivative of a constant function (of natural number value) is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $n$ be a natural number such that $F$ has a canonical element corresponding to $n$. Then the constant function $f : E \to F$ defined by $f(x) = n$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ along any filter $L$ on $E$.
hasFDerivWithinAt_const theorem
(c : F) (x : E) (s : Set E) : HasFDerivWithinAt (fun _ => c) (0 : E →L[𝕜] F) s x
Full source
@[fun_prop]
theorem hasFDerivWithinAt_const (c : F) (x : E) (s : Set E) :
    HasFDerivWithinAt (fun _ => c) (0 : E →L[𝕜] F) s x :=
  hasFDerivAtFilter_const _ _ _
Fréchet derivative of a constant function within a set is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $c \in F$ be a constant. The constant function $f : E \to F$ defined by $f(x) = c$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ within any set $s \subseteq E$.
hasFDerivWithinAt_zero theorem
(x : E) (s : Set E) : HasFDerivWithinAt (0 : E → F) (0 : E →L[𝕜] F) s x
Full source
@[fun_prop]
theorem hasFDerivWithinAt_zero (x : E) (s : Set E) :
    HasFDerivWithinAt (0 : E → F) (0 : E →L[𝕜] F) s x := hasFDerivWithinAt_const _ _ _
Fréchet derivative of the zero function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$. The zero function $f : E \to F$ defined by $f(x) = 0$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ within any set $s \subseteq E$.
hasFDerivWithinAt_one theorem
[One F] (x : E) (s : Set E) : HasFDerivWithinAt (1 : E → F) (0 : E →L[𝕜] F) s x
Full source
@[fun_prop]
theorem hasFDerivWithinAt_one [One F] (x : E) (s : Set E) :
    HasFDerivWithinAt (1 : E → F) (0 : E →L[𝕜] F) s x := hasFDerivWithinAt_const _ _ _
Fréchet derivative of the constant one function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ having a multiplicative identity element $1$. The constant function $f : E \to F$ defined by $f(x) = 1$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ within any set $s \subseteq E$.
hasFDerivWithinAt_natCast theorem
[NatCast F] (n : ℕ) (x : E) (s : Set E) : HasFDerivWithinAt (n : E → F) (0 : E →L[𝕜] F) s x
Full source
@[fun_prop]
theorem hasFDerivWithinAt_natCast [NatCast F] (n : ) (x : E) (s : Set E) :
    HasFDerivWithinAt (n : E → F) (0 : E →L[𝕜] F) s x :=
  hasFDerivWithinAt_const _ _ _
Fréchet Derivative of Natural Number Constant Function is Zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ equipped with a natural number cast operation. For any natural number $n \in \mathbb{N}$, the constant function $f : E \to F$ defined by $f(x) = n$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at any point $x \in E$ within any set $s \subseteq E$.
hasFDerivWithinAt_intCast theorem
[IntCast F] (z : ℤ) (x : E) (s : Set E) : HasFDerivWithinAt (z : E → F) (0 : E →L[𝕜] F) s x
Full source
@[fun_prop]
theorem hasFDerivWithinAt_intCast [IntCast F] (z : ) (x : E) (s : Set E) :
    HasFDerivWithinAt (z : E → F) (0 : E →L[𝕜] F) s x :=
  hasFDerivWithinAt_const _ _ _
Fréchet Derivative of Integer Constant Function is Zero Within a Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $F$ have an integer casting operation. For any integer $z \in \mathbb{Z}$ and any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = z$ for all $y \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$ within any set $s \subseteq E$.
hasFDerivWithinAt_ofNat theorem
(n : ℕ) [OfNat F n] (x : E) (s : Set E) : HasFDerivWithinAt (ofNat(n) : E → F) (0 : E →L[𝕜] F) s x
Full source
@[fun_prop]
theorem hasFDerivWithinAt_ofNat (n : ) [OfNat F n] (x : E) (s : Set E) :
    HasFDerivWithinAt (ofNat(n) : E → F) (0 : E →L[𝕜] F) s x :=
  hasFDerivWithinAt_const _ _ _
Fréchet derivative of a constant natural number function is zero within a set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $n$ be a natural number such that $F$ has a canonical element corresponding to $n$. For any point $x \in E$ and any subset $s \subseteq E$, the constant function $f : E \to F$ defined by $f(y) = n$ for all $y \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$ within $s$.
hasFDerivAt_const theorem
(c : F) (x : E) : HasFDerivAt (fun _ => c) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasFDerivAt_const (c : F) (x : E) : HasFDerivAt (fun _ => c) (0 : E →L[𝕜] F) x :=
  hasFDerivAtFilter_const _ _ _
Fréchet derivative of a constant function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$. For any constant $c \in F$ and any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = c$ for all $y \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$.
hasFDerivAt_zero theorem
(x : E) : HasFDerivAt (0 : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasFDerivAt_zero (x : E) :
    HasFDerivAt (0 : E → F) (0 : E →L[𝕜] F) x := hasFDerivAt_const _ _
Fréchet derivative of the zero function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$. The zero function $f : E \to F$ defined by $f(x) = 0$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at every point $x \in E$.
hasFDerivAt_one theorem
[One F] (x : E) : HasFDerivAt (1 : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasFDerivAt_one [One F] (x : E) :
    HasFDerivAt (1 : E → F) (0 : E →L[𝕜] F) x := hasFDerivAt_const _ _
Fréchet derivative of the constant one function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and assume $F$ has a multiplicative identity element $1$. Then the constant function $f : E \to F$ defined by $f(x) = 1$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at every point $x \in E$.
hasFDerivAt_natCast theorem
[NatCast F] (n : ℕ) (x : E) : HasFDerivAt (n : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasFDerivAt_natCast [NatCast F] (n : ) (x : E) :
    HasFDerivAt (n : E → F) (0 : E →L[𝕜] F) x := hasFDerivAt_const _ _
Fréchet derivative of a constant natural number function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and suppose $F$ has a natural number casting operation. For any natural number $n \in \mathbb{N}$ and any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = n$ for all $y \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$.
hasFDerivAt_intCast theorem
[IntCast F] (z : ℤ) (x : E) : HasFDerivAt (z : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasFDerivAt_intCast [IntCast F] (z : ) (x : E) :
    HasFDerivAt (z : E → F) (0 : E →L[𝕜] F) x := hasFDerivAt_const _ _
Fréchet derivative of an integer constant function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $F$ be equipped with an integer casting operation. For any integer $z \in \mathbb{Z}$ and any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = z$ for all $y \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$.
hasFDerivAt_ofNat theorem
(n : ℕ) [OfNat F n] (x : E) : HasFDerivAt (ofNat(n) : E → F) (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasFDerivAt_ofNat (n : ) [OfNat F n] (x : E) :
    HasFDerivAt (ofNat(n) : E → F) (0 : E →L[𝕜] F) x := hasFDerivAt_const _ _
Fréchet derivative of a constant function defined by a numeral is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $n$ be a natural number such that $F$ has a canonical element corresponding to $n$. Then the constant function $f : E \to F$ defined by $f(x) = n$ for all $x \in E$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at every point $x \in E$.
differentiableAt_const theorem
(c : F) : DifferentiableAt 𝕜 (fun _ => c) x
Full source
@[simp, fun_prop]
theorem differentiableAt_const (c : F) : DifferentiableAt 𝕜 (fun _ => c) x :=
  ⟨0, hasFDerivAt_const c x⟩
Differentiability of Constant Functions at a Point
Informal description
For any constant $c \in F$ and any point $x \in E$ in normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$, the constant function $f : E \to F$ defined by $f(y) = c$ for all $y \in E$ is differentiable at $x$.
differentiableAt_zero theorem
(x : E) : DifferentiableAt 𝕜 (0 : E → F) x
Full source
@[simp, fun_prop]
theorem differentiableAt_zero (x : E) :
    DifferentiableAt 𝕜 (0 : E → F) x := differentiableAt_const _
Differentiability of the Zero Function at a Point
Informal description
For any point $x$ in a normed space $E$ over a non-discrete normed field $\mathbb{K}$, the zero function $f : E \to F$ (where $F$ is another normed space) is differentiable at $x$.
differentiableAt_one theorem
[One F] (x : E) : DifferentiableAt 𝕜 (1 : E → F) x
Full source
@[simp, fun_prop]
theorem differentiableAt_one [One F] (x : E) :
    DifferentiableAt 𝕜 (1 : E → F) x := differentiableAt_const _
Differentiability of the Constant One Function
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ equipped with a multiplicative identity element $1$. Then for any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = 1$ for all $y \in E$ is differentiable at $x$.
differentiableAt_natCast theorem
[NatCast F] (n : ℕ) (x : E) : DifferentiableAt 𝕜 (n : E → F) x
Full source
@[simp, fun_prop]
theorem differentiableAt_natCast [NatCast F] (n : ) (x : E) :
    DifferentiableAt 𝕜 (n : E → F) x := differentiableAt_const _
Differentiability of Natural Number Constant Functions
Informal description
For any natural number $n$ and any point $x$ in a normed space $E$ over a non-discrete normed field $\mathbb{K}$, the constant function $f : E \to F$ defined by $f(y) = n$ for all $y \in E$ is differentiable at $x$.
differentiableAt_intCast theorem
[IntCast F] (z : ℤ) (x : E) : DifferentiableAt 𝕜 (z : E → F) x
Full source
@[simp, fun_prop]
theorem differentiableAt_intCast [IntCast F] (z : ) (x : E) :
    DifferentiableAt 𝕜 (z : E → F) x := differentiableAt_const _
Differentiability of Integer Constant Functions at a Point
Informal description
For any integer $z \in \mathbb{Z}$ and any point $x \in E$ in normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$, the constant function $f : E \to F$ defined by $f(y) = z$ for all $y \in E$ is differentiable at $x$.
differentiableAt_ofNat theorem
(n : ℕ) [OfNat F n] (x : E) : DifferentiableAt 𝕜 (ofNat(n) : E → F) x
Full source
@[simp low, fun_prop]
theorem differentiableAt_ofNat (n : ) [OfNat F n] (x : E) :
    DifferentiableAt 𝕜 (ofNat(n) : E → F) x := differentiableAt_const _
Differentiability of Numeric Constant Function at a Point
Informal description
For any natural number $n$ and any point $x$ in a normed space $E$ over a non-discrete normed field $\mathbb{K}$, the constant function $f : E \to F$ defined by $f(y) = n$ (where $F$ has an instance of `OfNat` for $n$) is differentiable at $x$.
differentiableWithinAt_const theorem
(c : F) : DifferentiableWithinAt 𝕜 (fun _ => c) s x
Full source
@[fun_prop]
theorem differentiableWithinAt_const (c : F) : DifferentiableWithinAt 𝕜 (fun _ => c) s x :=
  DifferentiableAt.differentiableWithinAt (differentiableAt_const _)
Differentiability of Constant Functions Within a Subset
Informal description
For any constant $c \in F$ and any subset $s \subseteq E$ in normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$, the constant function $f : E \to F$ defined by $f(y) = c$ for all $y \in E$ is differentiable at any point $x \in E$ within the set $s$.
differentiableWithinAt_zero theorem
: DifferentiableWithinAt 𝕜 (0 : E → F) s x
Full source
@[fun_prop]
theorem differentiableWithinAt_zero :
    DifferentiableWithinAt 𝕜 (0 : E → F) s x := differentiableWithinAt_const _
Differentiability of the Zero Function Within a Subset
Informal description
The zero function $f : E \to F$ defined by $f(x) = 0$ for all $x \in E$ is differentiable at any point $x \in E$ within any subset $s \subseteq E$, where $E$ and $F$ are normed spaces over a non-discrete normed field $\mathbb{K}$.
differentiableWithinAt_one theorem
[One F] : DifferentiableWithinAt 𝕜 (1 : E → F) s x
Full source
@[fun_prop]
theorem differentiableWithinAt_one [One F] :
    DifferentiableWithinAt 𝕜 (1 : E → F) s x := differentiableWithinAt_const _
Differentiability of the constant one function within a subset
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ equipped with a multiplicative identity element $1 \in F$. Then the constant function $f : E \to F$ defined by $f(x) = 1$ for all $x \in E$ is differentiable at any point $x \in E$ within any subset $s \subseteq E$.
differentiableWithinAt_natCast theorem
[NatCast F] (n : ℕ) : DifferentiableWithinAt 𝕜 (n : E → F) s x
Full source
@[fun_prop]
theorem differentiableWithinAt_natCast [NatCast F] (n : ) :
    DifferentiableWithinAt 𝕜 (n : E → F) s x := differentiableWithinAt_const _
Differentiability of Natural Number Constant Functions Within a Subset
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $F$ equipped with a natural number casting operation. For any natural number $n \in \mathbb{N}$, any subset $s \subseteq E$, and any point $x \in E$, the constant function $f : E \to F$ defined by $f(y) = n$ for all $y \in E$ is differentiable at $x$ within the set $s$.
differentiableWithinAt_intCast theorem
[IntCast F] (z : ℤ) : DifferentiableWithinAt 𝕜 (z : E → F) s x
Full source
@[fun_prop]
theorem differentiableWithinAt_intCast [IntCast F] (z : ) :
    DifferentiableWithinAt 𝕜 (z : E → F) s x := differentiableWithinAt_const _
Differentiability of Integer Constant Functions Within a Subset
Informal description
For any integer $z \in \mathbb{Z}$ and any subset $s \subseteq E$ in normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$, the constant function $f : E \to F$ defined by $f(y) = z$ for all $y \in E$ is differentiable at any point $x \in E$ within the set $s$.
differentiableWithinAt_ofNat theorem
(n : ℕ) [OfNat F n] : DifferentiableWithinAt 𝕜 (ofNat(n) : E → F) s x
Full source
@[fun_prop]
theorem differentiableWithinAt_ofNat (n : ) [OfNat F n] :
    DifferentiableWithinAt 𝕜 (ofNat(n) : E → F) s x := differentiableWithinAt_const _
Differentiability of Numeric Constant Function Within a Subset
Informal description
For any natural number $n$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ with an instance of `OfNat F n`, the constant function $f : E \to F$ defined by $f(x) = n$ for all $x \in E$ is differentiable at any point $x \in E$ within any subset $s \subseteq E$.
fderivWithin_const_apply theorem
(c : F) : fderivWithin 𝕜 (fun _ => c) s x = 0
Full source
theorem fderivWithin_const_apply (c : F) : fderivWithin 𝕜 (fun _ => c) s x = 0 := by
  rw [fderivWithin, if_pos]
  apply hasFDerivWithinAt_const
Fréchet derivative of a constant function within a set is zero
Informal description
For any constant function $f : E \to F$ defined by $f(x) = c$ for some $c \in F$, the Fréchet derivative of $f$ at any point $x \in E$ within any set $s \subseteq E$ is the zero continuous linear map, i.e., $\text{fderivWithin}_{\mathbb{K}} f s x = 0$.
fderivWithin_const theorem
(c : F) : fderivWithin 𝕜 (fun _ ↦ c) s = 0
Full source
@[simp]
theorem fderivWithin_const (c : F) : fderivWithin 𝕜 (fun _ ↦ c) s = 0 := by
  ext
  rw [fderivWithin_const_apply, Pi.zero_apply]
Fréchet derivative of a constant function is zero
Informal description
For any constant function $f : E \to F$ defined by $f(x) = c$ for some $c \in F$, the Fréchet derivative of $f$ within any set $s \subseteq E$ is identically zero, i.e., $\text{fderivWithin}_{\mathbb{K}} f s = 0$.
fderivWithin_zero theorem
: fderivWithin 𝕜 (0 : E → F) s = 0
Full source
@[simp]
theorem fderivWithin_zero : fderivWithin 𝕜 (0 : E → F) s = 0 := fderivWithin_const _
Fréchet Derivative of Zero Function is Zero
Informal description
The Fréchet derivative of the zero function $0 : E \to F$ within any set $s \subseteq E$ is the zero continuous linear map, i.e., $\text{fderivWithin}_{\mathbb{K}} 0 s = 0$.
fderivWithin_one theorem
[One F] : fderivWithin 𝕜 (1 : E → F) s = 0
Full source
@[simp]
theorem fderivWithin_one [One F] : fderivWithin 𝕜 (1 : E → F) s = 0 := fderivWithin_const _
Fréchet derivative of the constant one function is zero
Informal description
For the constant function $f : E \to F$ defined by $f(x) = 1$ (where $F$ has a multiplicative identity element $1$), the Fréchet derivative of $f$ within any set $s \subseteq E$ is identically zero, i.e., $\text{fderivWithin}_{\mathbb{K}} f s = 0$.
fderivWithin_natCast theorem
[NatCast F] (n : ℕ) : fderivWithin 𝕜 (n : E → F) s = 0
Full source
@[simp]
theorem fderivWithin_natCast [NatCast F] (n : ) : fderivWithin 𝕜 (n : E → F) s = 0 :=
  fderivWithin_const _
Fréchet Derivative of a Constant Natural Number Function is Zero
Informal description
For any natural number $n$ and any function $f : E \to F$ that is constant and equal to $n$ (where $F$ has a natural number cast), the Fréchet derivative of $f$ within any set $s \subseteq E$ is identically zero, i.e., $\text{fderivWithin}_{\mathbb{K}} f s = 0$.
fderivWithin_intCast theorem
[IntCast F] (z : ℤ) : fderivWithin 𝕜 (z : E → F) s = 0
Full source
@[simp]
theorem fderivWithin_intCast [IntCast F] (z : ) : fderivWithin 𝕜 (z : E → F) s = 0 :=
  fderivWithin_const _
Fréchet derivative of integer constant function is zero
Informal description
For any integer $z \in \mathbb{Z}$ and any set $s \subseteq E$, the Fréchet derivative within $s$ of the constant function $f : E \to F$ defined by $f(x) = z$ (where $F$ has an integer casting operation) is identically zero, i.e., $\text{fderivWithin}_{\mathbb{K}} f s = 0$.
fderivWithin_ofNat theorem
(n : ℕ) [OfNat F n] : fderivWithin 𝕜 (ofNat(n) : E → F) s = 0
Full source
@[simp low]
theorem fderivWithin_ofNat (n : ) [OfNat F n] : fderivWithin 𝕜 (ofNat(n) : E → F) s = 0 :=
  fderivWithin_const _
Fréchet derivative of a constant numeral function is zero
Informal description
For any natural number $n$ and any type $F$ with a canonical element corresponding to $n$, the Fréchet derivative within a set $s$ of the constant function $x \mapsto n$ (where $n$ is interpreted in $F$) is identically zero, i.e., $\text{fderivWithin}_{\mathbb{K}} (\lambda x, n) s = 0$.
fderiv_const_apply theorem
(c : F) : fderiv 𝕜 (fun _ => c) x = 0
Full source
theorem fderiv_const_apply (c : F) : fderiv 𝕜 (fun _ => c) x = 0 :=
  (hasFDerivAt_const c x).fderiv
Fréchet derivative of a constant function at a point is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$. For any constant $c \in F$ and any point $x \in E$, the Fréchet derivative of the constant function $f : E \to F$ defined by $f(y) = c$ for all $y \in E$ is zero at $x$, i.e., $\text{fderiv}_{\mathbb{K}} f x = 0$.
fderiv_const theorem
(c : F) : (fderiv 𝕜 fun _ : E => c) = 0
Full source
@[simp]
theorem fderiv_const (c : F) : (fderiv 𝕜 fun _ : E => c) = 0 := by
  rw [← fderivWithin_univ, fderivWithin_const]
Fréchet derivative of a constant function is zero
Informal description
For any constant function $f : E \to F$ defined by $f(x) = c$ for some $c \in F$, the Fréchet derivative of $f$ is identically zero, i.e., $\text{fderiv}_{\mathbb{K}} f = 0$.
fderiv_zero theorem
: fderiv 𝕜 (0 : E → F) = 0
Full source
@[simp]
theorem fderiv_zero : fderiv 𝕜 (0 : E → F) = 0 := fderiv_const _
Fréchet derivative of the zero function is zero
Informal description
The Fréchet derivative of the zero function $0 : E \to F$ is identically zero, i.e., $\text{fderiv}_{\mathbb{K}} 0 = 0$.
fderiv_one theorem
[One F] : fderiv 𝕜 (1 : E → F) = 0
Full source
@[simp]
theorem fderiv_one [One F] : fderiv 𝕜 (1 : E → F) = 0 := fderiv_const _
Fréchet derivative of the constant one function is zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and assume $F$ has a multiplicative identity element $1$. Then the Fréchet derivative of the constant function $f : E \to F$ defined by $f(x) = 1$ for all $x \in E$ is the zero map, i.e., $\text{fderiv}_{\mathbb{K}} f = 0$.
fderiv_natCast theorem
[NatCast F] (n : ℕ) : fderiv 𝕜 (n : E → F) = 0
Full source
@[simp]
theorem fderiv_natCast [NatCast F] (n : ) : fderiv 𝕜 (n : E → F) = 0 := fderiv_const _
Fréchet derivative of a constant natural number function is zero
Informal description
Let $E$ and $F$ be normed spaces over a nontrivially normed field $\mathbb{K}$, and let $F$ have a natural number casting operation. For any natural number $n \in \mathbb{N}$, the Fréchet derivative of the constant function $f : E \to F$ defined by $f(x) = n$ is the zero continuous linear map, i.e., $\text{fderiv}_{\mathbb{K}} f = 0$.
fderiv_intCast theorem
[IntCast F] (z : ℤ) : fderiv 𝕜 (z : E → F) = 0
Full source
@[simp]
theorem fderiv_intCast [IntCast F] (z : ) : fderiv 𝕜 (z : E → F) = 0 := fderiv_const _
Fréchet Derivative of Integer Constant Function is Zero
Informal description
For any integer $z \in \mathbb{Z}$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ with an integer casting operation, the Fréchet derivative of the constant function $f : E \to F$ defined by $f(x) = z$ for all $x \in E$ is identically zero, i.e., $\text{fderiv}_{\mathbb{K}} f = 0$.
fderiv_ofNat theorem
(n : ℕ) [OfNat F n] : fderiv 𝕜 (ofNat(n) : E → F) = 0
Full source
@[simp low]
theorem fderiv_ofNat (n : ) [OfNat F n] : fderiv 𝕜 (ofNat(n) : E → F) = 0 := fderiv_const _
Fréchet derivative of a constant natural number function is zero
Informal description
For any natural number $n$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ with an instance of `OfNat F n`, the Fréchet derivative of the constant function $f : E \to F$ defined by $f(x) = n$ (where $n$ is interpreted as an element of $F$) is identically zero, i.e., $\text{fderiv}_{\mathbb{K}} f = 0$.
differentiable_const theorem
(c : F) : Differentiable 𝕜 fun _ : E => c
Full source
@[simp, fun_prop]
theorem differentiable_const (c : F) : Differentiable 𝕜 fun _ : E => c := fun _ =>
  differentiableAt_const _
Differentiability of Constant Functions
Informal description
For any constant $c \in F$ in a normed space $F$ over a non-discrete normed field $\mathbb{K}$, the constant function $f : E \to F$ defined by $f(x) = c$ for all $x \in E$ is differentiable on the entire normed space $E$.
differentiable_zero theorem
: Differentiable 𝕜 (0 : E → F)
Full source
@[simp, fun_prop]
theorem differentiable_zero :
    Differentiable 𝕜 (0 : E → F) := differentiable_const _
Differentiability of the Zero Function
Informal description
The zero function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$ is differentiable everywhere on $E$.
differentiable_one theorem
[One F] : Differentiable 𝕜 (1 : E → F)
Full source
@[simp, fun_prop]
theorem differentiable_one [One F] :
    Differentiable 𝕜 (1 : E → F) := differentiable_const _
Differentiability of the Constant One Function
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and assume $F$ has a multiplicative identity element $1$. Then the constant function $f : E \to F$ defined by $f(x) = 1$ for all $x \in E$ is differentiable on $E$.
differentiable_natCast theorem
[NatCast F] (n : ℕ) : Differentiable 𝕜 (n : E → F)
Full source
@[simp, fun_prop]
theorem differentiable_natCast [NatCast F] (n : ) :
    Differentiable 𝕜 (n : E → F) := differentiable_const _
Differentiability of Constant Natural Number Functions
Informal description
For any natural number $n$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ that has a natural number casting operation, the constant function $f : E \to F$ defined by $f(x) = n$ for all $x \in E$ is differentiable on the entire normed space $E$.
differentiable_intCast theorem
[IntCast F] (z : ℤ) : Differentiable 𝕜 (z : E → F)
Full source
@[simp, fun_prop]
theorem differentiable_intCast [IntCast F] (z : ) :
    Differentiable 𝕜 (z : E → F) := differentiable_const _
Differentiability of Integer Constant Functions
Informal description
For any integer $z \in \mathbb{Z}$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ with an integer casting operation, the constant function $f : E \to F$ defined by $f(x) = z$ for all $x \in E$ is differentiable on the entire normed space $E$.
differentiable_ofNat theorem
(n : ℕ) [OfNat F n] : Differentiable 𝕜 (ofNat(n) : E → F)
Full source
@[simp low, fun_prop]
theorem differentiable_ofNat (n : ) [OfNat F n] :
    Differentiable 𝕜 (ofNat(n) : E → F) := differentiable_const _
Differentiability of Constant Function Defined by Natural Number Literal
Informal description
For any natural number $n$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ that has a canonical element corresponding to $n$, the constant function $f : E \to F$ defined by $f(x) = n$ for all $x \in E$ is differentiable on the entire normed space $E$.
differentiableOn_const theorem
(c : F) : DifferentiableOn 𝕜 (fun _ => c) s
Full source
@[simp, fun_prop]
theorem differentiableOn_const (c : F) : DifferentiableOn 𝕜 (fun _ => c) s :=
  (differentiable_const _).differentiableOn
Differentiability of Constant Functions on Subsets
Informal description
For any constant $c \in F$ in a normed space $F$ over a non-discrete normed field $\mathbb{K}$, the constant function $f : E \to F$ defined by $f(x) = c$ for all $x \in E$ is differentiable on any subset $s \subseteq E$ of the normed space $E$.
differentiableOn_zero theorem
: DifferentiableOn 𝕜 (0 : E → F) s
Full source
@[simp, fun_prop]
theorem differentiableOn_zero :
    DifferentiableOn 𝕜 (0 : E → F) s := differentiableOn_const _
Differentiability of the Zero Function on Subsets
Informal description
The zero function $f : E \to F$ between normed spaces $E$ and $F$ over a non-discrete normed field $\mathbb{K}$ is differentiable on any subset $s \subseteq E$.
differentiableOn_one theorem
[One F] : DifferentiableOn 𝕜 (1 : E → F) s
Full source
@[simp, fun_prop]
theorem differentiableOn_one [One F] :
    DifferentiableOn 𝕜 (1 : E → F) s := differentiableOn_const _
Differentiability of the Constant One Function on Subsets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, where $F$ has a multiplicative identity element $1$. Then the constant function $f : E \to F$ defined by $f(x) = 1$ for all $x \in E$ is differentiable on any subset $s \subseteq E$.
differentiableOn_natCast theorem
[NatCast F] (n : ℕ) : DifferentiableOn 𝕜 (n : E → F) s
Full source
@[simp, fun_prop]
theorem differentiableOn_natCast [NatCast F] (n : ) :
    DifferentiableOn 𝕜 (n : E → F) s := differentiableOn_const _
Differentiability of Natural Number Constant Functions on Subsets
Informal description
For any natural number $n$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ that has a natural number cast operation, the constant function $f : E \to F$ defined by $f(x) = n$ for all $x \in E$ is differentiable on any subset $s \subseteq E$ of a normed space $E$.
differentiableOn_intCast theorem
[IntCast F] (z : ℤ) : DifferentiableOn 𝕜 (z : E → F) s
Full source
@[simp, fun_prop]
theorem differentiableOn_intCast [IntCast F] (z : ) :
    DifferentiableOn 𝕜 (z : E → F) s := differentiableOn_const _
Differentiability of Integer Constant Functions on Subsets
Informal description
For any integer $z \in \mathbb{Z}$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ that has an integer casting operation, the constant function $f : E \to F$ defined by $f(x) = z$ for all $x \in E$ is differentiable on any subset $s \subseteq E$ of the normed space $E$.
differentiableOn_ofNat theorem
(n : ℕ) [OfNat F n] : DifferentiableOn 𝕜 (ofNat(n) : E → F) s
Full source
@[simp low, fun_prop]
theorem differentiableOn_ofNat (n : ) [OfNat F n] :
    DifferentiableOn 𝕜 (ofNat(n) : E → F) s := differentiableOn_const _
Differentiability of Numeric Constant Functions on Subsets
Informal description
For any natural number $n$ and any normed space $F$ over a non-discrete normed field $\mathbb{K}$ with an instance of `OfNat F n`, the constant function $f : E \to F$ defined by $f(x) = n$ for all $x \in E$ is differentiable on any subset $s \subseteq E$ of the normed space $E$.
hasFDerivWithinAt_singleton theorem
(f : E → F) (x : E) : HasFDerivWithinAt f (0 : E →L[𝕜] F) { x } x
Full source
@[fun_prop]
theorem hasFDerivWithinAt_singleton (f : E → F) (x : E) :
    HasFDerivWithinAt f (0 : E →L[𝕜] F) {x} x := by
  simp only [HasFDerivWithinAt, nhdsWithin_singleton, hasFDerivAtFilter_iff_isLittleO,
    isLittleO_pure, ContinuousLinearMap.zero_apply, sub_self]
Zero Derivative of a Function on a Singleton Set
Informal description
For any function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \), and for any point \( x \in E \), the function \( f \) has the zero continuous linear map \( 0 : E \toL[\mathbb{K}] F \) as its Fréchet derivative at \( x \) within the singleton set \( \{x\} \).
hasFDerivAt_of_subsingleton theorem
[h : Subsingleton E] (f : E → F) (x : E) : HasFDerivAt f (0 : E →L[𝕜] F) x
Full source
@[fun_prop]
theorem hasFDerivAt_of_subsingleton [h : Subsingleton E] (f : E → F) (x : E) :
    HasFDerivAt f (0 : E →L[𝕜] F) x := by
  rw [← hasFDerivWithinAt_univ, subsingleton_univ.eq_singleton_of_mem (mem_univ x)]
  exact hasFDerivWithinAt_singleton f x
Zero Derivative for Functions on Subsingleton Normed Spaces
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, with $E$ being a subsingleton (i.e., having at most one element). Then for any function $f : E \to F$ and any point $x \in E$, $f$ has Fréchet derivative $0$ at $x$.
differentiableOn_empty theorem
: DifferentiableOn 𝕜 f ∅
Full source
@[fun_prop]
theorem differentiableOn_empty : DifferentiableOn 𝕜 f  := fun _ => False.elim
Differentiability on the Empty Set
Informal description
For any function \( f : E \to F \) between normed spaces \( E \) and \( F \) over a non-discrete normed field \( \mathbb{K} \), the function \( f \) is differentiable on the empty set \( \emptyset \).
Set.Subsingleton.differentiableOn theorem
(hs : s.Subsingleton) : DifferentiableOn 𝕜 f s
Full source
@[fun_prop]
theorem Set.Subsingleton.differentiableOn (hs : s.Subsingleton) : DifferentiableOn 𝕜 f s :=
  hs.induction_on differentiableOn_empty fun _ => differentiableOn_singleton
Differentiability on Subsingleton Sets
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If a set $s \subseteq E$ is a subsingleton (i.e., contains at most one element), then $f$ is differentiable on $s$.
hasFDerivAt_zero_of_eventually_const theorem
(c : F) (hf : f =ᶠ[𝓝 x] fun _ => c) : HasFDerivAt f (0 : E →L[𝕜] F) x
Full source
theorem hasFDerivAt_zero_of_eventually_const (c : F) (hf : f =ᶠ[𝓝 x] fun _ => c) :
    HasFDerivAt f (0 : E →L[𝕜] F) x :=
  (hasFDerivAt_const _ _).congr_of_eventuallyEq hf
Fréchet Derivative of Locally Constant Function is Zero
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If there exists a constant $c \in F$ such that $f$ is eventually equal to the constant function $\lambda \_. c$ in a neighborhood of $x \in E$, then $f$ has Fréchet derivative $0 : E \toL[\mathbb{K}] F$ at $x$.
differentiableWithinAt_of_isInvertible_fderivWithin theorem
(hf : (fderivWithin 𝕜 f s x).IsInvertible) : DifferentiableWithinAt 𝕜 f s x
Full source
theorem differentiableWithinAt_of_isInvertible_fderivWithin
    (hf : (fderivWithin 𝕜 f s x).IsInvertible) : DifferentiableWithinAt 𝕜 f s x := by
  contrapose hf
  rw [fderivWithin_zero_of_not_differentiableWithinAt hf]
  contrapose! hf
  rcases isInvertible_zero_iff.1 hf with ⟨hE, hF⟩
  exact (hasFDerivAt_of_subsingleton _ _).differentiableAt.differentiableWithinAt
Invertibility of Fréchet Derivative Implies Differentiability Within a Set
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If the Fréchet derivative of $f$ at a point $x \in E$ within a set $s \subseteq E$ is an invertible continuous linear map, then $f$ is differentiable at $x$ within $s$.
differentiableAt_of_isInvertible_fderiv theorem
(hf : (fderiv 𝕜 f x).IsInvertible) : DifferentiableAt 𝕜 f x
Full source
theorem differentiableAt_of_isInvertible_fderiv
    (hf : (fderiv 𝕜 f x).IsInvertible) : DifferentiableAt 𝕜 f x := by
  simp only [← differentiableWithinAt_univ, ← fderivWithin_univ] at hf ⊢
  exact differentiableWithinAt_of_isInvertible_fderivWithin hf
Invertibility of Fréchet Derivative Implies Differentiability at a Point
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If the Fréchet derivative of $f$ at a point $x \in E$ is an invertible continuous linear map, then $f$ is differentiable at $x$.
HasFDerivAt.le_of_lip' theorem
{f : E → F} {f' : E →L[𝕜] F} {x₀ : E} (hf : HasFDerivAt f f' x₀) {C : ℝ} (hC₀ : 0 ≤ C) (hlip : ∀ᶠ x in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖) : ‖f'‖ ≤ C
Full source
/-- Converse to the mean value inequality: if `f` is differentiable at `x₀` and `C`-lipschitz
on a neighborhood of `x₀` then its derivative at `x₀` has norm bounded by `C`. This version
only assumes that `‖f x - f x₀‖ ≤ C * ‖x - x₀‖` in a neighborhood of `x`. -/
theorem HasFDerivAt.le_of_lip' {f : E → F} {f' : E →L[𝕜] F} {x₀ : E} (hf : HasFDerivAt f f' x₀)
    {C : } (hC₀ : 0 ≤ C) (hlip : ∀ᶠ x in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖) : ‖f'‖ ≤ C := by
  refine le_of_forall_pos_le_add fun ε ε0 => opNorm_le_of_nhds_zero ?_ ?_
  · exact add_nonneg hC₀ ε0.le
  rw [← map_add_left_nhds_zero x₀, eventually_map] at hlip
  filter_upwards [isLittleO_iff.1 (hasFDerivAt_iff_isLittleO_nhds_zero.1 hf) ε0, hlip] with y hy hyC
  rw [add_sub_cancel_left] at hyC
  calc
    ‖f' y‖‖f (x₀ + y) - f x₀‖ + ‖f (x₀ + y) - f x₀ - f' y‖ := norm_le_insert _ _
    _ ≤ C * ‖y‖ + ε * ‖y‖ := add_le_add hyC hy
    _ = (C + ε) * ‖y‖ := (add_mul _ _ _).symm
Operator Norm Bound via Local Lipschitz Condition: $\|f'\| \leq C$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function that is Fréchet differentiable at a point $x_0 \in E$ with derivative $f'$. If there exists a constant $C \geq 0$ such that for all $x$ in a neighborhood of $x_0$, the inequality $\|f(x) - f(x_0)\| \leq C \|x - x_0\|$ holds, then the operator norm of $f'$ satisfies $\|f'\| \leq C$.
HasFDerivAt.le_of_lipschitzOn theorem
{f : E → F} {f' : E →L[𝕜] F} {x₀ : E} (hf : HasFDerivAt f f' x₀) {s : Set E} (hs : s ∈ 𝓝 x₀) {C : ℝ≥0} (hlip : LipschitzOnWith C f s) : ‖f'‖ ≤ C
Full source
/-- Converse to the mean value inequality: if `f` is differentiable at `x₀` and `C`-lipschitz
on a neighborhood of `x₀` then its derivative at `x₀` has norm bounded by `C`. -/
theorem HasFDerivAt.le_of_lipschitzOn
    {f : E → F} {f' : E →L[𝕜] F} {x₀ : E} (hf : HasFDerivAt f f' x₀)
    {s : Set E} (hs : s ∈ 𝓝 x₀) {C : ℝ≥0} (hlip : LipschitzOnWith C f s) : ‖f'‖ ≤ C := by
  refine hf.le_of_lip' C.coe_nonneg ?_
  filter_upwards [hs] with x hx using hlip.norm_sub_le hx (mem_of_mem_nhds hs)
Operator norm bound via local Lipschitz condition: $\|f'\| \leq C$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function that is Fréchet differentiable at a point $x_0 \in E$ with derivative $f'$. If there exists a neighborhood $s$ of $x_0$ and a constant $C \geq 0$ such that $f$ is $C$-Lipschitz on $s$, then the operator norm of $f'$ satisfies $\|f'\| \leq C$.
HasFDerivAt.le_of_lipschitz theorem
{f : E → F} {f' : E →L[𝕜] F} {x₀ : E} (hf : HasFDerivAt f f' x₀) {C : ℝ≥0} (hlip : LipschitzWith C f) : ‖f'‖ ≤ C
Full source
/-- Converse to the mean value inequality: if `f` is differentiable at `x₀` and `C`-lipschitz
then its derivative at `x₀` has norm bounded by `C`. -/
theorem HasFDerivAt.le_of_lipschitz {f : E → F} {f' : E →L[𝕜] F} {x₀ : E} (hf : HasFDerivAt f f' x₀)
    {C : ℝ≥0} (hlip : LipschitzWith C f) : ‖f'‖ ≤ C :=
  hf.le_of_lipschitzOn univ_mem (lipschitzOnWith_univ.2 hlip)
Operator norm bound via global Lipschitz condition: $\|f'\| \leq C$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function that is Fréchet differentiable at a point $x_0 \in E$ with derivative $f'$. If $f$ is Lipschitz continuous with constant $C \geq 0$ on the entire space $E$, then the operator norm of $f'$ satisfies $\|f'\| \leq C$.
norm_fderiv_le_of_lip' theorem
{f : E → F} {x₀ : E} {C : ℝ} (hC₀ : 0 ≤ C) (hlip : ∀ᶠ x in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖) : ‖fderiv 𝕜 f x₀‖ ≤ C
Full source
/-- Converse to the mean value inequality: if `f` is `C`-lipschitz
on a neighborhood of `x₀` then its derivative at `x₀` has norm bounded by `C`. This version
only assumes that `‖f x - f x₀‖ ≤ C * ‖x - x₀‖` in a neighborhood of `x`. -/
theorem norm_fderiv_le_of_lip' {f : E → F} {x₀ : E}
    {C : } (hC₀ : 0 ≤ C) (hlip : ∀ᶠ x in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖) :
    ‖fderiv 𝕜 f x₀‖ ≤ C := by
  by_cases hf : DifferentiableAt 𝕜 f x₀
  · exact hf.hasFDerivAt.le_of_lip' hC₀ hlip
  · rw [fderiv_zero_of_not_differentiableAt hf]
    simp [hC₀]
Operator Norm Bound for Fréchet Derivative via Local Lipschitz Condition: $\|\text{fderiv}_{\mathbb{K}} f x_0\| \leq C$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. Suppose there exists a constant $C \geq 0$ such that for all $x$ in a neighborhood of $x_0 \in E$, the inequality $\|f(x) - f(x_0)\| \leq C \|x - x_0\|$ holds. Then the norm of the Fréchet derivative of $f$ at $x_0$ satisfies $\|\text{fderiv}_{\mathbb{K}} f x_0\| \leq C$.
norm_fderiv_le_of_lipschitzOn theorem
{f : E → F} {x₀ : E} {s : Set E} (hs : s ∈ 𝓝 x₀) {C : ℝ≥0} (hlip : LipschitzOnWith C f s) : ‖fderiv 𝕜 f x₀‖ ≤ C
Full source
/-- Converse to the mean value inequality: if `f` is `C`-lipschitz
on a neighborhood of `x₀` then its derivative at `x₀` has norm bounded by `C`.
Version using `fderiv`. -/
theorem norm_fderiv_le_of_lipschitzOn {f : E → F} {x₀ : E} {s : Set E} (hs : s ∈ 𝓝 x₀)
    {C : ℝ≥0} (hlip : LipschitzOnWith C f s) : ‖fderiv 𝕜 f x₀‖ ≤ C := by
  refine norm_fderiv_le_of_lip' 𝕜 C.coe_nonneg ?_
  filter_upwards [hs] with x hx using hlip.norm_sub_le hx (mem_of_mem_nhds hs)
Operator norm bound for Fréchet derivative via Lipschitz condition on a neighborhood: $\|\text{fderiv}_{\mathbb{K}} f x_0\| \leq C$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. Suppose there exists a neighborhood $s$ of $x_0 \in E$ and a constant $C \geq 0$ such that $f$ is Lipschitz continuous on $s$ with constant $C$. Then the norm of the Fréchet derivative of $f$ at $x_0$ satisfies $\|\text{fderiv}_{\mathbb{K}} f x_0\| \leq C$.
norm_fderiv_le_of_lipschitz theorem
{f : E → F} {x₀ : E} {C : ℝ≥0} (hlip : LipschitzWith C f) : ‖fderiv 𝕜 f x₀‖ ≤ C
Full source
/-- Converse to the mean value inequality: if `f` is `C`-lipschitz then
its derivative at `x₀` has norm bounded by `C`.
Version using `fderiv`. -/
theorem norm_fderiv_le_of_lipschitz {f : E → F} {x₀ : E}
    {C : ℝ≥0} (hlip : LipschitzWith C f) : ‖fderiv 𝕜 f x₀‖ ≤ C :=
  norm_fderiv_le_of_lipschitzOn 𝕜 univ_mem (lipschitzOnWith_univ.2 hlip)
Operator norm bound for Fréchet derivative via global Lipschitz condition: $\|\text{fderiv}_{\mathbb{K}} f x_0\| \leq C$
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function that is Lipschitz continuous with constant $C \geq 0$. Then the norm of the Fréchet derivative of $f$ at any point $x_0 \in E$ satisfies $\|\text{fderiv}_{\mathbb{K}} f x_0\| \leq C$.
HasStrictFDerivAt.of_nmem_tsupport theorem
(h : x ∉ tsupport f) : HasStrictFDerivAt f (0 : E →L[𝕜] F) x
Full source
theorem HasStrictFDerivAt.of_nmem_tsupport (h : x ∉ tsupport f) :
    HasStrictFDerivAt f (0 : E →L[𝕜] F) x := by
  rw [not_mem_tsupport_iff_eventuallyEq] at h
  exact (hasStrictFDerivAt_const (0 : F) x).congr_of_eventuallyEq h.symm
Strict Fréchet derivative is zero outside the topological support
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If a point $x \in E$ does not belong to the topological support of $f$ (i.e., $x \notin \text{tsupport}(f)$), then $f$ has strict Fréchet derivative $0$ at $x$.
HasFDerivAt.of_nmem_tsupport theorem
(h : x ∉ tsupport f) : HasFDerivAt f (0 : E →L[𝕜] F) x
Full source
theorem HasFDerivAt.of_nmem_tsupport (h : x ∉ tsupport f) :
    HasFDerivAt f (0 : E →L[𝕜] F) x :=
  (HasStrictFDerivAt.of_nmem_tsupport 𝕜 h).hasFDerivAt
Fréchet derivative is zero outside the topological support
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If a point $x \in E$ does not belong to the topological support of $f$ (i.e., $x \notin \text{tsupport}(f)$), then $f$ has Fréchet derivative $0$ at $x$.
HasFDerivWithinAt.of_not_mem_tsupport theorem
{s : Set E} {x : E} (h : x ∉ tsupport f) : HasFDerivWithinAt f (0 : E →L[𝕜] F) s x
Full source
theorem HasFDerivWithinAt.of_not_mem_tsupport {s : Set E} {x : E} (h : x ∉ tsupport f) :
    HasFDerivWithinAt f (0 : E →L[𝕜] F) s x :=
  (HasFDerivAt.of_nmem_tsupport 𝕜 h).hasFDerivWithinAt
Fréchet derivative is zero within any subset outside the topological support
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. For any subset $s \subseteq E$ and any point $x \in E$ not in the topological support of $f$ (i.e., $x \notin \text{tsupport}(f)$), the function $f$ has Fréchet derivative $0$ at $x$ within $s$.
fderiv_of_not_mem_tsupport theorem
(h : x ∉ tsupport f) : fderiv 𝕜 f x = 0
Full source
theorem fderiv_of_not_mem_tsupport (h : x ∉ tsupport f) : fderiv 𝕜 f x = 0 :=
  (HasFDerivAt.of_nmem_tsupport 𝕜 h).fderiv
Fréchet derivative vanishes outside topological support
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. If a point $x \in E$ does not belong to the topological support of $f$ (i.e., $x \notin \text{tsupport}(f)$), then the Fréchet derivative of $f$ at $x$ is the zero map, i.e., $\text{fderiv}_{\mathbb{K}} f x = 0$.
support_fderiv_subset theorem
: support (fderiv 𝕜 f) ⊆ tsupport f
Full source
theorem support_fderiv_subset : supportsupport (fderiv 𝕜 f) ⊆ tsupport f := fun x ↦ by
  rw [← not_imp_not, nmem_support]
  exact fderiv_of_not_mem_tsupport _
Support of Fréchet Derivative is Contained in Topological Support of Function
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. The support of the Fréchet derivative of $f$ is contained in the topological support of $f$, i.e., $\text{support}(\text{fderiv}_{\mathbb{K}} f) \subseteq \text{tsupport}(f)$.
tsupport_fderiv_subset theorem
: tsupport (fderiv 𝕜 f) ⊆ tsupport f
Full source
theorem tsupport_fderiv_subset : tsupporttsupport (fderiv 𝕜 f) ⊆ tsupport f :=
  closure_minimal (support_fderiv_subset 𝕜) isClosed_closure
Topological Support of Fréchet Derivative is Contained in Topological Support of Function
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function. The topological support of the Fréchet derivative of $f$ is contained in the topological support of $f$, i.e., $\text{tsupport}(\text{fderiv}_{\mathbb{K}} f) \subseteq \text{tsupport}(f)$.
HasCompactSupport.fderiv theorem
(hf : HasCompactSupport f) : HasCompactSupport (fderiv 𝕜 f)
Full source
protected theorem HasCompactSupport.fderiv (hf : HasCompactSupport f) :
    HasCompactSupport (fderiv 𝕜 f) :=
  hf.mono' <| support_fderiv_subset 𝕜
Compact Support of Function Implies Compact Support of Its Fréchet Derivative
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function with compact support. Then the Fréchet derivative $\text{fderiv}_{\mathbb{K}} f$ also has compact support.
HasCompactSupport.fderiv_apply theorem
(hf : HasCompactSupport f) (v : E) : HasCompactSupport (fderiv 𝕜 f · v)
Full source
protected theorem HasCompactSupport.fderiv_apply (hf : HasCompactSupport f) (v : E) :
    HasCompactSupport (fderiv 𝕜 f · v) :=
  hf.fderiv 𝕜 |>.comp_left (g := fun L : E →L[𝕜] F ↦ L v) rfl
Compact Support of Directional Derivatives for Functions with Compact Support
Informal description
Let $E$ and $F$ be normed spaces over a non-discrete normed field $\mathbb{K}$, and let $f : E \to F$ be a function with compact support. Then for any vector $v \in E$, the function $x \mapsto \text{fderiv}_{\mathbb{K}} f(x)(v)$ (the directional derivative of $f$ at $x$ in direction $v$) also has compact support.