Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: port Analysis.Calculus.FDeriv.RestrictScalars (#4186)
- Loading branch information
1 parent
d02b929
commit 7634824
Showing
2 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
/- | ||
Copyright (c) 2019 Jeremy Avigad. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Jeremy Avigad, SΓ©bastien GouΓ«zel, Yury Kudryashov | ||
! This file was ported from Lean 3 source module analysis.calculus.fderiv.restrict_scalars | ||
! leanprover-community/mathlib commit e3fb84046afd187b710170887195d50bada934ee | ||
! Please do not edit these lines, except to modify the commit id | ||
! if you have ported upstream changes. | ||
-/ | ||
import Mathlib.Analysis.Calculus.FDeriv.Basic | ||
|
||
/-! | ||
# The derivative of the scalar restriction of a linear map | ||
For detailed documentation of the FrΓ©chet derivative, | ||
see the module docstring of `Analysis/Calculus/FDeriv/Basic.lean`. | ||
This file contains the usual formulas (and existence assertions) for the derivative of | ||
the scalar restriction of a linear map. | ||
-/ | ||
|
||
|
||
open Filter Asymptotics ContinuousLinearMap Set Metric | ||
|
||
open Topology Classical NNReal Filter Asymptotics ENNReal | ||
|
||
noncomputable section | ||
|
||
section RestrictScalars | ||
|
||
/-! | ||
### Restricting from `β` to `β`, or generally from `π'` to `π` | ||
If a function is differentiable over `β`, then it is differentiable over `β`. In this paragraph, | ||
we give variants of this statement, in the general situation where `β` and `β` are replaced | ||
respectively by `π'` and `π` where `π'` is a normed algebra over `π`. | ||
-/ | ||
|
||
|
||
variable (π : Type _) [NontriviallyNormedField π] | ||
|
||
variable {π' : Type _} [NontriviallyNormedField π'] [NormedAlgebra π π'] | ||
|
||
variable {E : Type _} [NormedAddCommGroup E] [NormedSpace π E] [NormedSpace π' E] | ||
|
||
variable [IsScalarTower π π' E] | ||
|
||
variable {F : Type _} [NormedAddCommGroup F] [NormedSpace π F] [NormedSpace π' F] | ||
|
||
variable [IsScalarTower π π' F] | ||
|
||
variable {f : E β F} {f' : E βL[π'] F} {s : Set E} {x : E} | ||
|
||
theorem HasStrictFDerivAt.restrictScalars (h : HasStrictFDerivAt f f' x) : | ||
HasStrictFDerivAt f (f'.restrictScalars π) x := | ||
h | ||
#align has_strict_fderiv_at.restrict_scalars HasStrictFDerivAt.restrictScalars | ||
|
||
theorem HasFDerivAtFilter.restrictScalars {L} (h : HasFDerivAtFilter f f' x L) : | ||
HasFDerivAtFilter f (f'.restrictScalars π) x L := | ||
h | ||
#align has_fderiv_at_filter.restrict_scalars HasFDerivAtFilter.restrictScalars | ||
|
||
theorem HasFDerivAt.restrictScalars (h : HasFDerivAt f f' x) : | ||
HasFDerivAt f (f'.restrictScalars π) x := | ||
h | ||
#align has_fderiv_at.restrict_scalars HasFDerivAt.restrictScalars | ||
|
||
theorem HasFDerivWithinAt.restrictScalars (h : HasFDerivWithinAt f f' s x) : | ||
HasFDerivWithinAt f (f'.restrictScalars π) s x := | ||
h | ||
#align has_fderiv_within_at.restrict_scalars HasFDerivWithinAt.restrictScalars | ||
|
||
theorem DifferentiableAt.restrictScalars (h : DifferentiableAt π' f x) : DifferentiableAt π f x := | ||
(h.hasFDerivAt.restrictScalars π).differentiableAt | ||
#align differentiable_at.restrict_scalars DifferentiableAt.restrictScalars | ||
|
||
theorem DifferentiableWithinAt.restrictScalars (h : DifferentiableWithinAt π' f s x) : | ||
DifferentiableWithinAt π f s x := | ||
(h.hasFDerivWithinAt.restrictScalars π).differentiableWithinAt | ||
#align differentiable_within_at.restrict_scalars DifferentiableWithinAt.restrictScalars | ||
|
||
theorem DifferentiableOn.restrictScalars (h : DifferentiableOn π' f s) : DifferentiableOn π f s := | ||
fun x hx => (h x hx).restrictScalars π | ||
#align differentiable_on.restrict_scalars DifferentiableOn.restrictScalars | ||
|
||
theorem Differentiable.restrictScalars (h : Differentiable π' f) : Differentiable π f := fun x => | ||
(h x).restrictScalars π | ||
#align differentiable.restrict_scalars Differentiable.restrictScalars | ||
|
||
theorem hasFDerivWithinAt_of_restrictScalars {g' : E βL[π] F} (h : HasFDerivWithinAt f g' s x) | ||
(H : f'.restrictScalars π = g') : HasFDerivWithinAt f f' s x := by | ||
rw [β H] at h | ||
exact h | ||
#align has_fderiv_within_at_of_restrict_scalars hasFDerivWithinAt_of_restrictScalars | ||
|
||
theorem hasFDerivAt_of_restrictScalars {g' : E βL[π] F} (h : HasFDerivAt f g' x) | ||
(H : f'.restrictScalars π = g') : HasFDerivAt f f' x := by | ||
rw [β H] at h | ||
exact h | ||
#align has_fderiv_at_of_restrict_scalars hasFDerivAt_of_restrictScalars | ||
|
||
theorem DifferentiableAt.fderiv_restrictScalars (h : DifferentiableAt π' f x) : | ||
fderiv π f x = (fderiv π' f x).restrictScalars π := | ||
(h.hasFDerivAt.restrictScalars π).fderiv | ||
#align differentiable_at.fderiv_restrict_scalars DifferentiableAt.fderiv_restrictScalars | ||
|
||
theorem differentiableWithinAt_iff_restrictScalars (hf : DifferentiableWithinAt π f s x) | ||
(hs : UniqueDiffWithinAt π s x) : DifferentiableWithinAt π' f s x β | ||
β g' : E βL[π'] F, g'.restrictScalars π = fderivWithin π f s x := by | ||
constructor | ||
Β· rintro β¨g', hg'β© | ||
exact β¨g', hs.eq (hg'.restrictScalars π) hf.hasFDerivWithinAtβ© | ||
Β· rintro β¨f', hf'β© | ||
exact β¨f', hasFDerivWithinAt_of_restrictScalars π hf.hasFDerivWithinAt hf'β© | ||
#align differentiable_within_at_iff_restrict_scalars differentiableWithinAt_iff_restrictScalars | ||
|
||
theorem differentiableAt_iff_restrictScalars (hf : DifferentiableAt π f x) : | ||
DifferentiableAt π' f x β β g' : E βL[π'] F, g'.restrictScalars π = fderiv π f x := by | ||
rw [β differentiableWithinAt_univ, β fderivWithin_univ] | ||
exact | ||
differentiableWithinAt_iff_restrictScalars π hf.differentiableWithinAt uniqueDiffWithinAt_univ | ||
#align differentiable_at_iff_restrict_scalars differentiableAt_iff_restrictScalars | ||
|
||
end RestrictScalars |