analysis.calculus.cont_diff
β·
Mathlib.Analysis.Calculus.ContDiff.Bounds
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-/
-import Analysis.Calculus.ContDiffDef
+import Analysis.Calculus.ContDiff.Defs
import Analysis.Calculus.Deriv.Inverse
import Analysis.Calculus.MeanValue
import Analysis.NormedSpace.FiniteDimension
@@ -369,8 +369,8 @@ theorem ContinuousLinearMap.iteratedFDerivWithin_comp_left {f : E β F} (g : F
(hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β} (hi : (i : ββ) β€ n) :
iteratedFDerivWithin π i (g β f) s x =
g.compContinuousMultilinearMap (iteratedFDerivWithin π i f s x) :=
- (((hf.ftaylorSeriesWithin hs).continuousLinearMap_comp g).eq_ftaylor_series_of_uniqueDiffOn hi hs
- hx).symm
+ (((hf.ftaylorSeriesWithin hs).continuousLinearMap_comp g).eq_iteratedFDerivWithin_of_uniqueDiffOn
+ hi hs hx).symm
#align continuous_linear_map.iterated_fderiv_within_comp_left ContinuousLinearMap.iteratedFDerivWithin_comp_left
-/
@@ -582,8 +582,8 @@ theorem ContinuousLinearMap.iteratedFDerivWithin_comp_right {f : E β F} (g : G
(hx : g x β s) {i : β} (hi : (i : ββ) β€ n) :
iteratedFDerivWithin π i (f β g) (g β»ΒΉ' s) x =
(iteratedFDerivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
- (((hf.ftaylorSeriesWithin hs).compContinuousLinearMap g).eq_ftaylor_series_of_uniqueDiffOn hi h's
- hx).symm
+ (((hf.ftaylorSeriesWithin hs).compContinuousLinearMap g).eq_iteratedFDerivWithin_of_uniqueDiffOn
+ hi h's hx).symm
#align continuous_linear_map.iterated_fderiv_within_comp_right ContinuousLinearMap.iteratedFDerivWithin_comp_right
-/
@@ -1945,7 +1945,7 @@ theorem contDiff_prod {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'} (h : β i β t,
#print ContDiff.pow /-
theorem ContDiff.pow {f : E β πΈ} (hf : ContDiff π n f) : β m : β, ContDiff π n fun x => f x ^ m
| 0 => by simpa using contDiff_const
- | m + 1 => by simpa [pow_succ] using hf.mul (ContDiff.pow m)
+ | m + 1 => by simpa [pow_succ'] using hf.mul (ContDiff.pow m)
#align cont_diff.pow ContDiff.pow
-/
@@ -2554,7 +2554,7 @@ section Real
-/
-variable {π : Type _} [IsROrC π] {E' : Type _} [NormedAddCommGroup E'] [NormedSpace π E']
+variable {π : Type _} [RCLike π] {E' : Type _} [NormedAddCommGroup E'] [NormedSpace π E']
{F' : Type _} [NormedAddCommGroup F'] [NormedSpace π F']
#print HasFTaylorSeriesUpToOn.hasStrictFDerivAt /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -671,7 +671,7 @@ theorem ContinuousLinearEquiv.contDiffWithinAt_comp_iff (e : G βL[π] E) :
Β· intro H
simpa [β preimage_comp, (Β· β Β·)] using H.comp_continuous_linear_map (e.symm : E βL[π] G)
Β· intro H
- rw [β e.apply_symm_apply x, β e.coe_coe] at H
+ rw [β e.apply_symm_apply x, β e.coe_coe] at H
exact H.comp_continuous_linear_map _
#align continuous_linear_equiv.cont_diff_within_at_comp_iff ContinuousLinearEquiv.contDiffWithinAt_comp_iff
-/
@@ -877,7 +877,7 @@ theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F} (hg
ext y
simp only [Function.comp_apply, gu, fu]
rw [isoF.apply_symm_apply (f (isoE y))]
- rwa [this, isoE.cont_diff_on_comp_iff, isoG.symm.comp_cont_diff_on_iff] at main
+ rwa [this, isoE.cont_diff_on_comp_iff, isoG.symm.comp_cont_diff_on_iff] at main
#align cont_diff_on.comp ContDiffOn.comp
-/
@@ -934,7 +934,7 @@ theorem ContDiffWithinAt.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F
simp [hy1, hy2, vs hy2]
rw [A, β nhdsWithin_restrict'']
exact Filter.inter_mem this v_nhd
- rwa [insert_eq_of_mem xmem, this] at Z
+ rwa [insert_eq_of_mem xmem, this] at Z
#align cont_diff_within_at.comp ContDiffWithinAt.comp
-/
@@ -1356,7 +1356,7 @@ theorem ContDiffWithinAt.fderivWithin {f : E β F β G} {g : E β F} {t : Set
(hg : ContDiffWithinAt π m g s xβ) (ht : UniqueDiffOn π t) (hmn : m + 1 β€ n) (hxβ : xβ β s)
(hst : s β g β»ΒΉ' t) : ContDiffWithinAt π m (fun x => fderivWithin π (f x) t (g x)) s xβ :=
by
- rw [β insert_eq_self.mpr hxβ] at hf
+ rw [β insert_eq_self.mpr hxβ] at hf
refine' hf.fderiv_within' hg _ hmn hst
rw [insert_eq_self.mpr hxβ]
exact eventually_of_mem self_mem_nhdsWithin fun x hx => ht _ (hst hx)
@@ -2400,7 +2400,7 @@ theorem PartialHomeomorph.contDiffAt_symm [CompleteSpace E] (f : PartialHomeomor
have h_nhds : {y : E | β e : E βL[π] F, βe = f' y} β π (f.symm a) :=
by
have hfβ' := fβ'.nhds
- rw [β eq_fβ'] at hfβ'
+ rw [β eq_fβ'] at hfβ'
exact hf'.continuous_at.preimage_mem_nhds hfβ'
obtain β¨t, htu, ht, htfβ© := mem_nhds_iff.mp (Filter.inter_mem hu h_nhds)
use f.target β© f.symm β»ΒΉ' t
@@ -2575,7 +2575,7 @@ theorem ContDiffAt.hasStrictFDerivAt' {f : E' β F'} {f' : E' βL[π] F'} {x
(hf : ContDiffAt π n f x) (hf' : HasFDerivAt f f' x) (hn : 1 β€ n) : HasStrictFDerivAt f f' x :=
by
rcases hf 1 hn with β¨u, H, p, hpβ©
- simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
+ simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
have := hp.has_strict_fderiv_at le_rfl H
rwa [hf'.unique this.has_fderiv_at]
#align cont_diff_at.has_strict_fderiv_at' ContDiffAt.hasStrictFDerivAt'
@@ -2670,9 +2670,9 @@ theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGro
rcases metric.mem_nhds_within_iff.mp hst with β¨Ξ΅, Ξ΅0, hΞ΅β©
replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x Ξ΅ β© insert x s) := hp.mono hΞ΅
clear hst hΞ΅ t
- rw [β insert_eq_of_mem (Metric.mem_ball_self Ξ΅0), β insert_inter_distrib] at hp
+ rw [β insert_eq_of_mem (Metric.mem_ball_self Ξ΅0), β insert_inter_distrib] at hp
rcases hp.exists_lipschitz_on_with ((convex_ball _ _).inter hs) with β¨K, t, hst, hftβ©
- rw [inter_comm, β nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ Ξ΅0)] at hst
+ rw [inter_comm, β nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ Ξ΅0)] at hst
exact β¨K, t, hst, hftβ©
#align cont_diff_within_at.exists_lipschitz_on_with ContDiffWithinAt.exists_lipschitzOnWith
-/
@@ -2789,11 +2789,11 @@ theorem ContDiffOn.derivWithin (hf : ContDiffOn π n fβ sβ) (hs : UniqueDi
(hmn : m + 1 β€ n) : ContDiffOn π m (derivWithin fβ sβ) sβ :=
by
cases m
- Β· change β + 1 β€ n at hmn
+ Β· change β + 1 β€ n at hmn
have : n = β := by simpa using hmn
- rw [this] at hf
+ rw [this] at hf
exact ((contDiffOn_top_iff_derivWithin hs).1 hf).2
- Β· change (m.succ : ββ) β€ n at hmn
+ Β· change (m.succ : ββ) β€ n at hmn
exact ((contDiffOn_succ_iff_derivWithin hs).1 (hf.of_le hmn)).2
#align cont_diff_on.deriv_within ContDiffOn.derivWithin
-/
@@ -3114,13 +3114,13 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
intro i
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
+ rwa [β xu_x] at hx
have Ngu : β i, βiteratedFDerivWithin π i gu su xuβ = βiteratedFDerivWithin π i g s xβ :=
by
intro i
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
+ rwa [β xu_x] at hx
have NBu :
βiteratedFDerivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ =
βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ :=
@@ -3128,7 +3128,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
rw [Bu_eq]
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
+ rwa [β xu_x] at hx
-- state the bound for the lifted objects, and deduce the original bound from it.
have :
βiteratedFDerivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ β€
@@ -3137,7 +3137,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
(n.choose i : β) * βiteratedFDerivWithin π i fu su xuβ *
βiteratedFDerivWithin π (n - i) gu su xuβ :=
Bu.norm_iterated_fderiv_within_le_of_bilinear_aux hfu hgu hsu hxu
- simp only [Nfu, Ngu, NBu] at this
+ simp only [Nfu, Ngu, NBu] at this
apply this.trans (mul_le_mul_of_nonneg_right Bu_le _)
exact Finset.sum_nonneg' fun i => by positivity
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear
@@ -3302,7 +3302,7 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
βiteratedFDerivWithin π i (fderivWithin π g t β f) s xβ β€ i ! * C * D ^ i :=
by
intro i hi
- simp only [Finset.mem_range_succ_iff] at hi
+ simp only [Finset.mem_range_succ_iff] at hi
apply IH i hi
apply hf.of_le (Nat.cast_le.2 (hi.trans n.le_succ))
Β· intro j hj h'j
@@ -3443,7 +3443,7 @@ theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β}
by
intro i
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]
- simp_rw [β Nfu] at hD
+ simp_rw [β Nfu] at hD
have Ngu : β i, βiteratedFDerivWithin π i gu tu (fu x)β = βiteratedFDerivWithin π i g t (f x)β :=
by
intro i
@@ -3451,7 +3451,7 @@ theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β}
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ ht, Ffu]
rw [Ffu]
exact hst hx
- simp_rw [β Ngu] at hC
+ simp_rw [β Ngu] at hC
have Nfgu : βiteratedFDerivWithin π n (g β f) s xβ = βiteratedFDerivWithin π n (gu β fu) s xβ :=
by
have : gu β fu = isoG.symm β g β f := by
@@ -3523,7 +3523,7 @@ theorem norm_iteratedFDerivWithin_clm_apply_const {f : E β F βL[π] G} {c
by
let g : (F βL[π] G) βL[π] G := ContinuousLinearMap.apply π G c
have h := g.norm_comp_continuous_multilinear_map_le (iteratedFDerivWithin π n f s x)
- rw [β g.iterated_fderiv_within_comp_left hf hs hx hn] at h
+ rw [β g.iterated_fderiv_within_comp_left hf hs hx hn] at h
refine' h.trans (mul_le_mul_of_nonneg_right _ (norm_nonneg _))
refine' g.op_norm_le_bound (norm_nonneg _) fun f => _
rw [ContinuousLinearMap.apply_apply, mul_comm]
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -2960,7 +2960,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
induction' n with n IH generalizing Eu Fu Gu
Β· simp only [β mul_assoc, norm_iteratedFDerivWithin_zero, Finset.range_one, Finset.sum_singleton,
Nat.choose_self, algebraMap.coe_one, one_mul]
- apply ((B (f x)).le_op_norm (g x)).trans
+ apply ((B (f x)).le_opNorm (g x)).trans
apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)
exact B.le_op_norm (f x)
Β· have In : (n : ββ) + 1 β€ n.succ := by simp only [Nat.cast_succ, le_refl]
@@ -3087,15 +3087,15 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
-- All norms are preserved by the lifting process.
have Bu_le : βBuβ β€ βBβ :=
by
- refine' ContinuousLinearMap.op_norm_le_bound _ (norm_nonneg _) fun y => _
- refine' ContinuousLinearMap.op_norm_le_bound _ (by positivity) fun x => _
+ refine' ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) fun y => _
+ refine' ContinuousLinearMap.opNorm_le_bound _ (by positivity) fun x => _
simp only [Bu, ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
Function.comp_apply, LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply,
LinearIsometryEquiv.norm_map]
calc
- βB (isoE y) (isoF x)β β€ βB (isoE y)β * βisoF xβ := ContinuousLinearMap.le_op_norm _ _
+ βB (isoE y) (isoF x)β β€ βB (isoE y)β * βisoF xβ := ContinuousLinearMap.le_opNorm _ _
_ β€ βBβ * βisoE yβ * βisoF xβ :=
- (mul_le_mul_of_nonneg_right (ContinuousLinearMap.le_op_norm _ _) (norm_nonneg _))
+ (mul_le_mul_of_nonneg_right (ContinuousLinearMap.le_opNorm _ _) (norm_nonneg _))
_ = βBβ * βyβ * βxβ := by simp only [LinearIsometryEquiv.norm_map]
let su := isoD β»ΒΉ' s
have hsu : UniqueDiffOn π su := isoD.to_continuous_linear_equiv.unique_diff_on_preimage_iff.2 hs
@@ -3214,7 +3214,7 @@ theorem norm_iteratedFDerivWithin_smul_le {f : E β π'} {g : E β F} {N :
βiteratedFDerivWithin π (n - i) g s xβ :=
(ContinuousLinearMap.lsmul π π' :
π' βL[π] F βL[π] F).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
- hf hg hs hx hn ContinuousLinearMap.op_norm_lsmul_le
+ hf hg hs hx hn ContinuousLinearMap.opNorm_lsmul_le
#align norm_iterated_fderiv_within_smul_le norm_iteratedFDerivWithin_smul_le
-/
@@ -3225,7 +3225,7 @@ theorem norm_iteratedFDeriv_smul_le {f : E β π'} {g : E β F} {N : ββ}
β i in Finset.range (n + 1),
(n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ :=
(ContinuousLinearMap.lsmul π π' : π' βL[π] F βL[π] F).norm_iteratedFDeriv_le_of_bilinear_of_le_one
- hf hg x hn ContinuousLinearMap.op_norm_lsmul_le
+ hf hg x hn ContinuousLinearMap.opNorm_lsmul_le
#align norm_iterated_fderiv_smul_le norm_iteratedFDeriv_smul_le
-/
@@ -3245,7 +3245,7 @@ theorem norm_iteratedFDerivWithin_mul_le {f : E β A} {g : E β A} {N : ββ
βiteratedFDerivWithin π (n - i) g s xβ :=
(ContinuousLinearMap.mul π A :
A βL[π] A βL[π] A).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
- hf hg hs hx hn (ContinuousLinearMap.op_norm_mul_le _ _)
+ hf hg hs hx hn (ContinuousLinearMap.opNorm_mul_le _ _)
#align norm_iterated_fderiv_within_mul_le norm_iteratedFDerivWithin_mul_le
-/
@@ -3494,8 +3494,8 @@ theorem norm_iteratedFDerivWithin_clm_apply {f : E β F βL[π] G} {g : E
let B : (F βL[π] G) βL[π] F βL[π] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply π G)
have hB : βBβ β€ 1 :=
by
- simp only [ContinuousLinearMap.op_norm_flip, ContinuousLinearMap.apply]
- refine' ContinuousLinearMap.op_norm_le_bound _ zero_le_one fun f => _
+ simp only [ContinuousLinearMap.opNorm_flip, ContinuousLinearMap.apply]
+ refine' ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun f => _
simp only [ContinuousLinearMap.coe_id', id.def, one_mul]
exact B.norm_iterated_fderiv_within_le_of_bilinear_of_le_one hf hg hs hx hn hB
#align norm_iterated_fderiv_within_clm_apply norm_iteratedFDerivWithin_clm_apply
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1806,7 +1806,12 @@ theorem ContDiff.sub {f g : E β F} (hf : ContDiff π n f) (hg : ContDiff
#print ContDiffWithinAt.sum /-
theorem ContDiffWithinAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {t : Set E} {x : E}
(h : β i β s, ContDiffWithinAt π n (fun x => f i x) t x) :
- ContDiffWithinAt π n (fun x => β i in s, f i x) t x := by classical
+ ContDiffWithinAt π n (fun x => β i in s, f i x) t x := by
+ classical
+ induction' s using Finset.induction_on with i s is IH
+ Β· simp [contDiffWithinAt_const]
+ Β· simp only [is, Finset.sum_insert, not_false_iff]
+ exact (h _ (Finset.mem_insert_self i s)).add (IH fun j hj => h _ (Finset.mem_insert_of_mem hj))
#align cont_diff_within_at.sum ContDiffWithinAt.sum
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1806,12 +1806,7 @@ theorem ContDiff.sub {f g : E β F} (hf : ContDiff π n f) (hg : ContDiff
#print ContDiffWithinAt.sum /-
theorem ContDiffWithinAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {t : Set E} {x : E}
(h : β i β s, ContDiffWithinAt π n (fun x => f i x) t x) :
- ContDiffWithinAt π n (fun x => β i in s, f i x) t x := by
- classical
- induction' s using Finset.induction_on with i s is IH
- Β· simp [contDiffWithinAt_const]
- Β· simp only [is, Finset.sum_insert, not_false_iff]
- exact (h _ (Finset.mem_insert_self i s)).add (IH fun j hj => h _ (Finset.mem_insert_of_mem hj))
+ ContDiffWithinAt π n (fun x => β i in s, f i x) t x := by classical
#align cont_diff_within_at.sum ContDiffWithinAt.sum
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3393,7 +3393,7 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
simpa only [Ne.def, Nat.cast_eq_zero] using i.factorial_ne_zero
Β· rw [β pow_add]
congr 1
- rw [Nat.add_succ, Nat.succ_inj']
+ rw [Nat.add_succ, Nat.succ_inj]
exact Nat.add_sub_of_le (Finset.mem_range_succ_iff.1 hi)
_ β€ β i in Finset.range (n + 1), (n ! : β) * 1 * C * D ^ (n + 1) * 1 :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -2372,7 +2372,7 @@ section FunctionInverse
open ContinuousLinearMap
-#print LocalHomeomorph.contDiffAt_symm /-
+#print PartialHomeomorph.contDiffAt_symm /-
/-- If `f` is a local homeomorphism and the point `a` is in its target,
and if `f` is `n` times continuously differentiable at `f.symm a`,
and if the derivative at `f.symm a` is a continuous linear equivalence,
@@ -2380,7 +2380,7 @@ then `f.symm` is `n` times continuously differentiable at the point `a`.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
-theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E F)
+theorem PartialHomeomorph.contDiffAt_symm [CompleteSpace E] (f : PartialHomeomorph E F)
{fβ' : E βL[π] F} {a : F} (ha : a β f.target)
(hfβ' : HasFDerivAt f (fβ' : E βL[π] F) (f.symm a)) (hf : ContDiffAt π n f (f.symm a)) :
ContDiffAt π n f.symm a :=
@@ -2430,7 +2430,7 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
Β· refine' cont_diff_at_top.mpr _
intro n
exact Itop n (cont_diff_at_top.mp hf n)
-#align local_homeomorph.cont_diff_at_symm LocalHomeomorph.contDiffAt_symm
+#align local_homeomorph.cont_diff_at_symm PartialHomeomorph.contDiffAt_symm
-/
#print Homeomorph.contDiff_symm /-
@@ -2444,22 +2444,22 @@ theorem Homeomorph.contDiff_symm [CompleteSpace E] (f : E ββ F) {fβ' : E
(hfβ' : β a, HasFDerivAt f (fβ' a : E βL[π] F) a) (hf : ContDiff π n (f : E β F)) :
ContDiff π n (f.symm : F β E) :=
contDiff_iff_contDiffAt.2 fun x =>
- f.toLocalHomeomorph.contDiffAt_symm (mem_univ x) (hfβ' _) hf.ContDiffAt
+ f.toPartialHomeomorph.contDiffAt_symm (mem_univ x) (hfβ' _) hf.ContDiffAt
#align homeomorph.cont_diff_symm Homeomorph.contDiff_symm
-/
-#print LocalHomeomorph.contDiffAt_symm_deriv /-
+#print PartialHomeomorph.contDiffAt_symm_deriv /-
/-- Let `f` be a local homeomorphism of a nontrivially normed field, let `a` be a point in its
target. if `f` is `n` times continuously differentiable at `f.symm a`, and if the derivative at
`f.symm a` is nonzero, then `f.symm` is `n` times continuously differentiable at the point `a`.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
-theorem LocalHomeomorph.contDiffAt_symm_deriv [CompleteSpace π] (f : LocalHomeomorph π π)
+theorem PartialHomeomorph.contDiffAt_symm_deriv [CompleteSpace π] (f : PartialHomeomorph π π)
{fβ' a : π} (hβ : fβ' β 0) (ha : a β f.target) (hfβ' : HasDerivAt f fβ' (f.symm a))
(hf : ContDiffAt π n f (f.symm a)) : ContDiffAt π n f.symm a :=
f.contDiffAt_symm ha (hfβ'.hasFDerivAt_equiv hβ) hf
-#align local_homeomorph.cont_diff_at_symm_deriv LocalHomeomorph.contDiffAt_symm_deriv
+#align local_homeomorph.cont_diff_at_symm_deriv PartialHomeomorph.contDiffAt_symm_deriv
-/
#print Homeomorph.contDiff_symm_deriv /-
@@ -2473,7 +2473,7 @@ theorem Homeomorph.contDiff_symm_deriv [CompleteSpace π] (f : π ββ
(hβ : β x, f' x β 0) (hf' : β x, HasDerivAt f (f' x) x) (hf : ContDiff π n (f : π β π)) :
ContDiff π n (f.symm : π β π) :=
contDiff_iff_contDiffAt.2 fun x =>
- f.toLocalHomeomorph.contDiffAt_symm_deriv (hβ _) (mem_univ x) (hf' _) hf.ContDiffAt
+ f.toPartialHomeomorph.contDiffAt_symm_deriv (hβ _) (mem_univ x) (hf' _) hf.ContDiffAt
#align homeomorph.cont_diff_symm_deriv Homeomorph.contDiff_symm_deriv
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -2738,17 +2738,17 @@ theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ)
-/
/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
-#print contDiffOn_succ_iff_deriv_of_open /-
+#print contDiffOn_succ_iff_deriv_of_isOpen /-
/-- A function is `C^(n + 1)` on an open domain if and only if it is
differentiable there, and its derivative (formulated with `deriv`) is `C^n`. -/
-theorem contDiffOn_succ_iff_deriv_of_open {n : β} (hs : IsOpen sβ) :
+theorem contDiffOn_succ_iff_deriv_of_isOpen {n : β} (hs : IsOpen sβ) :
ContDiffOn π (n + 1 : β) fβ sβ β DifferentiableOn π fβ sβ β§ ContDiffOn π n (deriv fβ) sβ :=
by
rw [contDiffOn_succ_iff_derivWithin hs.unique_diff_on]
trace
"./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
- exact contDiffOn_congr fun _ => derivWithin_of_open hs
-#align cont_diff_on_succ_iff_deriv_of_open contDiffOn_succ_iff_deriv_of_open
+ exact contDiffOn_congr fun _ => derivWithin_of_isOpen hs
+#align cont_diff_on_succ_iff_deriv_of_open contDiffOn_succ_iff_deriv_of_isOpen
-/
#print contDiffOn_top_iff_derivWithin /-
@@ -2771,17 +2771,17 @@ theorem contDiffOn_top_iff_derivWithin (hs : UniqueDiffOn π sβ) :
-/
/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
-#print contDiffOn_top_iff_deriv_of_open /-
+#print contDiffOn_top_iff_deriv_of_isOpen /-
/-- A function is `C^β` on an open domain if and only if it is differentiable
there, and its derivative (formulated with `deriv`) is `C^β`. -/
-theorem contDiffOn_top_iff_deriv_of_open (hs : IsOpen sβ) :
+theorem contDiffOn_top_iff_deriv_of_isOpen (hs : IsOpen sβ) :
ContDiffOn π β fβ sβ β DifferentiableOn π fβ sβ β§ ContDiffOn π β (deriv fβ) sβ :=
by
rw [contDiffOn_top_iff_derivWithin hs.unique_diff_on]
trace
"./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
- exact contDiffOn_congr fun _ => derivWithin_of_open hs
-#align cont_diff_on_top_iff_deriv_of_open contDiffOn_top_iff_deriv_of_open
+ exact contDiffOn_congr fun _ => derivWithin_of_isOpen hs
+#align cont_diff_on_top_iff_deriv_of_open contDiffOn_top_iff_deriv_of_isOpen
-/
#print ContDiffOn.derivWithin /-
@@ -2798,11 +2798,11 @@ theorem ContDiffOn.derivWithin (hf : ContDiffOn π n fβ sβ) (hs : UniqueDi
#align cont_diff_on.deriv_within ContDiffOn.derivWithin
-/
-#print ContDiffOn.deriv_of_open /-
-theorem ContDiffOn.deriv_of_open (hf : ContDiffOn π n fβ sβ) (hs : IsOpen sβ) (hmn : m + 1 β€ n) :
+#print ContDiffOn.deriv_of_isOpen /-
+theorem ContDiffOn.deriv_of_isOpen (hf : ContDiffOn π n fβ sβ) (hs : IsOpen sβ) (hmn : m + 1 β€ n) :
ContDiffOn π m (deriv fβ) sβ :=
- (hf.derivWithin hs.UniqueDiffOn hmn).congr fun x hx => (derivWithin_of_open hs hx).symm
-#align cont_diff_on.deriv_of_open ContDiffOn.deriv_of_open
+ (hf.derivWithin hs.UniqueDiffOn hmn).congr fun x hx => (derivWithin_of_isOpen hs hx).symm
+#align cont_diff_on.deriv_of_open ContDiffOn.deriv_of_isOpen
-/
#print ContDiffOn.continuousOn_derivWithin /-
@@ -2812,11 +2812,11 @@ theorem ContDiffOn.continuousOn_derivWithin (h : ContDiffOn π n fβ sβ) (h
#align cont_diff_on.continuous_on_deriv_within ContDiffOn.continuousOn_derivWithin
-/
-#print ContDiffOn.continuousOn_deriv_of_open /-
-theorem ContDiffOn.continuousOn_deriv_of_open (h : ContDiffOn π n fβ sβ) (hs : IsOpen sβ)
+#print ContDiffOn.continuousOn_deriv_of_isOpen /-
+theorem ContDiffOn.continuousOn_deriv_of_isOpen (h : ContDiffOn π n fβ sβ) (hs : IsOpen sβ)
(hn : 1 β€ n) : ContinuousOn (deriv fβ) sβ :=
- ((contDiffOn_succ_iff_deriv_of_open hs).1 (h.of_le hn)).2.ContinuousOn
-#align cont_diff_on.continuous_on_deriv_of_open ContDiffOn.continuousOn_deriv_of_open
+ ((contDiffOn_succ_iff_deriv_of_isOpen hs).1 (h.of_le hn)).2.ContinuousOn
+#align cont_diff_on.continuous_on_deriv_of_open ContDiffOn.continuousOn_deriv_of_isOpen
-/
#print contDiff_succ_iff_deriv /-
@@ -2824,7 +2824,7 @@ theorem ContDiffOn.continuousOn_deriv_of_open (h : ContDiffOn π n fβ sβ)
and its derivative (formulated in terms of `deriv`) is `C^n`. -/
theorem contDiff_succ_iff_deriv {n : β} :
ContDiff π (n + 1 : β) fβ β Differentiable π fβ β§ ContDiff π n (deriv fβ) := by
- simp only [β contDiffOn_univ, contDiffOn_succ_iff_deriv_of_open, isOpen_univ,
+ simp only [β contDiffOn_univ, contDiffOn_succ_iff_deriv_of_isOpen, isOpen_univ,
differentiableOn_univ]
#align cont_diff_succ_iff_deriv contDiff_succ_iff_deriv
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-/
-import Mathbin.Analysis.Calculus.ContDiffDef
-import Mathbin.Analysis.Calculus.Deriv.Inverse
-import Mathbin.Analysis.Calculus.MeanValue
-import Mathbin.Analysis.NormedSpace.FiniteDimension
-import Mathbin.Data.Nat.Choose.Cast
+import Analysis.Calculus.ContDiffDef
+import Analysis.Calculus.Deriv.Inverse
+import Analysis.Calculus.MeanValue
+import Analysis.NormedSpace.FiniteDimension
+import Data.Nat.Choose.Cast
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"575b4ea3738b017e30fb205cb9b4a8742e5e82b6"
mathlib commit https://github.com/leanprover-community/mathlib/commit/442a83d738cb208d3600056c489be16900ba701d
@@ -1201,14 +1201,14 @@ theorem ContDiffOn.clm_comp {g : X β F βL[π] G} {f : X β E βL[π] F
#print ContDiff.clm_apply /-
theorem ContDiff.clm_apply {f : E β F βL[π] G} {g : E β F} {n : ββ} (hf : ContDiff π n f)
(hg : ContDiff π n g) : ContDiff π n fun x => (f x) (g x) :=
- isBoundedBilinearMapApply.ContDiff.compβ hf hg
+ isBoundedBilinearMap_apply.ContDiff.compβ hf hg
#align cont_diff.clm_apply ContDiff.clm_apply
-/
#print ContDiffOn.clm_apply /-
theorem ContDiffOn.clm_apply {f : E β F βL[π] G} {g : E β F} {n : ββ} (hf : ContDiffOn π n f s)
(hg : ContDiffOn π n g s) : ContDiffOn π n (fun x => (f x) (g x)) s :=
- isBoundedBilinearMapApply.ContDiff.comp_contDiff_onβ hf hg
+ isBoundedBilinearMap_apply.ContDiff.comp_contDiff_onβ hf hg
#align cont_diff_on.clm_apply ContDiffOn.clm_apply
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-
-! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 575b4ea3738b017e30fb205cb9b4a8742e5e82b6
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.ContDiffDef
import Mathbin.Analysis.Calculus.Deriv.Inverse
@@ -14,6 +9,8 @@ import Mathbin.Analysis.Calculus.MeanValue
import Mathbin.Analysis.NormedSpace.FiniteDimension
import Mathbin.Data.Nat.Choose.Cast
+#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"575b4ea3738b017e30fb205cb9b4a8742e5e82b6"
+
/-!
# Higher differentiability of usual operations
mathlib commit https://github.com/leanprover-community/mathlib/commit/2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
@@ -138,7 +138,7 @@ theorem iteratedFDeriv_zero_fun {n : β} : (iteratedFDeriv π n fun x : E =>
by
induction' n with n IH
Β· ext m; simp
- Β· ext (x m)
+ Β· ext x m
rw [iteratedFDeriv_succ_apply_left, IH]
change (fderiv π (fun x : E => (0 : E[Γn]βL[π] F)) x : E β E[Γn]βL[π] F) (m 0) (tail m) = _
rw [fderiv_const]
@@ -217,7 +217,7 @@ theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π n f s := b
#print iteratedFDeriv_succ_const /-
theorem iteratedFDeriv_succ_const (n : β) (c : F) : (iteratedFDeriv π (n + 1) fun y : E => c) = 0 :=
by
- ext (x m)
+ ext x m
simp only [iteratedFDeriv_succ_apply_right, fderiv_const, Pi.zero_apply, iteratedFDeriv_zero_fun,
ContinuousMultilinearMap.zero_apply, ContinuousLinearMap.zero_apply]
#align iterated_fderiv_succ_const iteratedFDeriv_succ_const
@@ -535,7 +535,7 @@ theorem HasFTaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFTaylorSeriesUpT
convert
(hA m).HasFDerivAt.comp_hasFDerivWithinAt x
((hf.fderiv_within m hm (g x) hx).comp x g.has_fderiv_within_at (subset.refl _))
- ext (y v)
+ ext y v
change p (g x) (Nat.succ m) (g β cons y v) = p (g x) m.succ (cons (g y) (g β v))
rw [comp_cons]
Β· intro m hm
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -49,7 +49,6 @@ noncomputable section
open scoped Classical BigOperators NNReal Nat
--- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
universe u v w uD uE uF uG
@@ -59,6 +58,7 @@ attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.to
namespace Finset
+#print Finset.sum_choose_succ_mul /-
-- TODO porting note: move the next two lemmas to the file `data.nat.choose.sum`
/-- The sum of `(n+1).choose i * f i (n+1-i)` can be split into two sums at rank `n`,
respectively of `n.choose i * f i (n+1-i)` and `n.choose i * f (i+1) (n-i)`. -/
@@ -89,7 +89,9 @@ theorem sum_choose_succ_mul {R : Type _} [Semiring R] (f : β β β β R) (n
rw [Finset.sum_add_distrib, β A]
abel
#align finset.sum_choose_succ_mul Finset.sum_choose_succ_mul
+-/
+#print Finset.sum_antidiagonal_choose_succ_mul /-
/-- The sum along the antidiagonal of `(n+1).choose i * f i j` can be split into two sums along the
antidiagonal at rank `n`, respectively of `n.choose i * f i (j+1)` and `n.choose j * f (i+1) j`. -/
theorem sum_antidiagonal_choose_succ_mul {R : Type _} [Semiring R] (f : β β β β R) (n : β) :
@@ -113,6 +115,7 @@ theorem sum_antidiagonal_choose_succ_mul {R : Type _} [Semiring R] (f : β β
apply Nat.choose_symm_of_eq_add
rw [β nat.mem_antidiagonal.1 hi, add_comm]
#align finset.sum_antidiagonal_choose_succ_mul Finset.sum_antidiagonal_choose_succ_mul
+-/
end Finset
@@ -129,6 +132,7 @@ variable {π : Type _} [NontriviallyNormedField π] {D : Type uD} [NormedAdd
/-! ### Constants -/
+#print iteratedFDeriv_zero_fun /-
@[simp]
theorem iteratedFDeriv_zero_fun {n : β} : (iteratedFDeriv π n fun x : E => (0 : F)) = 0 :=
by
@@ -140,14 +144,18 @@ theorem iteratedFDeriv_zero_fun {n : β} : (iteratedFDeriv π n fun x : E =>
rw [fderiv_const]
rfl
#align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun
+-/
+#print contDiff_zero_fun /-
theorem contDiff_zero_fun : ContDiff π n fun x : E => (0 : F) :=
by
apply contDiff_of_differentiable_iteratedFDeriv fun m hm => _
rw [iteratedFDeriv_zero_fun]
exact differentiable_const (0 : E[Γm]βL[π] F)
#align cont_diff_zero_fun contDiff_zero_fun
+-/
+#print contDiff_const /-
/-- Constants are `C^β`.
-/
theorem contDiff_const {c : F} : ContDiff π n fun x : E => c :=
@@ -158,56 +166,76 @@ theorem contDiff_const {c : F} : ContDiff π n fun x : E => c :=
rw [fderiv_const]
exact contDiff_zero_fun
#align cont_diff_const contDiff_const
+-/
+#print contDiffOn_const /-
theorem contDiffOn_const {c : F} {s : Set E} : ContDiffOn π n (fun x : E => c) s :=
contDiff_const.ContDiffOn
#align cont_diff_on_const contDiffOn_const
+-/
+#print contDiffAt_const /-
theorem contDiffAt_const {c : F} : ContDiffAt π n (fun x : E => c) x :=
contDiff_const.ContDiffAt
#align cont_diff_at_const contDiffAt_const
+-/
+#print contDiffWithinAt_const /-
theorem contDiffWithinAt_const {c : F} : ContDiffWithinAt π n (fun x : E => c) s x :=
contDiffAt_const.ContDiffWithinAt
#align cont_diff_within_at_const contDiffWithinAt_const
+-/
+#print contDiff_of_subsingleton /-
@[nontriviality]
theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π n f := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const
#align cont_diff_of_subsingleton contDiff_of_subsingleton
+-/
+#print contDiffAt_of_subsingleton /-
@[nontriviality]
theorem contDiffAt_of_subsingleton [Subsingleton F] : ContDiffAt π n f x := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiffAt_const
#align cont_diff_at_of_subsingleton contDiffAt_of_subsingleton
+-/
+#print contDiffWithinAt_of_subsingleton /-
@[nontriviality]
theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt π n f s x := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiffWithinAt_const
#align cont_diff_within_at_of_subsingleton contDiffWithinAt_of_subsingleton
+-/
+#print contDiffOn_of_subsingleton /-
@[nontriviality]
theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π n f s := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const
#align cont_diff_on_of_subsingleton contDiffOn_of_subsingleton
+-/
+#print iteratedFDeriv_succ_const /-
theorem iteratedFDeriv_succ_const (n : β) (c : F) : (iteratedFDeriv π (n + 1) fun y : E => c) = 0 :=
by
ext (x m)
simp only [iteratedFDeriv_succ_apply_right, fderiv_const, Pi.zero_apply, iteratedFDeriv_zero_fun,
ContinuousMultilinearMap.zero_apply, ContinuousLinearMap.zero_apply]
#align iterated_fderiv_succ_const iteratedFDeriv_succ_const
+-/
+#print iteratedFDeriv_const_of_ne /-
theorem iteratedFDeriv_const_of_ne {n : β} (hn : n β 0) (c : F) :
(iteratedFDeriv π n fun y : E => c) = 0 :=
by
cases' Nat.exists_eq_succ_of_ne_zero hn with k hk
rw [hk, iteratedFDeriv_succ_const]
#align iterated_fderiv_const_of_ne iteratedFDeriv_const_of_ne
+-/
/-! ### Smoothness of linear functions -/
+#print IsBoundedLinearMap.contDiff /-
/-- Unbundled bounded linear functions are `C^β`.
-/
theorem IsBoundedLinearMap.contDiff (hf : IsBoundedLinearMap π f) : ContDiff π n f :=
@@ -218,41 +246,59 @@ theorem IsBoundedLinearMap.contDiff (hf : IsBoundedLinearMap π f) : ContDiff
simp_rw [hf.fderiv]
exact contDiff_const
#align is_bounded_linear_map.cont_diff IsBoundedLinearMap.contDiff
+-/
+#print ContinuousLinearMap.contDiff /-
theorem ContinuousLinearMap.contDiff (f : E βL[π] F) : ContDiff π n f :=
f.IsBoundedLinearMap.ContDiff
#align continuous_linear_map.cont_diff ContinuousLinearMap.contDiff
+-/
+#print ContinuousLinearEquiv.contDiff /-
theorem ContinuousLinearEquiv.contDiff (f : E βL[π] F) : ContDiff π n f :=
(f : E βL[π] F).ContDiff
#align continuous_linear_equiv.cont_diff ContinuousLinearEquiv.contDiff
+-/
+#print LinearIsometry.contDiff /-
theorem LinearIsometry.contDiff (f : E ββα΅’[π] F) : ContDiff π n f :=
f.toContinuousLinearMap.ContDiff
#align linear_isometry.cont_diff LinearIsometry.contDiff
+-/
+#print LinearIsometryEquiv.contDiff /-
theorem LinearIsometryEquiv.contDiff (f : E ββα΅’[π] F) : ContDiff π n f :=
(f : E βL[π] F).ContDiff
#align linear_isometry_equiv.cont_diff LinearIsometryEquiv.contDiff
+-/
+#print contDiff_id /-
/-- The identity is `C^β`.
-/
theorem contDiff_id : ContDiff π n (id : E β E) :=
IsBoundedLinearMap.id.ContDiff
#align cont_diff_id contDiff_id
+-/
+#print contDiffWithinAt_id /-
theorem contDiffWithinAt_id {s x} : ContDiffWithinAt π n (id : E β E) s x :=
contDiff_id.ContDiffWithinAt
#align cont_diff_within_at_id contDiffWithinAt_id
+-/
+#print contDiffAt_id /-
theorem contDiffAt_id {x} : ContDiffAt π n (id : E β E) x :=
contDiff_id.ContDiffAt
#align cont_diff_at_id contDiffAt_id
+-/
+#print contDiffOn_id /-
theorem contDiffOn_id {s} : ContDiffOn π n (id : E β E) s :=
contDiff_id.ContDiffOn
#align cont_diff_on_id contDiffOn_id
+-/
+#print IsBoundedBilinearMap.contDiff /-
/-- Bilinear functions are `C^β`.
-/
theorem IsBoundedBilinearMap.contDiff (hb : IsBoundedBilinearMap π b) : ContDiff π n b :=
@@ -263,7 +309,9 @@ theorem IsBoundedBilinearMap.contDiff (hb : IsBoundedBilinearMap π b) : ContD
simp [hb.fderiv]
exact hb.is_bounded_linear_map_deriv.cont_diff
#align is_bounded_bilinear_map.cont_diff IsBoundedBilinearMap.contDiff
+-/
+#print HasFTaylorSeriesUpToOn.continuousLinearMap_comp /-
/-- If `f` admits a Taylor series `p` in a set `s`, and `g` is linear, then `g β f` admits a Taylor
series whose `k`-th term is given by `g β (p k)`. -/
theorem HasFTaylorSeriesUpToOn.continuousLinearMap_comp (g : F βL[π] G)
@@ -279,7 +327,9 @@ theorem HasFTaylorSeriesUpToOn.continuousLinearMap_comp (g : F βL[π] G)
Β· intro m hm
convert (L m).Continuous.comp_continuousOn (hf.cont m hm)
#align has_ftaylor_series_up_to_on.continuous_linear_map_comp HasFTaylorSeriesUpToOn.continuousLinearMap_comp
+-/
+#print ContDiffWithinAt.continuousLinearMap_comp /-
/-- Composition by continuous linear maps on the left preserves `C^n` functions in a domain
at a point. -/
theorem ContDiffWithinAt.continuousLinearMap_comp (g : F βL[π] G)
@@ -289,25 +339,33 @@ theorem ContDiffWithinAt.continuousLinearMap_comp (g : F βL[π] G)
rcases hf m hm with β¨u, hu, p, hpβ©
exact β¨u, hu, _, hp.continuous_linear_map_comp gβ©
#align cont_diff_within_at.continuous_linear_map_comp ContDiffWithinAt.continuousLinearMap_comp
+-/
+#print ContDiffAt.continuousLinearMap_comp /-
/-- Composition by continuous linear maps on the left preserves `C^n` functions in a domain
at a point. -/
theorem ContDiffAt.continuousLinearMap_comp (g : F βL[π] G) (hf : ContDiffAt π n f x) :
ContDiffAt π n (g β f) x :=
ContDiffWithinAt.continuousLinearMap_comp g hf
#align cont_diff_at.continuous_linear_map_comp ContDiffAt.continuousLinearMap_comp
+-/
+#print ContDiffOn.continuousLinearMap_comp /-
/-- Composition by continuous linear maps on the left preserves `C^n` functions on domains. -/
theorem ContDiffOn.continuousLinearMap_comp (g : F βL[π] G) (hf : ContDiffOn π n f s) :
ContDiffOn π n (g β f) s := fun x hx => (hf x hx).continuousLinearMap_comp g
#align cont_diff_on.continuous_linear_map_comp ContDiffOn.continuousLinearMap_comp
+-/
+#print ContDiff.continuousLinearMap_comp /-
/-- Composition by continuous linear maps on the left preserves `C^n` functions. -/
theorem ContDiff.continuousLinearMap_comp {f : E β F} (g : F βL[π] G) (hf : ContDiff π n f) :
ContDiff π n fun x => g (f x) :=
contDiffOn_univ.1 <| ContDiffOn.continuousLinearMap_comp _ (contDiffOn_univ.2 hf)
#align cont_diff.continuous_linear_map_comp ContDiff.continuousLinearMap_comp
+-/
+#print ContinuousLinearMap.iteratedFDerivWithin_comp_left /-
/-- The iterated derivative within a set of the composition with a linear map on the left is
obtained by applying the linear map to the iterated derivative. -/
theorem ContinuousLinearMap.iteratedFDerivWithin_comp_left {f : E β F} (g : F βL[π] G)
@@ -317,7 +375,9 @@ theorem ContinuousLinearMap.iteratedFDerivWithin_comp_left {f : E β F} (g : F
(((hf.ftaylorSeriesWithin hs).continuousLinearMap_comp g).eq_ftaylor_series_of_uniqueDiffOn hi hs
hx).symm
#align continuous_linear_map.iterated_fderiv_within_comp_left ContinuousLinearMap.iteratedFDerivWithin_comp_left
+-/
+#print ContinuousLinearMap.iteratedFDeriv_comp_left /-
/-- The iterated derivative of the composition with a linear map on the left is
obtained by applying the linear map to the iterated derivative. -/
theorem ContinuousLinearMap.iteratedFDeriv_comp_left {f : E β F} (g : F βL[π] G)
@@ -327,7 +387,9 @@ theorem ContinuousLinearMap.iteratedFDeriv_comp_left {f : E β F} (g : F βL[
simp only [β iteratedFDerivWithin_univ]
exact g.iterated_fderiv_within_comp_left hf.cont_diff_on uniqueDiffOn_univ (mem_univ x) hi
#align continuous_linear_map.iterated_fderiv_comp_left ContinuousLinearMap.iteratedFDeriv_comp_left
+-/
+#print ContinuousLinearEquiv.iteratedFDerivWithin_comp_left /-
/-- The iterated derivative within a set of the composition with a linear equiv on the left is
obtained by applying the linear equiv to the iterated derivative. This is true without
differentiability assumptions. -/
@@ -357,7 +419,9 @@ theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_left (g : F βL[π] G
ContinuousLinearMap.compContinuousMultilinearMap_coe, EmbeddingLike.apply_eq_iff_eq]
rw [iteratedFDerivWithin_succ_apply_left]
#align continuous_linear_equiv.iterated_fderiv_within_comp_left ContinuousLinearEquiv.iteratedFDerivWithin_comp_left
+-/
+#print LinearIsometry.norm_iteratedFDerivWithin_comp_left /-
/-- Composition with a linear isometry on the left preserves the norm of the iterated
derivative within a set. -/
theorem LinearIsometry.norm_iteratedFDerivWithin_comp_left {f : E β F} (g : F ββα΅’[π] G)
@@ -371,7 +435,9 @@ theorem LinearIsometry.norm_iteratedFDerivWithin_comp_left {f : E β F} (g : F
rw [this]
apply LinearIsometry.norm_compContinuousMultilinearMap
#align linear_isometry.norm_iterated_fderiv_within_comp_left LinearIsometry.norm_iteratedFDerivWithin_comp_left
+-/
+#print LinearIsometry.norm_iteratedFDeriv_comp_left /-
/-- Composition with a linear isometry on the left preserves the norm of the iterated
derivative. -/
theorem LinearIsometry.norm_iteratedFDeriv_comp_left {f : E β F} (g : F ββα΅’[π] G)
@@ -381,7 +447,9 @@ theorem LinearIsometry.norm_iteratedFDeriv_comp_left {f : E β F} (g : F ββ
simp only [β iteratedFDerivWithin_univ]
exact g.norm_iterated_fderiv_within_comp_left hf.cont_diff_on uniqueDiffOn_univ (mem_univ x) hi
#align linear_isometry.norm_iterated_fderiv_comp_left LinearIsometry.norm_iteratedFDeriv_comp_left
+-/
+#print LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left /-
/-- Composition with a linear isometry equiv on the left preserves the norm of the iterated
derivative within a set. -/
theorem LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left (g : F ββα΅’[π] G) (f : E β F)
@@ -395,7 +463,9 @@ theorem LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left (g : F ββα΅’
rw [this]
apply LinearIsometry.norm_compContinuousMultilinearMap g.to_linear_isometry
#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_left LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left
+-/
+#print LinearIsometryEquiv.norm_iteratedFDeriv_comp_left /-
/-- Composition with a linear isometry equiv on the left preserves the norm of the iterated
derivative. -/
theorem LinearIsometryEquiv.norm_iteratedFDeriv_comp_left (g : F ββα΅’[π] G) (f : E β F) (x : E)
@@ -404,7 +474,9 @@ theorem LinearIsometryEquiv.norm_iteratedFDeriv_comp_left (g : F ββα΅’[π]
rw [β iteratedFDerivWithin_univ, β iteratedFDerivWithin_univ]
apply g.norm_iterated_fderiv_within_comp_left f uniqueDiffOn_univ (mem_univ x) i
#align linear_isometry_equiv.norm_iterated_fderiv_comp_left LinearIsometryEquiv.norm_iteratedFDeriv_comp_left
+-/
+#print ContinuousLinearEquiv.comp_contDiffWithinAt_iff /-
/-- Composition by continuous linear equivs on the left respects higher differentiability at a
point in a domain. -/
theorem ContinuousLinearEquiv.comp_contDiffWithinAt_iff (e : F βL[π] G) :
@@ -414,27 +486,35 @@ theorem ContinuousLinearEquiv.comp_contDiffWithinAt_iff (e : F βL[π] G) :
H.continuous_linear_map_comp (e.symm : G βL[π] F),
fun H => H.continuousLinearMap_comp (e : F βL[π] G)β©
#align continuous_linear_equiv.comp_cont_diff_within_at_iff ContinuousLinearEquiv.comp_contDiffWithinAt_iff
+-/
+#print ContinuousLinearEquiv.comp_contDiffAt_iff /-
/-- Composition by continuous linear equivs on the left respects higher differentiability at a
point. -/
theorem ContinuousLinearEquiv.comp_contDiffAt_iff (e : F βL[π] G) :
ContDiffAt π n (e β f) x β ContDiffAt π n f x := by
simp only [β contDiffWithinAt_univ, e.comp_cont_diff_within_at_iff]
#align continuous_linear_equiv.comp_cont_diff_at_iff ContinuousLinearEquiv.comp_contDiffAt_iff
+-/
+#print ContinuousLinearEquiv.comp_contDiffOn_iff /-
/-- Composition by continuous linear equivs on the left respects higher differentiability on
domains. -/
theorem ContinuousLinearEquiv.comp_contDiffOn_iff (e : F βL[π] G) :
ContDiffOn π n (e β f) s β ContDiffOn π n f s := by
simp [ContDiffOn, e.comp_cont_diff_within_at_iff]
#align continuous_linear_equiv.comp_cont_diff_on_iff ContinuousLinearEquiv.comp_contDiffOn_iff
+-/
+#print ContinuousLinearEquiv.comp_contDiff_iff /-
/-- Composition by continuous linear equivs on the left respects higher differentiability. -/
theorem ContinuousLinearEquiv.comp_contDiff_iff (e : F βL[π] G) :
ContDiff π n (e β f) β ContDiff π n f := by
simp only [β contDiffOn_univ, e.comp_cont_diff_on_iff]
#align continuous_linear_equiv.comp_cont_diff_iff ContinuousLinearEquiv.comp_contDiff_iff
+-/
+#print HasFTaylorSeriesUpToOn.compContinuousLinearMap /-
/-- If `f` admits a Taylor series `p` in a set `s`, and `g` is linear, then `f β g` admits a Taylor
series in `g β»ΒΉ' s`, whose `k`-th term is given by `p k (g vβ, ..., g vβ)` . -/
theorem HasFTaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFTaylorSeriesUpToOn n f p s)
@@ -463,7 +543,9 @@ theorem HasFTaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFTaylorSeriesUpT
(hA m).Continuous.comp_continuousOn
((hf.cont m hm).comp g.continuous.continuous_on (subset.refl _))
#align has_ftaylor_series_up_to_on.comp_continuous_linear_map HasFTaylorSeriesUpToOn.compContinuousLinearMap
+-/
+#print ContDiffWithinAt.comp_continuousLinearMap /-
/-- Composition by continuous linear maps on the right preserves `C^n` functions at a point on
a domain. -/
theorem ContDiffWithinAt.comp_continuousLinearMap {x : G} (g : G βL[π] E)
@@ -478,18 +560,24 @@ theorem ContDiffWithinAt.comp_continuousLinearMap {x : G} (g : G βL[π] E)
rw [image_insert_eq]
exact insert_subset_insert (image_preimage_subset g s)
#align cont_diff_within_at.comp_continuous_linear_map ContDiffWithinAt.comp_continuousLinearMap
+-/
+#print ContDiffOn.comp_continuousLinearMap /-
/-- Composition by continuous linear maps on the right preserves `C^n` functions on domains. -/
theorem ContDiffOn.comp_continuousLinearMap (hf : ContDiffOn π n f s) (g : G βL[π] E) :
ContDiffOn π n (f β g) (g β»ΒΉ' s) := fun x hx => (hf (g x) hx).compContinuousLinearMap g
#align cont_diff_on.comp_continuous_linear_map ContDiffOn.comp_continuousLinearMap
+-/
+#print ContDiff.comp_continuousLinearMap /-
/-- Composition by continuous linear maps on the right preserves `C^n` functions. -/
theorem ContDiff.comp_continuousLinearMap {f : E β F} {g : G βL[π] E} (hf : ContDiff π n f) :
ContDiff π n (f β g) :=
contDiffOn_univ.1 <| ContDiffOn.comp_continuousLinearMap (contDiffOn_univ.2 hf) _
#align cont_diff.comp_continuous_linear_map ContDiff.comp_continuousLinearMap
+-/
+#print ContinuousLinearMap.iteratedFDerivWithin_comp_right /-
/-- The iterated derivative within a set of the composition with a linear map on the right is
obtained by composing the iterated derivative with the linear map. -/
theorem ContinuousLinearMap.iteratedFDerivWithin_comp_right {f : E β F} (g : G βL[π] E)
@@ -500,7 +588,9 @@ theorem ContinuousLinearMap.iteratedFDerivWithin_comp_right {f : E β F} (g : G
(((hf.ftaylorSeriesWithin hs).compContinuousLinearMap g).eq_ftaylor_series_of_uniqueDiffOn hi h's
hx).symm
#align continuous_linear_map.iterated_fderiv_within_comp_right ContinuousLinearMap.iteratedFDerivWithin_comp_right
+-/
+#print ContinuousLinearEquiv.iteratedFDerivWithin_comp_right /-
/-- The iterated derivative within a set of the composition with a linear equiv on the right is
obtained by composing the iterated derivative with the linear equiv. -/
theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_right (g : G βL[π] E) (f : E β F)
@@ -531,7 +621,9 @@ theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_right (g : G βL[π]
rw [ContinuousLinearEquiv.comp_right_fderivWithin _ (g.unique_diff_on_preimage_iff.2 hs x hx)]
rfl
#align continuous_linear_equiv.iterated_fderiv_within_comp_right ContinuousLinearEquiv.iteratedFDerivWithin_comp_right
+-/
+#print ContinuousLinearMap.iteratedFDeriv_comp_right /-
/-- The iterated derivative of the composition with a linear map on the right is
obtained by composing the iterated derivative with the linear map. -/
theorem ContinuousLinearMap.iteratedFDeriv_comp_right (g : G βL[π] E) {f : E β F}
@@ -544,7 +636,9 @@ theorem ContinuousLinearMap.iteratedFDeriv_comp_right (g : G βL[π] E) {f :
g.iterated_fderiv_within_comp_right hf.cont_diff_on uniqueDiffOn_univ uniqueDiffOn_univ
(mem_univ _) hi
#align continuous_linear_map.iterated_fderiv_comp_right ContinuousLinearMap.iteratedFDeriv_comp_right
+-/
+#print LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right /-
/-- Composition with a linear isometry on the right preserves the norm of the iterated derivative
within a set. -/
theorem LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right (g : G ββα΅’[π] E) (f : E β F)
@@ -557,7 +651,9 @@ theorem LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right (g : G ββ
g.to_continuous_linear_equiv.iterated_fderiv_within_comp_right f hs hx i
rw [this, ContinuousMultilinearMap.norm_compContinuous_linearIsometryEquiv]
#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_right LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right
+-/
+#print LinearIsometryEquiv.norm_iteratedFDeriv_comp_right /-
/-- Composition with a linear isometry on the right preserves the norm of the iterated derivative
within a set. -/
theorem LinearIsometryEquiv.norm_iteratedFDeriv_comp_right (g : G ββα΅’[π] E) (f : E β F) (x : G)
@@ -566,7 +662,9 @@ theorem LinearIsometryEquiv.norm_iteratedFDeriv_comp_right (g : G ββα΅’[π
simp only [β iteratedFDerivWithin_univ]
apply g.norm_iterated_fderiv_within_comp_right f uniqueDiffOn_univ (mem_univ (g x)) i
#align linear_isometry_equiv.norm_iterated_fderiv_comp_right LinearIsometryEquiv.norm_iteratedFDeriv_comp_right
+-/
+#print ContinuousLinearEquiv.contDiffWithinAt_comp_iff /-
/-- Composition by continuous linear equivs on the right respects higher differentiability at a
point in a domain. -/
theorem ContinuousLinearEquiv.contDiffWithinAt_comp_iff (e : G βL[π] E) :
@@ -579,7 +677,9 @@ theorem ContinuousLinearEquiv.contDiffWithinAt_comp_iff (e : G βL[π] E) :
rw [β e.apply_symm_apply x, β e.coe_coe] at H
exact H.comp_continuous_linear_map _
#align continuous_linear_equiv.cont_diff_within_at_comp_iff ContinuousLinearEquiv.contDiffWithinAt_comp_iff
+-/
+#print ContinuousLinearEquiv.contDiffAt_comp_iff /-
/-- Composition by continuous linear equivs on the right respects higher differentiability at a
point. -/
theorem ContinuousLinearEquiv.contDiffAt_comp_iff (e : G βL[π] E) :
@@ -588,7 +688,9 @@ theorem ContinuousLinearEquiv.contDiffAt_comp_iff (e : G βL[π] E) :
rw [β contDiffWithinAt_univ, β contDiffWithinAt_univ, β preimage_univ]
exact e.cont_diff_within_at_comp_iff
#align continuous_linear_equiv.cont_diff_at_comp_iff ContinuousLinearEquiv.contDiffAt_comp_iff
+-/
+#print ContinuousLinearEquiv.contDiffOn_comp_iff /-
/-- Composition by continuous linear equivs on the right respects higher differentiability on
domains. -/
theorem ContinuousLinearEquiv.contDiffOn_comp_iff (e : G βL[π] E) :
@@ -601,7 +703,9 @@ theorem ContinuousLinearEquiv.contDiffOn_comp_iff (e : G βL[π] E) :
rw [A, β B]
exact H.comp_continuous_linear_map (e.symm : E βL[π] G)
#align continuous_linear_equiv.cont_diff_on_comp_iff ContinuousLinearEquiv.contDiffOn_comp_iff
+-/
+#print ContinuousLinearEquiv.contDiff_comp_iff /-
/-- Composition by continuous linear equivs on the right respects higher differentiability. -/
theorem ContinuousLinearEquiv.contDiff_comp_iff (e : G βL[π] E) :
ContDiff π n (f β e) β ContDiff π n f :=
@@ -609,7 +713,9 @@ theorem ContinuousLinearEquiv.contDiff_comp_iff (e : G βL[π] E) :
rw [β contDiffOn_univ, β contDiffOn_univ, β preimage_univ]
exact e.cont_diff_on_comp_iff
#align continuous_linear_equiv.cont_diff_comp_iff ContinuousLinearEquiv.contDiff_comp_iff
+-/
+#print HasFTaylorSeriesUpToOn.prod /-
/-- If two functions `f` and `g` admit Taylor series `p` and `q` in a set `s`, then the cartesian
product of `f` and `g` admits the cartesian product of `p` and `q` as a Taylor series. -/
theorem HasFTaylorSeriesUpToOn.prod (hf : HasFTaylorSeriesUpToOn n f p s) {g : E β G}
@@ -626,7 +732,9 @@ theorem HasFTaylorSeriesUpToOn.prod (hf : HasFTaylorSeriesUpToOn n f p s) {g : E
Β· intro m hm
exact (L m).Continuous.comp_continuousOn ((hf.cont m hm).Prod (hg.cont m hm))
#align has_ftaylor_series_up_to_on.prod HasFTaylorSeriesUpToOn.prod
+-/
+#print ContDiffWithinAt.prod /-
/-- The cartesian product of `C^n` functions at a point in a domain is `C^n`. -/
theorem ContDiffWithinAt.prod {s : Set E} {f : E β F} {g : E β G} (hf : ContDiffWithinAt π n f s x)
(hg : ContDiffWithinAt π n g s x) : ContDiffWithinAt π n (fun x : E => (f x, g x)) s x :=
@@ -638,25 +746,32 @@ theorem ContDiffWithinAt.prod {s : Set E} {f : E β F} {g : E β G} (hf : Cont
β¨u β© v, Filter.inter_mem hu hv, _,
(hp.mono (inter_subset_left u v)).Prod (hq.mono (inter_subset_right u v))β©
#align cont_diff_within_at.prod ContDiffWithinAt.prod
+-/
+#print ContDiffOn.prod /-
/-- The cartesian product of `C^n` functions on domains is `C^n`. -/
theorem ContDiffOn.prod {s : Set E} {f : E β F} {g : E β G} (hf : ContDiffOn π n f s)
(hg : ContDiffOn π n g s) : ContDiffOn π n (fun x : E => (f x, g x)) s := fun x hx =>
(hf x hx).Prod (hg x hx)
#align cont_diff_on.prod ContDiffOn.prod
+-/
+#print ContDiffAt.prod /-
/-- The cartesian product of `C^n` functions at a point is `C^n`. -/
theorem ContDiffAt.prod {f : E β F} {g : E β G} (hf : ContDiffAt π n f x)
(hg : ContDiffAt π n g x) : ContDiffAt π n (fun x : E => (f x, g x)) x :=
contDiffWithinAt_univ.1 <|
ContDiffWithinAt.prod (contDiffWithinAt_univ.2 hf) (contDiffWithinAt_univ.2 hg)
#align cont_diff_at.prod ContDiffAt.prod
+-/
+#print ContDiff.prod /-
/-- The cartesian product of `C^n` functions is `C^n`.-/
theorem ContDiff.prod {f : E β F} {g : E β G} (hf : ContDiff π n f) (hg : ContDiff π n g) :
ContDiff π n fun x : E => (f x, g x) :=
contDiffOn_univ.1 <| ContDiffOn.prod (contDiffOn_univ.2 hf) (contDiffOn_univ.2 hg)
#align cont_diff.prod ContDiff.prod
+-/
/-!
### Composition of `C^n` functions
@@ -732,6 +847,7 @@ private theorem cont_diff_on.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu
Β· rw [contDiffOn_top] at hf hg β’
exact fun n => Itop n (hg n) (hf n) st
+#print ContDiffOn.comp /-
/-- The composition of `C^n` functions on domains is `C^n`. -/
theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F} (hg : ContDiffOn π n g t)
(hf : ContDiffOn π n f s) (st : s β f β»ΒΉ' t) : ContDiffOn π n (g β f) s :=
@@ -766,25 +882,33 @@ theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F} (hg
rw [isoF.apply_symm_apply (f (isoE y))]
rwa [this, isoE.cont_diff_on_comp_iff, isoG.symm.comp_cont_diff_on_iff] at main
#align cont_diff_on.comp ContDiffOn.comp
+-/
+#print ContDiffOn.comp' /-
/-- The composition of `C^n` functions on domains is `C^n`. -/
theorem ContDiffOn.comp' {s : Set E} {t : Set F} {g : F β G} {f : E β F} (hg : ContDiffOn π n g t)
(hf : ContDiffOn π n f s) : ContDiffOn π n (g β f) (s β© f β»ΒΉ' t) :=
hg.comp (hf.mono (inter_subset_left _ _)) (inter_subset_right _ _)
#align cont_diff_on.comp' ContDiffOn.comp'
+-/
+#print ContDiff.comp_contDiffOn /-
/-- The composition of a `C^n` function on a domain with a `C^n` function is `C^n`. -/
theorem ContDiff.comp_contDiffOn {s : Set E} {g : F β G} {f : E β F} (hg : ContDiff π n g)
(hf : ContDiffOn π n f s) : ContDiffOn π n (g β f) s :=
(contDiffOn_univ.2 hg).comp hf subset_preimage_univ
#align cont_diff.comp_cont_diff_on ContDiff.comp_contDiffOn
+-/
+#print ContDiff.comp /-
/-- The composition of `C^n` functions is `C^n`. -/
theorem ContDiff.comp {g : F β G} {f : E β F} (hg : ContDiff π n g) (hf : ContDiff π n f) :
ContDiff π n (g β f) :=
contDiffOn_univ.1 <| ContDiffOn.comp (contDiffOn_univ.2 hg) (contDiffOn_univ.2 hf) (subset_univ _)
#align cont_diff.comp ContDiff.comp
+-/
+#print ContDiffWithinAt.comp /-
/-- The composition of `C^n` functions at points in domains is `C^n`. -/
theorem ContDiffWithinAt.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F} (x : E)
(hg : ContDiffWithinAt π n g t (f x)) (hf : ContDiffWithinAt π n f s x) (st : s β f β»ΒΉ' t) :
@@ -815,7 +939,9 @@ theorem ContDiffWithinAt.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F
exact Filter.inter_mem this v_nhd
rwa [insert_eq_of_mem xmem, this] at Z
#align cont_diff_within_at.comp ContDiffWithinAt.comp
+-/
+#print ContDiffWithinAt.comp_of_mem /-
/-- The composition of `C^n` functions at points in domains is `C^n`,
with a weaker condition on `s` and `t`. -/
theorem ContDiffWithinAt.comp_of_mem {s : Set E} {t : Set F} {g : F β G} {f : E β F} (x : E)
@@ -823,148 +949,199 @@ theorem ContDiffWithinAt.comp_of_mem {s : Set E} {t : Set F} {g : F β G} {f :
(hs : t β π[f '' s] f x) : ContDiffWithinAt π n (g β f) s x :=
(hg.mono_of_mem hs).comp x hf (subset_preimage_image f s)
#align cont_diff_within_at.comp_of_mem ContDiffWithinAt.comp_of_mem
+-/
+#print ContDiffWithinAt.comp' /-
/-- The composition of `C^n` functions at points in domains is `C^n`. -/
theorem ContDiffWithinAt.comp' {s : Set E} {t : Set F} {g : F β G} {f : E β F} (x : E)
(hg : ContDiffWithinAt π n g t (f x)) (hf : ContDiffWithinAt π n f s x) :
ContDiffWithinAt π n (g β f) (s β© f β»ΒΉ' t) x :=
hg.comp x (hf.mono (inter_subset_left _ _)) (inter_subset_right _ _)
#align cont_diff_within_at.comp' ContDiffWithinAt.comp'
+-/
+#print ContDiffAt.comp_contDiffWithinAt /-
theorem ContDiffAt.comp_contDiffWithinAt {n} (x : E) (hg : ContDiffAt π n g (f x))
(hf : ContDiffWithinAt π n f s x) : ContDiffWithinAt π n (g β f) s x :=
hg.comp x hf (mapsTo_univ _ _)
#align cont_diff_at.comp_cont_diff_within_at ContDiffAt.comp_contDiffWithinAt
+-/
+#print ContDiffAt.comp /-
/-- The composition of `C^n` functions at points is `C^n`. -/
theorem ContDiffAt.comp (x : E) (hg : ContDiffAt π n g (f x)) (hf : ContDiffAt π n f x) :
ContDiffAt π n (g β f) x :=
hg.comp x hf subset_preimage_univ
#align cont_diff_at.comp ContDiffAt.comp
+-/
+#print ContDiff.comp_contDiffWithinAt /-
theorem ContDiff.comp_contDiffWithinAt {g : F β G} {f : E β F} (h : ContDiff π n g)
(hf : ContDiffWithinAt π n f t x) : ContDiffWithinAt π n (g β f) t x :=
haveI : ContDiffWithinAt π n g univ (f x) := h.cont_diff_at.cont_diff_within_at
this.comp x hf (subset_univ _)
#align cont_diff.comp_cont_diff_within_at ContDiff.comp_contDiffWithinAt
+-/
+#print ContDiff.comp_contDiffAt /-
theorem ContDiff.comp_contDiffAt {g : F β G} {f : E β F} (x : E) (hg : ContDiff π n g)
(hf : ContDiffAt π n f x) : ContDiffAt π n (g β f) x :=
hg.comp_contDiffWithinAt hf
#align cont_diff.comp_cont_diff_at ContDiff.comp_contDiffAt
+-/
/-!
### Smoothness of projections
-/
+#print contDiff_fst /-
/-- The first projection in a product is `C^β`. -/
theorem contDiff_fst : ContDiff π n (Prod.fst : E Γ F β E) :=
IsBoundedLinearMap.contDiff IsBoundedLinearMap.fst
#align cont_diff_fst contDiff_fst
+-/
+#print ContDiff.fst /-
/-- Postcomposing `f` with `prod.fst` is `C^n` -/
theorem ContDiff.fst {f : E β F Γ G} (hf : ContDiff π n f) : ContDiff π n fun x => (f x).1 :=
contDiff_fst.comp hf
#align cont_diff.fst ContDiff.fst
+-/
+#print ContDiff.fst' /-
/-- Precomposing `f` with `prod.fst` is `C^n` -/
theorem ContDiff.fst' {f : E β G} (hf : ContDiff π n f) : ContDiff π n fun x : E Γ F => f x.1 :=
hf.comp contDiff_fst
#align cont_diff.fst' ContDiff.fst'
+-/
+#print contDiffOn_fst /-
/-- The first projection on a domain in a product is `C^β`. -/
theorem contDiffOn_fst {s : Set (E Γ F)} : ContDiffOn π n (Prod.fst : E Γ F β E) s :=
ContDiff.contDiffOn contDiff_fst
#align cont_diff_on_fst contDiffOn_fst
+-/
+#print ContDiffOn.fst /-
theorem ContDiffOn.fst {f : E β F Γ G} {s : Set E} (hf : ContDiffOn π n f s) :
ContDiffOn π n (fun x => (f x).1) s :=
contDiff_fst.comp_contDiffOn hf
#align cont_diff_on.fst ContDiffOn.fst
+-/
+#print contDiffAt_fst /-
/-- The first projection at a point in a product is `C^β`. -/
theorem contDiffAt_fst {p : E Γ F} : ContDiffAt π n (Prod.fst : E Γ F β E) p :=
contDiff_fst.ContDiffAt
#align cont_diff_at_fst contDiffAt_fst
+-/
+#print ContDiffAt.fst /-
/-- Postcomposing `f` with `prod.fst` is `C^n` at `(x, y)` -/
theorem ContDiffAt.fst {f : E β F Γ G} {x : E} (hf : ContDiffAt π n f x) :
ContDiffAt π n (fun x => (f x).1) x :=
contDiffAt_fst.comp x hf
#align cont_diff_at.fst ContDiffAt.fst
+-/
+#print ContDiffAt.fst' /-
/-- Precomposing `f` with `prod.fst` is `C^n` at `(x, y)` -/
theorem ContDiffAt.fst' {f : E β G} {x : E} {y : F} (hf : ContDiffAt π n f x) :
ContDiffAt π n (fun x : E Γ F => f x.1) (x, y) :=
ContDiffAt.comp (x, y) hf contDiffAt_fst
#align cont_diff_at.fst' ContDiffAt.fst'
+-/
+#print ContDiffAt.fst'' /-
/-- Precomposing `f` with `prod.fst` is `C^n` at `x : E Γ F` -/
theorem ContDiffAt.fst'' {f : E β G} {x : E Γ F} (hf : ContDiffAt π n f x.1) :
ContDiffAt π n (fun x : E Γ F => f x.1) x :=
hf.comp x contDiffAt_fst
#align cont_diff_at.fst'' ContDiffAt.fst''
+-/
+#print contDiffWithinAt_fst /-
/-- The first projection within a domain at a point in a product is `C^β`. -/
theorem contDiffWithinAt_fst {s : Set (E Γ F)} {p : E Γ F} :
ContDiffWithinAt π n (Prod.fst : E Γ F β E) s p :=
contDiff_fst.ContDiffWithinAt
#align cont_diff_within_at_fst contDiffWithinAt_fst
+-/
+#print contDiff_snd /-
/-- The second projection in a product is `C^β`. -/
theorem contDiff_snd : ContDiff π n (Prod.snd : E Γ F β F) :=
IsBoundedLinearMap.contDiff IsBoundedLinearMap.snd
#align cont_diff_snd contDiff_snd
+-/
+#print ContDiff.snd /-
/-- Postcomposing `f` with `prod.snd` is `C^n` -/
theorem ContDiff.snd {f : E β F Γ G} (hf : ContDiff π n f) : ContDiff π n fun x => (f x).2 :=
contDiff_snd.comp hf
#align cont_diff.snd ContDiff.snd
+-/
+#print ContDiff.snd' /-
/-- Precomposing `f` with `prod.snd` is `C^n` -/
theorem ContDiff.snd' {f : F β G} (hf : ContDiff π n f) : ContDiff π n fun x : E Γ F => f x.2 :=
hf.comp contDiff_snd
#align cont_diff.snd' ContDiff.snd'
+-/
+#print contDiffOn_snd /-
/-- The second projection on a domain in a product is `C^β`. -/
theorem contDiffOn_snd {s : Set (E Γ F)} : ContDiffOn π n (Prod.snd : E Γ F β F) s :=
ContDiff.contDiffOn contDiff_snd
#align cont_diff_on_snd contDiffOn_snd
+-/
+#print ContDiffOn.snd /-
theorem ContDiffOn.snd {f : E β F Γ G} {s : Set E} (hf : ContDiffOn π n f s) :
ContDiffOn π n (fun x => (f x).2) s :=
contDiff_snd.comp_contDiffOn hf
#align cont_diff_on.snd ContDiffOn.snd
+-/
+#print contDiffAt_snd /-
/-- The second projection at a point in a product is `C^β`. -/
theorem contDiffAt_snd {p : E Γ F} : ContDiffAt π n (Prod.snd : E Γ F β F) p :=
contDiff_snd.ContDiffAt
#align cont_diff_at_snd contDiffAt_snd
+-/
+#print ContDiffAt.snd /-
/-- Postcomposing `f` with `prod.snd` is `C^n` at `x` -/
theorem ContDiffAt.snd {f : E β F Γ G} {x : E} (hf : ContDiffAt π n f x) :
ContDiffAt π n (fun x => (f x).2) x :=
contDiffAt_snd.comp x hf
#align cont_diff_at.snd ContDiffAt.snd
+-/
+#print ContDiffAt.snd' /-
/-- Precomposing `f` with `prod.snd` is `C^n` at `(x, y)` -/
theorem ContDiffAt.snd' {f : F β G} {x : E} {y : F} (hf : ContDiffAt π n f y) :
ContDiffAt π n (fun x : E Γ F => f x.2) (x, y) :=
ContDiffAt.comp (x, y) hf contDiffAt_snd
#align cont_diff_at.snd' ContDiffAt.snd'
+-/
+#print ContDiffAt.snd'' /-
/-- Precomposing `f` with `prod.snd` is `C^n` at `x : E Γ F` -/
theorem ContDiffAt.snd'' {f : F β G} {x : E Γ F} (hf : ContDiffAt π n f x.2) :
ContDiffAt π n (fun x : E Γ F => f x.2) x :=
hf.comp x contDiffAt_snd
#align cont_diff_at.snd'' ContDiffAt.snd''
+-/
+#print contDiffWithinAt_snd /-
/-- The second projection within a domain at a point in a product is `C^β`. -/
theorem contDiffWithinAt_snd {s : Set (E Γ F)} {p : E Γ F} :
ContDiffWithinAt π n (Prod.snd : E Γ F β F) s p :=
contDiff_snd.ContDiffWithinAt
#align cont_diff_within_at_snd contDiffWithinAt_snd
+-/
section NAry
@@ -974,54 +1151,71 @@ variable [NormedAddCommGroup Eβ] [NormedAddCommGroup Eβ] [NormedAddCommGroup
[NormedAddCommGroup Eβ] [NormedSpace π Eβ] [NormedSpace π Eβ] [NormedSpace π Eβ]
[NormedSpace π Eβ]
+#print ContDiff.compβ /-
theorem ContDiff.compβ {g : Eβ Γ Eβ β G} {fβ : F β Eβ} {fβ : F β Eβ} (hg : ContDiff π n g)
(hfβ : ContDiff π n fβ) (hfβ : ContDiff π n fβ) : ContDiff π n fun x => g (fβ x, fβ x) :=
hg.comp <| hfβ.Prod hfβ
#align cont_diff.compβ ContDiff.compβ
+-/
+#print ContDiff.compβ /-
theorem ContDiff.compβ {g : Eβ Γ Eβ Γ Eβ β G} {fβ : F β Eβ} {fβ : F β Eβ} {fβ : F β Eβ}
(hg : ContDiff π n g) (hfβ : ContDiff π n fβ) (hfβ : ContDiff π n fβ) (hfβ : ContDiff π n fβ) :
ContDiff π n fun x => g (fβ x, fβ x, fβ x) :=
hg.compβ hfβ <| hfβ.Prod hfβ
#align cont_diff.compβ ContDiff.compβ
+-/
+#print ContDiff.comp_contDiff_onβ /-
theorem ContDiff.comp_contDiff_onβ {g : Eβ Γ Eβ β G} {fβ : F β Eβ} {fβ : F β Eβ} {s : Set F}
(hg : ContDiff π n g) (hfβ : ContDiffOn π n fβ s) (hfβ : ContDiffOn π n fβ s) :
ContDiffOn π n (fun x => g (fβ x, fβ x)) s :=
hg.comp_contDiffOn <| hfβ.Prod hfβ
#align cont_diff.comp_cont_diff_onβ ContDiff.comp_contDiff_onβ
+-/
+#print ContDiff.comp_contDiff_onβ /-
theorem ContDiff.comp_contDiff_onβ {g : Eβ Γ Eβ Γ Eβ β G} {fβ : F β Eβ} {fβ : F β Eβ} {fβ : F β Eβ}
{s : Set F} (hg : ContDiff π n g) (hfβ : ContDiffOn π n fβ s) (hfβ : ContDiffOn π n fβ s)
(hfβ : ContDiffOn π n fβ s) : ContDiffOn π n (fun x => g (fβ x, fβ x, fβ x)) s :=
hg.comp_contDiff_onβ hfβ <| hfβ.Prod hfβ
#align cont_diff.comp_cont_diff_onβ ContDiff.comp_contDiff_onβ
+-/
end NAry
section SpecificBilinearMaps
+#print ContDiff.clm_comp /-
theorem ContDiff.clm_comp {g : X β F βL[π] G} {f : X β E βL[π] F} (hg : ContDiff π n g)
(hf : ContDiff π n f) : ContDiff π n fun x => (g x).comp (f x) :=
isBoundedBilinearMap_comp.ContDiff.compβ hg hf
#align cont_diff.clm_comp ContDiff.clm_comp
+-/
+#print ContDiffOn.clm_comp /-
theorem ContDiffOn.clm_comp {g : X β F βL[π] G} {f : X β E βL[π] F} {s : Set X}
(hg : ContDiffOn π n g s) (hf : ContDiffOn π n f s) :
ContDiffOn π n (fun x => (g x).comp (f x)) s :=
isBoundedBilinearMap_comp.ContDiff.comp_contDiff_onβ hg hf
#align cont_diff_on.clm_comp ContDiffOn.clm_comp
+-/
+#print ContDiff.clm_apply /-
theorem ContDiff.clm_apply {f : E β F βL[π] G} {g : E β F} {n : ββ} (hf : ContDiff π n f)
(hg : ContDiff π n g) : ContDiff π n fun x => (f x) (g x) :=
isBoundedBilinearMapApply.ContDiff.compβ hf hg
#align cont_diff.clm_apply ContDiff.clm_apply
+-/
+#print ContDiffOn.clm_apply /-
theorem ContDiffOn.clm_apply {f : E β F βL[π] G} {g : E β F} {n : ββ} (hf : ContDiffOn π n f s)
(hg : ContDiffOn π n g s) : ContDiffOn π n (fun x => (f x) (g x)) s :=
isBoundedBilinearMapApply.ContDiff.comp_contDiff_onβ hf hg
#align cont_diff_on.clm_apply ContDiffOn.clm_apply
+-/
+#print ContDiff.smulRight /-
theorem ContDiff.smulRight {f : E β F βL[π] π} {g : E β G} {n : ββ} (hf : ContDiff π n f)
(hg : ContDiff π n g) : ContDiff π n fun x => (f x).smul_right (g x) :=
(-- giving the following implicit type arguments speeds up elaboration significantly
@@ -1029,9 +1223,11 @@ theorem ContDiff.smulRight {f : E β F βL[π] π} {g : E β G} {n : β
π _ F _ _ G _ _).ContDiff.compβ
hf hg
#align cont_diff.smul_right ContDiff.smulRight
+-/
end SpecificBilinearMaps
+#print contDiff_prodAssoc /-
/-- The natural equivalence `(E Γ F) Γ G β E Γ (F Γ G)` is smooth.
Warning: if you think you need this lemma, it is likely that you can simplify your proof by
@@ -1041,7 +1237,9 @@ Note [continuity lemma statement]
theorem contDiff_prodAssoc : ContDiff π β€ <| Equiv.prodAssoc E F G :=
(LinearIsometryEquiv.prodAssoc π E F G).ContDiff
#align cont_diff_prod_assoc contDiff_prodAssoc
+-/
+#print contDiff_prodAssoc_symm /-
/-- The natural equivalence `E Γ (F Γ G) β (E Γ F) Γ G` is smooth.
Warning: see remarks attached to `cont_diff_prod_assoc`
@@ -1049,12 +1247,14 @@ Warning: see remarks attached to `cont_diff_prod_assoc`
theorem contDiff_prodAssoc_symm : ContDiff π β€ <| (Equiv.prodAssoc E F G).symm :=
(LinearIsometryEquiv.prodAssoc π E F G).symm.ContDiff
#align cont_diff_prod_assoc_symm contDiff_prodAssoc_symm
+-/
/-! ### Bundled derivatives are smooth -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffWithinAt.hasFDerivWithinAt_nhds /-
/-- One direction of `cont_diff_within_at_succ_iff_has_fderiv_within_at`, but where all derivatives
are taken within the same set. Version for partial derivatives / functions with parameters.
If `f x` is a `C^n+1` family of functions and `g x` is a `C^n` family of points, then the
@@ -1103,8 +1303,10 @@ theorem ContDiffWithinAt.hasFDerivWithinAt_nhds {f : E β F β G} {g : E β F
(ContinuousLinearMap.inr π E F)).comp_of_mem
xβ (cont_diff_within_at_id.prod hg) hst
#align cont_diff_within_at.has_fderiv_within_at_nhds ContDiffWithinAt.hasFDerivWithinAt_nhds
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffWithinAt.fderivWithin'' /-
/-- The most general lemma stating that `x β¦ fderiv_within π (f x) t (g x)` is `C^n`
at a point within a set.
To show that `x β¦ D_yf(x,y)g(x)` (taken within `t`) is `C^m` at `xβ` within `s`, we require that
@@ -1134,8 +1336,10 @@ theorem ContDiffWithinAt.fderivWithin'' {f : E β F β G} {g : E β F} {t : S
exact fun m => this m le_top
exact this m le_rfl
#align cont_diff_within_at.fderiv_within'' ContDiffWithinAt.fderivWithin''
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffWithinAt.fderivWithin' /-
/-- A special case of `cont_diff_within_at.fderiv_within''` where we require that `s β gβ»ΒΉ(t)`. -/
theorem ContDiffWithinAt.fderivWithin' {f : E β F β G} {g : E β F} {t : Set F} {n : ββ}
(hf : ContDiffWithinAt π n (Function.uncurry f) (insert xβ s ΓΛ’ t) (xβ, g xβ))
@@ -1144,8 +1348,10 @@ theorem ContDiffWithinAt.fderivWithin' {f : E β F β G} {g : E β F} {t : Se
(hst : s β g β»ΒΉ' t) : ContDiffWithinAt π m (fun x => fderivWithin π (f x) t (g x)) s xβ :=
hf.fderivWithin'' hg ht hmn <| mem_of_superset self_mem_nhdsWithin <| image_subset_iff.mpr hst
#align cont_diff_within_at.fderiv_within' ContDiffWithinAt.fderivWithin'
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffWithinAt.fderivWithin /-
/-- A special case of `cont_diff_within_at.fderiv_within'` where we require that `xβ β s` and there
are unique derivatives everywhere within `t`. -/
theorem ContDiffWithinAt.fderivWithin {f : E β F β G} {g : E β F} {t : Set F} {n : ββ}
@@ -1158,8 +1364,10 @@ theorem ContDiffWithinAt.fderivWithin {f : E β F β G} {g : E β F} {t : Set
rw [insert_eq_self.mpr hxβ]
exact eventually_of_mem self_mem_nhdsWithin fun x hx => ht _ (hst hx)
#align cont_diff_within_at.fderiv_within ContDiffWithinAt.fderivWithin
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffWithinAt.fderivWithin_apply /-
/-- `x β¦ fderiv_within π (f x) t (g x) (k x)` is smooth at a point within a set. -/
theorem ContDiffWithinAt.fderivWithin_apply {f : E β F β G} {g k : E β F} {t : Set F} {n : ββ}
(hf : ContDiffWithinAt π n (Function.uncurry f) (s ΓΛ’ t) (xβ, g xβ))
@@ -1169,7 +1377,9 @@ theorem ContDiffWithinAt.fderivWithin_apply {f : E β F β G} {g k : E β F}
(contDiff_fst.clm_apply contDiff_snd).ContDiffAt.comp_contDiffWithinAt xβ
((hf.fderivWithin hg ht hmn hxβ hst).Prod hk)
#align cont_diff_within_at.fderiv_within_apply ContDiffWithinAt.fderivWithin_apply
+-/
+#print ContDiffWithinAt.fderivWithin_right /-
/-- `fderiv_within π f s` is smooth at `xβ` within `s`. -/
theorem ContDiffWithinAt.fderivWithin_right (hf : ContDiffWithinAt π n f s xβ)
(hs : UniqueDiffOn π s) (hmn : (m + 1 : ββ) β€ n) (hxβs : xβ β s) :
@@ -1178,7 +1388,9 @@ theorem ContDiffWithinAt.fderivWithin_right (hf : ContDiffWithinAt π n f s x
(ContDiffWithinAt.comp (xβ, xβ) hf contDiffWithinAt_snd <| prod_subset_preimage_snd s s)
contDiffWithinAt_id hs hmn hxβs (by rw [preimage_id'])
#align cont_diff_within_at.fderiv_within_right ContDiffWithinAt.fderivWithin_right
+-/
+#print ContDiffAt.fderiv /-
/-- `x β¦ fderiv π (f x) (g x)` is smooth at `xβ`. -/
theorem ContDiffAt.fderiv {f : E β F β G} {g : E β F} {n : ββ}
(hf : ContDiffAt π n (Function.uncurry f) (xβ, g xβ)) (hg : ContDiffAt π m g xβ)
@@ -1191,41 +1403,53 @@ theorem ContDiffAt.fderiv {f : E β F β G} {g : E β F} {n : ββ}
univ_mem
rw [preimage_univ]
#align cont_diff_at.fderiv ContDiffAt.fderiv
+-/
+#print ContDiffAt.fderiv_right /-
/-- `fderiv π f` is smooth at `xβ`. -/
theorem ContDiffAt.fderiv_right (hf : ContDiffAt π n f xβ) (hmn : (m + 1 : ββ) β€ n) :
ContDiffAt π m (fderiv π f) xβ :=
ContDiffAt.fderiv (ContDiffAt.comp (xβ, xβ) hf contDiffAt_snd) contDiffAt_id hmn
#align cont_diff_at.fderiv_right ContDiffAt.fderiv_right
+-/
+#print ContDiff.fderiv /-
/-- `x β¦ fderiv π (f x) (g x)` is smooth. -/
theorem ContDiff.fderiv {f : E β F β G} {g : E β F} {n m : ββ}
(hf : ContDiff π m <| Function.uncurry f) (hg : ContDiff π n g) (hnm : n + 1 β€ m) :
ContDiff π n fun x => fderiv π (f x) (g x) :=
contDiff_iff_contDiffAt.mpr fun x => hf.ContDiffAt.fderiv hg.ContDiffAt hnm
#align cont_diff.fderiv ContDiff.fderiv
+-/
+#print ContDiff.fderiv_right /-
/-- `fderiv π f` is smooth. -/
theorem ContDiff.fderiv_right (hf : ContDiff π n f) (hmn : (m + 1 : ββ) β€ n) :
ContDiff π m (fderiv π f) :=
contDiff_iff_contDiffAt.mpr fun x => hf.ContDiffAt.fderiv_right hmn
#align cont_diff.fderiv_right ContDiff.fderiv_right
+-/
+#print Continuous.fderiv /-
/-- `x β¦ fderiv π (f x) (g x)` is continuous. -/
theorem Continuous.fderiv {f : E β F β G} {g : E β F} {n : ββ}
(hf : ContDiff π n <| Function.uncurry f) (hg : Continuous g) (hn : 1 β€ n) :
Continuous fun x => fderiv π (f x) (g x) :=
(hf.fderiv (contDiff_zero.mpr hg) hn).Continuous
#align continuous.fderiv Continuous.fderiv
+-/
+#print ContDiff.fderiv_apply /-
/-- `x β¦ fderiv π (f x) (g x) (k x)` is smooth. -/
theorem ContDiff.fderiv_apply {f : E β F β G} {g k : E β F} {n m : ββ}
(hf : ContDiff π m <| Function.uncurry f) (hg : ContDiff π n g) (hk : ContDiff π n k)
(hnm : n + 1 β€ m) : ContDiff π n fun x => fderiv π (f x) (g x) (k x) :=
(hf.fderiv hg hnm).clm_apply hk
#align cont_diff.fderiv_apply ContDiff.fderiv_apply
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print contDiffOn_fderivWithin_apply /-
/-- The bundled derivative of a `C^{n+1}` function is `C^n`. -/
theorem contDiffOn_fderivWithin_apply {m n : ββ} {s : Set E} {f : E β F} (hf : ContDiffOn π n f s)
(hs : UniqueDiffOn π s) (hmn : m + 1 β€ n) :
@@ -1233,8 +1457,10 @@ theorem contDiffOn_fderivWithin_apply {m n : ββ} {s : Set E} {f : E β F} (
((hf.fderivWithin hs hmn).comp contDiffOn_fst (prod_subset_preimage_fst _ _)).clm_apply
contDiffOn_snd
#align cont_diff_on_fderiv_within_apply contDiffOn_fderivWithin_apply
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffOn.continuousOn_fderivWithin_apply /-
/-- If a function is at least `C^1`, its bundled derivative (mapping `(x, v)` to `Df(x) v`) is
continuous. -/
theorem ContDiffOn.continuousOn_fderivWithin_apply (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s)
@@ -1242,7 +1468,9 @@ theorem ContDiffOn.continuousOn_fderivWithin_apply (hf : ContDiffOn π n f s)
ContinuousOn (fun p : E Γ E => (fderivWithin π f s p.1 : E β F) p.2) (s ΓΛ’ univ) :=
(contDiffOn_fderivWithin_apply hf hs <| by rwa [zero_add]).ContinuousOn
#align cont_diff_on.continuous_on_fderiv_within_apply ContDiffOn.continuousOn_fderivWithin_apply
+-/
+#print ContDiff.contDiff_fderiv_apply /-
/-- The bundled derivative of a `C^{n+1}` function is `C^n`. -/
theorem ContDiff.contDiff_fderiv_apply {f : E β F} (hf : ContDiff π n f) (hmn : m + 1 β€ n) :
ContDiff π m fun p : E Γ E => (fderiv π f p.1 : E βL[π] F) p.2 :=
@@ -1251,6 +1479,7 @@ theorem ContDiff.contDiff_fderiv_apply {f : E β F} (hf : ContDiff π n f) (h
rw [β fderivWithin_univ, β univ_prod_univ]
exact contDiffOn_fderivWithin_apply hf uniqueDiffOn_univ hmn
#align cont_diff.cont_diff_fderiv_apply ContDiff.contDiff_fderiv_apply
+-/
/-!
### Smoothness of functions `f : E β Ξ i, F' i`
@@ -1263,6 +1492,7 @@ variable {ΞΉ ΞΉ' : Type _} [Fintype ΞΉ] [Fintype ΞΉ'] {F' : ΞΉ β Type _} [β
[β i, NormedSpace π (F' i)] {Ο : β i, E β F' i} {p' : β i, E β FormalMultilinearSeries π E (F' i)}
{Ξ¦ : E β β i, F' i} {P' : E β FormalMultilinearSeries π E (β i, F' i)}
+#print hasFTaylorSeriesUpToOn_pi /-
theorem hasFTaylorSeriesUpToOn_pi :
HasFTaylorSeriesUpToOn n (fun x i => Ο i x)
(fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s β
@@ -1284,7 +1514,9 @@ theorem hasFTaylorSeriesUpToOn_pi :
have := continuousOn_pi.2 fun i => (h i).cont m hm
convert (L m).Continuous.comp_continuousOn this
#align has_ftaylor_series_up_to_on_pi hasFTaylorSeriesUpToOn_pi
+-/
+#print hasFTaylorSeriesUpToOn_pi' /-
@[simp]
theorem hasFTaylorSeriesUpToOn_pi' :
HasFTaylorSeriesUpToOn n Ξ¦ P' s β
@@ -1295,7 +1527,9 @@ theorem hasFTaylorSeriesUpToOn_pi' :
s :=
by convert hasFTaylorSeriesUpToOn_pi; ext; rfl
#align has_ftaylor_series_up_to_on_pi' hasFTaylorSeriesUpToOn_pi'
+-/
+#print contDiffWithinAt_pi /-
theorem contDiffWithinAt_pi :
ContDiffWithinAt π n Ξ¦ s x β β i, ContDiffWithinAt π n (fun x => Ξ¦ x i) s x :=
by
@@ -1306,29 +1540,40 @@ theorem contDiffWithinAt_pi :
β¨β i, u i, Filter.iInter_mem.2 hux, _,
hasFTaylorSeriesUpToOn_pi.2 fun i => (hp i).mono <| Inter_subset _ _β©
#align cont_diff_within_at_pi contDiffWithinAt_pi
+-/
+#print contDiffOn_pi /-
theorem contDiffOn_pi : ContDiffOn π n Ξ¦ s β β i, ContDiffOn π n (fun x => Ξ¦ x i) s :=
β¨fun h i x hx => contDiffWithinAt_pi.1 (h x hx) _, fun h x hx =>
contDiffWithinAt_pi.2 fun i => h i x hxβ©
#align cont_diff_on_pi contDiffOn_pi
+-/
+#print contDiffAt_pi /-
theorem contDiffAt_pi : ContDiffAt π n Ξ¦ x β β i, ContDiffAt π n (fun x => Ξ¦ x i) x :=
contDiffWithinAt_pi
#align cont_diff_at_pi contDiffAt_pi
+-/
+#print contDiff_pi /-
theorem contDiff_pi : ContDiff π n Ξ¦ β β i, ContDiff π n fun x => Ξ¦ x i := by
simp only [β contDiffOn_univ, contDiffOn_pi]
#align cont_diff_pi contDiff_pi
+-/
variable (π E)
+#print contDiff_apply /-
theorem contDiff_apply (i : ΞΉ) : ContDiff π n fun f : ΞΉ β E => f i :=
contDiff_pi.mp contDiff_id i
#align cont_diff_apply contDiff_apply
+-/
+#print contDiff_apply_apply /-
theorem contDiff_apply_apply (i : ΞΉ) (j : ΞΉ') : ContDiff π n fun f : ΞΉ β ΞΉ' β E => f i j :=
contDiff_pi.mp (contDiff_apply π (ΞΉ' β E) i) j
#align cont_diff_apply_apply contDiff_apply_apply
+-/
variable {π E}
@@ -1339,38 +1584,49 @@ end Pi
section Add
+#print contDiff_add /-
-- The sum is smooth.
theorem contDiff_add : ContDiff π n fun p : F Γ F => p.1 + p.2 :=
(IsBoundedLinearMap.fst.add IsBoundedLinearMap.snd).ContDiff
#align cont_diff_add contDiff_add
+-/
+#print ContDiffWithinAt.add /-
/-- The sum of two `C^n` functions within a set at a point is `C^n` within this set
at this point. -/
theorem ContDiffWithinAt.add {s : Set E} {f g : E β F} (hf : ContDiffWithinAt π n f s x)
(hg : ContDiffWithinAt π n g s x) : ContDiffWithinAt π n (fun x => f x + g x) s x :=
contDiff_add.ContDiffWithinAt.comp x (hf.Prod hg) subset_preimage_univ
#align cont_diff_within_at.add ContDiffWithinAt.add
+-/
+#print ContDiffAt.add /-
/-- The sum of two `C^n` functions at a point is `C^n` at this point. -/
theorem ContDiffAt.add {f g : E β F} (hf : ContDiffAt π n f x) (hg : ContDiffAt π n g x) :
ContDiffAt π n (fun x => f x + g x) x := by
rw [β contDiffWithinAt_univ] at * <;> exact hf.add hg
#align cont_diff_at.add ContDiffAt.add
+-/
+#print ContDiff.add /-
/-- The sum of two `C^n`functions is `C^n`. -/
theorem ContDiff.add {f g : E β F} (hf : ContDiff π n f) (hg : ContDiff π n g) :
ContDiff π n fun x => f x + g x :=
contDiff_add.comp (hf.Prod hg)
#align cont_diff.add ContDiff.add
+-/
+#print ContDiffOn.add /-
/-- The sum of two `C^n` functions on a domain is `C^n`. -/
theorem ContDiffOn.add {s : Set E} {f g : E β F} (hf : ContDiffOn π n f s)
(hg : ContDiffOn π n g s) : ContDiffOn π n (fun x => f x + g x) s := fun x hx =>
(hf x hx).add (hg x hx)
#align cont_diff_on.add ContDiffOn.add
+-/
variable {i : β}
+#print iteratedFDerivWithin_add_apply /-
/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
See also `iterated_fderiv_within_add_apply'`, which uses the spelling `(Ξ» x, f x + g x)`
instead of `f + g`. -/
@@ -1404,7 +1660,9 @@ theorem iteratedFDerivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f
by rw [Pi.add_def, fderivWithin_add (hu x hx) (hdf x hx) (hdg x hx)]; rfl
_ = (iteratedFDerivWithin π (i + 1) f s + iteratedFDerivWithin π (i + 1) g s) x h := rfl
#align iterated_fderiv_within_add_apply iteratedFDerivWithin_add_apply
+-/
+#print iteratedFDerivWithin_add_apply' /-
/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
This is the same as `iterated_fderiv_within_add_apply`, but using the spelling `(Ξ» x, f x + g x)`
instead of `f + g`, which can be handy for some rewrites.
@@ -1415,19 +1673,24 @@ theorem iteratedFDerivWithin_add_apply' {f g : E β F} (hf : ContDiffOn π i
iteratedFDerivWithin π i f s x + iteratedFDerivWithin π i g s x :=
iteratedFDerivWithin_add_apply hf hg hu hx
#align iterated_fderiv_within_add_apply' iteratedFDerivWithin_add_apply'
+-/
+#print iteratedFDeriv_add_apply /-
theorem iteratedFDeriv_add_apply {i : β} {f g : E β F} (hf : ContDiff π i f) (hg : ContDiff π i g) :
iteratedFDeriv π i (f + g) x = iteratedFDeriv π i f x + iteratedFDeriv π i g x :=
by
simp_rw [β contDiffOn_univ, β iteratedFDerivWithin_univ] at hf hg β’
exact iteratedFDerivWithin_add_apply hf hg uniqueDiffOn_univ (Set.mem_univ _)
#align iterated_fderiv_add_apply iteratedFDeriv_add_apply
+-/
+#print iteratedFDeriv_add_apply' /-
theorem iteratedFDeriv_add_apply' {i : β} {f g : E β F} (hf : ContDiff π i f)
(hg : ContDiff π i g) :
iteratedFDeriv π i (fun x => f x + g x) x = iteratedFDeriv π i f x + iteratedFDeriv π i g x :=
iteratedFDeriv_add_apply hf hg
#align iterated_fderiv_add_apply' iteratedFDeriv_add_apply'
+-/
end Add
@@ -1436,35 +1699,46 @@ end Add
section Neg
+#print contDiff_neg /-
-- The negative is smooth.
theorem contDiff_neg : ContDiff π n fun p : F => -p :=
IsBoundedLinearMap.id.neg.ContDiff
#align cont_diff_neg contDiff_neg
+-/
+#print ContDiffWithinAt.neg /-
/-- The negative of a `C^n` function within a domain at a point is `C^n` within this domain at
this point. -/
theorem ContDiffWithinAt.neg {s : Set E} {f : E β F} (hf : ContDiffWithinAt π n f s x) :
ContDiffWithinAt π n (fun x => -f x) s x :=
contDiff_neg.ContDiffWithinAt.comp x hf subset_preimage_univ
#align cont_diff_within_at.neg ContDiffWithinAt.neg
+-/
+#print ContDiffAt.neg /-
/-- The negative of a `C^n` function at a point is `C^n` at this point. -/
theorem ContDiffAt.neg {f : E β F} (hf : ContDiffAt π n f x) : ContDiffAt π n (fun x => -f x) x :=
by rw [β contDiffWithinAt_univ] at * <;> exact hf.neg
#align cont_diff_at.neg ContDiffAt.neg
+-/
+#print ContDiff.neg /-
/-- The negative of a `C^n`function is `C^n`. -/
theorem ContDiff.neg {f : E β F} (hf : ContDiff π n f) : ContDiff π n fun x => -f x :=
contDiff_neg.comp hf
#align cont_diff.neg ContDiff.neg
+-/
+#print ContDiffOn.neg /-
/-- The negative of a `C^n` function on a domain is `C^n`. -/
theorem ContDiffOn.neg {s : Set E} {f : E β F} (hf : ContDiffOn π n f s) :
ContDiffOn π n (fun x => -f x) s := fun x hx => (hf x hx).neg
#align cont_diff_on.neg ContDiffOn.neg
+-/
variable {i : β}
+#print iteratedFDerivWithin_neg_apply /-
theorem iteratedFDerivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s) (hx : x β s) :
iteratedFDerivWithin π i (-f) s x = -iteratedFDerivWithin π i f s x :=
by
@@ -1482,45 +1756,57 @@ theorem iteratedFDerivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s)
rw [Pi.neg_def, fderivWithin_neg (hu x hx)]; rfl
_ = -(iteratedFDerivWithin π (i + 1) f s) x h := rfl
#align iterated_fderiv_within_neg_apply iteratedFDerivWithin_neg_apply
+-/
+#print iteratedFDeriv_neg_apply /-
theorem iteratedFDeriv_neg_apply {i : β} {f : E β F} :
iteratedFDeriv π i (-f) x = -iteratedFDeriv π i f x :=
by
simp_rw [β iteratedFDerivWithin_univ]
exact iteratedFDerivWithin_neg_apply uniqueDiffOn_univ (Set.mem_univ _)
#align iterated_fderiv_neg_apply iteratedFDeriv_neg_apply
+-/
end Neg
/-! ### Subtraction -/
+#print ContDiffWithinAt.sub /-
/-- The difference of two `C^n` functions within a set at a point is `C^n` within this set
at this point. -/
theorem ContDiffWithinAt.sub {s : Set E} {f g : E β F} (hf : ContDiffWithinAt π n f s x)
(hg : ContDiffWithinAt π n g s x) : ContDiffWithinAt π n (fun x => f x - g x) s x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align cont_diff_within_at.sub ContDiffWithinAt.sub
+-/
+#print ContDiffAt.sub /-
/-- The difference of two `C^n` functions at a point is `C^n` at this point. -/
theorem ContDiffAt.sub {f g : E β F} (hf : ContDiffAt π n f x) (hg : ContDiffAt π n g x) :
ContDiffAt π n (fun x => f x - g x) x := by simpa only [sub_eq_add_neg] using hf.add hg.neg
#align cont_diff_at.sub ContDiffAt.sub
+-/
+#print ContDiffOn.sub /-
/-- The difference of two `C^n` functions on a domain is `C^n`. -/
theorem ContDiffOn.sub {s : Set E} {f g : E β F} (hf : ContDiffOn π n f s)
(hg : ContDiffOn π n g s) : ContDiffOn π n (fun x => f x - g x) s := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align cont_diff_on.sub ContDiffOn.sub
+-/
+#print ContDiff.sub /-
/-- The difference of two `C^n` functions is `C^n`. -/
theorem ContDiff.sub {f g : E β F} (hf : ContDiff π n f) (hg : ContDiff π n g) :
ContDiff π n fun x => f x - g x := by simpa only [sub_eq_add_neg] using hf.add hg.neg
#align cont_diff.sub ContDiff.sub
+-/
/-! ### Sum of finitely many functions -/
+#print ContDiffWithinAt.sum /-
theorem ContDiffWithinAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {t : Set E} {x : E}
(h : β i β s, ContDiffWithinAt π n (fun x => f i x) t x) :
ContDiffWithinAt π n (fun x => β i in s, f i x) t x := by
@@ -1530,23 +1816,30 @@ theorem ContDiffWithinAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ}
Β· simp only [is, Finset.sum_insert, not_false_iff]
exact (h _ (Finset.mem_insert_self i s)).add (IH fun j hj => h _ (Finset.mem_insert_of_mem hj))
#align cont_diff_within_at.sum ContDiffWithinAt.sum
+-/
+#print ContDiffAt.sum /-
theorem ContDiffAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {x : E}
(h : β i β s, ContDiffAt π n (fun x => f i x) x) :
ContDiffAt π n (fun x => β i in s, f i x) x := by
rw [β contDiffWithinAt_univ] at * <;> exact ContDiffWithinAt.sum h
#align cont_diff_at.sum ContDiffAt.sum
+-/
+#print ContDiffOn.sum /-
theorem ContDiffOn.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {t : Set E}
(h : β i β s, ContDiffOn π n (fun x => f i x) t) :
ContDiffOn π n (fun x => β i in s, f i x) t := fun x hx =>
ContDiffWithinAt.sum fun i hi => h i hi x hx
#align cont_diff_on.sum ContDiffOn.sum
+-/
+#print ContDiff.sum /-
theorem ContDiff.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ}
(h : β i β s, ContDiff π n fun x => f i x) : ContDiff π n fun x => β i in s, f i x := by
simp only [β contDiffOn_univ] at * <;> exact ContDiffOn.sum h
#align cont_diff.sum ContDiff.sum
+-/
/-! ### Product of two functions -/
@@ -1556,112 +1849,154 @@ section MulProd
variable {πΈ πΈ' ΞΉ π' : Type _} [NormedRing πΈ] [NormedAlgebra π πΈ] [NormedCommRing πΈ']
[NormedAlgebra π πΈ'] [NormedField π'] [NormedAlgebra π π']
+#print contDiff_mul /-
-- The product is smooth.
theorem contDiff_mul : ContDiff π n fun p : πΈ Γ πΈ => p.1 * p.2 :=
(ContinuousLinearMap.mul π πΈ).IsBoundedBilinearMap.ContDiff
#align cont_diff_mul contDiff_mul
+-/
+#print ContDiffWithinAt.mul /-
/-- The product of two `C^n` functions within a set at a point is `C^n` within this set
at this point. -/
theorem ContDiffWithinAt.mul {s : Set E} {f g : E β πΈ} (hf : ContDiffWithinAt π n f s x)
(hg : ContDiffWithinAt π n g s x) : ContDiffWithinAt π n (fun x => f x * g x) s x :=
contDiff_mul.comp_contDiffWithinAt (hf.Prod hg)
#align cont_diff_within_at.mul ContDiffWithinAt.mul
+-/
+#print ContDiffAt.mul /-
/-- The product of two `C^n` functions at a point is `C^n` at this point. -/
theorem ContDiffAt.mul {f g : E β πΈ} (hf : ContDiffAt π n f x) (hg : ContDiffAt π n g x) :
ContDiffAt π n (fun x => f x * g x) x :=
hf.mul hg
#align cont_diff_at.mul ContDiffAt.mul
+-/
+#print ContDiffOn.mul /-
/-- The product of two `C^n` functions on a domain is `C^n`. -/
theorem ContDiffOn.mul {f g : E β πΈ} (hf : ContDiffOn π n f s) (hg : ContDiffOn π n g s) :
ContDiffOn π n (fun x => f x * g x) s := fun x hx => (hf x hx).mul (hg x hx)
#align cont_diff_on.mul ContDiffOn.mul
+-/
+#print ContDiff.mul /-
/-- The product of two `C^n`functions is `C^n`. -/
theorem ContDiff.mul {f g : E β πΈ} (hf : ContDiff π n f) (hg : ContDiff π n g) :
ContDiff π n fun x => f x * g x :=
contDiff_mul.comp (hf.Prod hg)
#align cont_diff.mul ContDiff.mul
+-/
+#print contDiffWithinAt_prod' /-
theorem contDiffWithinAt_prod' {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'}
(h : β i β t, ContDiffWithinAt π n (f i) s x) : ContDiffWithinAt π n (β i in t, f i) s x :=
Finset.prod_induction f (fun f => ContDiffWithinAt π n f s x) (fun _ _ => ContDiffWithinAt.mul)
(@contDiffWithinAt_const _ _ _ _ _ _ _ _ _ _ _ 1) h
#align cont_diff_within_at_prod' contDiffWithinAt_prod'
+-/
+#print contDiffWithinAt_prod /-
theorem contDiffWithinAt_prod {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'}
(h : β i β t, ContDiffWithinAt π n (f i) s x) :
ContDiffWithinAt π n (fun y => β i in t, f i y) s x := by
simpa only [β Finset.prod_apply] using contDiffWithinAt_prod' h
#align cont_diff_within_at_prod contDiffWithinAt_prod
+-/
+#print contDiffAt_prod' /-
theorem contDiffAt_prod' {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'} (h : β i β t, ContDiffAt π n (f i) x) :
ContDiffAt π n (β i in t, f i) x :=
contDiffWithinAt_prod' h
#align cont_diff_at_prod' contDiffAt_prod'
+-/
+#print contDiffAt_prod /-
theorem contDiffAt_prod {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'} (h : β i β t, ContDiffAt π n (f i) x) :
ContDiffAt π n (fun y => β i in t, f i y) x :=
contDiffWithinAt_prod h
#align cont_diff_at_prod contDiffAt_prod
+-/
+#print contDiffOn_prod' /-
theorem contDiffOn_prod' {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'} (h : β i β t, ContDiffOn π n (f i) s) :
ContDiffOn π n (β i in t, f i) s := fun x hx => contDiffWithinAt_prod' fun i hi => h i hi x hx
#align cont_diff_on_prod' contDiffOn_prod'
+-/
+#print contDiffOn_prod /-
theorem contDiffOn_prod {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'} (h : β i β t, ContDiffOn π n (f i) s) :
ContDiffOn π n (fun y => β i in t, f i y) s := fun x hx =>
contDiffWithinAt_prod fun i hi => h i hi x hx
#align cont_diff_on_prod contDiffOn_prod
+-/
+#print contDiff_prod' /-
theorem contDiff_prod' {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'} (h : β i β t, ContDiff π n (f i)) :
ContDiff π n (β i in t, f i) :=
contDiff_iff_contDiffAt.mpr fun x => contDiffAt_prod' fun i hi => (h i hi).ContDiffAt
#align cont_diff_prod' contDiff_prod'
+-/
+#print contDiff_prod /-
theorem contDiff_prod {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'} (h : β i β t, ContDiff π n (f i)) :
ContDiff π n fun y => β i in t, f i y :=
contDiff_iff_contDiffAt.mpr fun x => contDiffAt_prod fun i hi => (h i hi).ContDiffAt
#align cont_diff_prod contDiff_prod
+-/
+#print ContDiff.pow /-
theorem ContDiff.pow {f : E β πΈ} (hf : ContDiff π n f) : β m : β, ContDiff π n fun x => f x ^ m
| 0 => by simpa using contDiff_const
| m + 1 => by simpa [pow_succ] using hf.mul (ContDiff.pow m)
#align cont_diff.pow ContDiff.pow
+-/
+#print ContDiffWithinAt.pow /-
theorem ContDiffWithinAt.pow {f : E β πΈ} (hf : ContDiffWithinAt π n f s x) (m : β) :
ContDiffWithinAt π n (fun y => f y ^ m) s x :=
(contDiff_id.pow m).comp_contDiffWithinAt hf
#align cont_diff_within_at.pow ContDiffWithinAt.pow
+-/
+#print ContDiffAt.pow /-
theorem ContDiffAt.pow {f : E β πΈ} (hf : ContDiffAt π n f x) (m : β) :
ContDiffAt π n (fun y => f y ^ m) x :=
hf.pow m
#align cont_diff_at.pow ContDiffAt.pow
+-/
+#print ContDiffOn.pow /-
theorem ContDiffOn.pow {f : E β πΈ} (hf : ContDiffOn π n f s) (m : β) :
ContDiffOn π n (fun y => f y ^ m) s := fun y hy => (hf y hy).pow m
#align cont_diff_on.pow ContDiffOn.pow
+-/
+#print ContDiffWithinAt.div_const /-
theorem ContDiffWithinAt.div_const {f : E β π'} {n} (hf : ContDiffWithinAt π n f s x) (c : π') :
ContDiffWithinAt π n (fun x => f x / c) s x := by
simpa only [div_eq_mul_inv] using hf.mul contDiffWithinAt_const
#align cont_diff_within_at.div_const ContDiffWithinAt.div_const
+-/
+#print ContDiffAt.div_const /-
theorem ContDiffAt.div_const {f : E β π'} {n} (hf : ContDiffAt π n f x) (c : π') :
ContDiffAt π n (fun x => f x / c) x :=
hf.div_const c
#align cont_diff_at.div_const ContDiffAt.div_const
+-/
+#print ContDiffOn.div_const /-
theorem ContDiffOn.div_const {f : E β π'} {n} (hf : ContDiffOn π n f s) (c : π') :
ContDiffOn π n (fun x => f x / c) s := fun x hx => (hf x hx).div_const c
#align cont_diff_on.div_const ContDiffOn.div_const
+-/
+#print ContDiff.div_const /-
theorem ContDiff.div_const {f : E β π'} {n} (hf : ContDiff π n f) (c : π') :
ContDiff π n fun x => f x / c := by simpa only [div_eq_mul_inv] using hf.mul contDiff_const
#align cont_diff.div_const ContDiff.div_const
+-/
end MulProd
@@ -1670,35 +2005,45 @@ end MulProd
section Smul
+#print contDiff_smul /-
-- The scalar multiplication is smooth.
theorem contDiff_smul : ContDiff π n fun p : π Γ F => p.1 β’ p.2 :=
isBoundedBilinearMap_smul.ContDiff
#align cont_diff_smul contDiff_smul
+-/
+#print ContDiffWithinAt.smul /-
/-- The scalar multiplication of two `C^n` functions within a set at a point is `C^n` within this
set at this point. -/
theorem ContDiffWithinAt.smul {s : Set E} {f : E β π} {g : E β F} (hf : ContDiffWithinAt π n f s x)
(hg : ContDiffWithinAt π n g s x) : ContDiffWithinAt π n (fun x => f x β’ g x) s x :=
contDiff_smul.ContDiffWithinAt.comp x (hf.Prod hg) subset_preimage_univ
#align cont_diff_within_at.smul ContDiffWithinAt.smul
+-/
+#print ContDiffAt.smul /-
/-- The scalar multiplication of two `C^n` functions at a point is `C^n` at this point. -/
theorem ContDiffAt.smul {f : E β π} {g : E β F} (hf : ContDiffAt π n f x)
(hg : ContDiffAt π n g x) : ContDiffAt π n (fun x => f x β’ g x) x := by
rw [β contDiffWithinAt_univ] at * <;> exact hf.smul hg
#align cont_diff_at.smul ContDiffAt.smul
+-/
+#print ContDiff.smul /-
/-- The scalar multiplication of two `C^n` functions is `C^n`. -/
theorem ContDiff.smul {f : E β π} {g : E β F} (hf : ContDiff π n f) (hg : ContDiff π n g) :
ContDiff π n fun x => f x β’ g x :=
contDiff_smul.comp (hf.Prod hg)
#align cont_diff.smul ContDiff.smul
+-/
+#print ContDiffOn.smul /-
/-- The scalar multiplication of two `C^n` functions on a domain is `C^n`. -/
theorem ContDiffOn.smul {s : Set E} {f : E β π} {g : E β F} (hf : ContDiffOn π n f s)
(hg : ContDiffOn π n g s) : ContDiffOn π n (fun x => f x β’ g x) s := fun x hx =>
(hf x hx).smul (hg x hx)
#align cont_diff_on.smul ContDiffOn.smul
+-/
end Smul
@@ -1711,38 +2056,49 @@ variable {R : Type _} [Semiring R] [Module R F] [SMulCommClass π R F]
variable [ContinuousConstSMul R F]
+#print contDiff_const_smul /-
-- The scalar multiplication with a constant is smooth.
theorem contDiff_const_smul (c : R) : ContDiff π n fun p : F => c β’ p :=
(c β’ ContinuousLinearMap.id π F).ContDiff
#align cont_diff_const_smul contDiff_const_smul
+-/
+#print ContDiffWithinAt.const_smul /-
/-- The scalar multiplication of a constant and a `C^n` function within a set at a point is `C^n`
within this set at this point. -/
theorem ContDiffWithinAt.const_smul {s : Set E} {f : E β F} {x : E} (c : R)
(hf : ContDiffWithinAt π n f s x) : ContDiffWithinAt π n (fun y => c β’ f y) s x :=
(contDiff_const_smul c).ContDiffAt.comp_contDiffWithinAt x hf
#align cont_diff_within_at.const_smul ContDiffWithinAt.const_smul
+-/
+#print ContDiffAt.const_smul /-
/-- The scalar multiplication of a constant and a `C^n` function at a point is `C^n` at this
point. -/
theorem ContDiffAt.const_smul {f : E β F} {x : E} (c : R) (hf : ContDiffAt π n f x) :
ContDiffAt π n (fun y => c β’ f y) x := by
rw [β contDiffWithinAt_univ] at * <;> exact hf.const_smul c
#align cont_diff_at.const_smul ContDiffAt.const_smul
+-/
+#print ContDiff.const_smul /-
/-- The scalar multiplication of a constant and a `C^n` function is `C^n`. -/
theorem ContDiff.const_smul {f : E β F} (c : R) (hf : ContDiff π n f) :
ContDiff π n fun y => c β’ f y :=
(contDiff_const_smul c).comp hf
#align cont_diff.const_smul ContDiff.const_smul
+-/
+#print ContDiffOn.const_smul /-
/-- The scalar multiplication of a constant and a `C^n` on a domain is `C^n`. -/
theorem ContDiffOn.const_smul {s : Set E} {f : E β F} (c : R) (hf : ContDiffOn π n f s) :
ContDiffOn π n (fun y => c β’ f y) s := fun x hx => (hf x hx).const_smul c
#align cont_diff_on.const_smul ContDiffOn.const_smul
+-/
variable {i : β} {a : R}
+#print iteratedFDerivWithin_const_smul_apply /-
theorem iteratedFDerivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu : UniqueDiffOn π s)
(hx : x β s) : iteratedFDerivWithin π i (a β’ f) s x = a β’ iteratedFDerivWithin π i f s x :=
by
@@ -1763,13 +2119,16 @@ theorem iteratedFDerivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu :
rw [Pi.smul_def, fderivWithin_const_smul (hu x hx) (hdf x hx)]; rfl
_ = a β’ iteratedFDerivWithin π (i + 1) f s x h := rfl
#align iterated_fderiv_within_const_smul_apply iteratedFDerivWithin_const_smul_apply
+-/
+#print iteratedFDeriv_const_smul_apply /-
theorem iteratedFDeriv_const_smul_apply {x : E} (hf : ContDiff π i f) :
iteratedFDeriv π i (a β’ f) x = a β’ iteratedFDeriv π i f x :=
by
simp_rw [β contDiffOn_univ, β iteratedFDerivWithin_univ] at *
refine' iteratedFDerivWithin_const_smul_apply hf uniqueDiffOn_univ (Set.mem_univ _)
#align iterated_fderiv_const_smul_apply iteratedFDeriv_const_smul_apply
+-/
end ConstSmul
@@ -1783,6 +2142,7 @@ variable {E' : Type _} [NormedAddCommGroup E'] [NormedSpace π E']
variable {F' : Type _} [NormedAddCommGroup F'] [NormedSpace π F']
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffWithinAt.prod_map' /-
/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
theorem ContDiffWithinAt.prod_map' {s : Set E} {t : Set E'} {f : E β F} {g : E' β F'} {p : E Γ E'}
@@ -1791,15 +2151,19 @@ theorem ContDiffWithinAt.prod_map' {s : Set E} {t : Set E'} {f : E β F} {g : E
(hf.comp p contDiffWithinAt_fst (prod_subset_preimage_fst _ _)).Prod
(hg.comp p contDiffWithinAt_snd (prod_subset_preimage_snd _ _))
#align cont_diff_within_at.prod_map' ContDiffWithinAt.prod_map'
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffWithinAt.prod_map /-
theorem ContDiffWithinAt.prod_map {s : Set E} {t : Set E'} {f : E β F} {g : E' β F'} {x : E}
{y : E'} (hf : ContDiffWithinAt π n f s x) (hg : ContDiffWithinAt π n g t y) :
ContDiffWithinAt π n (Prod.map f g) (s ΓΛ’ t) (x, y) :=
ContDiffWithinAt.prod_map' hf hg
#align cont_diff_within_at.prod_map ContDiffWithinAt.prod_map
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print ContDiffOn.prod_map /-
/-- The product map of two `C^n` functions on a set is `C^n` on the product set. -/
theorem ContDiffOn.prod_map {E' : Type _} [NormedAddCommGroup E'] [NormedSpace π E'] {F' : Type _}
[NormedAddCommGroup F'] [NormedSpace π F'] {s : Set E} {t : Set E'} {f : E β F} {g : E' β F'}
@@ -1807,7 +2171,9 @@ theorem ContDiffOn.prod_map {E' : Type _} [NormedAddCommGroup E'] [NormedSpace
(hf.comp contDiffOn_fst (prod_subset_preimage_fst _ _)).Prod
(hg.comp contDiffOn_snd (prod_subset_preimage_snd _ _))
#align cont_diff_on.prod_map ContDiffOn.prod_map
+-/
+#print ContDiffAt.prod_map /-
/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
theorem ContDiffAt.prod_map {f : E β F} {g : E' β F'} {x : E} {y : E'} (hf : ContDiffAt π n f x)
@@ -1817,7 +2183,9 @@ theorem ContDiffAt.prod_map {f : E β F} {g : E' β F'} {x : E} {y : E'} (hf :
convert hf.prod_map hg
simp only [univ_prod_univ]
#align cont_diff_at.prod_map ContDiffAt.prod_map
+-/
+#print ContDiffAt.prod_map' /-
/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
theorem ContDiffAt.prod_map' {f : E β F} {g : E' β F'} {p : E Γ E'} (hf : ContDiffAt π n f p.1)
@@ -1826,7 +2194,9 @@ theorem ContDiffAt.prod_map' {f : E β F} {g : E' β F'} {p : E Γ E'} (hf : C
rcases p with β¨β©
exact ContDiffAt.prod_map hf hg
#align cont_diff_at.prod_map' ContDiffAt.prod_map'
+-/
+#print ContDiff.prod_map /-
/-- The product map of two `C^n` functions is `C^n`. -/
theorem ContDiff.prod_map {f : E β F} {g : E' β F'} (hf : ContDiff π n f) (hg : ContDiff π n g) :
ContDiff π n (Prod.map f g) :=
@@ -1834,14 +2204,19 @@ theorem ContDiff.prod_map {f : E β F} {g : E' β F'} (hf : ContDiff π n f)
rw [contDiff_iff_contDiffAt] at *
exact fun β¨x, yβ© => (hf x).Prod_map (hg y)
#align cont_diff.prod_map ContDiff.prod_map
+-/
+#print contDiff_prod_mk_left /-
theorem contDiff_prod_mk_left (fβ : F) : ContDiff π n fun e : E => (e, fβ) :=
contDiff_id.Prod contDiff_const
#align cont_diff_prod_mk_left contDiff_prod_mk_left
+-/
+#print contDiff_prod_mk_right /-
theorem contDiff_prod_mk_right (eβ : E) : ContDiff π n fun f : F => (eβ, f) :=
contDiff_const.Prod contDiff_id
#align cont_diff_prod_mk_right contDiff_prod_mk_right
+-/
end Prod_map
@@ -1854,6 +2229,7 @@ variable (π) {R : Type _} [NormedRing R] [NormedAlgebra π R]
open NormedRing ContinuousLinearMap Ring
+#print contDiffAt_ring_inverse /-
/-- In a complete normed algebra, the operation of inversion is `C^n`, for all `n`, at each
invertible element. The proof is by induction, bootstrapping using an identity expressing the
derivative of inversion as a bilinear map of inversion itself. -/
@@ -1881,19 +2257,25 @@ theorem contDiffAt_ring_inverse [CompleteSpace R] (x : RΛ£) : ContDiffAt π n
(mul_left_right_is_bounded_bilinear π R).ContDiff.neg.comp_contDiffAt (x : R) (IH.prod IH)
Β· exact cont_diff_at_top.mpr Itop
#align cont_diff_at_ring_inverse contDiffAt_ring_inverse
+-/
variable (π) {π' : Type _} [NormedField π'] [NormedAlgebra π π'] [CompleteSpace π']
+#print contDiffAt_inv /-
theorem contDiffAt_inv {x : π'} (hx : x β 0) {n} : ContDiffAt π n Inv.inv x := by
simpa only [Ring.inverse_eq_inv'] using contDiffAt_ring_inverse π (Units.mk0 x hx)
#align cont_diff_at_inv contDiffAt_inv
+-/
+#print contDiffOn_inv /-
theorem contDiffOn_inv {n} : ContDiffOn π n (Inv.inv : π' β π') ({0}αΆ) := fun x hx =>
(contDiffAt_inv π hx).ContDiffWithinAt
#align cont_diff_on_inv contDiffOn_inv
+-/
variable {π}
+#print ContDiffWithinAt.inv /-
-- TODO: the next few lemmas don't need `π` or `π'` to be complete
-- A good way to show this is to generalize `cont_diff_at_ring_inverse` to the setting
-- of a function `f` such that `βαΆ x in π a, x * f x = 1`.
@@ -1901,44 +2283,59 @@ theorem ContDiffWithinAt.inv {f : E β π'} {n} (hf : ContDiffWithinAt π n
ContDiffWithinAt π n (fun x => (f x)β»ΒΉ) s x :=
(contDiffAt_inv π hx).comp_contDiffWithinAt x hf
#align cont_diff_within_at.inv ContDiffWithinAt.inv
+-/
+#print ContDiffOn.inv /-
theorem ContDiffOn.inv {f : E β π'} {n} (hf : ContDiffOn π n f s) (h : β x β s, f x β 0) :
ContDiffOn π n (fun x => (f x)β»ΒΉ) s := fun x hx => (hf.ContDiffWithinAt hx).inv (h x hx)
#align cont_diff_on.inv ContDiffOn.inv
+-/
+#print ContDiffAt.inv /-
theorem ContDiffAt.inv {f : E β π'} {n} (hf : ContDiffAt π n f x) (hx : f x β 0) :
ContDiffAt π n (fun x => (f x)β»ΒΉ) x :=
hf.inv hx
#align cont_diff_at.inv ContDiffAt.inv
+-/
+#print ContDiff.inv /-
theorem ContDiff.inv {f : E β π'} {n} (hf : ContDiff π n f) (h : β x, f x β 0) :
ContDiff π n fun x => (f x)β»ΒΉ := by rw [contDiff_iff_contDiffAt];
exact fun x => hf.cont_diff_at.inv (h x)
#align cont_diff.inv ContDiff.inv
+-/
+#print ContDiffWithinAt.div /-
-- TODO: generalize to `f g : E β π'`
theorem ContDiffWithinAt.div [CompleteSpace π] {f g : E β π} {n} (hf : ContDiffWithinAt π n f s x)
(hg : ContDiffWithinAt π n g s x) (hx : g x β 0) :
ContDiffWithinAt π n (fun x => f x / g x) s x := by
simpa only [div_eq_mul_inv] using hf.mul (hg.inv hx)
#align cont_diff_within_at.div ContDiffWithinAt.div
+-/
+#print ContDiffOn.div /-
theorem ContDiffOn.div [CompleteSpace π] {f g : E β π} {n} (hf : ContDiffOn π n f s)
(hg : ContDiffOn π n g s) (hβ : β x β s, g x β 0) : ContDiffOn π n (f / g) s := fun x hx =>
(hf x hx).div (hg x hx) (hβ x hx)
#align cont_diff_on.div ContDiffOn.div
+-/
+#print ContDiffAt.div /-
theorem ContDiffAt.div [CompleteSpace π] {f g : E β π} {n} (hf : ContDiffAt π n f x)
(hg : ContDiffAt π n g x) (hx : g x β 0) : ContDiffAt π n (fun x => f x / g x) x :=
hf.div hg hx
#align cont_diff_at.div ContDiffAt.div
+-/
+#print ContDiff.div /-
theorem ContDiff.div [CompleteSpace π] {f g : E β π} {n} (hf : ContDiff π n f) (hg : ContDiff π n g)
(h0 : β x, g x β 0) : ContDiff π n fun x => f x / g x :=
by
simp only [contDiff_iff_contDiffAt] at *
exact fun x => (hf x).div (hg x) (h0 x)
#align cont_diff.div ContDiff.div
+-/
end AlgebraInverse
@@ -1949,6 +2346,7 @@ section MapInverse
open ContinuousLinearMap
+#print contDiffAt_map_inverse /-
/-- At a continuous linear equivalence `e : E βL[π] F` between Banach spaces, the operation of
inversion is `C^n`, for all `n`. -/
theorem contDiffAt_map_inverse [CompleteSpace E] (e : E βL[π] F) :
@@ -1969,6 +2367,7 @@ theorem contDiffAt_map_inverse [CompleteSpace E] (e : E βL[π] F) :
convert contDiffAt_ring_inverse π (1 : (E βL[π] E)Λ£)
simp [Oβ, one_def]
#align cont_diff_at_map_inverse contDiffAt_map_inverse
+-/
end MapInverse
@@ -1976,6 +2375,7 @@ section FunctionInverse
open ContinuousLinearMap
+#print LocalHomeomorph.contDiffAt_symm /-
/-- If `f` is a local homeomorphism and the point `a` is in its target,
and if `f` is `n` times continuously differentiable at `f.symm a`,
and if the derivative at `f.symm a` is a continuous linear equivalence,
@@ -2034,7 +2434,9 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
intro n
exact Itop n (cont_diff_at_top.mp hf n)
#align local_homeomorph.cont_diff_at_symm LocalHomeomorph.contDiffAt_symm
+-/
+#print Homeomorph.contDiff_symm /-
/-- If `f` is an `n` times continuously differentiable homeomorphism,
and if the derivative of `f` at each point is a continuous linear equivalence,
then `f.symm` is `n` times continuously differentiable.
@@ -2047,7 +2449,9 @@ theorem Homeomorph.contDiff_symm [CompleteSpace E] (f : E ββ F) {fβ' : E
contDiff_iff_contDiffAt.2 fun x =>
f.toLocalHomeomorph.contDiffAt_symm (mem_univ x) (hfβ' _) hf.ContDiffAt
#align homeomorph.cont_diff_symm Homeomorph.contDiff_symm
+-/
+#print LocalHomeomorph.contDiffAt_symm_deriv /-
/-- Let `f` be a local homeomorphism of a nontrivially normed field, let `a` be a point in its
target. if `f` is `n` times continuously differentiable at `f.symm a`, and if the derivative at
`f.symm a` is nonzero, then `f.symm` is `n` times continuously differentiable at the point `a`.
@@ -2059,7 +2463,9 @@ theorem LocalHomeomorph.contDiffAt_symm_deriv [CompleteSpace π] (f : LocalHom
(hf : ContDiffAt π n f (f.symm a)) : ContDiffAt π n f.symm a :=
f.contDiffAt_symm ha (hfβ'.hasFDerivAt_equiv hβ) hf
#align local_homeomorph.cont_diff_at_symm_deriv LocalHomeomorph.contDiffAt_symm_deriv
+-/
+#print Homeomorph.contDiff_symm_deriv /-
/-- Let `f` be an `n` times continuously differentiable homeomorphism of a nontrivially normed
field. Suppose that the derivative of `f` is never equal to zero. Then `f.symm` is `n` times
continuously differentiable.
@@ -2072,6 +2478,7 @@ theorem Homeomorph.contDiff_symm_deriv [CompleteSpace π] (f : π ββ
contDiff_iff_contDiffAt.2 fun x =>
f.toLocalHomeomorph.contDiffAt_symm_deriv (hβ _) (mem_univ x) (hf' _) hf.ContDiffAt
#align homeomorph.cont_diff_symm_deriv Homeomorph.contDiff_symm_deriv
+-/
end FunctionInverse
@@ -2084,6 +2491,7 @@ open Function FiniteDimensional
variable [CompleteSpace π]
+#print contDiffOn_clm_apply /-
/-- A family of continuous linear maps is `C^n` on `s` if all its applications are. -/
theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s :=
@@ -2096,12 +2504,16 @@ theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E}
rw [β comp.left_id f, β eβ.symm_comp_self]
exact eβ.symm.cont_diff.comp_cont_diff_on (cont_diff_on_pi.mpr fun i => h _)
#align cont_diff_on_clm_apply contDiffOn_clm_apply
+-/
+#print contDiff_clm_apply_iff /-
theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDimensional π F] :
ContDiff π n f β β y, ContDiff π n fun x => f x y := by
simp_rw [β contDiffOn_univ, contDiffOn_clm_apply]
#align cont_diff_clm_apply_iff contDiff_clm_apply_iff
+-/
+#print contDiff_succ_iff_fderiv_apply /-
/-- This is a useful lemma to prove that a certain operation preserves functions being `C^n`.
When you do induction on `n`, this gives a useful characterization of a function being `C^(n+1)`,
assuming you have already computed the derivative. The advantage of this version over
@@ -2115,19 +2527,24 @@ theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f :
ContDiff π (n + 1 : β) f β Differentiable π f β§ β y, ContDiff π n fun x => fderiv π f x y := by
rw [contDiff_succ_iff_fderiv, contDiff_clm_apply_iff]
#align cont_diff_succ_iff_fderiv_apply contDiff_succ_iff_fderiv_apply
+-/
+#print contDiffOn_succ_of_fderiv_apply /-
theorem contDiffOn_succ_of_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} {s : Set E}
(hf : DifferentiableOn π f s) (h : β y, ContDiffOn π n (fun x => fderivWithin π f s x y) s) :
ContDiffOn π (n + 1 : β) f s :=
contDiffOn_succ_of_fderivWithin hf <| contDiffOn_clm_apply.mpr h
#align cont_diff_on_succ_of_fderiv_apply contDiffOn_succ_of_fderiv_apply
+-/
+#print contDiffOn_succ_iff_fderiv_apply /-
theorem contDiffOn_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} {s : Set E}
(hs : UniqueDiffOn π s) :
ContDiffOn π (n + 1 : β) f s β
DifferentiableOn π f s β§ β y, ContDiffOn π n (fun x => fderivWithin π f s x y) s :=
by rw [contDiffOn_succ_iff_fderivWithin hs, contDiffOn_clm_apply]
#align cont_diff_on_succ_iff_fderiv_apply contDiffOn_succ_iff_fderiv_apply
+-/
end FiniteDimensional
@@ -2143,6 +2560,7 @@ section Real
variable {π : Type _} [IsROrC π] {E' : Type _} [NormedAddCommGroup E'] [NormedSpace π E']
{F' : Type _} [NormedAddCommGroup F'] [NormedSpace π F']
+#print HasFTaylorSeriesUpToOn.hasStrictFDerivAt /-
/-- If a function has a Taylor series at order at least 1, then at points in the interior of the
domain of definition, the term of order 1 of this series is a strict derivative of `f`. -/
theorem HasFTaylorSeriesUpToOn.hasStrictFDerivAt {s : Set E'} {f : E' β F'} {x : E'}
@@ -2151,7 +2569,9 @@ theorem HasFTaylorSeriesUpToOn.hasStrictFDerivAt {s : Set E'} {f : E' β F'} {x
hasStrictFDerivAt_of_hasFDerivAt_of_continuousAt (hf.eventually_hasFDerivAt hn hs) <|
(continuousMultilinearCurryFin1 π E' F').ContinuousAt.comp <| (hf.cont 1 hn).ContinuousAt hs
#align has_ftaylor_series_up_to_on.has_strict_fderiv_at HasFTaylorSeriesUpToOn.hasStrictFDerivAt
+-/
+#print ContDiffAt.hasStrictFDerivAt' /-
/-- If a function is `C^n` with `1 β€ n` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
theorem ContDiffAt.hasStrictFDerivAt' {f : E' β F'} {f' : E' βL[π] F'} {x : E'}
@@ -2162,40 +2582,52 @@ theorem ContDiffAt.hasStrictFDerivAt' {f : E' β F'} {f' : E' βL[π] F'} {x
have := hp.has_strict_fderiv_at le_rfl H
rwa [hf'.unique this.has_fderiv_at]
#align cont_diff_at.has_strict_fderiv_at' ContDiffAt.hasStrictFDerivAt'
+-/
+#print ContDiffAt.hasStrictDerivAt' /-
/-- If a function is `C^n` with `1 β€ n` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
theorem ContDiffAt.hasStrictDerivAt' {f : π β F'} {f' : F'} {x : π} (hf : ContDiffAt π n f x)
(hf' : HasDerivAt f f' x) (hn : 1 β€ n) : HasStrictDerivAt f f' x :=
hf.hasStrictFDerivAt' hf' hn
#align cont_diff_at.has_strict_deriv_at' ContDiffAt.hasStrictDerivAt'
+-/
+#print ContDiffAt.hasStrictFDerivAt /-
/-- If a function is `C^n` with `1 β€ n` around a point, then the derivative of `f` at this point
is also a strict derivative. -/
theorem ContDiffAt.hasStrictFDerivAt {f : E' β F'} {x : E'} (hf : ContDiffAt π n f x) (hn : 1 β€ n) :
HasStrictFDerivAt f (fderiv π f x) x :=
hf.hasStrictFDerivAt' (hf.DifferentiableAt hn).HasFDerivAt hn
#align cont_diff_at.has_strict_fderiv_at ContDiffAt.hasStrictFDerivAt
+-/
+#print ContDiffAt.hasStrictDerivAt /-
/-- If a function is `C^n` with `1 β€ n` around a point, then the derivative of `f` at this point
is also a strict derivative. -/
theorem ContDiffAt.hasStrictDerivAt {f : π β F'} {x : π} (hf : ContDiffAt π n f x) (hn : 1 β€ n) :
HasStrictDerivAt f (deriv f x) x :=
(hf.HasStrictFDerivAt hn).HasStrictDerivAt
#align cont_diff_at.has_strict_deriv_at ContDiffAt.hasStrictDerivAt
+-/
+#print ContDiff.hasStrictFDerivAt /-
/-- If a function is `C^n` with `1 β€ n`, then the derivative of `f` is also a strict derivative. -/
theorem ContDiff.hasStrictFDerivAt {f : E' β F'} {x : E'} (hf : ContDiff π n f) (hn : 1 β€ n) :
HasStrictFDerivAt f (fderiv π f x) x :=
hf.ContDiffAt.HasStrictFDerivAt hn
#align cont_diff.has_strict_fderiv_at ContDiff.hasStrictFDerivAt
+-/
+#print ContDiff.hasStrictDerivAt /-
/-- If a function is `C^n` with `1 β€ n`, then the derivative of `f` is also a strict derivative. -/
theorem ContDiff.hasStrictDerivAt {f : π β F'} {x : π} (hf : ContDiff π n f) (hn : 1 β€ n) :
HasStrictDerivAt f (deriv f x) x :=
hf.ContDiffAt.HasStrictDerivAt hn
#align cont_diff.has_strict_deriv_at ContDiff.hasStrictDerivAt
+-/
+#print HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt /-
/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} βͺ s`, where `s` is a convex set,
and `βp x 1ββ < K`, then `f` is `K`-Lipschitz in a neighborhood of `x` within `s`. -/
theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _}
@@ -2215,7 +2647,9 @@ theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _
hs.exists_nhds_within_lipschitz_on_with_of_has_fderiv_within_at_of_nnnorm_lt
(eventually_nhdsWithin_iff.2 <| eventually_of_forall hder) hcont K hK
#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with_of_nnnorm_lt HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt
+-/
+#print HasFTaylorSeriesUpToOn.exists_lipschitzOnWith /-
/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} βͺ s`, where `s` is a convex set,
then `f` is Lipschitz in a neighborhood of `x` within `s`. -/
theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGroup E]
@@ -2225,7 +2659,9 @@ theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type _} [NormedAddC
β K, β t β π[s] x, LipschitzOnWith K f t :=
(exists_gt _).imp <| hf.exists_lipschitzOnWith_of_nnnorm_lt hs
#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with HasFTaylorSeriesUpToOn.exists_lipschitzOnWith
+-/
+#print ContDiffWithinAt.exists_lipschitzOnWith /-
/-- If `f` is `C^1` within a conves set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGroup E]
@@ -2242,7 +2678,9 @@ theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGro
rw [inter_comm, β nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ Ξ΅0)] at hst
exact β¨K, t, hst, hftβ©
#align cont_diff_within_at.exists_lipschitz_on_with ContDiffWithinAt.exists_lipschitzOnWith
+-/
+#print ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt /-
/-- If `f` is `C^1` at `x` and `K > βfderiv π f xβ`, then `f` is `K`-Lipschitz in a neighborhood of
`x`. -/
theorem ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt {f : E' β F'} {x : E'}
@@ -2250,12 +2688,15 @@ theorem ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt {f : E' β F'} {x : E'}
β t β π x, LipschitzOnWith K f t :=
(hf.HasStrictFDerivAt le_rfl).exists_lipschitzOnWith_of_nnnorm_lt K hK
#align cont_diff_at.exists_lipschitz_on_with_of_nnnorm_lt ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt
+-/
+#print ContDiffAt.exists_lipschitzOnWith /-
/-- If `f` is `C^1` at `x`, then `f` is Lipschitz in a neighborhood of `x`. -/
theorem ContDiffAt.exists_lipschitzOnWith {f : E' β F'} {x : E'} (hf : ContDiffAt π 1 f x) :
β K, β t β π x, LipschitzOnWith K f t :=
(hf.HasStrictFDerivAt le_rfl).exists_lipschitzOnWith
#align cont_diff_at.exists_lipschitz_on_with ContDiffAt.exists_lipschitzOnWith
+-/
end Real
@@ -2274,6 +2715,7 @@ variable {fβ : π β F} {sβ : Set π}
open ContinuousLinearMap (smul_right)
+#print contDiffOn_succ_iff_derivWithin /-
/-- A function is `C^(n + 1)` on a domain with unique derivatives if and only if it is
differentiable there, and its derivative (formulated with `deriv_within`) is `C^n`. -/
theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ) :
@@ -2296,8 +2738,10 @@ theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ)
have : IsBoundedBilinearMap π fun _ : (π βL[π] π) Γ F => _ := isBoundedBilinearMap_smulRight
exact (this.is_bounded_linear_map_right _).ContDiff
#align cont_diff_on_succ_iff_deriv_within contDiffOn_succ_iff_derivWithin
+-/
/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
+#print contDiffOn_succ_iff_deriv_of_open /-
/-- A function is `C^(n + 1)` on an open domain if and only if it is
differentiable there, and its derivative (formulated with `deriv`) is `C^n`. -/
theorem contDiffOn_succ_iff_deriv_of_open {n : β} (hs : IsOpen sβ) :
@@ -2308,7 +2752,9 @@ theorem contDiffOn_succ_iff_deriv_of_open {n : β} (hs : IsOpen sβ) :
"./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
exact contDiffOn_congr fun _ => derivWithin_of_open hs
#align cont_diff_on_succ_iff_deriv_of_open contDiffOn_succ_iff_deriv_of_open
+-/
+#print contDiffOn_top_iff_derivWithin /-
/-- A function is `C^β` on a domain with unique derivatives if and only if it is differentiable
there, and its derivative (formulated with `deriv_within`) is `C^β`. -/
theorem contDiffOn_top_iff_derivWithin (hs : UniqueDiffOn π sβ) :
@@ -2325,8 +2771,10 @@ theorem contDiffOn_top_iff_derivWithin (hs : UniqueDiffOn π sβ) :
apply ((contDiffOn_succ_iff_derivWithin hs).2 β¨h.1, h.2.of_le Aβ©).of_le
exact WithTop.coe_le_coe.2 (Nat.le_succ n)
#align cont_diff_on_top_iff_deriv_within contDiffOn_top_iff_derivWithin
+-/
/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
+#print contDiffOn_top_iff_deriv_of_open /-
/-- A function is `C^β` on an open domain if and only if it is differentiable
there, and its derivative (formulated with `deriv`) is `C^β`. -/
theorem contDiffOn_top_iff_deriv_of_open (hs : IsOpen sβ) :
@@ -2337,7 +2785,9 @@ theorem contDiffOn_top_iff_deriv_of_open (hs : IsOpen sβ) :
"./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
exact contDiffOn_congr fun _ => derivWithin_of_open hs
#align cont_diff_on_top_iff_deriv_of_open contDiffOn_top_iff_deriv_of_open
+-/
+#print ContDiffOn.derivWithin /-
theorem ContDiffOn.derivWithin (hf : ContDiffOn π n fβ sβ) (hs : UniqueDiffOn π sβ)
(hmn : m + 1 β€ n) : ContDiffOn π m (derivWithin fβ sβ) sβ :=
by
@@ -2349,22 +2799,30 @@ theorem ContDiffOn.derivWithin (hf : ContDiffOn π n fβ sβ) (hs : UniqueDi
Β· change (m.succ : ββ) β€ n at hmn
exact ((contDiffOn_succ_iff_derivWithin hs).1 (hf.of_le hmn)).2
#align cont_diff_on.deriv_within ContDiffOn.derivWithin
+-/
+#print ContDiffOn.deriv_of_open /-
theorem ContDiffOn.deriv_of_open (hf : ContDiffOn π n fβ sβ) (hs : IsOpen sβ) (hmn : m + 1 β€ n) :
ContDiffOn π m (deriv fβ) sβ :=
(hf.derivWithin hs.UniqueDiffOn hmn).congr fun x hx => (derivWithin_of_open hs hx).symm
#align cont_diff_on.deriv_of_open ContDiffOn.deriv_of_open
+-/
+#print ContDiffOn.continuousOn_derivWithin /-
theorem ContDiffOn.continuousOn_derivWithin (h : ContDiffOn π n fβ sβ) (hs : UniqueDiffOn π sβ)
(hn : 1 β€ n) : ContinuousOn (derivWithin fβ sβ) sβ :=
((contDiffOn_succ_iff_derivWithin hs).1 (h.of_le hn)).2.ContinuousOn
#align cont_diff_on.continuous_on_deriv_within ContDiffOn.continuousOn_derivWithin
+-/
+#print ContDiffOn.continuousOn_deriv_of_open /-
theorem ContDiffOn.continuousOn_deriv_of_open (h : ContDiffOn π n fβ sβ) (hs : IsOpen sβ)
(hn : 1 β€ n) : ContinuousOn (deriv fβ) sβ :=
((contDiffOn_succ_iff_deriv_of_open hs).1 (h.of_le hn)).2.ContinuousOn
#align cont_diff_on.continuous_on_deriv_of_open ContDiffOn.continuousOn_deriv_of_open
+-/
+#print contDiff_succ_iff_deriv /-
/-- A function is `C^(n + 1)` if and only if it is differentiable,
and its derivative (formulated in terms of `deriv`) is `C^n`. -/
theorem contDiff_succ_iff_deriv {n : β} :
@@ -2372,11 +2830,15 @@ theorem contDiff_succ_iff_deriv {n : β} :
simp only [β contDiffOn_univ, contDiffOn_succ_iff_deriv_of_open, isOpen_univ,
differentiableOn_univ]
#align cont_diff_succ_iff_deriv contDiff_succ_iff_deriv
+-/
+#print contDiff_one_iff_deriv /-
theorem contDiff_one_iff_deriv : ContDiff π 1 fβ β Differentiable π fβ β§ Continuous (deriv fβ) :=
contDiff_succ_iff_deriv.trans <| Iff.rfl.And contDiff_zero
#align cont_diff_one_iff_deriv contDiff_one_iff_deriv
+-/
+#print contDiff_top_iff_deriv /-
/-- A function is `C^β` if and only if it is differentiable,
and its derivative (formulated in terms of `deriv`) is `C^β`. -/
theorem contDiff_top_iff_deriv : ContDiff π β fβ β Differentiable π fβ β§ ContDiff π β (deriv fβ) :=
@@ -2384,22 +2846,29 @@ theorem contDiff_top_iff_deriv : ContDiff π β fβ β Differentiable π
simp only [β contDiffOn_univ, β differentiableOn_univ, β derivWithin_univ]
rw [contDiffOn_top_iff_derivWithin uniqueDiffOn_univ]
#align cont_diff_top_iff_deriv contDiff_top_iff_deriv
+-/
+#print ContDiff.continuous_deriv /-
theorem ContDiff.continuous_deriv (h : ContDiff π n fβ) (hn : 1 β€ n) : Continuous (deriv fβ) :=
(contDiff_succ_iff_deriv.mp (h.of_le hn)).2.Continuous
#align cont_diff.continuous_deriv ContDiff.continuous_deriv
+-/
+#print ContDiff.iterate_deriv /-
theorem ContDiff.iterate_deriv :
β (n : β) {fβ : π β F} (hf : ContDiff π β fβ), ContDiff π β ((deriv^[n]) fβ)
| 0, fβ, hf => hf
| n + 1, fβ, hf => ContDiff.iterate_deriv n (contDiff_top_iff_deriv.mp hf).2
#align cont_diff.iterate_deriv ContDiff.iterate_deriv
+-/
+#print ContDiff.iterate_deriv' /-
theorem ContDiff.iterate_deriv' (n : β) :
β (k : β) {fβ : π β F} (hf : ContDiff π (n + k : β) fβ), ContDiff π n ((deriv^[k]) fβ)
| 0, fβ, hf => hf
| n + 1, fβ, hf => ContDiff.iterate_deriv' n (contDiff_succ_iff_deriv.mp hf).2
#align cont_diff.iterate_deriv' ContDiff.iterate_deriv'
+-/
end deriv
@@ -2423,6 +2892,7 @@ variable [NormedSpace π' F] [IsScalarTower π π' F]
variable {p' : E β FormalMultilinearSeries π' E F}
+#print HasFTaylorSeriesUpToOn.restrictScalars /-
theorem HasFTaylorSeriesUpToOn.restrictScalars (h : HasFTaylorSeriesUpToOn n f p' s) :
HasFTaylorSeriesUpToOn n f (fun x => (p' x).restrictScalars π) s :=
{ zero_eq := fun x hx => h.zero_eq x hx
@@ -2434,31 +2904,41 @@ theorem HasFTaylorSeriesUpToOn.restrictScalars (h : HasFTaylorSeriesUpToOn n f p
cont := fun m hm =>
ContinuousMultilinearMap.continuous_restrictScalars.comp_continuousOn (h.cont m hm) }
#align has_ftaylor_series_up_to_on.restrict_scalars HasFTaylorSeriesUpToOn.restrictScalars
+-/
+#print ContDiffWithinAt.restrict_scalars /-
theorem ContDiffWithinAt.restrict_scalars (h : ContDiffWithinAt π' n f s x) :
ContDiffWithinAt π n f s x := by
intro m hm
rcases h m hm with β¨u, u_mem, p', hp'β©
exact β¨u, u_mem, _, hp'.restrict_scalars _β©
#align cont_diff_within_at.restrict_scalars ContDiffWithinAt.restrict_scalars
+-/
+#print ContDiffOn.restrict_scalars /-
theorem ContDiffOn.restrict_scalars (h : ContDiffOn π' n f s) : ContDiffOn π n f s := fun x hx =>
(h x hx).restrictScalars _
#align cont_diff_on.restrict_scalars ContDiffOn.restrict_scalars
+-/
+#print ContDiffAt.restrict_scalars /-
theorem ContDiffAt.restrict_scalars (h : ContDiffAt π' n f x) : ContDiffAt π n f x :=
contDiffWithinAt_univ.1 <| h.ContDiffWithinAt.restrictScalars _
#align cont_diff_at.restrict_scalars ContDiffAt.restrict_scalars
+-/
+#print ContDiff.restrict_scalars /-
theorem ContDiff.restrict_scalars (h : ContDiff π' n f) : ContDiff π n f :=
contDiff_iff_contDiffAt.2 fun x => h.ContDiffAt.restrictScalars _
#align cont_diff.restrict_scalars ContDiff.restrict_scalars
+-/
end RestrictScalars
/-!## Quantitative bounds -/
+#print ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux /-
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear. This lemma is an auxiliary version
assuming all spaces live in the same universe, to enable an induction. Use instead
@@ -2565,7 +3045,9 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
(Finset.sum_choose_succ_mul
(fun i j => βiteratedFDerivWithin π i f s xβ * βiteratedFDerivWithin π j g s xβ) n).symm
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_aux ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux
+-/
+#print ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear /-
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear:
`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
@@ -2662,7 +3144,9 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
apply this.trans (mul_le_mul_of_nonneg_right Bu_le _)
exact Finset.sum_nonneg' fun i => by positivity
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear
+-/
+#print ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear /-
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear:
`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
@@ -2679,7 +3163,9 @@ theorem ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear (B : E βL[π]
B.norm_iterated_fderiv_within_le_of_bilinear hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ
(mem_univ x) hn
#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear
+-/
+#print ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one /-
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
@@ -2696,7 +3182,9 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
apply mul_le_of_le_one_left (Finset.sum_nonneg' fun i => _) hB
positivity
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
+-/
+#print ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one /-
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
@@ -2712,12 +3200,14 @@ theorem ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one (B : E
B.norm_iterated_fderiv_within_le_of_bilinear_of_le_one hf.cont_diff_on hg.cont_diff_on
uniqueDiffOn_univ (mem_univ x) hn hB
#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one
+-/
section
variable {π' : Type _} [NormedField π'] [NormedAlgebra π π'] [NormedSpace π' F]
[IsScalarTower π π' F]
+#print norm_iteratedFDerivWithin_smul_le /-
theorem norm_iteratedFDerivWithin_smul_le {f : E β π'} {g : E β F} {N : ββ}
(hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s)
{n : β} (hn : (n : ββ) β€ N) :
@@ -2729,7 +3219,9 @@ theorem norm_iteratedFDerivWithin_smul_le {f : E β π'} {g : E β F} {N :
π' βL[π] F βL[π] F).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
hf hg hs hx hn ContinuousLinearMap.op_norm_lsmul_le
#align norm_iterated_fderiv_within_smul_le norm_iteratedFDerivWithin_smul_le
+-/
+#print norm_iteratedFDeriv_smul_le /-
theorem norm_iteratedFDeriv_smul_le {f : E β π'} {g : E β F} {N : ββ} (hf : ContDiff π N f)
(hg : ContDiff π N g) (x : E) {n : β} (hn : (n : ββ) β€ N) :
βiteratedFDeriv π n (fun y => f y β’ g y) xβ β€
@@ -2738,6 +3230,7 @@ theorem norm_iteratedFDeriv_smul_le {f : E β π'} {g : E β F} {N : ββ}
(ContinuousLinearMap.lsmul π π' : π' βL[π] F βL[π] F).norm_iteratedFDeriv_le_of_bilinear_of_le_one
hf hg x hn ContinuousLinearMap.op_norm_lsmul_le
#align norm_iterated_fderiv_smul_le norm_iteratedFDeriv_smul_le
+-/
end
@@ -2745,6 +3238,7 @@ section
variable {A : Type _} [NormedRing A] [NormedAlgebra π A]
+#print norm_iteratedFDerivWithin_mul_le /-
theorem norm_iteratedFDerivWithin_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiffOn π N f s)
(hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s) {n : β}
(hn : (n : ββ) β€ N) :
@@ -2756,7 +3250,9 @@ theorem norm_iteratedFDerivWithin_mul_le {f : E β A} {g : E β A} {N : ββ
A βL[π] A βL[π] A).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
hf hg hs hx hn (ContinuousLinearMap.op_norm_mul_le _ _)
#align norm_iterated_fderiv_within_mul_le norm_iteratedFDerivWithin_mul_le
+-/
+#print norm_iteratedFDeriv_mul_le /-
theorem norm_iteratedFDeriv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiff π N f)
(hg : ContDiff π N g) (x : E) {n : β} (hn : (n : ββ) β€ N) :
βiteratedFDeriv π n (fun y => f y * g y) xβ β€
@@ -2768,9 +3264,11 @@ theorem norm_iteratedFDeriv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf
norm_iteratedFDerivWithin_mul_le hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ (mem_univ x)
hn
#align norm_iterated_fderiv_mul_le norm_iteratedFDeriv_mul_le
+-/
end
+#print norm_iteratedFDerivWithin_comp_le_aux /-
/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
within a set of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
of `g β f` is bounded by `n! * C * D^n`.
@@ -2910,7 +3408,9 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
simp only [mul_assoc, mul_one, Finset.sum_const, Finset.card_range, nsmul_eq_mul,
Nat.factorial_succ, Nat.cast_mul]
#align norm_iterated_fderiv_within_comp_le_aux norm_iteratedFDerivWithin_comp_le_aux
+-/
+#print norm_iteratedFDerivWithin_comp_le /-
/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
within a set of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
of `g β f` is bounded by `n! * C * D^n`. -/
@@ -2965,7 +3465,9 @@ theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β}
rw [Nfgu]
exact norm_iteratedFDerivWithin_comp_le_aux hgu hfu htu hs hstu hx hC hD
#align norm_iterated_fderiv_within_comp_le norm_iteratedFDerivWithin_comp_le
+-/
+#print norm_iteratedFDeriv_comp_le /-
/-- If the derivatives of `g` at `f x` are bounded by `C`, and the `i`-th derivative
of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
of `g β f` is bounded by `n! * C * D^n`. -/
@@ -2980,9 +3482,11 @@ theorem norm_iteratedFDeriv_comp_le {g : F β G} {f : E β F} {n : β} {N :
norm_iteratedFDerivWithin_comp_le hg.cont_diff_on hf.cont_diff_on hn uniqueDiffOn_univ
uniqueDiffOn_univ (maps_to_univ _ _) (mem_univ x) hC hD
#align norm_iterated_fderiv_comp_le norm_iteratedFDeriv_comp_le
+-/
section Apply
+#print norm_iteratedFDerivWithin_clm_apply /-
theorem norm_iteratedFDerivWithin_clm_apply {f : E β F βL[π] G} {g : E β F} {s : Set E} {x : E}
{N : ββ} {n : β} (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s)
(hx : x β s) (hn : βn β€ N) :
@@ -2998,7 +3502,9 @@ theorem norm_iteratedFDerivWithin_clm_apply {f : E β F βL[π] G} {g : E
simp only [ContinuousLinearMap.coe_id', id.def, one_mul]
exact B.norm_iterated_fderiv_within_le_of_bilinear_of_le_one hf hg hs hx hn hB
#align norm_iterated_fderiv_within_clm_apply norm_iteratedFDerivWithin_clm_apply
+-/
+#print norm_iteratedFDeriv_clm_apply /-
theorem norm_iteratedFDeriv_clm_apply {f : E β F βL[π] G} {g : E β F} {N : ββ} {n : β}
(hf : ContDiff π N f) (hg : ContDiff π N g) (x : E) (hn : βn β€ N) :
βiteratedFDeriv π n (fun y : E => (f y) (g y)) xβ β€
@@ -3010,7 +3516,9 @@ theorem norm_iteratedFDeriv_clm_apply {f : E β F βL[π] G} {g : E β F} {
norm_iteratedFDerivWithin_clm_apply hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ
(Set.mem_univ x) hn
#align norm_iterated_fderiv_clm_apply norm_iteratedFDeriv_clm_apply
+-/
+#print norm_iteratedFDerivWithin_clm_apply_const /-
theorem norm_iteratedFDerivWithin_clm_apply_const {f : E β F βL[π] G} {c : F} {s : Set E} {x : E}
{N : ββ} {n : β} (hf : ContDiffOn π N f s) (hs : UniqueDiffOn π s) (hx : x β s) (hn : βn β€ N) :
βiteratedFDerivWithin π n (fun y : E => (f y) c) s xβ β€
@@ -3024,7 +3532,9 @@ theorem norm_iteratedFDerivWithin_clm_apply_const {f : E β F βL[π] G} {c
rw [ContinuousLinearMap.apply_apply, mul_comm]
exact f.le_op_norm c
#align norm_iterated_fderiv_within_clm_apply_const norm_iteratedFDerivWithin_clm_apply_const
+-/
+#print norm_iteratedFDeriv_clm_apply_const /-
theorem norm_iteratedFDeriv_clm_apply_const {f : E β F βL[π] G} {c : F} {x : E} {N : ββ} {n : β}
(hf : ContDiff π N f) (hn : βn β€ N) :
βiteratedFDeriv π n (fun y : E => (f y) c) xβ β€ βcβ * βiteratedFDeriv π n f xβ :=
@@ -3033,6 +3543,7 @@ theorem norm_iteratedFDeriv_clm_apply_const {f : E β F βL[π] G} {c : F} {
refine'
norm_iteratedFDerivWithin_clm_apply_const hf.cont_diff_on uniqueDiffOn_univ (Set.mem_univ x) hn
#align norm_iterated_fderiv_clm_apply_const norm_iteratedFDeriv_clm_apply_const
+-/
end Apply
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -63,26 +63,26 @@ namespace Finset
/-- The sum of `(n+1).choose i * f i (n+1-i)` can be split into two sums at rank `n`,
respectively of `n.choose i * f i (n+1-i)` and `n.choose i * f (i+1) (n-i)`. -/
theorem sum_choose_succ_mul {R : Type _} [Semiring R] (f : β β β β R) (n : β) :
- (β i in range (n + 2), ((n + 1).choose i : R) * f i (n + 1 - i)) =
- (β i in range (n + 1), (n.choose i : R) * f i (n + 1 - i)) +
+ β i in range (n + 2), ((n + 1).choose i : R) * f i (n + 1 - i) =
+ β i in range (n + 1), (n.choose i : R) * f i (n + 1 - i) +
β i in range (n + 1), (n.choose i : R) * f (i + 1) (n - i) :=
by
have A :
- (β i in range (n + 1), (n.choose (i + 1) : R) * f (i + 1) (n - i)) + f 0 (n + 1) =
+ β i in range (n + 1), (n.choose (i + 1) : R) * f (i + 1) (n - i) + f 0 (n + 1) =
β i in range (n + 1), n.choose i * f i (n + 1 - i) :=
by
rw [Finset.sum_range_succ, Finset.sum_range_succ']
simp only [Nat.choose_succ_self, algebraMap.coe_zero, MulZeroClass.zero_mul, add_zero,
Nat.succ_sub_succ_eq_sub, Nat.choose_zero_right, algebraMap.coe_one, one_mul, tsub_zero]
calc
- (β i in Finset.range (n + 2), ((n + 1).choose i : R) * f i (n + 1 - i)) =
- (β i in Finset.range (n + 1), ((n + 1).choose (i + 1) : R) * f (i + 1) (n + 1 - (i + 1))) +
+ β i in Finset.range (n + 2), ((n + 1).choose i : R) * f i (n + 1 - i) =
+ β i in Finset.range (n + 1), ((n + 1).choose (i + 1) : R) * f (i + 1) (n + 1 - (i + 1)) +
f 0 (n + 1 - 0) :=
by
rw [Finset.sum_range_succ']
simp only [Nat.choose_zero_right, algebraMap.coe_one, one_mul]
_ =
- (β i in Finset.range (n + 1), (n.choose i : R) * f i (n + 1 - i)) +
+ β i in Finset.range (n + 1), (n.choose i : R) * f i (n + 1 - i) +
β i in Finset.range (n + 1), n.choose i * f (i + 1) (n - i) :=
by
simp only [Nat.choose_succ_succ, Nat.cast_add, Nat.succ_sub_succ_eq_sub, tsub_zero, add_mul]
@@ -93,8 +93,8 @@ theorem sum_choose_succ_mul {R : Type _} [Semiring R] (f : β β β β R) (n
/-- The sum along the antidiagonal of `(n+1).choose i * f i j` can be split into two sums along the
antidiagonal at rank `n`, respectively of `n.choose i * f i (j+1)` and `n.choose j * f (i+1) j`. -/
theorem sum_antidiagonal_choose_succ_mul {R : Type _} [Semiring R] (f : β β β β R) (n : β) :
- (β ij in Nat.antidiagonal (n + 1), ((n + 1).choose ij.1 : R) * f ij.1 ij.2) =
- (β ij in Nat.antidiagonal n, (n.choose ij.1 : R) * f ij.1 (ij.2 + 1)) +
+ β ij in Nat.antidiagonal (n + 1), ((n + 1).choose ij.1 : R) * f ij.1 ij.2 =
+ β ij in Nat.antidiagonal n, (n.choose ij.1 : R) * f ij.1 (ij.2 + 1) +
β ij in Nat.antidiagonal n, (n.choose ij.2 : R) * f (ij.1 + 1) ij.2 :=
by
convert sum_choose_succ_mul f n using 1
@@ -105,7 +105,7 @@ theorem sum_antidiagonal_choose_succ_mul {R : Type _} [Semiring R] (f : β β
have : n + 1 - i = n - i + 1 := Nat.sub_add_comm (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi))
simp only [this]
Β· suffices H :
- (β ij in nat.antidiagonal n, (n.choose ij.2 : R) * f (ij.1 + 1) ij.2) =
+ β ij in nat.antidiagonal n, (n.choose ij.2 : R) * f (ij.1 + 1) ij.2 =
β ij in nat.antidiagonal n, (n.choose ij.1 : R) * f (ij.1 + 1) ij.2
Β· rw [H, nat.sum_antidiagonal_eq_sum_range_succ (fun i j => (n.choose i : R) * f (i + 1) j) n]
apply Finset.sum_congr rfl fun i hi => _
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -88,7 +88,6 @@ theorem sum_choose_succ_mul {R : Type _} [Semiring R] (f : β β β β R) (n
simp only [Nat.choose_succ_succ, Nat.cast_add, Nat.succ_sub_succ_eq_sub, tsub_zero, add_mul]
rw [Finset.sum_add_distrib, β A]
abel
-
#align finset.sum_choose_succ_mul Finset.sum_choose_succ_mul
/-- The sum along the antidiagonal of `(n+1).choose i * f i j` can be split into two sums along the
@@ -1404,7 +1403,6 @@ theorem iteratedFDerivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f
x (h 0) (Fin.tail h) :=
by rw [Pi.add_def, fderivWithin_add (hu x hx) (hdf x hx) (hdg x hx)]; rfl
_ = (iteratedFDerivWithin π (i + 1) f s + iteratedFDerivWithin π (i + 1) g s) x h := rfl
-
#align iterated_fderiv_within_add_apply iteratedFDerivWithin_add_apply
/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
@@ -1483,7 +1481,6 @@ theorem iteratedFDerivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s)
_ = -(fderivWithin π (iteratedFDerivWithin π i f s) s) x (h 0) (Fin.tail h) := by
rw [Pi.neg_def, fderivWithin_neg (hu x hx)]; rfl
_ = -(iteratedFDerivWithin π (i + 1) f s) x h := rfl
-
#align iterated_fderiv_within_neg_apply iteratedFDerivWithin_neg_apply
theorem iteratedFDeriv_neg_apply {i : β} {f : E β F} :
@@ -1765,7 +1762,6 @@ theorem iteratedFDerivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu :
_ = (a β’ fderivWithin π (iteratedFDerivWithin π i f s)) s x (h 0) (Fin.tail h) := by
rw [Pi.smul_def, fderivWithin_const_smul (hu x hx) (hdf x hx)]; rfl
_ = a β’ iteratedFDerivWithin π (i + 1) f s x h := rfl
-
#align iterated_fderiv_within_const_smul_apply iteratedFDerivWithin_const_smul_apply
theorem iteratedFDeriv_const_smul_apply {x : E} (hf : ContDiff π i f) :
@@ -2516,7 +2512,6 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
apply Finset.sum_congr rfl fun i hi => _
rw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)),
iteratedFDerivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
-
have I2 :
βiteratedFDerivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
βBβ *
@@ -2541,7 +2536,6 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
congr 1
apply Finset.sum_congr rfl fun i hi => _
rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
-
have J :
iteratedFDerivWithin π n (fun y : Du => fderivWithin π (fun y : Du => B (f y) (g y)) s y) s
x =
@@ -2624,7 +2618,6 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
_ β€ βBβ * βisoE yβ * βisoF xβ :=
(mul_le_mul_of_nonneg_right (ContinuousLinearMap.le_op_norm _ _) (norm_nonneg _))
_ = βBβ * βyβ * βxβ := by simp only [LinearIsometryEquiv.norm_map]
-
let su := isoD β»ΒΉ' s
have hsu : UniqueDiffOn π su := isoD.to_continuous_linear_equiv.unique_diff_on_preimage_iff.2 hs
let xu := isoD.symm x
@@ -2916,7 +2909,6 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
_ = (n + 1)! * C * D ^ (n + 1) := by
simp only [mul_assoc, mul_one, Finset.sum_const, Finset.card_range, nsmul_eq_mul,
Nat.factorial_succ, Nat.cast_mul]
-
#align norm_iterated_fderiv_within_comp_le_aux norm_iteratedFDerivWithin_comp_le_aux
/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3209ddf94136d36e5e5c624b10b2a347cc9d090
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
+! leanprover-community/mathlib commit 575b4ea3738b017e30fb205cb9b4a8742e5e82b6
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -17,6 +17,9 @@ import Mathbin.Data.Nat.Choose.Cast
/-!
# Higher differentiability of usual operations
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We prove that the usual operations (addition, multiplication, difference, composition, and
so on) preserve `C^n` functions. We also expand the API around `C^n` functions.
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -273,9 +273,9 @@ theorem HasFTaylorSeriesUpToOn.continuousLinearMap_comp (g : F βL[π] G)
constructor
Β· exact fun x hx => congr_arg g (hf.zero_eq x hx)
Β· intro m hm x hx
- convert(L m).HasFDerivAt.comp_hasFDerivWithinAt x (hf.fderiv_within m hm x hx)
+ convert (L m).HasFDerivAt.comp_hasFDerivWithinAt x (hf.fderiv_within m hm x hx)
Β· intro m hm
- convert(L m).Continuous.comp_continuousOn (hf.cont m hm)
+ convert (L m).Continuous.comp_continuousOn (hf.cont m hm)
#align has_ftaylor_series_up_to_on.continuous_linear_map_comp HasFTaylorSeriesUpToOn.continuousLinearMap_comp
/-- Composition by continuous linear maps on the left preserves `C^n` functions in a domain
@@ -450,7 +450,8 @@ theorem HasFTaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFTaylorSeriesUpT
rw [ContinuousLinearMap.map_zero]
rfl
Β· intro m hm x hx
- convert(hA m).HasFDerivAt.comp_hasFDerivWithinAt x
+ convert
+ (hA m).HasFDerivAt.comp_hasFDerivWithinAt x
((hf.fderiv_within m hm (g x) hx).comp x g.has_fderiv_within_at (subset.refl _))
ext (y v)
change p (g x) (Nat.succ m) (g β cons y v) = p (g x) m.succ (cons (g y) (g β v))
@@ -469,7 +470,7 @@ theorem ContDiffWithinAt.comp_continuousLinearMap {x : G} (g : G βL[π] E)
intro m hm
rcases hf m hm with β¨u, hu, p, hpβ©
refine' β¨g β»ΒΉ' u, _, _, hp.comp_continuous_linear_map gβ©
- apply ContinuousWithinAt.preimage_mem_nhds_within'
+ apply ContinuousWithinAt.preimage_mem_nhdsWithin'
Β· exact g.continuous.continuous_within_at
Β· apply nhdsWithin_mono (g x) _ hu
rw [image_insert_eq]
@@ -617,7 +618,8 @@ theorem HasFTaylorSeriesUpToOn.prod (hf : HasFTaylorSeriesUpToOn n f p s) {g : E
constructor
Β· intro x hx; rw [β hf.zero_eq x hx, β hg.zero_eq x hx]; rfl
Β· intro m hm x hx
- convert(L m).HasFDerivAt.comp_hasFDerivWithinAt x
+ convert
+ (L m).HasFDerivAt.comp_hasFDerivWithinAt x
((hf.fderiv_within m hm x hx).Prod (hg.fderiv_within m hm x hx))
Β· intro m hm
exact (L m).Continuous.comp_continuousOn ((hf.cont m hm).Prod (hg.cont m hm))
@@ -709,7 +711,7 @@ private theorem cont_diff_on.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu
show w β π[s] x
Β· apply Filter.inter_mem self_mem_nhdsWithin
apply Filter.inter_mem hu
- apply ContinuousWithinAt.preimage_mem_nhds_within'
+ apply ContinuousWithinAt.preimage_mem_nhdsWithin'
Β· rw [β continuousWithinAt_inter' hu]
exact (hf' x xu).DifferentiableWithinAt.ContinuousWithinAt.mono (inter_subset_right _ _)
Β· apply nhdsWithin_mono _ _ hv
@@ -999,13 +1001,13 @@ section SpecificBilinearMaps
theorem ContDiff.clm_comp {g : X β F βL[π] G} {f : X β E βL[π] F} (hg : ContDiff π n g)
(hf : ContDiff π n f) : ContDiff π n fun x => (g x).comp (f x) :=
- isBoundedBilinearMapComp.ContDiff.compβ hg hf
+ isBoundedBilinearMap_comp.ContDiff.compβ hg hf
#align cont_diff.clm_comp ContDiff.clm_comp
theorem ContDiffOn.clm_comp {g : X β F βL[π] G} {f : X β E βL[π] F} {s : Set X}
(hg : ContDiffOn π n g s) (hf : ContDiffOn π n f s) :
ContDiffOn π n (fun x => (g x).comp (f x)) s :=
- isBoundedBilinearMapComp.ContDiff.comp_contDiff_onβ hg hf
+ isBoundedBilinearMap_comp.ContDiff.comp_contDiff_onβ hg hf
#align cont_diff_on.clm_comp ContDiffOn.clm_comp
theorem ContDiff.clm_apply {f : E β F βL[π] G} {g : E β F} {n : ββ} (hf : ContDiff π n f)
@@ -1021,7 +1023,7 @@ theorem ContDiffOn.clm_apply {f : E β F βL[π] G} {g : E β F} {n : β
theorem ContDiff.smulRight {f : E β F βL[π] π} {g : E β G} {n : ββ} (hf : ContDiff π n f)
(hg : ContDiff π n g) : ContDiff π n fun x => (f x).smul_right (g x) :=
(-- giving the following implicit type arguments speeds up elaboration significantly
- @isBoundedBilinearMapSmulRight
+ @isBoundedBilinearMap_smulRight
π _ F _ _ G _ _).ContDiff.compβ
hf hg
#align cont_diff.smul_right ContDiff.smulRight
@@ -1085,7 +1087,7 @@ theorem ContDiffWithinAt.hasFDerivWithinAt_nhds {f : E β F β G} {g : E β F
Β· refine' inter_mem _ self_mem_nhdsWithin
have := mem_of_mem_nhdsWithin (mem_insert _ _) hv
refine' mem_nhds_within_insert.mpr β¨this, _β©
- refine' (continuous_within_at_id.prod hg.continuous_within_at).preimage_mem_nhds_within' _
+ refine' (continuous_within_at_id.prod hg.continuous_within_at).preimage_mem_nhdsWithin' _
rw [β nhdsWithin_le_iff] at hst hv β’
refine' (hst.trans <| nhdsWithin_mono _ <| subset_insert _ _).trans hv
Β· intro z hz
@@ -1108,7 +1110,7 @@ To show that `x β¦ D_yf(x,y)g(x)` (taken within `t`) is `C^m` at `xβ` within
* `g` is `C^m` at `xβ` within `s`;
* Derivatives are unique at `g(x)` within `t` for `x` sufficiently close to `xβ` within `s βͺ {xβ}`;
* `t` is a neighborhood of `g(xβ)` within `g '' s`; -/
-theorem ContDiffWithinAt.fderiv_within'' {f : E β F β G} {g : E β F} {t : Set F} {n : ββ}
+theorem ContDiffWithinAt.fderivWithin'' {f : E β F β G} {g : E β F} {t : Set F} {n : ββ}
(hf : ContDiffWithinAt π n (Function.uncurry f) (insert xβ s ΓΛ’ t) (xβ, g xβ))
(hg : ContDiffWithinAt π m g s xβ)
(ht : βαΆ x in π[insert xβ s] xβ, UniqueDiffWithinAt π t (g x)) (hmn : m + 1 β€ n)
@@ -1129,17 +1131,17 @@ theorem ContDiffWithinAt.fderiv_within'' {f : E β F β G} {g : E β F} {t :
rw [contDiffWithinAt_top]
exact fun m => this m le_top
exact this m le_rfl
-#align cont_diff_within_at.fderiv_within'' ContDiffWithinAt.fderiv_within''
+#align cont_diff_within_at.fderiv_within'' ContDiffWithinAt.fderivWithin''
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/-- A special case of `cont_diff_within_at.fderiv_within''` where we require that `s β gβ»ΒΉ(t)`. -/
-theorem ContDiffWithinAt.fderiv_within' {f : E β F β G} {g : E β F} {t : Set F} {n : ββ}
+theorem ContDiffWithinAt.fderivWithin' {f : E β F β G} {g : E β F} {t : Set F} {n : ββ}
(hf : ContDiffWithinAt π n (Function.uncurry f) (insert xβ s ΓΛ’ t) (xβ, g xβ))
(hg : ContDiffWithinAt π m g s xβ)
(ht : βαΆ x in π[insert xβ s] xβ, UniqueDiffWithinAt π t (g x)) (hmn : m + 1 β€ n)
(hst : s β g β»ΒΉ' t) : ContDiffWithinAt π m (fun x => fderivWithin π (f x) t (g x)) s xβ :=
- hf.fderiv_within'' hg ht hmn <| mem_of_superset self_mem_nhdsWithin <| image_subset_iff.mpr hst
-#align cont_diff_within_at.fderiv_within' ContDiffWithinAt.fderiv_within'
+ hf.fderivWithin'' hg ht hmn <| mem_of_superset self_mem_nhdsWithin <| image_subset_iff.mpr hst
+#align cont_diff_within_at.fderiv_within' ContDiffWithinAt.fderivWithin'
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/-- A special case of `cont_diff_within_at.fderiv_within'` where we require that `xβ β s` and there
@@ -1275,10 +1277,10 @@ theorem hasFTaylorSeriesUpToOn_pi :
exact (h i).zero_eq x hx
Β· intro m hm x hx
have := hasFDerivWithinAt_pi.2 fun i => (h i).fderivWithin m hm x hx
- convert(L m).HasFDerivAt.comp_hasFDerivWithinAt x this
+ convert (L m).HasFDerivAt.comp_hasFDerivWithinAt x this
Β· intro m hm
have := continuousOn_pi.2 fun i => (h i).cont m hm
- convert(L m).Continuous.comp_continuousOn this
+ convert (L m).Continuous.comp_continuousOn this
#align has_ftaylor_series_up_to_on_pi hasFTaylorSeriesUpToOn_pi
@[simp]
@@ -1523,11 +1525,10 @@ theorem ContDiffWithinAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ}
(h : β i β s, ContDiffWithinAt π n (fun x => f i x) t x) :
ContDiffWithinAt π n (fun x => β i in s, f i x) t x := by
classical
- induction' s using Finset.induction_on with i s is IH
- Β· simp [contDiffWithinAt_const]
- Β· simp only [is, Finset.sum_insert, not_false_iff]
- exact
- (h _ (Finset.mem_insert_self i s)).add (IH fun j hj => h _ (Finset.mem_insert_of_mem hj))
+ induction' s using Finset.induction_on with i s is IH
+ Β· simp [contDiffWithinAt_const]
+ Β· simp only [is, Finset.sum_insert, not_false_iff]
+ exact (h _ (Finset.mem_insert_self i s)).add (IH fun j hj => h _ (Finset.mem_insert_of_mem hj))
#align cont_diff_within_at.sum ContDiffWithinAt.sum
theorem ContDiffAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {x : E}
@@ -1671,7 +1672,7 @@ section Smul
-- The scalar multiplication is smooth.
theorem contDiff_smul : ContDiff π n fun p : π Γ F => p.1 β’ p.2 :=
- isBoundedBilinearMapSmul.ContDiff
+ isBoundedBilinearMap_smul.ContDiff
#align cont_diff_smul contDiff_smul
/-- The scalar multiplication of two `C^n` functions within a set at a point is `C^n` within this
@@ -1861,7 +1862,7 @@ theorem contDiffAt_ring_inverse [CompleteSpace R] (x : RΛ£) : ContDiffAt π n
by
induction' n using ENat.nat_induction with n IH Itop
Β· intro m hm
- refine' β¨{ y : R | IsUnit y }, _, _β©
+ refine' β¨{y : R | IsUnit y}, _, _β©
Β· simp [nhdsWithin_univ]
exact x.nhds
Β· use ftaylorSeriesWithin π inverse univ
@@ -1872,13 +1873,13 @@ theorem contDiffAt_ring_inverse [CompleteSpace R] (x : RΛ£) : ContDiffAt π n
Β· simp [ftaylorSeriesWithin]
Β· apply cont_diff_at_succ_iff_has_fderiv_at.mpr
refine' β¨fun x : R => -mul_left_right π R (inverse x) (inverse x), _, _β©
- Β· refine' β¨{ y : R | IsUnit y }, x.nhds, _β©
+ Β· refine' β¨{y : R | IsUnit y}, x.nhds, _β©
rintro _ β¨y, rflβ©
rw [inverse_unit]
exact hasFDerivAt_ring_inverse y
Β·
- convert(mul_left_right_is_bounded_bilinear π R).ContDiff.neg.comp_contDiffAt (x : R)
- (IH.prod IH)
+ convert
+ (mul_left_right_is_bounded_bilinear π R).ContDiff.neg.comp_contDiffAt (x : R) (IH.prod IH)
Β· exact cont_diff_at_top.mpr Itop
#align cont_diff_at_ring_inverse contDiffAt_ring_inverse
@@ -2000,7 +2001,7 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
-- This follows by a bootstrapping formula expressing the derivative as a function of `f` itself
refine' β¨inverse β f' β f.symm, _, _β©
Β· -- We first check that the derivative of `f` is that formula
- have h_nhds : { y : E | β e : E βL[π] F, βe = f' y } β π (f.symm a) :=
+ have h_nhds : {y : E | β e : E βL[π] F, βe = f' y} β π (f.symm a) :=
by
have hfβ' := fβ'.nhds
rw [β eq_fβ'] at hfβ'
@@ -2154,27 +2155,27 @@ theorem HasFTaylorSeriesUpToOn.hasStrictFDerivAt {s : Set E'} {f : E' β F'} {x
/-- If a function is `C^n` with `1 β€ n` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
-theorem ContDiffAt.has_strict_fderiv_at' {f : E' β F'} {f' : E' βL[π] F'} {x : E'}
+theorem ContDiffAt.hasStrictFDerivAt' {f : E' β F'} {f' : E' βL[π] F'} {x : E'}
(hf : ContDiffAt π n f x) (hf' : HasFDerivAt f f' x) (hn : 1 β€ n) : HasStrictFDerivAt f f' x :=
by
rcases hf 1 hn with β¨u, H, p, hpβ©
simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
have := hp.has_strict_fderiv_at le_rfl H
rwa [hf'.unique this.has_fderiv_at]
-#align cont_diff_at.has_strict_fderiv_at' ContDiffAt.has_strict_fderiv_at'
+#align cont_diff_at.has_strict_fderiv_at' ContDiffAt.hasStrictFDerivAt'
/-- If a function is `C^n` with `1 β€ n` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
-theorem ContDiffAt.has_strict_deriv_at' {f : π β F'} {f' : F'} {x : π} (hf : ContDiffAt π n f x)
+theorem ContDiffAt.hasStrictDerivAt' {f : π β F'} {f' : F'} {x : π} (hf : ContDiffAt π n f x)
(hf' : HasDerivAt f f' x) (hn : 1 β€ n) : HasStrictDerivAt f f' x :=
- hf.has_strict_fderiv_at' hf' hn
-#align cont_diff_at.has_strict_deriv_at' ContDiffAt.has_strict_deriv_at'
+ hf.hasStrictFDerivAt' hf' hn
+#align cont_diff_at.has_strict_deriv_at' ContDiffAt.hasStrictDerivAt'
/-- If a function is `C^n` with `1 β€ n` around a point, then the derivative of `f` at this point
is also a strict derivative. -/
theorem ContDiffAt.hasStrictFDerivAt {f : E' β F'} {x : E'} (hf : ContDiffAt π n f x) (hn : 1 β€ n) :
HasStrictFDerivAt f (fderiv π f x) x :=
- hf.has_strict_fderiv_at' (hf.DifferentiableAt hn).HasFDerivAt hn
+ hf.hasStrictFDerivAt' (hf.DifferentiableAt hn).HasFDerivAt hn
#align cont_diff_at.has_strict_fderiv_at ContDiffAt.hasStrictFDerivAt
/-- If a function is `C^n` with `1 β€ n` around a point, then the derivative of `f` at this point
@@ -2293,7 +2294,7 @@ theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ)
simp [derivWithin]
simp only [this]
apply ContDiff.comp_contDiffOn _ h
- have : IsBoundedBilinearMap π fun _ : (π βL[π] π) Γ F => _ := isBoundedBilinearMapSmulRight
+ have : IsBoundedBilinearMap π fun _ : (π βL[π] π) Γ F => _ := isBoundedBilinearMap_smulRight
exact (this.is_bounded_linear_map_right _).ContDiff
#align cont_diff_on_succ_iff_deriv_within contDiffOn_succ_iff_derivWithin
@@ -2428,7 +2429,8 @@ theorem HasFTaylorSeriesUpToOn.restrictScalars (h : HasFTaylorSeriesUpToOn n f p
{ zero_eq := fun x hx => h.zero_eq x hx
fderivWithin := by
intro m hm x hx
- convert(ContinuousMultilinearMap.restrictScalarsLinear π).HasFDerivAt.comp_hasFDerivWithinAt _
+ convert
+ (ContinuousMultilinearMap.restrictScalarsLinear π).HasFDerivAt.comp_hasFDerivWithinAt _
((h.fderiv_within m hm x hx).restrictScalars π)
cont := fun m hm =>
ContinuousMultilinearMap.continuous_restrictScalars.comp_continuousOn (h.cont m hm) }
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -51,8 +51,8 @@ local notation "β" => (β€ : ββ)
universe u v w uD uE uF uG
-attribute [local instance 1001]
- NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid
+attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule'
+ AddCommGroup.toAddCommMonoid
namespace Finset
@@ -573,7 +573,7 @@ theorem ContinuousLinearEquiv.contDiffWithinAt_comp_iff (e : G βL[π] E) :
Β· intro H
simpa [β preimage_comp, (Β· β Β·)] using H.comp_continuous_linear_map (e.symm : E βL[π] G)
Β· intro H
- rw [β e.apply_symm_apply x, β e.coe_coe] at H
+ rw [β e.apply_symm_apply x, β e.coe_coe] at H
exact H.comp_continuous_linear_map _
#align continuous_linear_equiv.cont_diff_within_at_comp_iff ContinuousLinearEquiv.contDiffWithinAt_comp_iff
@@ -693,13 +693,13 @@ private theorem cont_diff_on.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu
ContDiffOn π n (g β f) s :=
by
induction' n using ENat.nat_induction with n IH Itop generalizing Eu Fu Gu
- Β· rw [contDiffOn_zero] at hf hgβ’
+ Β· rw [contDiffOn_zero] at hf hg β’
exact ContinuousOn.comp hg hf st
- Β· rw [contDiffOn_succ_iff_hasFDerivWithinAt] at hgβ’
+ Β· rw [contDiffOn_succ_iff_hasFDerivWithinAt] at hg β’
intro x hx
rcases(contDiffOn_succ_iff_hasFDerivWithinAt.1 hf) x hx with β¨u, hu, f', hf', f'_diffβ©
rcases hg (f x) (st hx) with β¨v, hv, g', hg', g'_diffβ©
- rw [insert_eq_of_mem hx] at huβ’
+ rw [insert_eq_of_mem hx] at hu β’
have xu : x β u := mem_of_mem_nhdsWithin hx hu
let w := s β© (u β© f β»ΒΉ' v)
have wv : w β f β»ΒΉ' v := fun y hy => hy.2.2
@@ -725,7 +725,7 @@ private theorem cont_diff_on.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu
have D : ContDiffOn π n (fun p : (Fu βL[π] Gu) Γ (Eu βL[π] Fu) => p.1.comp p.2) univ :=
is_bounded_bilinear_map_comp.cont_diff.cont_diff_on
exact IH D C (subset_univ _)
- Β· rw [contDiffOn_top] at hf hgβ’
+ Β· rw [contDiffOn_top] at hf hg β’
exact fun n => Itop n (hg n) (hf n) st
/-- The composition of `C^n` functions on domains is `C^n`. -/
@@ -760,7 +760,7 @@ theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F} (hg
ext y
simp only [Function.comp_apply, gu, fu]
rw [isoF.apply_symm_apply (f (isoE y))]
- rwa [this, isoE.cont_diff_on_comp_iff, isoG.symm.comp_cont_diff_on_iff] at main
+ rwa [this, isoE.cont_diff_on_comp_iff, isoG.symm.comp_cont_diff_on_iff] at main
#align cont_diff_on.comp ContDiffOn.comp
/-- The composition of `C^n` functions on domains is `C^n`. -/
@@ -809,7 +809,7 @@ theorem ContDiffWithinAt.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F
simp [hy1, hy2, vs hy2]
rw [A, β nhdsWithin_restrict'']
exact Filter.inter_mem this v_nhd
- rwa [insert_eq_of_mem xmem, this] at Z
+ rwa [insert_eq_of_mem xmem, this] at Z
#align cont_diff_within_at.comp ContDiffWithinAt.comp
/-- The composition of `C^n` functions at points in domains is `C^n`,
@@ -1086,7 +1086,7 @@ theorem ContDiffWithinAt.hasFDerivWithinAt_nhds {f : E β F β G} {g : E β F
have := mem_of_mem_nhdsWithin (mem_insert _ _) hv
refine' mem_nhds_within_insert.mpr β¨this, _β©
refine' (continuous_within_at_id.prod hg.continuous_within_at).preimage_mem_nhds_within' _
- rw [β nhdsWithin_le_iff] at hst hvβ’
+ rw [β nhdsWithin_le_iff] at hst hv β’
refine' (hst.trans <| nhdsWithin_mono _ <| subset_insert _ _).trans hv
Β· intro z hz
have := hvf' (z, g z) hz.1
@@ -1149,7 +1149,7 @@ theorem ContDiffWithinAt.fderivWithin {f : E β F β G} {g : E β F} {t : Set
(hg : ContDiffWithinAt π m g s xβ) (ht : UniqueDiffOn π t) (hmn : m + 1 β€ n) (hxβ : xβ β s)
(hst : s β g β»ΒΉ' t) : ContDiffWithinAt π m (fun x => fderivWithin π (f x) t (g x)) s xβ :=
by
- rw [β insert_eq_self.mpr hxβ] at hf
+ rw [β insert_eq_self.mpr hxβ] at hf
refine' hf.fderiv_within' hg _ hmn hst
rw [insert_eq_self.mpr hxβ]
exact eventually_of_mem self_mem_nhdsWithin fun x hx => ht _ (hst hx)
@@ -1243,7 +1243,7 @@ theorem ContDiffOn.continuousOn_fderivWithin_apply (hf : ContDiffOn π n f s)
theorem ContDiff.contDiff_fderiv_apply {f : E β F} (hf : ContDiff π n f) (hmn : m + 1 β€ n) :
ContDiff π m fun p : E Γ E => (fderiv π f p.1 : E βL[π] F) p.2 :=
by
- rw [β contDiffOn_univ] at hfβ’
+ rw [β contDiffOn_univ] at hf β’
rw [β fderivWithin_univ, β univ_prod_univ]
exact contDiffOn_fderivWithin_apply hf uniqueDiffOn_univ hmn
#align cont_diff.cont_diff_fderiv_apply ContDiff.contDiff_fderiv_apply
@@ -1416,7 +1416,7 @@ theorem iteratedFDerivWithin_add_apply' {f g : E β F} (hf : ContDiffOn π i
theorem iteratedFDeriv_add_apply {i : β} {f g : E β F} (hf : ContDiff π i f) (hg : ContDiff π i g) :
iteratedFDeriv π i (f + g) x = iteratedFDeriv π i f x + iteratedFDeriv π i g x :=
by
- simp_rw [β contDiffOn_univ, β iteratedFDerivWithin_univ] at hf hgβ’
+ simp_rw [β contDiffOn_univ, β iteratedFDerivWithin_univ] at hf hg β’
exact iteratedFDerivWithin_add_apply hf hg uniqueDiffOn_univ (Set.mem_univ _)
#align iterated_fderiv_add_apply iteratedFDeriv_add_apply
@@ -2003,7 +2003,7 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
have h_nhds : { y : E | β e : E βL[π] F, βe = f' y } β π (f.symm a) :=
by
have hfβ' := fβ'.nhds
- rw [β eq_fβ'] at hfβ'
+ rw [β eq_fβ'] at hfβ'
exact hf'.continuous_at.preimage_mem_nhds hfβ'
obtain β¨t, htu, ht, htfβ© := mem_nhds_iff.mp (Filter.inter_mem hu h_nhds)
use f.target β© f.symm β»ΒΉ' t
@@ -2158,7 +2158,7 @@ theorem ContDiffAt.has_strict_fderiv_at' {f : E' β F'} {f' : E' βL[π] F'}
(hf : ContDiffAt π n f x) (hf' : HasFDerivAt f f' x) (hn : 1 β€ n) : HasStrictFDerivAt f f' x :=
by
rcases hf 1 hn with β¨u, H, p, hpβ©
- simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
+ simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
have := hp.has_strict_fderiv_at le_rfl H
rwa [hf'.unique this.has_fderiv_at]
#align cont_diff_at.has_strict_fderiv_at' ContDiffAt.has_strict_fderiv_at'
@@ -2237,9 +2237,9 @@ theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGro
rcases metric.mem_nhds_within_iff.mp hst with β¨Ξ΅, Ξ΅0, hΞ΅β©
replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x Ξ΅ β© insert x s) := hp.mono hΞ΅
clear hst hΞ΅ t
- rw [β insert_eq_of_mem (Metric.mem_ball_self Ξ΅0), β insert_inter_distrib] at hp
+ rw [β insert_eq_of_mem (Metric.mem_ball_self Ξ΅0), β insert_inter_distrib] at hp
rcases hp.exists_lipschitz_on_with ((convex_ball _ _).inter hs) with β¨K, t, hst, hftβ©
- rw [inter_comm, β nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ Ξ΅0)] at hst
+ rw [inter_comm, β nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ Ξ΅0)] at hst
exact β¨K, t, hst, hftβ©
#align cont_diff_within_at.exists_lipschitz_on_with ContDiffWithinAt.exists_lipschitzOnWith
@@ -2342,11 +2342,11 @@ theorem ContDiffOn.derivWithin (hf : ContDiffOn π n fβ sβ) (hs : UniqueDi
(hmn : m + 1 β€ n) : ContDiffOn π m (derivWithin fβ sβ) sβ :=
by
cases m
- Β· change β + 1 β€ n at hmn
+ Β· change β + 1 β€ n at hmn
have : n = β := by simpa using hmn
- rw [this] at hf
+ rw [this] at hf
exact ((contDiffOn_top_iff_derivWithin hs).1 hf).2
- Β· change (m.succ : ββ) β€ n at hmn
+ Β· change (m.succ : ββ) β€ n at hmn
exact ((contDiffOn_succ_iff_derivWithin hs).1 (hf.of_le hmn)).2
#align cont_diff_on.deriv_within ContDiffOn.derivWithin
@@ -2637,13 +2637,13 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
intro i
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
+ rwa [β xu_x] at hx
have Ngu : β i, βiteratedFDerivWithin π i gu su xuβ = βiteratedFDerivWithin π i g s xβ :=
by
intro i
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
+ rwa [β xu_x] at hx
have NBu :
βiteratedFDerivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ =
βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ :=
@@ -2651,7 +2651,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
rw [Bu_eq]
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
+ rwa [β xu_x] at hx
-- state the bound for the lifted objects, and deduce the original bound from it.
have :
βiteratedFDerivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ β€
@@ -2660,7 +2660,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
(n.choose i : β) * βiteratedFDerivWithin π i fu su xuβ *
βiteratedFDerivWithin π (n - i) gu su xuβ :=
Bu.norm_iterated_fderiv_within_le_of_bilinear_aux hfu hgu hsu hxu
- simp only [Nfu, Ngu, NBu] at this
+ simp only [Nfu, Ngu, NBu] at this
apply this.trans (mul_le_mul_of_nonneg_right Bu_le _)
exact Finset.sum_nonneg' fun i => by positivity
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear
@@ -2809,7 +2809,7 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
βiteratedFDerivWithin π i (fderivWithin π g t β f) s xβ β€ i ! * C * D ^ i :=
by
intro i hi
- simp only [Finset.mem_range_succ_iff] at hi
+ simp only [Finset.mem_range_succ_iff] at hi
apply IH i hi
apply hf.of_le (Nat.cast_le.2 (hi.trans n.le_succ))
Β· intro j hj h'j
@@ -2949,7 +2949,7 @@ theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β}
by
intro i
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]
- simp_rw [β Nfu] at hD
+ simp_rw [β Nfu] at hD
have Ngu : β i, βiteratedFDerivWithin π i gu tu (fu x)β = βiteratedFDerivWithin π i g t (f x)β :=
by
intro i
@@ -2957,7 +2957,7 @@ theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β}
rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ ht, Ffu]
rw [Ffu]
exact hst hx
- simp_rw [β Ngu] at hC
+ simp_rw [β Ngu] at hC
have Nfgu : βiteratedFDerivWithin π n (g β f) s xβ = βiteratedFDerivWithin π n (gu β fu) s xβ :=
by
have : gu β fu = isoG.symm β g β f := by
@@ -2978,7 +2978,7 @@ theorem norm_iteratedFDeriv_comp_le {g : F β G} {f : E β F} {n : β} {N :
(hD : β i, 1 β€ i β i β€ n β βiteratedFDeriv π i f xβ β€ D ^ i) :
βiteratedFDeriv π n (g β f) xβ β€ n ! * C * D ^ n :=
by
- simp_rw [β iteratedFDerivWithin_univ] at hC hDβ’
+ simp_rw [β iteratedFDerivWithin_univ] at hC hD β’
exact
norm_iteratedFDerivWithin_comp_le hg.cont_diff_on hf.cont_diff_on hn uniqueDiffOn_univ
uniqueDiffOn_univ (maps_to_univ _ _) (mem_univ x) hC hD
@@ -3021,7 +3021,7 @@ theorem norm_iteratedFDerivWithin_clm_apply_const {f : E β F βL[π] G} {c
by
let g : (F βL[π] G) βL[π] G := ContinuousLinearMap.apply π G c
have h := g.norm_comp_continuous_multilinear_map_le (iteratedFDerivWithin π n f s x)
- rw [β g.iterated_fderiv_within_comp_left hf hs hx hn] at h
+ rw [β g.iterated_fderiv_within_comp_left hf hs hx hn] at h
refine' h.trans (mul_le_mul_of_nonneg_right _ (norm_nonneg _))
refine' g.op_norm_le_bound (norm_nonneg _) fun f => _
rw [ContinuousLinearMap.apply_apply, mul_comm]
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -128,21 +128,21 @@ variable {π : Type _} [NontriviallyNormedField π] {D : Type uD} [NormedAdd
@[simp]
-theorem iteratedFderiv_zero_fun {n : β} : (iteratedFderiv π n fun x : E => (0 : F)) = 0 :=
+theorem iteratedFDeriv_zero_fun {n : β} : (iteratedFDeriv π n fun x : E => (0 : F)) = 0 :=
by
induction' n with n IH
Β· ext m; simp
Β· ext (x m)
- rw [iteratedFderiv_succ_apply_left, IH]
+ rw [iteratedFDeriv_succ_apply_left, IH]
change (fderiv π (fun x : E => (0 : E[Γn]βL[π] F)) x : E β E[Γn]βL[π] F) (m 0) (tail m) = _
rw [fderiv_const]
rfl
-#align iterated_fderiv_zero_fun iteratedFderiv_zero_fun
+#align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun
theorem contDiff_zero_fun : ContDiff π n fun x : E => (0 : F) :=
by
- apply contDiff_of_differentiable_iteratedFderiv fun m hm => _
- rw [iteratedFderiv_zero_fun]
+ apply contDiff_of_differentiable_iteratedFDeriv fun m hm => _
+ rw [iteratedFDeriv_zero_fun]
exact differentiable_const (0 : E[Γm]βL[π] F)
#align cont_diff_zero_fun contDiff_zero_fun
@@ -189,19 +189,19 @@ theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π n f s := b
rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const
#align cont_diff_on_of_subsingleton contDiffOn_of_subsingleton
-theorem iteratedFderiv_succ_const (n : β) (c : F) : (iteratedFderiv π (n + 1) fun y : E => c) = 0 :=
+theorem iteratedFDeriv_succ_const (n : β) (c : F) : (iteratedFDeriv π (n + 1) fun y : E => c) = 0 :=
by
ext (x m)
- simp only [iteratedFderiv_succ_apply_right, fderiv_const, Pi.zero_apply, iteratedFderiv_zero_fun,
+ simp only [iteratedFDeriv_succ_apply_right, fderiv_const, Pi.zero_apply, iteratedFDeriv_zero_fun,
ContinuousMultilinearMap.zero_apply, ContinuousLinearMap.zero_apply]
-#align iterated_fderiv_succ_const iteratedFderiv_succ_const
+#align iterated_fderiv_succ_const iteratedFDeriv_succ_const
-theorem iteratedFderiv_const_of_ne {n : β} (hn : n β 0) (c : F) :
- (iteratedFderiv π n fun y : E => c) = 0 :=
+theorem iteratedFDeriv_const_of_ne {n : β} (hn : n β 0) (c : F) :
+ (iteratedFDeriv π n fun y : E => c) = 0 :=
by
cases' Nat.exists_eq_succ_of_ne_zero hn with k hk
- rw [hk, iteratedFderiv_succ_const]
-#align iterated_fderiv_const_of_ne iteratedFderiv_const_of_ne
+ rw [hk, iteratedFDeriv_succ_const]
+#align iterated_fderiv_const_of_ne iteratedFDeriv_const_of_ne
/-! ### Smoothness of linear functions -/
@@ -264,9 +264,9 @@ theorem IsBoundedBilinearMap.contDiff (hb : IsBoundedBilinearMap π b) : ContD
/-- If `f` admits a Taylor series `p` in a set `s`, and `g` is linear, then `g β f` admits a Taylor
series whose `k`-th term is given by `g β (p k)`. -/
-theorem HasFtaylorSeriesUpToOn.continuousLinearMapComp (g : F βL[π] G)
- (hf : HasFtaylorSeriesUpToOn n f p s) :
- HasFtaylorSeriesUpToOn n (g β f) (fun x k => g.compContinuousMultilinearMap (p x k)) s :=
+theorem HasFTaylorSeriesUpToOn.continuousLinearMap_comp (g : F βL[π] G)
+ (hf : HasFTaylorSeriesUpToOn n f p s) :
+ HasFTaylorSeriesUpToOn n (g β f) (fun x k => g.compContinuousMultilinearMap (p x k)) s :=
by
set L : β m : β, (E[Γm]βL[π] F) βL[π] E[Γm]βL[π] G := fun m =>
ContinuousLinearMap.compContinuousMultilinearMapL π (fun _ => E) F G g
@@ -276,7 +276,7 @@ theorem HasFtaylorSeriesUpToOn.continuousLinearMapComp (g : F βL[π] G)
convert(L m).HasFDerivAt.comp_hasFDerivWithinAt x (hf.fderiv_within m hm x hx)
Β· intro m hm
convert(L m).Continuous.comp_continuousOn (hf.cont m hm)
-#align has_ftaylor_series_up_to_on.continuous_linear_map_comp HasFtaylorSeriesUpToOn.continuousLinearMapComp
+#align has_ftaylor_series_up_to_on.continuous_linear_map_comp HasFTaylorSeriesUpToOn.continuousLinearMap_comp
/-- Composition by continuous linear maps on the left preserves `C^n` functions in a domain
at a point. -/
@@ -297,7 +297,7 @@ theorem ContDiffAt.continuousLinearMap_comp (g : F βL[π] G) (hf : ContDiffA
/-- Composition by continuous linear maps on the left preserves `C^n` functions on domains. -/
theorem ContDiffOn.continuousLinearMap_comp (g : F βL[π] G) (hf : ContDiffOn π n f s) :
- ContDiffOn π n (g β f) s := fun x hx => (hf x hx).continuousLinearMapComp g
+ ContDiffOn π n (g β f) s := fun x hx => (hf x hx).continuousLinearMap_comp g
#align cont_diff_on.continuous_linear_map_comp ContDiffOn.continuousLinearMap_comp
/-- Composition by continuous linear maps on the left preserves `C^n` functions. -/
@@ -308,44 +308,44 @@ theorem ContDiff.continuousLinearMap_comp {f : E β F} (g : F βL[π] G) (hf
/-- The iterated derivative within a set of the composition with a linear map on the left is
obtained by applying the linear map to the iterated derivative. -/
-theorem ContinuousLinearMap.iteratedFderivWithin_comp_left {f : E β F} (g : F βL[π] G)
+theorem ContinuousLinearMap.iteratedFDerivWithin_comp_left {f : E β F} (g : F βL[π] G)
(hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β} (hi : (i : ββ) β€ n) :
- iteratedFderivWithin π i (g β f) s x =
- g.compContinuousMultilinearMap (iteratedFderivWithin π i f s x) :=
- (((hf.ftaylorSeriesWithin hs).continuousLinearMapComp g).eq_ftaylor_series_of_uniqueDiffOn hi hs
+ iteratedFDerivWithin π i (g β f) s x =
+ g.compContinuousMultilinearMap (iteratedFDerivWithin π i f s x) :=
+ (((hf.ftaylorSeriesWithin hs).continuousLinearMap_comp g).eq_ftaylor_series_of_uniqueDiffOn hi hs
hx).symm
-#align continuous_linear_map.iterated_fderiv_within_comp_left ContinuousLinearMap.iteratedFderivWithin_comp_left
+#align continuous_linear_map.iterated_fderiv_within_comp_left ContinuousLinearMap.iteratedFDerivWithin_comp_left
/-- The iterated derivative of the composition with a linear map on the left is
obtained by applying the linear map to the iterated derivative. -/
-theorem ContinuousLinearMap.iteratedFderiv_comp_left {f : E β F} (g : F βL[π] G)
+theorem ContinuousLinearMap.iteratedFDeriv_comp_left {f : E β F} (g : F βL[π] G)
(hf : ContDiff π n f) (x : E) {i : β} (hi : (i : ββ) β€ n) :
- iteratedFderiv π i (g β f) x = g.compContinuousMultilinearMap (iteratedFderiv π i f x) :=
+ iteratedFDeriv π i (g β f) x = g.compContinuousMultilinearMap (iteratedFDeriv π i f x) :=
by
- simp only [β iteratedFderivWithin_univ]
+ simp only [β iteratedFDerivWithin_univ]
exact g.iterated_fderiv_within_comp_left hf.cont_diff_on uniqueDiffOn_univ (mem_univ x) hi
-#align continuous_linear_map.iterated_fderiv_comp_left ContinuousLinearMap.iteratedFderiv_comp_left
+#align continuous_linear_map.iterated_fderiv_comp_left ContinuousLinearMap.iteratedFDeriv_comp_left
/-- The iterated derivative within a set of the composition with a linear equiv on the left is
obtained by applying the linear equiv to the iterated derivative. This is true without
differentiability assumptions. -/
-theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_left (g : F βL[π] G) (f : E β F)
+theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_left (g : F βL[π] G) (f : E β F)
(hs : UniqueDiffOn π s) (hx : x β s) (i : β) :
- iteratedFderivWithin π i (g β f) s x =
- (g : F βL[π] G).compContinuousMultilinearMap (iteratedFderivWithin π i f s x) :=
+ iteratedFDerivWithin π i (g β f) s x =
+ (g : F βL[π] G).compContinuousMultilinearMap (iteratedFDerivWithin π i f s x) :=
by
induction' i with i IH generalizing x
Β· ext1 m
- simp only [iteratedFderivWithin_zero_apply, ContinuousLinearEquiv.coe_coe,
+ simp only [iteratedFDerivWithin_zero_apply, ContinuousLinearEquiv.coe_coe,
ContinuousLinearMap.compContinuousMultilinearMap_coe, EmbeddingLike.apply_eq_iff_eq]
Β· ext1 m
- rw [iteratedFderivWithin_succ_apply_left]
+ rw [iteratedFDerivWithin_succ_apply_left]
have Z :
- fderivWithin π (iteratedFderivWithin π i (g β f) s) s x =
+ fderivWithin π (iteratedFDerivWithin π i (g β f) s) s x =
fderivWithin π
(fun y =>
g.comp_continuous_multilinear_mapL (fun j : Fin i => E)
- (iteratedFderivWithin π i f s y))
+ (iteratedFDerivWithin π i f s y))
s x :=
fderivWithin_congr' (@IH) hx
simp_rw [Z]
@@ -353,55 +353,55 @@ theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_left (g : F βL[π] G
simp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_app,
ContinuousLinearEquiv.compContinuousMultilinearMapL_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, EmbeddingLike.apply_eq_iff_eq]
- rw [iteratedFderivWithin_succ_apply_left]
-#align continuous_linear_equiv.iterated_fderiv_within_comp_left ContinuousLinearEquiv.iteratedFderivWithin_comp_left
+ rw [iteratedFDerivWithin_succ_apply_left]
+#align continuous_linear_equiv.iterated_fderiv_within_comp_left ContinuousLinearEquiv.iteratedFDerivWithin_comp_left
/-- Composition with a linear isometry on the left preserves the norm of the iterated
derivative within a set. -/
-theorem LinearIsometry.norm_iteratedFderivWithin_comp_left {f : E β F} (g : F ββα΅’[π] G)
+theorem LinearIsometry.norm_iteratedFDerivWithin_comp_left {f : E β F} (g : F ββα΅’[π] G)
(hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β} (hi : (i : ββ) β€ n) :
- βiteratedFderivWithin π i (g β f) s xβ = βiteratedFderivWithin π i f s xβ :=
+ βiteratedFDerivWithin π i (g β f) s xβ = βiteratedFDerivWithin π i f s xβ :=
by
have :
- iteratedFderivWithin π i (g β f) s x =
- g.to_continuous_linear_map.comp_continuous_multilinear_map (iteratedFderivWithin π i f s x) :=
+ iteratedFDerivWithin π i (g β f) s x =
+ g.to_continuous_linear_map.comp_continuous_multilinear_map (iteratedFDerivWithin π i f s x) :=
g.to_continuous_linear_map.iterated_fderiv_within_comp_left hf hs hx hi
rw [this]
apply LinearIsometry.norm_compContinuousMultilinearMap
-#align linear_isometry.norm_iterated_fderiv_within_comp_left LinearIsometry.norm_iteratedFderivWithin_comp_left
+#align linear_isometry.norm_iterated_fderiv_within_comp_left LinearIsometry.norm_iteratedFDerivWithin_comp_left
/-- Composition with a linear isometry on the left preserves the norm of the iterated
derivative. -/
-theorem LinearIsometry.norm_iteratedFderiv_comp_left {f : E β F} (g : F ββα΅’[π] G)
+theorem LinearIsometry.norm_iteratedFDeriv_comp_left {f : E β F} (g : F ββα΅’[π] G)
(hf : ContDiff π n f) (x : E) {i : β} (hi : (i : ββ) β€ n) :
- βiteratedFderiv π i (g β f) xβ = βiteratedFderiv π i f xβ :=
+ βiteratedFDeriv π i (g β f) xβ = βiteratedFDeriv π i f xβ :=
by
- simp only [β iteratedFderivWithin_univ]
+ simp only [β iteratedFDerivWithin_univ]
exact g.norm_iterated_fderiv_within_comp_left hf.cont_diff_on uniqueDiffOn_univ (mem_univ x) hi
-#align linear_isometry.norm_iterated_fderiv_comp_left LinearIsometry.norm_iteratedFderiv_comp_left
+#align linear_isometry.norm_iterated_fderiv_comp_left LinearIsometry.norm_iteratedFDeriv_comp_left
/-- Composition with a linear isometry equiv on the left preserves the norm of the iterated
derivative within a set. -/
-theorem LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left (g : F ββα΅’[π] G) (f : E β F)
+theorem LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left (g : F ββα΅’[π] G) (f : E β F)
(hs : UniqueDiffOn π s) (hx : x β s) (i : β) :
- βiteratedFderivWithin π i (g β f) s xβ = βiteratedFderivWithin π i f s xβ :=
+ βiteratedFDerivWithin π i (g β f) s xβ = βiteratedFDerivWithin π i f s xβ :=
by
have :
- iteratedFderivWithin π i (g β f) s x =
- (g : F βL[π] G).compContinuousMultilinearMap (iteratedFderivWithin π i f s x) :=
+ iteratedFDerivWithin π i (g β f) s x =
+ (g : F βL[π] G).compContinuousMultilinearMap (iteratedFDerivWithin π i f s x) :=
g.to_continuous_linear_equiv.iterated_fderiv_within_comp_left f hs hx i
rw [this]
apply LinearIsometry.norm_compContinuousMultilinearMap g.to_linear_isometry
-#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_left LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left
+#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_left LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left
/-- Composition with a linear isometry equiv on the left preserves the norm of the iterated
derivative. -/
-theorem LinearIsometryEquiv.norm_iteratedFderiv_comp_left (g : F ββα΅’[π] G) (f : E β F) (x : E)
- (i : β) : βiteratedFderiv π i (g β f) xβ = βiteratedFderiv π i f xβ :=
+theorem LinearIsometryEquiv.norm_iteratedFDeriv_comp_left (g : F ββα΅’[π] G) (f : E β F) (x : E)
+ (i : β) : βiteratedFDeriv π i (g β f) xβ = βiteratedFDeriv π i f xβ :=
by
- rw [β iteratedFderivWithin_univ, β iteratedFderivWithin_univ]
+ rw [β iteratedFDerivWithin_univ, β iteratedFDerivWithin_univ]
apply g.norm_iterated_fderiv_within_comp_left f uniqueDiffOn_univ (mem_univ x) i
-#align linear_isometry_equiv.norm_iterated_fderiv_comp_left LinearIsometryEquiv.norm_iteratedFderiv_comp_left
+#align linear_isometry_equiv.norm_iterated_fderiv_comp_left LinearIsometryEquiv.norm_iteratedFDeriv_comp_left
/-- Composition by continuous linear equivs on the left respects higher differentiability at a
point in a domain. -/
@@ -410,7 +410,7 @@ theorem ContinuousLinearEquiv.comp_contDiffWithinAt_iff (e : F βL[π] G) :
β¨fun H => by
simpa only [(Β· β Β·), e.symm.coe_coe, e.symm_apply_apply] using
H.continuous_linear_map_comp (e.symm : G βL[π] F),
- fun H => H.continuousLinearMapComp (e : F βL[π] G)β©
+ fun H => H.continuousLinearMap_comp (e : F βL[π] G)β©
#align continuous_linear_equiv.comp_cont_diff_within_at_iff ContinuousLinearEquiv.comp_contDiffWithinAt_iff
/-- Composition by continuous linear equivs on the left respects higher differentiability at a
@@ -435,9 +435,9 @@ theorem ContinuousLinearEquiv.comp_contDiff_iff (e : F βL[π] G) :
/-- If `f` admits a Taylor series `p` in a set `s`, and `g` is linear, then `f β g` admits a Taylor
series in `g β»ΒΉ' s`, whose `k`-th term is given by `p k (g vβ, ..., g vβ)` . -/
-theorem HasFtaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFtaylorSeriesUpToOn n f p s)
+theorem HasFTaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFTaylorSeriesUpToOn n f p s)
(g : G βL[π] E) :
- HasFtaylorSeriesUpToOn n (f β g) (fun x k => (p (g x) k).compContinuousLinearMap fun _ => g)
+ HasFTaylorSeriesUpToOn n (f β g) (fun x k => (p (g x) k).compContinuousLinearMap fun _ => g)
(g β»ΒΉ' s) :=
by
let A : β m : β, (E[Γm]βL[π] F) β G[Γm]βL[π] F := fun m h => h.compContinuousLinearMap fun _ => g
@@ -459,7 +459,7 @@ theorem HasFtaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFtaylorSeriesUpT
exact
(hA m).Continuous.comp_continuousOn
((hf.cont m hm).comp g.continuous.continuous_on (subset.refl _))
-#align has_ftaylor_series_up_to_on.comp_continuous_linear_map HasFtaylorSeriesUpToOn.compContinuousLinearMap
+#align has_ftaylor_series_up_to_on.comp_continuous_linear_map HasFTaylorSeriesUpToOn.compContinuousLinearMap
/-- Composition by continuous linear maps on the right preserves `C^n` functions at a point on
a domain. -/
@@ -489,35 +489,35 @@ theorem ContDiff.comp_continuousLinearMap {f : E β F} {g : G βL[π] E} (hf
/-- The iterated derivative within a set of the composition with a linear map on the right is
obtained by composing the iterated derivative with the linear map. -/
-theorem ContinuousLinearMap.iteratedFderivWithin_comp_right {f : E β F} (g : G βL[π] E)
+theorem ContinuousLinearMap.iteratedFDerivWithin_comp_right {f : E β F} (g : G βL[π] E)
(hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (h's : UniqueDiffOn π (g β»ΒΉ' s)) {x : G}
(hx : g x β s) {i : β} (hi : (i : ββ) β€ n) :
- iteratedFderivWithin π i (f β g) (g β»ΒΉ' s) x =
- (iteratedFderivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
+ iteratedFDerivWithin π i (f β g) (g β»ΒΉ' s) x =
+ (iteratedFDerivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
(((hf.ftaylorSeriesWithin hs).compContinuousLinearMap g).eq_ftaylor_series_of_uniqueDiffOn hi h's
hx).symm
-#align continuous_linear_map.iterated_fderiv_within_comp_right ContinuousLinearMap.iteratedFderivWithin_comp_right
+#align continuous_linear_map.iterated_fderiv_within_comp_right ContinuousLinearMap.iteratedFDerivWithin_comp_right
/-- The iterated derivative within a set of the composition with a linear equiv on the right is
obtained by composing the iterated derivative with the linear equiv. -/
-theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_right (g : G βL[π] E) (f : E β F)
+theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_right (g : G βL[π] E) (f : E β F)
(hs : UniqueDiffOn π s) {x : G} (hx : g x β s) (i : β) :
- iteratedFderivWithin π i (f β g) (g β»ΒΉ' s) x =
- (iteratedFderivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
+ iteratedFDerivWithin π i (f β g) (g β»ΒΉ' s) x =
+ (iteratedFDerivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
by
induction' i with i IH generalizing x
Β· ext1 m
- simp only [iteratedFderivWithin_zero_apply,
+ simp only [iteratedFDerivWithin_zero_apply,
ContinuousMultilinearMap.compContinuousLinearMap_apply]
Β· ext1 m
simp only [ContinuousMultilinearMap.compContinuousLinearMap_apply,
- ContinuousLinearEquiv.coe_coe, iteratedFderivWithin_succ_apply_left]
+ ContinuousLinearEquiv.coe_coe, iteratedFDerivWithin_succ_apply_left]
have :
- fderivWithin π (iteratedFderivWithin π i (f β βg) (βg β»ΒΉ' s)) (βg β»ΒΉ' s) x =
+ fderivWithin π (iteratedFDerivWithin π i (f β βg) (βg β»ΒΉ' s)) (βg β»ΒΉ' s) x =
fderivWithin π
(fun y =>
ContinuousMultilinearMap.compContinuousLinearMapEquivL _ (fun _x : Fin i => g)
- (iteratedFderivWithin π i f s (g y)))
+ (iteratedFDerivWithin π i f s (g y)))
(g β»ΒΉ' s) x :=
fderivWithin_congr' (@IH) hx
rw [this]
@@ -527,42 +527,42 @@ theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_right (g : G βL[π]
ContinuousMultilinearMap.compContinuousLinearMap_apply]
rw [ContinuousLinearEquiv.comp_right_fderivWithin _ (g.unique_diff_on_preimage_iff.2 hs x hx)]
rfl
-#align continuous_linear_equiv.iterated_fderiv_within_comp_right ContinuousLinearEquiv.iteratedFderivWithin_comp_right
+#align continuous_linear_equiv.iterated_fderiv_within_comp_right ContinuousLinearEquiv.iteratedFDerivWithin_comp_right
/-- The iterated derivative of the composition with a linear map on the right is
obtained by composing the iterated derivative with the linear map. -/
-theorem ContinuousLinearMap.iteratedFderiv_comp_right (g : G βL[π] E) {f : E β F}
+theorem ContinuousLinearMap.iteratedFDeriv_comp_right (g : G βL[π] E) {f : E β F}
(hf : ContDiff π n f) (x : G) {i : β} (hi : (i : ββ) β€ n) :
- iteratedFderiv π i (f β g) x =
- (iteratedFderiv π i f (g x)).compContinuousLinearMap fun _ => g :=
+ iteratedFDeriv π i (f β g) x =
+ (iteratedFDeriv π i f (g x)).compContinuousLinearMap fun _ => g :=
by
- simp only [β iteratedFderivWithin_univ]
+ simp only [β iteratedFDerivWithin_univ]
apply
g.iterated_fderiv_within_comp_right hf.cont_diff_on uniqueDiffOn_univ uniqueDiffOn_univ
(mem_univ _) hi
-#align continuous_linear_map.iterated_fderiv_comp_right ContinuousLinearMap.iteratedFderiv_comp_right
+#align continuous_linear_map.iterated_fderiv_comp_right ContinuousLinearMap.iteratedFDeriv_comp_right
/-- Composition with a linear isometry on the right preserves the norm of the iterated derivative
within a set. -/
-theorem LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right (g : G ββα΅’[π] E) (f : E β F)
+theorem LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right (g : G ββα΅’[π] E) (f : E β F)
(hs : UniqueDiffOn π s) {x : G} (hx : g x β s) (i : β) :
- βiteratedFderivWithin π i (f β g) (g β»ΒΉ' s) xβ = βiteratedFderivWithin π i f s (g x)β :=
+ βiteratedFDerivWithin π i (f β g) (g β»ΒΉ' s) xβ = βiteratedFDerivWithin π i f s (g x)β :=
by
have :
- iteratedFderivWithin π i (f β g) (g β»ΒΉ' s) x =
- (iteratedFderivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
+ iteratedFDerivWithin π i (f β g) (g β»ΒΉ' s) x =
+ (iteratedFDerivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
g.to_continuous_linear_equiv.iterated_fderiv_within_comp_right f hs hx i
rw [this, ContinuousMultilinearMap.norm_compContinuous_linearIsometryEquiv]
-#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_right LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right
+#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_right LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right
/-- Composition with a linear isometry on the right preserves the norm of the iterated derivative
within a set. -/
-theorem LinearIsometryEquiv.norm_iteratedFderiv_comp_right (g : G ββα΅’[π] E) (f : E β F) (x : G)
- (i : β) : βiteratedFderiv π i (f β g) xβ = βiteratedFderiv π i f (g x)β :=
+theorem LinearIsometryEquiv.norm_iteratedFDeriv_comp_right (g : G ββα΅’[π] E) (f : E β F) (x : G)
+ (i : β) : βiteratedFDeriv π i (f β g) xβ = βiteratedFDeriv π i f (g x)β :=
by
- simp only [β iteratedFderivWithin_univ]
+ simp only [β iteratedFDerivWithin_univ]
apply g.norm_iterated_fderiv_within_comp_right f uniqueDiffOn_univ (mem_univ (g x)) i
-#align linear_isometry_equiv.norm_iterated_fderiv_comp_right LinearIsometryEquiv.norm_iteratedFderiv_comp_right
+#align linear_isometry_equiv.norm_iterated_fderiv_comp_right LinearIsometryEquiv.norm_iteratedFDeriv_comp_right
/-- Composition by continuous linear equivs on the right respects higher differentiability at a
point in a domain. -/
@@ -609,9 +609,9 @@ theorem ContinuousLinearEquiv.contDiff_comp_iff (e : G βL[π] E) :
/-- If two functions `f` and `g` admit Taylor series `p` and `q` in a set `s`, then the cartesian
product of `f` and `g` admits the cartesian product of `p` and `q` as a Taylor series. -/
-theorem HasFtaylorSeriesUpToOn.prod (hf : HasFtaylorSeriesUpToOn n f p s) {g : E β G}
- {q : E β FormalMultilinearSeries π E G} (hg : HasFtaylorSeriesUpToOn n g q s) :
- HasFtaylorSeriesUpToOn n (fun y => (f y, g y)) (fun y k => (p y k).Prod (q y k)) s :=
+theorem HasFTaylorSeriesUpToOn.prod (hf : HasFTaylorSeriesUpToOn n f p s) {g : E β G}
+ {q : E β FormalMultilinearSeries π E G} (hg : HasFTaylorSeriesUpToOn n g q s) :
+ HasFTaylorSeriesUpToOn n (fun y => (f y, g y)) (fun y k => (p y k).Prod (q y k)) s :=
by
set L := fun m => ContinuousMultilinearMap.prodL π (fun i : Fin m => E) F G
constructor
@@ -621,7 +621,7 @@ theorem HasFtaylorSeriesUpToOn.prod (hf : HasFtaylorSeriesUpToOn n f p s) {g : E
((hf.fderiv_within m hm x hx).Prod (hg.fderiv_within m hm x hx))
Β· intro m hm
exact (L m).Continuous.comp_continuousOn ((hf.cont m hm).Prod (hg.cont m hm))
-#align has_ftaylor_series_up_to_on.prod HasFtaylorSeriesUpToOn.prod
+#align has_ftaylor_series_up_to_on.prod HasFTaylorSeriesUpToOn.prod
/-- The cartesian product of `C^n` functions at a point in a domain is `C^n`. -/
theorem ContDiffWithinAt.prod {s : Set E} {f : E β F} {g : E β G} (hf : ContDiffWithinAt π n f s x)
@@ -1259,10 +1259,10 @@ variable {ΞΉ ΞΉ' : Type _} [Fintype ΞΉ] [Fintype ΞΉ'] {F' : ΞΉ β Type _} [β
[β i, NormedSpace π (F' i)] {Ο : β i, E β F' i} {p' : β i, E β FormalMultilinearSeries π E (F' i)}
{Ξ¦ : E β β i, F' i} {P' : E β FormalMultilinearSeries π E (β i, F' i)}
-theorem hasFtaylorSeriesUpToOn_pi :
- HasFtaylorSeriesUpToOn n (fun x i => Ο i x)
+theorem hasFTaylorSeriesUpToOn_pi :
+ HasFTaylorSeriesUpToOn n (fun x i => Ο i x)
(fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s β
- β i, HasFtaylorSeriesUpToOn n (Ο i) (p' i) s :=
+ β i, HasFTaylorSeriesUpToOn n (Ο i) (p' i) s :=
by
set pr := @ContinuousLinearMap.proj π _ ΞΉ F' _ _ _
letI : β (m : β) (i : ΞΉ), NormedSpace π (E[Γm]βL[π] F' i) := fun m i => inferInstance
@@ -1279,28 +1279,28 @@ theorem hasFtaylorSeriesUpToOn_pi :
Β· intro m hm
have := continuousOn_pi.2 fun i => (h i).cont m hm
convert(L m).Continuous.comp_continuousOn this
-#align has_ftaylor_series_up_to_on_pi hasFtaylorSeriesUpToOn_pi
+#align has_ftaylor_series_up_to_on_pi hasFTaylorSeriesUpToOn_pi
@[simp]
-theorem hasFtaylorSeriesUpToOn_pi' :
- HasFtaylorSeriesUpToOn n Ξ¦ P' s β
+theorem hasFTaylorSeriesUpToOn_pi' :
+ HasFTaylorSeriesUpToOn n Ξ¦ P' s β
β i,
- HasFtaylorSeriesUpToOn n (fun x => Ξ¦ x i)
+ HasFTaylorSeriesUpToOn n (fun x => Ξ¦ x i)
(fun x m =>
(@ContinuousLinearMap.proj π _ ΞΉ F' _ _ _ i).compContinuousMultilinearMap (P' x m))
s :=
- by convert hasFtaylorSeriesUpToOn_pi; ext; rfl
-#align has_ftaylor_series_up_to_on_pi' hasFtaylorSeriesUpToOn_pi'
+ by convert hasFTaylorSeriesUpToOn_pi; ext; rfl
+#align has_ftaylor_series_up_to_on_pi' hasFTaylorSeriesUpToOn_pi'
theorem contDiffWithinAt_pi :
ContDiffWithinAt π n Ξ¦ s x β β i, ContDiffWithinAt π n (fun x => Ξ¦ x i) s x :=
by
set pr := @ContinuousLinearMap.proj π _ ΞΉ F' _ _ _
- refine' β¨fun h i => h.continuousLinearMapComp (pr i), fun h m hm => _β©
+ refine' β¨fun h i => h.continuousLinearMap_comp (pr i), fun h m hm => _β©
choose u hux p hp using fun i => h i m hm
exact
β¨β i, u i, Filter.iInter_mem.2 hux, _,
- hasFtaylorSeriesUpToOn_pi.2 fun i => (hp i).mono <| Inter_subset _ _β©
+ hasFTaylorSeriesUpToOn_pi.2 fun i => (hp i).mono <| Inter_subset _ _β©
#align cont_diff_within_at_pi contDiffWithinAt_pi
theorem contDiffOn_pi : ContDiffOn π n Ξ¦ s β β i, ContDiffOn π n (fun x => Ξ¦ x i) s :=
@@ -1370,61 +1370,61 @@ variable {i : β}
/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
See also `iterated_fderiv_within_add_apply'`, which uses the spelling `(Ξ» x, f x + g x)`
instead of `f + g`. -/
-theorem iteratedFderivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f s)
+theorem iteratedFDerivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f s)
(hg : ContDiffOn π i g s) (hu : UniqueDiffOn π s) (hx : x β s) :
- iteratedFderivWithin π i (f + g) s x =
- iteratedFderivWithin π i f s x + iteratedFderivWithin π i g s x :=
+ iteratedFDerivWithin π i (f + g) s x =
+ iteratedFDerivWithin π i f s x + iteratedFDerivWithin π i g s x :=
by
induction' i with i hi generalizing x
Β· ext h; simp
Β· ext h
have hi' : (i : ββ) < i + 1 := with_top.coe_lt_coe.mpr (Nat.lt_succ_self _)
- have hdf : DifferentiableOn π (iteratedFderivWithin π i f s) s :=
+ have hdf : DifferentiableOn π (iteratedFDerivWithin π i f s) s :=
hf.differentiable_on_iterated_fderiv_within hi' hu
- have hdg : DifferentiableOn π (iteratedFderivWithin π i g s) s :=
+ have hdg : DifferentiableOn π (iteratedFDerivWithin π i g s) s :=
hg.differentiable_on_iterated_fderiv_within hi' hu
have hcdf : ContDiffOn π i f s := hf.of_le hi'.le
have hcdg : ContDiffOn π i g s := hg.of_le hi'.le
calc
- iteratedFderivWithin π (i + 1) (f + g) s x h =
- fderivWithin π (iteratedFderivWithin π i (f + g) s) s x (h 0) (Fin.tail h) :=
+ iteratedFDerivWithin π (i + 1) (f + g) s x h =
+ fderivWithin π (iteratedFDerivWithin π i (f + g) s) s x (h 0) (Fin.tail h) :=
rfl
_ =
- fderivWithin π (iteratedFderivWithin π i f s + iteratedFderivWithin π i g s) s x (h 0)
+ fderivWithin π (iteratedFDerivWithin π i f s + iteratedFDerivWithin π i g s) s x (h 0)
(Fin.tail h) :=
by rw [fderivWithin_congr' (fun _ => hi hcdf hcdg) hx]; rfl
_ =
- (fderivWithin π (iteratedFderivWithin π i f s) s +
- fderivWithin π (iteratedFderivWithin π i g s) s)
+ (fderivWithin π (iteratedFDerivWithin π i f s) s +
+ fderivWithin π (iteratedFDerivWithin π i g s) s)
x (h 0) (Fin.tail h) :=
by rw [Pi.add_def, fderivWithin_add (hu x hx) (hdf x hx) (hdg x hx)]; rfl
- _ = (iteratedFderivWithin π (i + 1) f s + iteratedFderivWithin π (i + 1) g s) x h := rfl
+ _ = (iteratedFDerivWithin π (i + 1) f s + iteratedFDerivWithin π (i + 1) g s) x h := rfl
-#align iterated_fderiv_within_add_apply iteratedFderivWithin_add_apply
+#align iterated_fderiv_within_add_apply iteratedFDerivWithin_add_apply
/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
This is the same as `iterated_fderiv_within_add_apply`, but using the spelling `(Ξ» x, f x + g x)`
instead of `f + g`, which can be handy for some rewrites.
TODO: use one form consistently. -/
-theorem iteratedFderivWithin_add_apply' {f g : E β F} (hf : ContDiffOn π i f s)
+theorem iteratedFDerivWithin_add_apply' {f g : E β F} (hf : ContDiffOn π i f s)
(hg : ContDiffOn π i g s) (hu : UniqueDiffOn π s) (hx : x β s) :
- iteratedFderivWithin π i (fun x => f x + g x) s x =
- iteratedFderivWithin π i f s x + iteratedFderivWithin π i g s x :=
- iteratedFderivWithin_add_apply hf hg hu hx
-#align iterated_fderiv_within_add_apply' iteratedFderivWithin_add_apply'
+ iteratedFDerivWithin π i (fun x => f x + g x) s x =
+ iteratedFDerivWithin π i f s x + iteratedFDerivWithin π i g s x :=
+ iteratedFDerivWithin_add_apply hf hg hu hx
+#align iterated_fderiv_within_add_apply' iteratedFDerivWithin_add_apply'
-theorem iteratedFderiv_add_apply {i : β} {f g : E β F} (hf : ContDiff π i f) (hg : ContDiff π i g) :
- iteratedFderiv π i (f + g) x = iteratedFderiv π i f x + iteratedFderiv π i g x :=
+theorem iteratedFDeriv_add_apply {i : β} {f g : E β F} (hf : ContDiff π i f) (hg : ContDiff π i g) :
+ iteratedFDeriv π i (f + g) x = iteratedFDeriv π i f x + iteratedFDeriv π i g x :=
by
- simp_rw [β contDiffOn_univ, β iteratedFderivWithin_univ] at hf hgβ’
- exact iteratedFderivWithin_add_apply hf hg uniqueDiffOn_univ (Set.mem_univ _)
-#align iterated_fderiv_add_apply iteratedFderiv_add_apply
+ simp_rw [β contDiffOn_univ, β iteratedFDerivWithin_univ] at hf hgβ’
+ exact iteratedFDerivWithin_add_apply hf hg uniqueDiffOn_univ (Set.mem_univ _)
+#align iterated_fderiv_add_apply iteratedFDeriv_add_apply
-theorem iteratedFderiv_add_apply' {i : β} {f g : E β F} (hf : ContDiff π i f)
+theorem iteratedFDeriv_add_apply' {i : β} {f g : E β F} (hf : ContDiff π i f)
(hg : ContDiff π i g) :
- iteratedFderiv π i (fun x => f x + g x) x = iteratedFderiv π i f x + iteratedFderiv π i g x :=
- iteratedFderiv_add_apply hf hg
-#align iterated_fderiv_add_apply' iteratedFderiv_add_apply'
+ iteratedFDeriv π i (fun x => f x + g x) x = iteratedFDeriv π i f x + iteratedFDeriv π i g x :=
+ iteratedFDeriv_add_apply hf hg
+#align iterated_fderiv_add_apply' iteratedFDeriv_add_apply'
end Add
@@ -1462,31 +1462,31 @@ theorem ContDiffOn.neg {s : Set E} {f : E β F} (hf : ContDiffOn π n f s) :
variable {i : β}
-theorem iteratedFderivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s) (hx : x β s) :
- iteratedFderivWithin π i (-f) s x = -iteratedFderivWithin π i f s x :=
+theorem iteratedFDerivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s) (hx : x β s) :
+ iteratedFDerivWithin π i (-f) s x = -iteratedFDerivWithin π i f s x :=
by
induction' i with i hi generalizing x
Β· ext h; simp
Β· ext h
have hi' : (i : ββ) < i + 1 := with_top.coe_lt_coe.mpr (Nat.lt_succ_self _)
calc
- iteratedFderivWithin π (i + 1) (-f) s x h =
- fderivWithin π (iteratedFderivWithin π i (-f) s) s x (h 0) (Fin.tail h) :=
+ iteratedFDerivWithin π (i + 1) (-f) s x h =
+ fderivWithin π (iteratedFDerivWithin π i (-f) s) s x (h 0) (Fin.tail h) :=
rfl
- _ = fderivWithin π (-iteratedFderivWithin π i f s) s x (h 0) (Fin.tail h) := by
+ _ = fderivWithin π (-iteratedFDerivWithin π i f s) s x (h 0) (Fin.tail h) := by
rw [fderivWithin_congr' (@hi) hx]; rfl
- _ = -(fderivWithin π (iteratedFderivWithin π i f s) s) x (h 0) (Fin.tail h) := by
+ _ = -(fderivWithin π (iteratedFDerivWithin π i f s) s) x (h 0) (Fin.tail h) := by
rw [Pi.neg_def, fderivWithin_neg (hu x hx)]; rfl
- _ = -(iteratedFderivWithin π (i + 1) f s) x h := rfl
+ _ = -(iteratedFDerivWithin π (i + 1) f s) x h := rfl
-#align iterated_fderiv_within_neg_apply iteratedFderivWithin_neg_apply
+#align iterated_fderiv_within_neg_apply iteratedFDerivWithin_neg_apply
-theorem iteratedFderiv_neg_apply {i : β} {f : E β F} :
- iteratedFderiv π i (-f) x = -iteratedFderiv π i f x :=
+theorem iteratedFDeriv_neg_apply {i : β} {f : E β F} :
+ iteratedFDeriv π i (-f) x = -iteratedFDeriv π i f x :=
by
- simp_rw [β iteratedFderivWithin_univ]
- exact iteratedFderivWithin_neg_apply uniqueDiffOn_univ (Set.mem_univ _)
-#align iterated_fderiv_neg_apply iteratedFderiv_neg_apply
+ simp_rw [β iteratedFDerivWithin_univ]
+ exact iteratedFDerivWithin_neg_apply uniqueDiffOn_univ (Set.mem_univ _)
+#align iterated_fderiv_neg_apply iteratedFDeriv_neg_apply
end Neg
@@ -1742,34 +1742,34 @@ theorem ContDiffOn.const_smul {s : Set E} {f : E β F} (c : R) (hf : ContDiffOn
variable {i : β} {a : R}
-theorem iteratedFderivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu : UniqueDiffOn π s)
- (hx : x β s) : iteratedFderivWithin π i (a β’ f) s x = a β’ iteratedFderivWithin π i f s x :=
+theorem iteratedFDerivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu : UniqueDiffOn π s)
+ (hx : x β s) : iteratedFDerivWithin π i (a β’ f) s x = a β’ iteratedFDerivWithin π i f s x :=
by
induction' i with i hi generalizing x
Β· ext; simp
Β· ext h
have hi' : (i : ββ) < i + 1 := with_top.coe_lt_coe.mpr (Nat.lt_succ_self _)
- have hdf : DifferentiableOn π (iteratedFderivWithin π i f s) s :=
+ have hdf : DifferentiableOn π (iteratedFDerivWithin π i f s) s :=
hf.differentiable_on_iterated_fderiv_within hi' hu
have hcdf : ContDiffOn π i f s := hf.of_le hi'.le
calc
- iteratedFderivWithin π (i + 1) (a β’ f) s x h =
- fderivWithin π (iteratedFderivWithin π i (a β’ f) s) s x (h 0) (Fin.tail h) :=
+ iteratedFDerivWithin π (i + 1) (a β’ f) s x h =
+ fderivWithin π (iteratedFDerivWithin π i (a β’ f) s) s x (h 0) (Fin.tail h) :=
rfl
- _ = fderivWithin π (a β’ iteratedFderivWithin π i f s) s x (h 0) (Fin.tail h) := by
+ _ = fderivWithin π (a β’ iteratedFDerivWithin π i f s) s x (h 0) (Fin.tail h) := by
rw [fderivWithin_congr' (fun _ => hi hcdf) hx]; rfl
- _ = (a β’ fderivWithin π (iteratedFderivWithin π i f s)) s x (h 0) (Fin.tail h) := by
+ _ = (a β’ fderivWithin π (iteratedFDerivWithin π i f s)) s x (h 0) (Fin.tail h) := by
rw [Pi.smul_def, fderivWithin_const_smul (hu x hx) (hdf x hx)]; rfl
- _ = a β’ iteratedFderivWithin π (i + 1) f s x h := rfl
+ _ = a β’ iteratedFDerivWithin π (i + 1) f s x h := rfl
-#align iterated_fderiv_within_const_smul_apply iteratedFderivWithin_const_smul_apply
+#align iterated_fderiv_within_const_smul_apply iteratedFDerivWithin_const_smul_apply
-theorem iteratedFderiv_const_smul_apply {x : E} (hf : ContDiff π i f) :
- iteratedFderiv π i (a β’ f) x = a β’ iteratedFderiv π i f x :=
+theorem iteratedFDeriv_const_smul_apply {x : E} (hf : ContDiff π i f) :
+ iteratedFDeriv π i (a β’ f) x = a β’ iteratedFDeriv π i f x :=
by
- simp_rw [β contDiffOn_univ, β iteratedFderivWithin_univ] at *
- refine' iteratedFderivWithin_const_smul_apply hf uniqueDiffOn_univ (Set.mem_univ _)
-#align iterated_fderiv_const_smul_apply iteratedFderiv_const_smul_apply
+ simp_rw [β contDiffOn_univ, β iteratedFDerivWithin_univ] at *
+ refine' iteratedFDerivWithin_const_smul_apply hf uniqueDiffOn_univ (Set.mem_univ _)
+#align iterated_fderiv_const_smul_apply iteratedFDeriv_const_smul_apply
end ConstSmul
@@ -1865,7 +1865,7 @@ theorem contDiffAt_ring_inverse [CompleteSpace R] (x : RΛ£) : ContDiffAt π n
Β· simp [nhdsWithin_univ]
exact x.nhds
Β· use ftaylorSeriesWithin π inverse univ
- rw [le_antisymm hm bot_le, hasFtaylorSeriesUpToOn_zero_iff]
+ rw [le_antisymm hm bot_le, hasFTaylorSeriesUpToOn_zero_iff]
constructor
Β· rintro _ β¨x', rflβ©
exact (inverse_continuous_at x').ContinuousWithinAt
@@ -2145,12 +2145,12 @@ variable {π : Type _} [IsROrC π] {E' : Type _} [NormedAddCommGroup E'] [No
/-- If a function has a Taylor series at order at least 1, then at points in the interior of the
domain of definition, the term of order 1 of this series is a strict derivative of `f`. -/
-theorem HasFtaylorSeriesUpToOn.hasStrictFDerivAt {s : Set E'} {f : E' β F'} {x : E'}
- {p : E' β FormalMultilinearSeries π E' F'} (hf : HasFtaylorSeriesUpToOn n f p s) (hn : 1 β€ n)
+theorem HasFTaylorSeriesUpToOn.hasStrictFDerivAt {s : Set E'} {f : E' β F'} {x : E'}
+ {p : E' β FormalMultilinearSeries π E' F'} (hf : HasFTaylorSeriesUpToOn n f p s) (hn : 1 β€ n)
(hs : s β π x) : HasStrictFDerivAt f ((continuousMultilinearCurryFin1 π E' F') (p x 1)) x :=
hasStrictFDerivAt_of_hasFDerivAt_of_continuousAt (hf.eventually_hasFDerivAt hn hs) <|
(continuousMultilinearCurryFin1 π E' F').ContinuousAt.comp <| (hf.cont 1 hn).ContinuousAt hs
-#align has_ftaylor_series_up_to_on.has_strict_fderiv_at HasFtaylorSeriesUpToOn.hasStrictFDerivAt
+#align has_ftaylor_series_up_to_on.has_strict_fderiv_at HasFTaylorSeriesUpToOn.hasStrictFDerivAt
/-- If a function is `C^n` with `1 β€ n` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
@@ -2198,10 +2198,10 @@ theorem ContDiff.hasStrictDerivAt {f : π β F'} {x : π} (hf : ContDiff
/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} βͺ s`, where `s` is a convex set,
and `βp x 1ββ < K`, then `f` is `K`-Lipschitz in a neighborhood of `x` within `s`. -/
-theorem HasFtaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _}
+theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _}
[NormedAddCommGroup E] [NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F}
{p : E β FormalMultilinearSeries β E F} {s : Set E} {x : E}
- (hf : HasFtaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex β s) (K : ββ₯0)
+ (hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex β s) (K : ββ₯0)
(hK : βp x 1ββ < K) : β t β π[s] x, LipschitzOnWith K f t :=
by
set f' := fun y => continuousMultilinearCurryFin1 β E F (p y 1)
@@ -2214,17 +2214,17 @@ theorem HasFtaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _
exact
hs.exists_nhds_within_lipschitz_on_with_of_has_fderiv_within_at_of_nnnorm_lt
(eventually_nhdsWithin_iff.2 <| eventually_of_forall hder) hcont K hK
-#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with_of_nnnorm_lt HasFtaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt
+#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with_of_nnnorm_lt HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt
/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} βͺ s`, where `s` is a convex set,
then `f` is Lipschitz in a neighborhood of `x` within `s`. -/
-theorem HasFtaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGroup E]
+theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGroup E]
[NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F}
{p : E β FormalMultilinearSeries β E F} {s : Set E} {x : E}
- (hf : HasFtaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex β s) :
+ (hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex β s) :
β K, β t β π[s] x, LipschitzOnWith K f t :=
(exists_gt _).imp <| hf.exists_lipschitzOnWith_of_nnnorm_lt hs
-#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with HasFtaylorSeriesUpToOn.exists_lipschitzOnWith
+#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with HasFTaylorSeriesUpToOn.exists_lipschitzOnWith
/-- If `f` is `C^1` within a conves set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
@@ -2235,7 +2235,7 @@ theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGro
by
rcases hf 1 le_rfl with β¨t, hst, p, hpβ©
rcases metric.mem_nhds_within_iff.mp hst with β¨Ξ΅, Ξ΅0, hΞ΅β©
- replace hp : HasFtaylorSeriesUpToOn 1 f p (Metric.ball x Ξ΅ β© insert x s) := hp.mono hΞ΅
+ replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x Ξ΅ β© insert x s) := hp.mono hΞ΅
clear hst hΞ΅ t
rw [β insert_eq_of_mem (Metric.mem_ball_self Ξ΅0), β insert_inter_distrib] at hp
rcases hp.exists_lipschitz_on_with ((convex_ball _ _).inter hs) with β¨K, t, hst, hftβ©
@@ -2423,8 +2423,8 @@ variable [NormedSpace π' F] [IsScalarTower π π' F]
variable {p' : E β FormalMultilinearSeries π' E F}
-theorem HasFtaylorSeriesUpToOn.restrictScalars (h : HasFtaylorSeriesUpToOn n f p' s) :
- HasFtaylorSeriesUpToOn n f (fun x => (p' x).restrictScalars π) s :=
+theorem HasFTaylorSeriesUpToOn.restrictScalars (h : HasFTaylorSeriesUpToOn n f p' s) :
+ HasFTaylorSeriesUpToOn n f (fun x => (p' x).restrictScalars π) s :=
{ zero_eq := fun x hx => h.zero_eq x hx
fderivWithin := by
intro m hm x hx
@@ -2432,7 +2432,7 @@ theorem HasFtaylorSeriesUpToOn.restrictScalars (h : HasFtaylorSeriesUpToOn n f p
((h.fderiv_within m hm x hx).restrictScalars π)
cont := fun m hm =>
ContinuousMultilinearMap.continuous_restrictScalars.comp_continuousOn (h.cont m hm) }
-#align has_ftaylor_series_up_to_on.restrict_scalars HasFtaylorSeriesUpToOn.restrictScalars
+#align has_ftaylor_series_up_to_on.restrict_scalars HasFTaylorSeriesUpToOn.restrictScalars
theorem ContDiffWithinAt.restrict_scalars (h : ContDiffWithinAt π' n f s x) :
ContDiffWithinAt π n f s x := by
@@ -2462,16 +2462,16 @@ end RestrictScalars
iterated derivatives of `f` and `g` when `B` is bilinear. This lemma is an auxiliary version
assuming all spaces live in the same universe, to enable an induction. Use instead
`continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear` that removes this assumption. -/
-theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux {Du Eu Fu Gu : Type u}
+theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu Fu Gu : Type u}
[NormedAddCommGroup Du] [NormedSpace π Du] [NormedAddCommGroup Eu] [NormedSpace π Eu]
[NormedAddCommGroup Fu] [NormedSpace π Fu] [NormedAddCommGroup Gu] [NormedSpace π Gu]
(B : Eu βL[π] Fu βL[π] Gu) {f : Du β Eu} {g : Du β Fu} {n : β} {s : Set Du} {x : Du}
(hf : ContDiffOn π n f s) (hg : ContDiffOn π n g s) (hs : UniqueDiffOn π s) (hx : x β s) :
- βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ β€
+ βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ β€
βBβ *
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
- βiteratedFderivWithin π (n - i) g s xβ :=
+ (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
+ βiteratedFDerivWithin π (n - i) g s xβ :=
by
/- We argue by induction on `n`. The bound is trivial for `n = 0`. For `n + 1`, we write
the `(n+1)`-th derivative as the `n`-th derivative of the derivative `B f g' + B f' g`, and apply
@@ -2480,104 +2480,104 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux {Du Eu
original spaces, which explains why we assume in the lemma that all spaces live in the same
universe. -/
induction' n with n IH generalizing Eu Fu Gu
- Β· simp only [β mul_assoc, norm_iteratedFderivWithin_zero, Finset.range_one, Finset.sum_singleton,
+ Β· simp only [β mul_assoc, norm_iteratedFDerivWithin_zero, Finset.range_one, Finset.sum_singleton,
Nat.choose_self, algebraMap.coe_one, one_mul]
apply ((B (f x)).le_op_norm (g x)).trans
apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)
exact B.le_op_norm (f x)
Β· have In : (n : ββ) + 1 β€ n.succ := by simp only [Nat.cast_succ, le_refl]
have I1 :
- βiteratedFderivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
+ βiteratedFDerivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
βBβ *
β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFderivWithin π i f s xβ *
- βiteratedFderivWithin π (n + 1 - i) g s xβ :=
+ n.choose i * βiteratedFDerivWithin π i f s xβ *
+ βiteratedFDerivWithin π (n + 1 - i) g s xβ :=
calc
- βiteratedFderivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
+ βiteratedFDerivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
βB.precompR Duβ *
β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFderivWithin π i f s xβ *
- βiteratedFderivWithin π (n - i) (fderivWithin π g s) s xβ :=
+ n.choose i * βiteratedFDerivWithin π i f s xβ *
+ βiteratedFDerivWithin π (n - i) (fderivWithin π g s) s xβ :=
IH _ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderiv_within hs In)
_ β€
βBβ *
β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFderivWithin π i f s xβ *
- βiteratedFderivWithin π (n - i) (fderivWithin π g s) s xβ :=
+ n.choose i * βiteratedFDerivWithin π i f s xβ *
+ βiteratedFDerivWithin π (n - i) (fderivWithin π g s) s xβ :=
(mul_le_mul_of_nonneg_right (B.norm_precompR_le Du)
(Finset.sum_nonneg' fun i => by positivity))
_ = _ := by
congr 1
apply Finset.sum_congr rfl fun i hi => _
rw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)),
- iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
+ iteratedFDerivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
have I2 :
- βiteratedFderivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
+ βiteratedFDerivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
βBβ *
β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFderivWithin π (i + 1) f s xβ *
- βiteratedFderivWithin π (n - i) g s xβ :=
+ n.choose i * βiteratedFDerivWithin π (i + 1) f s xβ *
+ βiteratedFDerivWithin π (n - i) g s xβ :=
calc
- βiteratedFderivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
+ βiteratedFDerivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
βB.precompL Duβ *
β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFderivWithin π i (fderivWithin π f s) s xβ *
- βiteratedFderivWithin π (n - i) g s xβ :=
+ n.choose i * βiteratedFDerivWithin π i (fderivWithin π f s) s xβ *
+ βiteratedFDerivWithin π (n - i) g s xβ :=
IH _ (hf.fderiv_within hs In) (hg.of_le (Nat.cast_le.2 (Nat.le_succ n)))
_ β€
βBβ *
β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFderivWithin π i (fderivWithin π f s) s xβ *
- βiteratedFderivWithin π (n - i) g s xβ :=
+ n.choose i * βiteratedFDerivWithin π i (fderivWithin π f s) s xβ *
+ βiteratedFDerivWithin π (n - i) g s xβ :=
(mul_le_mul_of_nonneg_right (B.norm_precompL_le Du)
(Finset.sum_nonneg' fun i => by positivity))
_ = _ := by
congr 1
apply Finset.sum_congr rfl fun i hi => _
- rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
+ rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
have J :
- iteratedFderivWithin π n (fun y : Du => fderivWithin π (fun y : Du => B (f y) (g y)) s y) s
+ iteratedFDerivWithin π n (fun y : Du => fderivWithin π (fun y : Du => B (f y) (g y)) s y) s
x =
- iteratedFderivWithin π n
+ iteratedFDerivWithin π n
(fun y =>
B.precompR Du (f y) (fderivWithin π g s y) + B.precompL Du (fderivWithin π f s y) (g y))
s x :=
by
- apply iteratedFderivWithin_congr (fun y hy => _) hx
+ apply iteratedFDerivWithin_congr (fun y hy => _) hx
have L : (1 : ββ) β€ n.succ := by
simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n
exact
B.fderiv_within_of_bilinear (hf.differentiable_on L y hy) (hg.differentiable_on L y hy)
(hs y hy)
- rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map, J]
+ rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map, J]
have A : ContDiffOn π n (fun y => B.precompR Du (f y) (fderivWithin π g s y)) s :=
(B.precompR Du).IsBoundedBilinearMap.ContDiff.comp_contDiff_onβ
(hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderiv_within hs In)
have A' : ContDiffOn π n (fun y => B.precompL Du (fderivWithin π f s y) (g y)) s :=
(B.precompL Du).IsBoundedBilinearMap.ContDiff.comp_contDiff_onβ (hf.fderiv_within hs In)
(hg.of_le (Nat.cast_le.2 (Nat.le_succ n)))
- rw [iteratedFderivWithin_add_apply' A A' hs hx]
+ rw [iteratedFDerivWithin_add_apply' A A' hs hx]
apply (norm_add_le _ _).trans ((add_le_add I1 I2).trans (le_of_eq _))
simp_rw [β mul_add, mul_assoc]
congr 1
exact
(Finset.sum_choose_succ_mul
- (fun i j => βiteratedFderivWithin π i f s xβ * βiteratedFderivWithin π j g s xβ) n).symm
-#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_aux ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux
+ (fun i j => βiteratedFDerivWithin π i f s xβ * βiteratedFDerivWithin π j g s xβ) n).symm
+#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_aux ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear:
`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
-theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear (B : E βL[π] F βL[π] G)
+theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL[π] F βL[π] G)
{f : D β E} {g : D β F} {N : ββ} {s : Set D} {x : D} (hf : ContDiffOn π N f s)
(hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β} (hn : (n : ββ) β€ N) :
- βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ β€
+ βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ β€
βBβ *
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
- βiteratedFderivWithin π (n - i) g s xβ :=
+ (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
+ βiteratedFDerivWithin π (n - i) g s xβ :=
by
/- We reduce the bound to the case where all spaces live in the same universe (in which we
already have proved the result), by using linear isometries between the spaces and their `ulift`
@@ -2632,114 +2632,114 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear (B : E βL
have hgu : ContDiffOn π n gu su :=
isoF.symm.cont_diff.comp_cont_diff_on
((hg.of_le hn).compContinuousLinearMap (isoD : Du βL[π] D))
- have Nfu : β i, βiteratedFderivWithin π i fu su xuβ = βiteratedFderivWithin π i f s xβ :=
+ have Nfu : β i, βiteratedFDerivWithin π i fu su xuβ = βiteratedFDerivWithin π i f s xβ :=
by
intro i
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hsu hxu]
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right _ _ hs, xu_x]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
rwa [β xu_x] at hx
- have Ngu : β i, βiteratedFderivWithin π i gu su xuβ = βiteratedFderivWithin π i g s xβ :=
+ have Ngu : β i, βiteratedFDerivWithin π i gu su xuβ = βiteratedFDerivWithin π i g s xβ :=
by
intro i
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hsu hxu]
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right _ _ hs, xu_x]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
rwa [β xu_x] at hx
have NBu :
- βiteratedFderivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ =
- βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ :=
+ βiteratedFDerivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ =
+ βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ :=
by
rw [Bu_eq]
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hsu hxu]
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right _ _ hs, xu_x]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
rwa [β xu_x] at hx
-- state the bound for the lifted objects, and deduce the original bound from it.
have :
- βiteratedFderivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ β€
+ βiteratedFDerivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ β€
βBuβ *
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderivWithin π i fu su xuβ *
- βiteratedFderivWithin π (n - i) gu su xuβ :=
+ (n.choose i : β) * βiteratedFDerivWithin π i fu su xuβ *
+ βiteratedFDerivWithin π (n - i) gu su xuβ :=
Bu.norm_iterated_fderiv_within_le_of_bilinear_aux hfu hgu hsu hxu
simp only [Nfu, Ngu, NBu] at this
apply this.trans (mul_le_mul_of_nonneg_right Bu_le _)
exact Finset.sum_nonneg' fun i => by positivity
-#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear
+#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear:
`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
-theorem ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear (B : E βL[π] F βL[π] G) {f : D β E}
+theorem ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear (B : E βL[π] F βL[π] G) {f : D β E}
{g : D β F} {N : ββ} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D) {n : β}
(hn : (n : ββ) β€ N) :
- βiteratedFderiv π n (fun y => B (f y) (g y)) xβ β€
+ βiteratedFDeriv π n (fun y => B (f y) (g y)) xβ β€
βBβ *
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ (n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ :=
by
- simp_rw [β iteratedFderivWithin_univ]
+ simp_rw [β iteratedFDerivWithin_univ]
exact
B.norm_iterated_fderiv_within_le_of_bilinear hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ
(mem_univ x) hn
-#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear
+#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
-theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_of_le_one
+theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
(B : E βL[π] F βL[π] G) {f : D β E} {g : D β F} {N : ββ} {s : Set D} {x : D}
(hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β}
(hn : (n : ββ) β€ N) (hB : βBβ β€ 1) :
- βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ β€
+ βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ β€
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
- βiteratedFderivWithin π (n - i) g s xβ :=
+ (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
+ βiteratedFDerivWithin π (n - i) g s xβ :=
by
apply (B.norm_iterated_fderiv_within_le_of_bilinear hf hg hs hx hn).trans
apply mul_le_of_le_one_left (Finset.sum_nonneg' fun i => _) hB
positivity
-#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_of_le_one
+#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
-theorem ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear_of_le_one (B : E βL[π] F βL[π] G)
+theorem ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one (B : E βL[π] F βL[π] G)
{f : D β E} {g : D β F} {N : ββ} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D) {n : β}
(hn : (n : ββ) β€ N) (hB : βBβ β€ 1) :
- βiteratedFderiv π n (fun y => B (f y) (g y)) xβ β€
+ βiteratedFDeriv π n (fun y => B (f y) (g y)) xβ β€
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ (n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ :=
by
- simp_rw [β iteratedFderivWithin_univ]
+ simp_rw [β iteratedFDerivWithin_univ]
exact
B.norm_iterated_fderiv_within_le_of_bilinear_of_le_one hf.cont_diff_on hg.cont_diff_on
uniqueDiffOn_univ (mem_univ x) hn hB
-#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear_of_le_one
+#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one
section
variable {π' : Type _} [NormedField π'] [NormedAlgebra π π'] [NormedSpace π' F]
[IsScalarTower π π' F]
-theorem norm_iteratedFderivWithin_smul_le {f : E β π'} {g : E β F} {N : ββ}
+theorem norm_iteratedFDerivWithin_smul_le {f : E β π'} {g : E β F} {N : ββ}
(hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s)
{n : β} (hn : (n : ββ) β€ N) :
- βiteratedFderivWithin π n (fun y => f y β’ g y) s xβ β€
+ βiteratedFDerivWithin π n (fun y => f y β’ g y) s xβ β€
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
- βiteratedFderivWithin π (n - i) g s xβ :=
+ (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
+ βiteratedFDerivWithin π (n - i) g s xβ :=
(ContinuousLinearMap.lsmul π π' :
- π' βL[π] F βL[π] F).norm_iteratedFderivWithin_le_of_bilinear_of_le_one
+ π' βL[π] F βL[π] F).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
hf hg hs hx hn ContinuousLinearMap.op_norm_lsmul_le
-#align norm_iterated_fderiv_within_smul_le norm_iteratedFderivWithin_smul_le
+#align norm_iterated_fderiv_within_smul_le norm_iteratedFDerivWithin_smul_le
-theorem norm_iteratedFderiv_smul_le {f : E β π'} {g : E β F} {N : ββ} (hf : ContDiff π N f)
+theorem norm_iteratedFDeriv_smul_le {f : E β π'} {g : E β F} {N : ββ} (hf : ContDiff π N f)
(hg : ContDiff π N g) (x : E) {n : β} (hn : (n : ββ) β€ N) :
- βiteratedFderiv π n (fun y => f y β’ g y) xβ β€
+ βiteratedFDeriv π n (fun y => f y β’ g y) xβ β€
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
- (ContinuousLinearMap.lsmul π π' : π' βL[π] F βL[π] F).norm_iteratedFderiv_le_of_bilinear_of_le_one
+ (n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ :=
+ (ContinuousLinearMap.lsmul π π' : π' βL[π] F βL[π] F).norm_iteratedFDeriv_le_of_bilinear_of_le_one
hf hg x hn ContinuousLinearMap.op_norm_lsmul_le
-#align norm_iterated_fderiv_smul_le norm_iteratedFderiv_smul_le
+#align norm_iterated_fderiv_smul_le norm_iteratedFDeriv_smul_le
end
@@ -2747,29 +2747,29 @@ section
variable {A : Type _} [NormedRing A] [NormedAlgebra π A]
-theorem norm_iteratedFderivWithin_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiffOn π N f s)
+theorem norm_iteratedFDerivWithin_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiffOn π N f s)
(hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s) {n : β}
(hn : (n : ββ) β€ N) :
- βiteratedFderivWithin π n (fun y => f y * g y) s xβ β€
+ βiteratedFDerivWithin π n (fun y => f y * g y) s xβ β€
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
- βiteratedFderivWithin π (n - i) g s xβ :=
+ (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
+ βiteratedFDerivWithin π (n - i) g s xβ :=
(ContinuousLinearMap.mul π A :
- A βL[π] A βL[π] A).norm_iteratedFderivWithin_le_of_bilinear_of_le_one
+ A βL[π] A βL[π] A).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
hf hg hs hx hn (ContinuousLinearMap.op_norm_mul_le _ _)
-#align norm_iterated_fderiv_within_mul_le norm_iteratedFderivWithin_mul_le
+#align norm_iterated_fderiv_within_mul_le norm_iteratedFDerivWithin_mul_le
-theorem norm_iteratedFderiv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiff π N f)
+theorem norm_iteratedFDeriv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiff π N f)
(hg : ContDiff π N g) (x : E) {n : β} (hn : (n : ββ) β€ N) :
- βiteratedFderiv π n (fun y => f y * g y) xβ β€
+ βiteratedFDeriv π n (fun y => f y * g y) xβ β€
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ (n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ :=
by
- simp_rw [β iteratedFderivWithin_univ]
+ simp_rw [β iteratedFDerivWithin_univ]
exact
- norm_iteratedFderivWithin_mul_le hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ (mem_univ x)
+ norm_iteratedFDerivWithin_mul_le hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ (mem_univ x)
hn
-#align norm_iterated_fderiv_mul_le norm_iteratedFderiv_mul_le
+#align norm_iterated_fderiv_mul_le norm_iteratedFDeriv_mul_le
end
@@ -2779,13 +2779,13 @@ of `g β f` is bounded by `n! * C * D^n`.
This lemma proves this estimate assuming additionally that two of the spaces live in the same
universe, to make an induction possible. Use instead `norm_iterated_fderiv_within_comp_le` that
removes this assumption. -/
-theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGroup Fu]
+theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGroup Fu]
[NormedSpace π Fu] [NormedAddCommGroup Gu] [NormedSpace π Gu] {g : Fu β Gu} {f : E β Fu} {n : β}
{s : Set E} {t : Set Fu} {x : E} (hg : ContDiffOn π n g t) (hf : ContDiffOn π n f s)
(ht : UniqueDiffOn π t) (hs : UniqueDiffOn π s) (hst : MapsTo f s t) (hx : x β s) {C : β}
- {D : β} (hC : β i, i β€ n β βiteratedFderivWithin π i g t (f x)β β€ C)
- (hD : β i, 1 β€ i β i β€ n β βiteratedFderivWithin π i f s xβ β€ D ^ i) :
- βiteratedFderivWithin π n (g β f) s xβ β€ n ! * C * D ^ n :=
+ {D : β} (hC : β i, i β€ n β βiteratedFDerivWithin π i g t (f x)β β€ C)
+ (hD : β i, 1 β€ i β i β€ n β βiteratedFDerivWithin π i f s xβ β€ D ^ i) :
+ βiteratedFDerivWithin π n (g β f) s xβ β€ n ! * C * D ^ n :=
by
/- We argue by induction on `n`, using that `D^(n+1) (g β f) = D^n (g ' β f β¬ f')`. The successive
derivatives of `g' β f` are controlled thanks to the inductive assumption, and those of `f'` are
@@ -2795,7 +2795,7 @@ theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
on `D^n (g ' β f β¬ f')`. -/
induction' n using Nat.case_strong_induction_on with n IH generalizing Gu
Β·
- simpa only [norm_iteratedFderivWithin_zero, Nat.factorial_zero, algebraMap.coe_one, one_mul,
+ simpa only [norm_iteratedFDerivWithin_zero, Nat.factorial_zero, algebraMap.coe_one, one_mul,
pow_zero, mul_one] using hC 0 le_rfl
have M : (n : ββ) < n.succ := Nat.cast_lt.2 n.lt_succ_self
have Cnonneg : 0 β€ C := (norm_nonneg _).trans (hC 0 bot_le)
@@ -2806,7 +2806,7 @@ theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
-- use the inductive assumption to bound the derivatives of `g' β f`.
have I :
β i β Finset.range (n + 1),
- βiteratedFderivWithin π i (fderivWithin π g t β f) s xβ β€ i ! * C * D ^ i :=
+ βiteratedFDerivWithin π i (fderivWithin π g t β f) s xβ β€ i ! * C * D ^ i :=
by
intro i hi
simp only [Finset.mem_range_succ_iff] at hi
@@ -2819,37 +2819,37 @@ theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
exact add_le_add_right (Nat.cast_le.2 hi) _
Β· intro j hj
have :
- βiteratedFderivWithin π j (fderivWithin π g t) t (f x)β =
- βiteratedFderivWithin π (j + 1) g t (f x)β :=
- by rw [iteratedFderivWithin_succ_eq_comp_right ht (hst hx), LinearIsometryEquiv.norm_map]
+ βiteratedFDerivWithin π j (fderivWithin π g t) t (f x)β =
+ βiteratedFDerivWithin π (j + 1) g t (f x)β :=
+ by rw [iteratedFDerivWithin_succ_eq_comp_right ht (hst hx), LinearIsometryEquiv.norm_map]
rw [this]
exact hC (j + 1) (add_le_add (hj.trans hi) le_rfl)
-- reformulate `hD` as a bound for the derivatives of `f'`.
- have J : β i, βiteratedFderivWithin π (n - i) (fderivWithin π f s) s xβ β€ D ^ (n - i + 1) :=
+ have J : β i, βiteratedFDerivWithin π (n - i) (fderivWithin π f s) s xβ β€ D ^ (n - i + 1) :=
by
intro i
have :
- βiteratedFderivWithin π (n - i) (fderivWithin π f s) s xβ =
- βiteratedFderivWithin π (n - i + 1) f s xβ :=
- by rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
+ βiteratedFDerivWithin π (n - i) (fderivWithin π f s) s xβ =
+ βiteratedFDerivWithin π (n - i + 1) f s xβ :=
+ by rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
rw [this]
apply hD
Β· simp only [le_add_iff_nonneg_left, zero_le']
Β· apply Nat.succ_le_succ tsub_le_self
-- Now put these together: first, notice that we have to bound `D^n (g' β f β¬ f')`.
calc
- βiteratedFderivWithin π (n + 1) (g β f) s xβ =
- βiteratedFderivWithin π n (fun y : E => fderivWithin π (g β f) s y) s xβ :=
- by rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
+ βiteratedFDerivWithin π (n + 1) (g β f) s xβ =
+ βiteratedFDerivWithin π n (fun y : E => fderivWithin π (g β f) s y) s xβ :=
+ by rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
_ =
- βiteratedFderivWithin π n
+ βiteratedFDerivWithin π n
(fun y : E =>
ContinuousLinearMap.compL π E Fu Gu (fderivWithin π g t (f y)) (fderivWithin π f s y))
s xβ :=
by
have L : (1 : ββ) β€ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using n.succ_pos
congr 1
- refine' iteratedFderivWithin_congr (fun y hy => _) hx _
+ refine' iteratedFDerivWithin_congr (fun y hy => _) hx _
apply fderivWithin.comp _ _ _ hst (hs y hy)
Β· exact hg.differentiable_on L _ (hst hy)
Β· exact hf.differentiable_on L _ hy
@@ -2857,8 +2857,8 @@ theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
-- for which we have bounds for the`n`-th derivative.
_ β€
β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFderivWithin π i (fderivWithin π g t β f) s xβ *
- βiteratedFderivWithin π (n - i) (fderivWithin π f s) s xβ :=
+ (n.choose i : β) * βiteratedFDerivWithin π i (fderivWithin π g t β f) s xβ *
+ βiteratedFDerivWithin π (n - i) (fderivWithin π f s) s xβ :=
by
have A : ContDiffOn π n (fderivWithin π g t β f) s :=
by
@@ -2870,7 +2870,7 @@ theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
apply hf.fderiv_within hs
simp only [Nat.cast_succ, le_refl]
exact
- (ContinuousLinearMap.compL π E Fu Gu).norm_iteratedFderivWithin_le_of_bilinear_of_le_one A B
+ (ContinuousLinearMap.compL π E Fu Gu).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one A B
hs hx le_rfl (ContinuousLinearMap.norm_compL_le π E Fu Gu)
-- bound each of the terms using the estimates on previous derivatives (that use the inductive
-- assumption for `g' β f`).
@@ -2912,17 +2912,17 @@ theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
simp only [mul_assoc, mul_one, Finset.sum_const, Finset.card_range, nsmul_eq_mul,
Nat.factorial_succ, Nat.cast_mul]
-#align norm_iterated_fderiv_within_comp_le_aux norm_iteratedFderivWithin_comp_le_aux
+#align norm_iterated_fderiv_within_comp_le_aux norm_iteratedFDerivWithin_comp_le_aux
/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
within a set of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
of `g β f` is bounded by `n! * C * D^n`. -/
-theorem norm_iteratedFderivWithin_comp_le {g : F β G} {f : E β F} {n : β} {s : Set E} {t : Set F}
+theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β} {s : Set E} {t : Set F}
{x : E} {N : ββ} (hg : ContDiffOn π N g t) (hf : ContDiffOn π N f s) (hn : (n : ββ) β€ N)
(ht : UniqueDiffOn π t) (hs : UniqueDiffOn π s) (hst : MapsTo f s t) (hx : x β s) {C : β}
- {D : β} (hC : β i, i β€ n β βiteratedFderivWithin π i g t (f x)β β€ C)
- (hD : β i, 1 β€ i β i β€ n β βiteratedFderivWithin π i f s xβ β€ D ^ i) :
- βiteratedFderivWithin π n (g β f) s xβ β€ n ! * C * D ^ n :=
+ {D : β} (hC : β i, i β€ n β βiteratedFDerivWithin π i g t (f x)β β€ C)
+ (hD : β i, 1 β€ i β i β€ n β βiteratedFDerivWithin π i f s xβ β€ D ^ i) :
+ βiteratedFDerivWithin π n (g β f) s xβ β€ n ! * C * D ^ n :=
by
/- We reduce the bound to the case where all spaces live in the same universe (in which we
already have proved the result), by using linear isometries between the spaces and their `ulift`
@@ -2945,53 +2945,53 @@ theorem norm_iteratedFderivWithin_comp_le {g : F β G} {f : E β F} {n : β}
have hgu : ContDiffOn π n gu tu :=
isoG.symm.cont_diff.comp_cont_diff_on
((hg.of_le hn).compContinuousLinearMap (isoF : Fu βL[π] F))
- have Nfu : β i, βiteratedFderivWithin π i fu s xβ = βiteratedFderivWithin π i f s xβ :=
+ have Nfu : β i, βiteratedFDerivWithin π i fu s xβ = βiteratedFDerivWithin π i f s xβ :=
by
intro i
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hs hx]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]
simp_rw [β Nfu] at hD
- have Ngu : β i, βiteratedFderivWithin π i gu tu (fu x)β = βiteratedFderivWithin π i g t (f x)β :=
+ have Ngu : β i, βiteratedFDerivWithin π i gu tu (fu x)β = βiteratedFDerivWithin π i g t (f x)β :=
by
intro i
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ htu (hstu hx)]
- rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right _ _ ht, Ffu]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ htu (hstu hx)]
+ rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ ht, Ffu]
rw [Ffu]
exact hst hx
simp_rw [β Ngu] at hC
- have Nfgu : βiteratedFderivWithin π n (g β f) s xβ = βiteratedFderivWithin π n (gu β fu) s xβ :=
+ have Nfgu : βiteratedFDerivWithin π n (g β f) s xβ = βiteratedFDerivWithin π n (gu β fu) s xβ :=
by
have : gu β fu = isoG.symm β g β f := by
ext x
simp only [comp_app, LinearIsometryEquiv.map_eq_iff, LinearIsometryEquiv.apply_symm_apply]
- rw [this, LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hs hx]
+ rw [this, LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]
-- deduce the required bound from the one for `gu β fu`.
rw [Nfgu]
- exact norm_iteratedFderivWithin_comp_le_aux hgu hfu htu hs hstu hx hC hD
-#align norm_iterated_fderiv_within_comp_le norm_iteratedFderivWithin_comp_le
+ exact norm_iteratedFDerivWithin_comp_le_aux hgu hfu htu hs hstu hx hC hD
+#align norm_iterated_fderiv_within_comp_le norm_iteratedFDerivWithin_comp_le
/-- If the derivatives of `g` at `f x` are bounded by `C`, and the `i`-th derivative
of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
of `g β f` is bounded by `n! * C * D^n`. -/
-theorem norm_iteratedFderiv_comp_le {g : F β G} {f : E β F} {n : β} {N : ββ} (hg : ContDiff π N g)
+theorem norm_iteratedFDeriv_comp_le {g : F β G} {f : E β F} {n : β} {N : ββ} (hg : ContDiff π N g)
(hf : ContDiff π N f) (hn : (n : ββ) β€ N) (x : E) {C : β} {D : β}
- (hC : β i, i β€ n β βiteratedFderiv π i g (f x)β β€ C)
- (hD : β i, 1 β€ i β i β€ n β βiteratedFderiv π i f xβ β€ D ^ i) :
- βiteratedFderiv π n (g β f) xβ β€ n ! * C * D ^ n :=
+ (hC : β i, i β€ n β βiteratedFDeriv π i g (f x)β β€ C)
+ (hD : β i, 1 β€ i β i β€ n β βiteratedFDeriv π i f xβ β€ D ^ i) :
+ βiteratedFDeriv π n (g β f) xβ β€ n ! * C * D ^ n :=
by
- simp_rw [β iteratedFderivWithin_univ] at hC hDβ’
+ simp_rw [β iteratedFDerivWithin_univ] at hC hDβ’
exact
- norm_iteratedFderivWithin_comp_le hg.cont_diff_on hf.cont_diff_on hn uniqueDiffOn_univ
+ norm_iteratedFDerivWithin_comp_le hg.cont_diff_on hf.cont_diff_on hn uniqueDiffOn_univ
uniqueDiffOn_univ (maps_to_univ _ _) (mem_univ x) hC hD
-#align norm_iterated_fderiv_comp_le norm_iteratedFderiv_comp_le
+#align norm_iterated_fderiv_comp_le norm_iteratedFDeriv_comp_le
section Apply
-theorem norm_iteratedFderivWithin_clm_apply {f : E β F βL[π] G} {g : E β F} {s : Set E} {x : E}
+theorem norm_iteratedFDerivWithin_clm_apply {f : E β F βL[π] G} {g : E β F} {s : Set E} {x : E}
{N : ββ} {n : β} (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s)
(hx : x β s) (hn : βn β€ N) :
- βiteratedFderivWithin π n (fun y => (f y) (g y)) s xβ β€
+ βiteratedFDerivWithin π n (fun y => (f y) (g y)) s xβ β€
(Finset.range (n + 1)).Sum fun i =>
- β(n.choose i) * βiteratedFderivWithin π i f s xβ * βiteratedFderivWithin π (n - i) g s xβ :=
+ β(n.choose i) * βiteratedFDerivWithin π i f s xβ * βiteratedFDerivWithin π (n - i) g s xβ :=
by
let B : (F βL[π] G) βL[π] F βL[π] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply π G)
have hB : βBβ β€ 1 :=
@@ -3000,42 +3000,42 @@ theorem norm_iteratedFderivWithin_clm_apply {f : E β F βL[π] G} {g : E
refine' ContinuousLinearMap.op_norm_le_bound _ zero_le_one fun f => _
simp only [ContinuousLinearMap.coe_id', id.def, one_mul]
exact B.norm_iterated_fderiv_within_le_of_bilinear_of_le_one hf hg hs hx hn hB
-#align norm_iterated_fderiv_within_clm_apply norm_iteratedFderivWithin_clm_apply
+#align norm_iterated_fderiv_within_clm_apply norm_iteratedFDerivWithin_clm_apply
-theorem norm_iteratedFderiv_clm_apply {f : E β F βL[π] G} {g : E β F} {N : ββ} {n : β}
+theorem norm_iteratedFDeriv_clm_apply {f : E β F βL[π] G} {g : E β F} {N : ββ} {n : β}
(hf : ContDiff π N f) (hg : ContDiff π N g) (x : E) (hn : βn β€ N) :
- βiteratedFderiv π n (fun y : E => (f y) (g y)) xβ β€
+ βiteratedFDeriv π n (fun y : E => (f y) (g y)) xβ β€
(Finset.range (n + 1)).Sum fun i : β =>
- β(n.choose i) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ β(n.choose i) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ :=
by
- simp only [β iteratedFderivWithin_univ]
+ simp only [β iteratedFDerivWithin_univ]
exact
- norm_iteratedFderivWithin_clm_apply hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ
+ norm_iteratedFDerivWithin_clm_apply hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ
(Set.mem_univ x) hn
-#align norm_iterated_fderiv_clm_apply norm_iteratedFderiv_clm_apply
+#align norm_iterated_fderiv_clm_apply norm_iteratedFDeriv_clm_apply
-theorem norm_iteratedFderivWithin_clm_apply_const {f : E β F βL[π] G} {c : F} {s : Set E} {x : E}
+theorem norm_iteratedFDerivWithin_clm_apply_const {f : E β F βL[π] G} {c : F} {s : Set E} {x : E}
{N : ββ} {n : β} (hf : ContDiffOn π N f s) (hs : UniqueDiffOn π s) (hx : x β s) (hn : βn β€ N) :
- βiteratedFderivWithin π n (fun y : E => (f y) c) s xβ β€
- βcβ * βiteratedFderivWithin π n f s xβ :=
+ βiteratedFDerivWithin π n (fun y : E => (f y) c) s xβ β€
+ βcβ * βiteratedFDerivWithin π n f s xβ :=
by
let g : (F βL[π] G) βL[π] G := ContinuousLinearMap.apply π G c
- have h := g.norm_comp_continuous_multilinear_map_le (iteratedFderivWithin π n f s x)
+ have h := g.norm_comp_continuous_multilinear_map_le (iteratedFDerivWithin π n f s x)
rw [β g.iterated_fderiv_within_comp_left hf hs hx hn] at h
refine' h.trans (mul_le_mul_of_nonneg_right _ (norm_nonneg _))
refine' g.op_norm_le_bound (norm_nonneg _) fun f => _
rw [ContinuousLinearMap.apply_apply, mul_comm]
exact f.le_op_norm c
-#align norm_iterated_fderiv_within_clm_apply_const norm_iteratedFderivWithin_clm_apply_const
+#align norm_iterated_fderiv_within_clm_apply_const norm_iteratedFDerivWithin_clm_apply_const
-theorem norm_iteratedFderiv_clm_apply_const {f : E β F βL[π] G} {c : F} {x : E} {N : ββ} {n : β}
+theorem norm_iteratedFDeriv_clm_apply_const {f : E β F βL[π] G} {c : F} {x : E} {N : ββ} {n : β}
(hf : ContDiff π N f) (hn : βn β€ N) :
- βiteratedFderiv π n (fun y : E => (f y) c) xβ β€ βcβ * βiteratedFderiv π n f xβ :=
+ βiteratedFDeriv π n (fun y : E => (f y) c) xβ β€ βcβ * βiteratedFDeriv π n f xβ :=
by
- simp only [β iteratedFderivWithin_univ]
+ simp only [β iteratedFDerivWithin_univ]
refine'
- norm_iteratedFderivWithin_clm_apply_const hf.cont_diff_on uniqueDiffOn_univ (Set.mem_univ x) hn
-#align norm_iterated_fderiv_clm_apply_const norm_iteratedFderiv_clm_apply_const
+ norm_iteratedFDerivWithin_clm_apply_const hf.cont_diff_on uniqueDiffOn_univ (Set.mem_univ x) hn
+#align norm_iterated_fderiv_clm_apply_const norm_iteratedFDeriv_clm_apply_const
end Apply
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -44,7 +44,7 @@ derivative, differentiability, higher derivative, `C^n`, multilinear, Taylor ser
noncomputable section
-open Classical BigOperators NNReal Nat
+open scoped Classical BigOperators NNReal Nat
-- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
@@ -116,7 +116,7 @@ end Finset
open Set Fin Filter Function
-open Topology
+open scoped Topology
variable {π : Type _} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -131,8 +131,7 @@ variable {π : Type _} [NontriviallyNormedField π] {D : Type uD} [NormedAdd
theorem iteratedFderiv_zero_fun {n : β} : (iteratedFderiv π n fun x : E => (0 : F)) = 0 :=
by
induction' n with n IH
- Β· ext m
- simp
+ Β· ext m; simp
Β· ext (x m)
rw [iteratedFderiv_succ_apply_left, IH]
change (fderiv π (fun x : E => (0 : E[Γn]βL[π] F)) x : E β E[Γn]βL[π] F) (m 0) (tail m) = _
@@ -171,31 +170,23 @@ theorem contDiffWithinAt_const {c : F} : ContDiffWithinAt π n (fun x : E => c
#align cont_diff_within_at_const contDiffWithinAt_const
@[nontriviality]
-theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π n f :=
- by
- rw [Subsingleton.elim f fun _ => 0]
- exact contDiff_const
+theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff π n f := by
+ rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const
#align cont_diff_of_subsingleton contDiff_of_subsingleton
@[nontriviality]
-theorem contDiffAt_of_subsingleton [Subsingleton F] : ContDiffAt π n f x :=
- by
- rw [Subsingleton.elim f fun _ => 0]
- exact contDiffAt_const
+theorem contDiffAt_of_subsingleton [Subsingleton F] : ContDiffAt π n f x := by
+ rw [Subsingleton.elim f fun _ => 0]; exact contDiffAt_const
#align cont_diff_at_of_subsingleton contDiffAt_of_subsingleton
@[nontriviality]
-theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt π n f s x :=
- by
- rw [Subsingleton.elim f fun _ => 0]
- exact contDiffWithinAt_const
+theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt π n f s x := by
+ rw [Subsingleton.elim f fun _ => 0]; exact contDiffWithinAt_const
#align cont_diff_within_at_of_subsingleton contDiffWithinAt_of_subsingleton
@[nontriviality]
-theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π n f s :=
- by
- rw [Subsingleton.elim f fun _ => 0]
- exact contDiffOn_const
+theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π n f s := by
+ rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const
#align cont_diff_on_of_subsingleton contDiffOn_of_subsingleton
theorem iteratedFderiv_succ_const (n : β) (c : F) : (iteratedFderiv π (n + 1) fun y : E => c) = 0 :=
@@ -601,14 +592,9 @@ theorem ContinuousLinearEquiv.contDiffOn_comp_iff (e : G βL[π] E) :
ContDiffOn π n (f β e) (e β»ΒΉ' s) β ContDiffOn π n f s :=
by
refine' β¨fun H => _, fun H => H.compContinuousLinearMap (e : G βL[π] E)β©
- have A : f = (f β e) β e.symm := by
- ext y
- simp only [Function.comp_apply]
+ have A : f = (f β e) β e.symm := by ext y; simp only [Function.comp_apply];
rw [e.apply_symm_apply y]
- have B : e.symm β»ΒΉ' (e β»ΒΉ' s) = s :=
- by
- rw [β preimage_comp, e.self_comp_symm]
- rfl
+ have B : e.symm β»ΒΉ' (e β»ΒΉ' s) = s := by rw [β preimage_comp, e.self_comp_symm]; rfl
rw [A, β B]
exact H.comp_continuous_linear_map (e.symm : E βL[π] G)
#align continuous_linear_equiv.cont_diff_on_comp_iff ContinuousLinearEquiv.contDiffOn_comp_iff
@@ -629,9 +615,7 @@ theorem HasFtaylorSeriesUpToOn.prod (hf : HasFtaylorSeriesUpToOn n f p s) {g : E
by
set L := fun m => ContinuousMultilinearMap.prodL π (fun i : Fin m => E) F G
constructor
- Β· intro x hx
- rw [β hf.zero_eq x hx, β hg.zero_eq x hx]
- rfl
+ Β· intro x hx; rw [β hf.zero_eq x hx, β hg.zero_eq x hx]; rfl
Β· intro m hm x hx
convert(L m).HasFDerivAt.comp_hasFDerivWithinAt x
((hf.fderiv_within m hm x hx).Prod (hg.fderiv_within m hm x hx))
@@ -1286,8 +1270,7 @@ theorem hasFtaylorSeriesUpToOn_pi :
ContinuousMultilinearMap.piβα΅’ _ _
refine' β¨fun h i => _, fun h => β¨fun x hx => _, _, _β©β©
Β· convert h.continuous_linear_map_comp (pr i)
- ext
- rfl
+ ext; rfl
Β· ext1 i
exact (h i).zero_eq x hx
Β· intro m hm x hx
@@ -1306,10 +1289,7 @@ theorem hasFtaylorSeriesUpToOn_pi' :
(fun x m =>
(@ContinuousLinearMap.proj π _ ΞΉ F' _ _ _ i).compContinuousMultilinearMap (P' x m))
s :=
- by
- convert hasFtaylorSeriesUpToOn_pi
- ext
- rfl
+ by convert hasFtaylorSeriesUpToOn_pi; ext; rfl
#align has_ftaylor_series_up_to_on_pi' hasFtaylorSeriesUpToOn_pi'
theorem contDiffWithinAt_pi :
@@ -1396,8 +1376,7 @@ theorem iteratedFderivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f
iteratedFderivWithin π i f s x + iteratedFderivWithin π i g s x :=
by
induction' i with i hi generalizing x
- Β· ext h
- simp
+ Β· ext h; simp
Β· ext h
have hi' : (i : ββ) < i + 1 := with_top.coe_lt_coe.mpr (Nat.lt_succ_self _)
have hdf : DifferentiableOn π (iteratedFderivWithin π i f s) s :=
@@ -1413,16 +1392,12 @@ theorem iteratedFderivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f
_ =
fderivWithin π (iteratedFderivWithin π i f s + iteratedFderivWithin π i g s) s x (h 0)
(Fin.tail h) :=
- by
- rw [fderivWithin_congr' (fun _ => hi hcdf hcdg) hx]
- rfl
+ by rw [fderivWithin_congr' (fun _ => hi hcdf hcdg) hx]; rfl
_ =
(fderivWithin π (iteratedFderivWithin π i f s) s +
fderivWithin π (iteratedFderivWithin π i g s) s)
x (h 0) (Fin.tail h) :=
- by
- rw [Pi.add_def, fderivWithin_add (hu x hx) (hdf x hx) (hdg x hx)]
- rfl
+ by rw [Pi.add_def, fderivWithin_add (hu x hx) (hdf x hx) (hdg x hx)]; rfl
_ = (iteratedFderivWithin π (i + 1) f s + iteratedFderivWithin π (i + 1) g s) x h := rfl
#align iterated_fderiv_within_add_apply iteratedFderivWithin_add_apply
@@ -1491,22 +1466,17 @@ theorem iteratedFderivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s)
iteratedFderivWithin π i (-f) s x = -iteratedFderivWithin π i f s x :=
by
induction' i with i hi generalizing x
- Β· ext h
- simp
+ Β· ext h; simp
Β· ext h
have hi' : (i : ββ) < i + 1 := with_top.coe_lt_coe.mpr (Nat.lt_succ_self _)
calc
iteratedFderivWithin π (i + 1) (-f) s x h =
fderivWithin π (iteratedFderivWithin π i (-f) s) s x (h 0) (Fin.tail h) :=
rfl
- _ = fderivWithin π (-iteratedFderivWithin π i f s) s x (h 0) (Fin.tail h) :=
- by
- rw [fderivWithin_congr' (@hi) hx]
- rfl
- _ = -(fderivWithin π (iteratedFderivWithin π i f s) s) x (h 0) (Fin.tail h) :=
- by
- rw [Pi.neg_def, fderivWithin_neg (hu x hx)]
- rfl
+ _ = fderivWithin π (-iteratedFderivWithin π i f s) s x (h 0) (Fin.tail h) := by
+ rw [fderivWithin_congr' (@hi) hx]; rfl
+ _ = -(fderivWithin π (iteratedFderivWithin π i f s) s) x (h 0) (Fin.tail h) := by
+ rw [Pi.neg_def, fderivWithin_neg (hu x hx)]; rfl
_ = -(iteratedFderivWithin π (i + 1) f s) x h := rfl
#align iterated_fderiv_within_neg_apply iteratedFderivWithin_neg_apply
@@ -1776,8 +1746,7 @@ theorem iteratedFderivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu :
(hx : x β s) : iteratedFderivWithin π i (a β’ f) s x = a β’ iteratedFderivWithin π i f s x :=
by
induction' i with i hi generalizing x
- Β· ext
- simp
+ Β· ext; simp
Β· ext h
have hi' : (i : ββ) < i + 1 := with_top.coe_lt_coe.mpr (Nat.lt_succ_self _)
have hdf : DifferentiableOn π (iteratedFderivWithin π i f s) s :=
@@ -1787,14 +1756,10 @@ theorem iteratedFderivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu :
iteratedFderivWithin π (i + 1) (a β’ f) s x h =
fderivWithin π (iteratedFderivWithin π i (a β’ f) s) s x (h 0) (Fin.tail h) :=
rfl
- _ = fderivWithin π (a β’ iteratedFderivWithin π i f s) s x (h 0) (Fin.tail h) :=
- by
- rw [fderivWithin_congr' (fun _ => hi hcdf) hx]
- rfl
- _ = (a β’ fderivWithin π (iteratedFderivWithin π i f s)) s x (h 0) (Fin.tail h) :=
- by
- rw [Pi.smul_def, fderivWithin_const_smul (hu x hx) (hdf x hx)]
- rfl
+ _ = fderivWithin π (a β’ iteratedFderivWithin π i f s) s x (h 0) (Fin.tail h) := by
+ rw [fderivWithin_congr' (fun _ => hi hcdf) hx]; rfl
+ _ = (a β’ fderivWithin π (iteratedFderivWithin π i f s)) s x (h 0) (Fin.tail h) := by
+ rw [Pi.smul_def, fderivWithin_const_smul (hu x hx) (hdf x hx)]; rfl
_ = a β’ iteratedFderivWithin π (i + 1) f s x h := rfl
#align iterated_fderiv_within_const_smul_apply iteratedFderivWithin_const_smul_apply
@@ -1947,9 +1912,7 @@ theorem ContDiffAt.inv {f : E β π'} {n} (hf : ContDiffAt π n f x) (hx :
#align cont_diff_at.inv ContDiffAt.inv
theorem ContDiff.inv {f : E β π'} {n} (hf : ContDiff π n f) (h : β x, f x β 0) :
- ContDiff π n fun x => (f x)β»ΒΉ :=
- by
- rw [contDiff_iff_contDiffAt]
+ ContDiff π n fun x => (f x)β»ΒΉ := by rw [contDiff_iff_contDiffAt];
exact fun x => hf.cont_diff_at.inv (h x)
#align cont_diff.inv ContDiff.inv
@@ -2247,8 +2210,7 @@ theorem HasFtaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _
have hcont : ContinuousWithinAt f' s x :=
(continuousMultilinearCurryFin1 β E F).ContinuousAt.comp_continuousWithinAt
((hf.cont _ le_rfl _ (mem_insert _ _)).mono (subset_insert x s))
- replace hK : βf' xββ < K
- Β· simpa only [LinearIsometryEquiv.nnnorm_map]
+ replace hK : βf' xββ < K; Β· simpa only [LinearIsometryEquiv.nnnorm_map]
exact
hs.exists_nhds_within_lipschitz_on_with_of_has_fderiv_within_at_of_nnnorm_lt
(eventually_nhdsWithin_iff.2 <| eventually_of_forall hder) hcont K hK
@@ -2322,17 +2284,12 @@ theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ)
congr 2
apply le_antisymm
Β· intro h
- have : derivWithin fβ sβ = (fun u : π βL[π] F => u 1) β fderivWithin π fβ sβ :=
- by
- ext x
- rfl
+ have : derivWithin fβ sβ = (fun u : π βL[π] F => u 1) β fderivWithin π fβ sβ := by ext x; rfl
simp only [this]
apply ContDiff.comp_contDiffOn _ h
exact (is_bounded_bilinear_map_apply.is_bounded_linear_map_left _).ContDiff
Β· intro h
- have : fderivWithin π fβ sβ = smul_right (1 : π βL[π] π) β derivWithin fβ sβ :=
- by
- ext x
+ have : fderivWithin π fβ sβ = smul_right (1 : π βL[π] π) β derivWithin fβ sβ := by ext x;
simp [derivWithin]
simp only [this]
apply ContDiff.comp_contDiffOn _ h
@@ -2639,7 +2596,7 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear (B : E βL
-- lift the bilinear map `B` to a bilinear map `Bu` on the lifted spaces.
let Buβ : Eu βL[π] Fu βL[π] G
exact ((B.comp (isoE : Eu βL[π] E)).flip.comp (isoF : Fu βL[π] F)).flip
- let Bu : Eu βL[π] Fu βL[π] Gu
+ let Bu : Eu βL[π] Fu βL[π] Gu;
exact
ContinuousLinearMap.compL π Eu (Fu βL[π] G) (Fu βL[π] Gu)
(ContinuousLinearMap.compL π Fu G Gu (isoG.symm : G βL[π] Gu)) Buβ
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -4,11 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
+! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.ContDiffDef
+import Mathbin.Analysis.Calculus.Deriv.Inverse
import Mathbin.Analysis.Calculus.MeanValue
import Mathbin.Analysis.NormedSpace.FiniteDimension
import Mathbin.Data.Nat.Choose.Cast
@@ -742,7 +743,6 @@ private theorem cont_diff_on.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu
exact IH D C (subset_univ _)
Β· rw [contDiffOn_top] at hf hgβ’
exact fun n => Itop n (hg n) (hf n) st
-#align cont_diff_on.comp_same_univ cont_diff_on.comp_same_univ
/-- The composition of `C^n` functions on domains is `C^n`. -/
theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F} (hg : ContDiffOn π n g t)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ef95945cd48c932c9e034872bd25c3c220d9c946
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 066ecdb4834c7a4693e0f0e5154935a6f3d3f90c
+! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -355,7 +355,7 @@ theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_left (g : F βL[π] G
g.comp_continuous_multilinear_mapL (fun j : Fin i => E)
(iteratedFderivWithin π i f s y))
s x :=
- fderivWithin_congr' (hs x hx) (fun y hy => IH hy) hx
+ fderivWithin_congr' (@IH) hx
simp_rw [Z]
rw [(g.comp_continuous_multilinear_mapL fun j : Fin i => E).comp_fderivWithin (hs x hx)]
simp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_app,
@@ -527,7 +527,7 @@ theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_right (g : G βL[π]
ContinuousMultilinearMap.compContinuousLinearMapEquivL _ (fun _x : Fin i => g)
(iteratedFderivWithin π i f s (g y)))
(g β»ΒΉ' s) x :=
- fderivWithin_congr' (g.unique_diff_on_preimage_iff.2 hs x hx) (fun y hy => IH hy) hx
+ fderivWithin_congr' (@IH) hx
rw [this]
rw [ContinuousLinearEquiv.comp_fderivWithin _ (g.unique_diff_on_preimage_iff.2 hs x hx)]
simp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_app,
@@ -1414,13 +1414,15 @@ theorem iteratedFderivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f
fderivWithin π (iteratedFderivWithin π i f s + iteratedFderivWithin π i g s) s x (h 0)
(Fin.tail h) :=
by
- congr 2
- exact fderivWithin_congr (hu x hx) (fun _ => hi hcdf hcdg) (hi hcdf hcdg hx)
+ rw [fderivWithin_congr' (fun _ => hi hcdf hcdg) hx]
+ rfl
_ =
(fderivWithin π (iteratedFderivWithin π i f s) s +
fderivWithin π (iteratedFderivWithin π i g s) s)
x (h 0) (Fin.tail h) :=
- by rw [Pi.add_def, fderivWithin_add (hu x hx) (hdf x hx) (hdg x hx)] <;> rfl
+ by
+ rw [Pi.add_def, fderivWithin_add (hu x hx) (hdf x hx) (hdg x hx)]
+ rfl
_ = (iteratedFderivWithin π (i + 1) f s + iteratedFderivWithin π (i + 1) g s) x h := rfl
#align iterated_fderiv_within_add_apply iteratedFderivWithin_add_apply
@@ -1499,10 +1501,12 @@ theorem iteratedFderivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s)
rfl
_ = fderivWithin π (-iteratedFderivWithin π i f s) s x (h 0) (Fin.tail h) :=
by
- congr 2
- exact fderivWithin_congr (hu x hx) (fun _ => hi) (hi hx)
- _ = -(fderivWithin π (iteratedFderivWithin π i f s) s) x (h 0) (Fin.tail h) := by
- rw [Pi.neg_def, fderivWithin_neg (hu x hx)] <;> rfl
+ rw [fderivWithin_congr' (@hi) hx]
+ rfl
+ _ = -(fderivWithin π (iteratedFderivWithin π i f s) s) x (h 0) (Fin.tail h) :=
+ by
+ rw [Pi.neg_def, fderivWithin_neg (hu x hx)]
+ rfl
_ = -(iteratedFderivWithin π (i + 1) f s) x h := rfl
#align iterated_fderiv_within_neg_apply iteratedFderivWithin_neg_apply
@@ -1785,10 +1789,12 @@ theorem iteratedFderivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu :
rfl
_ = fderivWithin π (a β’ iteratedFderivWithin π i f s) s x (h 0) (Fin.tail h) :=
by
- congr 2
- exact fderivWithin_congr (hu x hx) (fun _ => hi hcdf) (hi hcdf hx)
- _ = (a β’ fderivWithin π (iteratedFderivWithin π i f s)) s x (h 0) (Fin.tail h) := by
- rw [Pi.smul_def, fderivWithin_const_smul (hu x hx) (hdf x hx)] <;> rfl
+ rw [fderivWithin_congr' (fun _ => hi hcdf) hx]
+ rfl
+ _ = (a β’ fderivWithin π (iteratedFderivWithin π i f s)) s x (h 0) (Fin.tail h) :=
+ by
+ rw [Pi.smul_def, fderivWithin_const_smul (hu x hx) (hdf x hx)]
+ rfl
_ = a β’ iteratedFderivWithin π (i + 1) f s x h := rfl
#align iterated_fderiv_within_const_smul_apply iteratedFderivWithin_const_smul_apply
@@ -2582,7 +2588,7 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux {Du Eu
B.precompR Du (f y) (fderivWithin π g s y) + B.precompL Du (fderivWithin π f s y) (g y))
s x :=
by
- apply iteratedFderivWithin_congr hs (fun y hy => _) hx
+ apply iteratedFderivWithin_congr (fun y hy => _) hx
have L : (1 : ββ) β€ n.succ := by
simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n
exact
@@ -2886,7 +2892,7 @@ theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
by
have L : (1 : ββ) β€ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using n.succ_pos
congr 1
- apply iteratedFderivWithin_congr hs (fun y hy => _) hx
+ refine' iteratedFderivWithin_congr (fun y hy => _) hx _
apply fderivWithin.comp _ _ _ hst (hs y hy)
Β· exact hg.differentiable_on L _ (hst hy)
Β· exact hf.differentiable_on L _ hy
mathlib commit https://github.com/leanprover-community/mathlib/commit/33c67ae661dd8988516ff7f247b0be3018cdd952
@@ -281,7 +281,7 @@ theorem HasFtaylorSeriesUpToOn.continuousLinearMapComp (g : F βL[π] G)
constructor
Β· exact fun x hx => congr_arg g (hf.zero_eq x hx)
Β· intro m hm x hx
- convert(L m).HasFderivAt.comp_hasFderivWithinAt x (hf.fderiv_within m hm x hx)
+ convert(L m).HasFDerivAt.comp_hasFDerivWithinAt x (hf.fderiv_within m hm x hx)
Β· intro m hm
convert(L m).Continuous.comp_continuousOn (hf.cont m hm)
#align has_ftaylor_series_up_to_on.continuous_linear_map_comp HasFtaylorSeriesUpToOn.continuousLinearMapComp
@@ -458,7 +458,7 @@ theorem HasFtaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFtaylorSeriesUpT
rw [ContinuousLinearMap.map_zero]
rfl
Β· intro m hm x hx
- convert(hA m).HasFderivAt.comp_hasFderivWithinAt x
+ convert(hA m).HasFDerivAt.comp_hasFDerivWithinAt x
((hf.fderiv_within m hm (g x) hx).comp x g.has_fderiv_within_at (subset.refl _))
ext (y v)
change p (g x) (Nat.succ m) (g β cons y v) = p (g x) m.succ (cons (g y) (g β v))
@@ -632,7 +632,7 @@ theorem HasFtaylorSeriesUpToOn.prod (hf : HasFtaylorSeriesUpToOn n f p s) {g : E
rw [β hf.zero_eq x hx, β hg.zero_eq x hx]
rfl
Β· intro m hm x hx
- convert(L m).HasFderivAt.comp_hasFderivWithinAt x
+ convert(L m).HasFDerivAt.comp_hasFDerivWithinAt x
((hf.fderiv_within m hm x hx).Prod (hg.fderiv_within m hm x hx))
Β· intro m hm
exact (L m).Continuous.comp_continuousOn ((hf.cont m hm).Prod (hg.cont m hm))
@@ -710,9 +710,9 @@ private theorem cont_diff_on.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu
induction' n using ENat.nat_induction with n IH Itop generalizing Eu Fu Gu
Β· rw [contDiffOn_zero] at hf hgβ’
exact ContinuousOn.comp hg hf st
- Β· rw [contDiffOn_succ_iff_hasFderivWithinAt] at hgβ’
+ Β· rw [contDiffOn_succ_iff_hasFDerivWithinAt] at hgβ’
intro x hx
- rcases(contDiffOn_succ_iff_hasFderivWithinAt.1 hf) x hx with β¨u, hu, f', hf', f'_diffβ©
+ rcases(contDiffOn_succ_iff_hasFDerivWithinAt.1 hf) x hx with β¨u, hu, f', hf', f'_diffβ©
rcases hg (f x) (st hx) with β¨v, hv, g', hg', g'_diffβ©
rw [insert_eq_of_mem hx] at huβ’
have xu : x β u := mem_of_mem_nhdsWithin hx hu
@@ -729,7 +729,7 @@ private theorem cont_diff_on.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu
exact (hf' x xu).DifferentiableWithinAt.ContinuousWithinAt.mono (inter_subset_right _ _)
Β· apply nhdsWithin_mono _ _ hv
exact subset.trans (image_subset_iff.mpr st) (subset_insert (f x) t)
- show β y β w, HasFderivWithinAt (g β f) ((g' (f y)).comp (f' y)) w y
+ show β y β w, HasFDerivWithinAt (g β f) ((g' (f y)).comp (f' y)) w y
Β· rintro y β¨ys, yu, yvβ©
exact (hg' (f y) yv).comp y ((hf' y yu).mono wu) wv
show ContDiffOn π n (fun y => (g' (f y)).comp (f' y)) w
@@ -1080,13 +1080,13 @@ theorem contDiff_prodAssoc_symm : ContDiff π β€ <| (Equiv.prodAssoc E F G).s
`s βͺ {xβ}`.
We need one additional condition, namely that `t` is a neighborhood of `g(xβ)` within `g '' s`.
-/
-theorem ContDiffWithinAt.hasFderivWithinAt_nhds {f : E β F β G} {g : E β F} {t : Set F} {n : β}
+theorem ContDiffWithinAt.hasFDerivWithinAt_nhds {f : E β F β G} {g : E β F} {t : Set F} {n : β}
{xβ : E} (hf : ContDiffWithinAt π (n + 1) (uncurry f) (insert xβ s ΓΛ’ t) (xβ, g xβ))
(hg : ContDiffWithinAt π n g s xβ) (hgt : t β π[g '' s] g xβ) :
β v β π[insert xβ s] xβ,
v β insert xβ s β§
β f' : E β F βL[π] G,
- (β x β v, HasFderivWithinAt (f x) (f' x) t (g x)) β§
+ (β x β v, HasFDerivWithinAt (f x) (f' x) t (g x)) β§
ContDiffWithinAt π n (fun x => f' x) s xβ :=
by
have hst : insert xβ s ΓΛ’ t β π[(fun x => (x, g x)) '' s] (xβ, g xβ) :=
@@ -1106,7 +1106,7 @@ theorem ContDiffWithinAt.hasFderivWithinAt_nhds {f : E β F β G} {g : E β F
refine' (hst.trans <| nhdsWithin_mono _ <| subset_insert _ _).trans hv
Β· intro z hz
have := hvf' (z, g z) hz.1
- refine' this.comp _ (hasFderivAt_prod_mk_right _ _).HasFderivWithinAt _
+ refine' this.comp _ (hasFDerivAt_prod_mk_right _ _).HasFDerivWithinAt _
exact maps_to'.mpr (image_prod_mk_subset_prod_right hz.2)
Β·
exact
@@ -1114,7 +1114,7 @@ theorem ContDiffWithinAt.hasFderivWithinAt_nhds {f : E β F β G} {g : E β F
(ContinuousLinearMap.compL π F (E Γ F) G).flip
(ContinuousLinearMap.inr π E F)).comp_of_mem
xβ (cont_diff_within_at_id.prod hg) hst
-#align cont_diff_within_at.has_fderiv_within_at_nhds ContDiffWithinAt.hasFderivWithinAt_nhds
+#align cont_diff_within_at.has_fderiv_within_at_nhds ContDiffWithinAt.hasFDerivWithinAt_nhds
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/-- The most general lemma stating that `x β¦ fderiv_within π (f x) t (g x)` is `C^n`
@@ -1136,7 +1136,7 @@ theorem ContDiffWithinAt.fderiv_within'' {f : E β F β G} {g : E β F} {t :
by
intro k hkm
obtain β¨v, hv, -, f', hvf', hf'β© :=
- (hf.of_le <| (add_le_add_right hkm 1).trans hmn).hasFderivWithinAt_nhds (hg.of_le hkm) hgt
+ (hf.of_le <| (add_le_add_right hkm 1).trans hmn).hasFDerivWithinAt_nhds (hg.of_le hkm) hgt
refine' hf'.congr_of_eventually_eq_insert _
filter_upwards [hv, ht]
exact fun y hy h2y => (hvf' y hy).fderivWithin h2y
@@ -1291,8 +1291,8 @@ theorem hasFtaylorSeriesUpToOn_pi :
Β· ext1 i
exact (h i).zero_eq x hx
Β· intro m hm x hx
- have := hasFderivWithinAt_pi.2 fun i => (h i).fderivWithin m hm x hx
- convert(L m).HasFderivAt.comp_hasFderivWithinAt x this
+ have := hasFDerivWithinAt_pi.2 fun i => (h i).fderivWithin m hm x hx
+ convert(L m).HasFDerivAt.comp_hasFDerivWithinAt x this
Β· intro m hm
have := continuousOn_pi.2 fun i => (h i).cont m hm
convert(L m).Continuous.comp_continuousOn this
@@ -1904,7 +1904,7 @@ theorem contDiffAt_ring_inverse [CompleteSpace R] (x : RΛ£) : ContDiffAt π n
Β· refine' β¨{ y : R | IsUnit y }, x.nhds, _β©
rintro _ β¨y, rflβ©
rw [inverse_unit]
- exact hasFderivAt_ring_inverse y
+ exact hasFDerivAt_ring_inverse y
Β·
convert(mul_left_right_is_bounded_bilinear π R).ContDiff.neg.comp_contDiffAt (x : R)
(IH.prod IH)
@@ -2016,7 +2016,7 @@ This is one of the easy parts of the inverse function theorem: it assumes that w
an inverse function. -/
theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E F)
{fβ' : E βL[π] F} {a : F} (ha : a β f.target)
- (hfβ' : HasFderivAt f (fβ' : E βL[π] F) (f.symm a)) (hf : ContDiffAt π n f (f.symm a)) :
+ (hfβ' : HasFDerivAt f (fβ' : E βL[π] F) (f.symm a)) (hf : ContDiffAt π n f (f.symm a)) :
ContDiffAt π n f.symm a :=
by
-- We prove this by induction on `n`
@@ -2043,7 +2043,7 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
Β· exact mem_inter ha (mem_preimage.mpr htf)
intro x hx
obtain β¨hxu, e, heβ© := htu hx.2
- have h_deriv : HasFderivAt f (βe) (f.symm x) :=
+ have h_deriv : HasFDerivAt f (βe) (f.symm x) :=
by
rw [he]
exact hff' (f.symm x) hxu
@@ -2073,7 +2073,7 @@ then `f.symm` is `n` times continuously differentiable.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem Homeomorph.contDiff_symm [CompleteSpace E] (f : E ββ F) {fβ' : E β E βL[π] F}
- (hfβ' : β a, HasFderivAt f (fβ' a : E βL[π] F) a) (hf : ContDiff π n (f : E β F)) :
+ (hfβ' : β a, HasFDerivAt f (fβ' a : E βL[π] F) a) (hf : ContDiff π n (f : E β F)) :
ContDiff π n (f.symm : F β E) :=
contDiff_iff_contDiffAt.2 fun x =>
f.toLocalHomeomorph.contDiffAt_symm (mem_univ x) (hfβ' _) hf.ContDiffAt
@@ -2088,7 +2088,7 @@ an inverse function. -/
theorem LocalHomeomorph.contDiffAt_symm_deriv [CompleteSpace π] (f : LocalHomeomorph π π)
{fβ' a : π} (hβ : fβ' β 0) (ha : a β f.target) (hfβ' : HasDerivAt f fβ' (f.symm a))
(hf : ContDiffAt π n f (f.symm a)) : ContDiffAt π n f.symm a :=
- f.contDiffAt_symm ha (hfβ'.hasFderivAt_equiv hβ) hf
+ f.contDiffAt_symm ha (hfβ'.hasFDerivAt_equiv hβ) hf
#align local_homeomorph.cont_diff_at_symm_deriv LocalHomeomorph.contDiffAt_symm_deriv
/-- Let `f` be an `n` times continuously differentiable homeomorphism of a nontrivially normed
@@ -2176,17 +2176,17 @@ variable {π : Type _} [IsROrC π] {E' : Type _} [NormedAddCommGroup E'] [No
/-- If a function has a Taylor series at order at least 1, then at points in the interior of the
domain of definition, the term of order 1 of this series is a strict derivative of `f`. -/
-theorem HasFtaylorSeriesUpToOn.hasStrictFderivAt {s : Set E'} {f : E' β F'} {x : E'}
+theorem HasFtaylorSeriesUpToOn.hasStrictFDerivAt {s : Set E'} {f : E' β F'} {x : E'}
{p : E' β FormalMultilinearSeries π E' F'} (hf : HasFtaylorSeriesUpToOn n f p s) (hn : 1 β€ n)
- (hs : s β π x) : HasStrictFderivAt f ((continuousMultilinearCurryFin1 π E' F') (p x 1)) x :=
- hasStrictFderivAt_of_hasFderivAt_of_continuousAt (hf.eventually_hasFderivAt hn hs) <|
+ (hs : s β π x) : HasStrictFDerivAt f ((continuousMultilinearCurryFin1 π E' F') (p x 1)) x :=
+ hasStrictFDerivAt_of_hasFDerivAt_of_continuousAt (hf.eventually_hasFDerivAt hn hs) <|
(continuousMultilinearCurryFin1 π E' F').ContinuousAt.comp <| (hf.cont 1 hn).ContinuousAt hs
-#align has_ftaylor_series_up_to_on.has_strict_fderiv_at HasFtaylorSeriesUpToOn.hasStrictFderivAt
+#align has_ftaylor_series_up_to_on.has_strict_fderiv_at HasFtaylorSeriesUpToOn.hasStrictFDerivAt
/-- If a function is `C^n` with `1 β€ n` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
theorem ContDiffAt.has_strict_fderiv_at' {f : E' β F'} {f' : E' βL[π] F'} {x : E'}
- (hf : ContDiffAt π n f x) (hf' : HasFderivAt f f' x) (hn : 1 β€ n) : HasStrictFderivAt f f' x :=
+ (hf : ContDiffAt π n f x) (hf' : HasFDerivAt f f' x) (hn : 1 β€ n) : HasStrictFDerivAt f f' x :=
by
rcases hf 1 hn with β¨u, H, p, hpβ©
simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
@@ -2203,23 +2203,23 @@ theorem ContDiffAt.has_strict_deriv_at' {f : π β F'} {f' : F'} {x : π} (
/-- If a function is `C^n` with `1 β€ n` around a point, then the derivative of `f` at this point
is also a strict derivative. -/
-theorem ContDiffAt.hasStrictFderivAt {f : E' β F'} {x : E'} (hf : ContDiffAt π n f x) (hn : 1 β€ n) :
- HasStrictFderivAt f (fderiv π f x) x :=
- hf.has_strict_fderiv_at' (hf.DifferentiableAt hn).HasFderivAt hn
-#align cont_diff_at.has_strict_fderiv_at ContDiffAt.hasStrictFderivAt
+theorem ContDiffAt.hasStrictFDerivAt {f : E' β F'} {x : E'} (hf : ContDiffAt π n f x) (hn : 1 β€ n) :
+ HasStrictFDerivAt f (fderiv π f x) x :=
+ hf.has_strict_fderiv_at' (hf.DifferentiableAt hn).HasFDerivAt hn
+#align cont_diff_at.has_strict_fderiv_at ContDiffAt.hasStrictFDerivAt
/-- If a function is `C^n` with `1 β€ n` around a point, then the derivative of `f` at this point
is also a strict derivative. -/
theorem ContDiffAt.hasStrictDerivAt {f : π β F'} {x : π} (hf : ContDiffAt π n f x) (hn : 1 β€ n) :
HasStrictDerivAt f (deriv f x) x :=
- (hf.HasStrictFderivAt hn).HasStrictDerivAt
+ (hf.HasStrictFDerivAt hn).HasStrictDerivAt
#align cont_diff_at.has_strict_deriv_at ContDiffAt.hasStrictDerivAt
/-- If a function is `C^n` with `1 β€ n`, then the derivative of `f` is also a strict derivative. -/
-theorem ContDiff.hasStrictFderivAt {f : E' β F'} {x : E'} (hf : ContDiff π n f) (hn : 1 β€ n) :
- HasStrictFderivAt f (fderiv π f x) x :=
- hf.ContDiffAt.HasStrictFderivAt hn
-#align cont_diff.has_strict_fderiv_at ContDiff.hasStrictFderivAt
+theorem ContDiff.hasStrictFDerivAt {f : E' β F'} {x : E'} (hf : ContDiff π n f) (hn : 1 β€ n) :
+ HasStrictFDerivAt f (fderiv π f x) x :=
+ hf.ContDiffAt.HasStrictFDerivAt hn
+#align cont_diff.has_strict_fderiv_at ContDiff.hasStrictFDerivAt
/-- If a function is `C^n` with `1 β€ n`, then the derivative of `f` is also a strict derivative. -/
theorem ContDiff.hasStrictDerivAt {f : π β F'} {x : π} (hf : ContDiff π n f) (hn : 1 β€ n) :
@@ -2236,7 +2236,7 @@ theorem HasFtaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _
(hK : βp x 1ββ < K) : β t β π[s] x, LipschitzOnWith K f t :=
by
set f' := fun y => continuousMultilinearCurryFin1 β E F (p y 1)
- have hder : β y β s, HasFderivWithinAt f (f' y) s y := fun y hy =>
+ have hder : β y β s, HasFDerivWithinAt f (f' y) s y := fun y hy =>
(hf.has_fderiv_within_at le_rfl (subset_insert x s hy)).mono (subset_insert x s)
have hcont : ContinuousWithinAt f' s x :=
(continuousMultilinearCurryFin1 β E F).ContinuousAt.comp_continuousWithinAt
@@ -2280,13 +2280,13 @@ theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGro
theorem ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt {f : E' β F'} {x : E'}
(hf : ContDiffAt π 1 f x) (K : ββ₯0) (hK : βfderiv π f xββ < K) :
β t β π x, LipschitzOnWith K f t :=
- (hf.HasStrictFderivAt le_rfl).exists_lipschitzOnWith_of_nnnorm_lt K hK
+ (hf.HasStrictFDerivAt le_rfl).exists_lipschitzOnWith_of_nnnorm_lt K hK
#align cont_diff_at.exists_lipschitz_on_with_of_nnnorm_lt ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt
/-- If `f` is `C^1` at `x`, then `f` is Lipschitz in a neighborhood of `x`. -/
theorem ContDiffAt.exists_lipschitzOnWith {f : E' β F'} {x : E'} (hf : ContDiffAt π 1 f x) :
β K, β t β π x, LipschitzOnWith K f t :=
- (hf.HasStrictFderivAt le_rfl).exists_lipschitzOnWith
+ (hf.HasStrictFDerivAt le_rfl).exists_lipschitzOnWith
#align cont_diff_at.exists_lipschitz_on_with ContDiffAt.exists_lipschitzOnWith
end Real
@@ -2465,7 +2465,7 @@ theorem HasFtaylorSeriesUpToOn.restrictScalars (h : HasFtaylorSeriesUpToOn n f p
{ zero_eq := fun x hx => h.zero_eq x hx
fderivWithin := by
intro m hm x hx
- convert(ContinuousMultilinearMap.restrictScalarsLinear π).HasFderivAt.comp_hasFderivWithinAt _
+ convert(ContinuousMultilinearMap.restrictScalarsLinear π).HasFDerivAt.comp_hasFDerivWithinAt _
((h.fderiv_within m hm x hx).restrictScalars π)
cont := fun m hm =>
ContinuousMultilinearMap.continuous_restrictScalars.comp_continuousOn (h.cont m hm) }
mathlib commit https://github.com/leanprover-community/mathlib/commit/c89fe2d59ae06402c3f55f978016d1ada444f57e
@@ -560,7 +560,7 @@ theorem LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right (g : G ββ
iteratedFderivWithin π i (f β g) (g β»ΒΉ' s) x =
(iteratedFderivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
g.to_continuous_linear_equiv.iterated_fderiv_within_comp_right f hs hx i
- rw [this, ContinuousMultilinearMap.norm_comp_continuous_linearIsometryEquiv]
+ rw [this, ContinuousMultilinearMap.norm_compContinuous_linearIsometryEquiv]
#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_right LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right
/-- Composition with a linear isometry on the right preserves the norm of the iterated derivative
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -1319,7 +1319,7 @@ theorem contDiffWithinAt_pi :
refine' β¨fun h i => h.continuousLinearMapComp (pr i), fun h m hm => _β©
choose u hux p hp using fun i => h i m hm
exact
- β¨β i, u i, Filter.interα΅’_mem.2 hux, _,
+ β¨β i, u i, Filter.iInter_mem.2 hux, _,
hasFtaylorSeriesUpToOn_pi.2 fun i => (hp i).mono <| Inter_subset _ _β©
#align cont_diff_within_at_pi contDiffWithinAt_pi
mathlib commit https://github.com/leanprover-community/mathlib/commit/403190b5419b3f03f1a2893ad9352ca7f7d8bff6
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit aa68866e61a7f1f40e7d6c8b0116ebd6370525c3
+! leanprover-community/mathlib commit 066ecdb4834c7a4693e0f0e5154935a6f3d3f90c
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -2426,6 +2426,18 @@ theorem ContDiff.continuous_deriv (h : ContDiff π n fβ) (hn : 1 β€ n) : Co
(contDiff_succ_iff_deriv.mp (h.of_le hn)).2.Continuous
#align cont_diff.continuous_deriv ContDiff.continuous_deriv
+theorem ContDiff.iterate_deriv :
+ β (n : β) {fβ : π β F} (hf : ContDiff π β fβ), ContDiff π β ((deriv^[n]) fβ)
+ | 0, fβ, hf => hf
+ | n + 1, fβ, hf => ContDiff.iterate_deriv n (contDiff_top_iff_deriv.mp hf).2
+#align cont_diff.iterate_deriv ContDiff.iterate_deriv
+
+theorem ContDiff.iterate_deriv' (n : β) :
+ β (k : β) {fβ : π β F} (hf : ContDiff π (n + k : β) fβ), ContDiff π n ((deriv^[k]) fβ)
+ | 0, fβ, hf => hf
+ | n + 1, fβ, hf => ContDiff.iterate_deriv' n (contDiff_succ_iff_deriv.mp hf).2
+#align cont_diff.iterate_deriv' ContDiff.iterate_deriv'
+
end deriv
section RestrictScalars
mathlib commit https://github.com/leanprover-community/mathlib/commit/d2d964c64f8ddcccd6704a731c41f95d13e72f5c
@@ -4,19 +4,29 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 323b7f2616426313505aae4e09ffbea6013862fc
+! leanprover-community/mathlib commit aa68866e61a7f1f40e7d6c8b0116ebd6370525c3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.ContDiffDef
import Mathbin.Analysis.Calculus.MeanValue
import Mathbin.Analysis.NormedSpace.FiniteDimension
+import Mathbin.Data.Nat.Choose.Cast
/-!
# Higher differentiability of usual operations
We prove that the usual operations (addition, multiplication, difference, composition, and
-so on) preserve `C^n` functions. We also expand the API aound `C^n` functions.
+so on) preserve `C^n` functions. We also expand the API around `C^n` functions.
+
+## Main results
+
+* `cont_diff.comp` states that the composition of two `C^n` functions is `C^n`.
+* `norm_iterated_fderiv_comp_le` gives the bound `n! * C * D ^ n` for the `n`-th derivative
+ of `g β f` assuming that the derivatives of `g` are bounded by `C` and the `i`-th
+ derivative of `f` is bounded by `D ^ i`.
+
+Similar results are given for `C^n` functions on domains.
## Notations
@@ -33,7 +43,7 @@ derivative, differentiability, higher derivative, `C^n`, multilinear, Taylor ser
noncomputable section
-open Classical BigOperators NNReal
+open Classical BigOperators NNReal Nat
-- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
@@ -307,8 +317,7 @@ theorem ContDiff.continuousLinearMap_comp {f : E β F} (g : F βL[π] G) (hf
/-- The iterated derivative within a set of the composition with a linear map on the left is
obtained by applying the linear map to the iterated derivative. -/
theorem ContinuousLinearMap.iteratedFderivWithin_comp_left {f : E β F} (g : F βL[π] G)
- (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β}
- (hi : (i : WithTop β) β€ n) :
+ (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β} (hi : (i : ββ) β€ n) :
iteratedFderivWithin π i (g β f) s x =
g.compContinuousMultilinearMap (iteratedFderivWithin π i f s x) :=
(((hf.ftaylorSeriesWithin hs).continuousLinearMapComp g).eq_ftaylor_series_of_uniqueDiffOn hi hs
@@ -318,7 +327,7 @@ theorem ContinuousLinearMap.iteratedFderivWithin_comp_left {f : E β F} (g : F
/-- The iterated derivative of the composition with a linear map on the left is
obtained by applying the linear map to the iterated derivative. -/
theorem ContinuousLinearMap.iteratedFderiv_comp_left {f : E β F} (g : F βL[π] G)
- (hf : ContDiff π n f) (x : E) {i : β} (hi : (i : WithTop β) β€ n) :
+ (hf : ContDiff π n f) (x : E) {i : β} (hi : (i : ββ) β€ n) :
iteratedFderiv π i (g β f) x = g.compContinuousMultilinearMap (iteratedFderiv π i f x) :=
by
simp only [β iteratedFderivWithin_univ]
@@ -358,8 +367,7 @@ theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_left (g : F βL[π] G
/-- Composition with a linear isometry on the left preserves the norm of the iterated
derivative within a set. -/
theorem LinearIsometry.norm_iteratedFderivWithin_comp_left {f : E β F} (g : F ββα΅’[π] G)
- (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β}
- (hi : (i : WithTop β) β€ n) :
+ (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β} (hi : (i : ββ) β€ n) :
βiteratedFderivWithin π i (g β f) s xβ = βiteratedFderivWithin π i f s xβ :=
by
have :
@@ -373,7 +381,7 @@ theorem LinearIsometry.norm_iteratedFderivWithin_comp_left {f : E β F} (g : F
/-- Composition with a linear isometry on the left preserves the norm of the iterated
derivative. -/
theorem LinearIsometry.norm_iteratedFderiv_comp_left {f : E β F} (g : F ββα΅’[π] G)
- (hf : ContDiff π n f) (x : E) {i : β} (hi : (i : WithTop β) β€ n) :
+ (hf : ContDiff π n f) (x : E) {i : β} (hi : (i : ββ) β€ n) :
βiteratedFderiv π i (g β f) xβ = βiteratedFderiv π i f xβ :=
by
simp only [β iteratedFderivWithin_univ]
@@ -491,7 +499,7 @@ theorem ContDiff.comp_continuousLinearMap {f : E β F} {g : G βL[π] E} (hf
obtained by composing the iterated derivative with the linear map. -/
theorem ContinuousLinearMap.iteratedFderivWithin_comp_right {f : E β F} (g : G βL[π] E)
(hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (h's : UniqueDiffOn π (g β»ΒΉ' s)) {x : G}
- (hx : g x β s) {i : β} (hi : (i : WithTop β) β€ n) :
+ (hx : g x β s) {i : β} (hi : (i : ββ) β€ n) :
iteratedFderivWithin π i (f β g) (g β»ΒΉ' s) x =
(iteratedFderivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
(((hf.ftaylorSeriesWithin hs).compContinuousLinearMap g).eq_ftaylor_series_of_uniqueDiffOn hi h's
@@ -532,7 +540,7 @@ theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_right (g : G βL[π]
/-- The iterated derivative of the composition with a linear map on the right is
obtained by composing the iterated derivative with the linear map. -/
theorem ContinuousLinearMap.iteratedFderiv_comp_right (g : G βL[π] E) {f : E β F}
- (hf : ContDiff π n f) (x : G) {i : β} (hi : (i : WithTop β) β€ n) :
+ (hf : ContDiff π n f) (x : G) {i : β} (hi : (i : ββ) β€ n) :
iteratedFderiv π i (f β g) x =
(iteratedFderiv π i f (g x)).compContinuousLinearMap fun _ => g :=
by
@@ -2502,7 +2510,7 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux {Du Eu
apply ((B (f x)).le_op_norm (g x)).trans
apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)
exact B.le_op_norm (f x)
- Β· have In : (n : WithTop β) + 1 β€ n.succ := by simp only [Nat.cast_succ, le_refl]
+ Β· have In : (n : ββ) + 1 β€ n.succ := by simp only [Nat.cast_succ, le_refl]
have I1 :
βiteratedFderivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
βBβ *
@@ -2563,7 +2571,7 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux {Du Eu
s x :=
by
apply iteratedFderivWithin_congr hs (fun y hy => _) hx
- have L : (1 : WithTop β) β€ n.succ := by
+ have L : (1 : ββ) β€ n.succ := by
simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n
exact
B.fderiv_within_of_bilinear (hf.differentiable_on L y hy) (hg.differentiable_on L y hy)
@@ -2588,9 +2596,8 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux {Du Eu
iterated derivatives of `f` and `g` when `B` is bilinear:
`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear (B : E βL[π] F βL[π] G)
- {f : D β E} {g : D β F} {N : WithTop β} {s : Set D} {x : D} (hf : ContDiffOn π N f s)
- (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β}
- (hn : (n : WithTop β) β€ N) :
+ {f : D β E} {g : D β F} {N : ββ} {s : Set D} {x : D} (hf : ContDiffOn π N f s)
+ (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β} (hn : (n : ββ) β€ N) :
βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ β€
βBβ *
β i in Finset.range (n + 1),
@@ -2687,8 +2694,8 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear (B : E βL
iterated derivatives of `f` and `g` when `B` is bilinear:
`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
theorem ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear (B : E βL[π] F βL[π] G) {f : D β E}
- {g : D β F} {N : WithTop β} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D) {n : β}
- (hn : (n : WithTop β) β€ N) :
+ {g : D β F} {N : ββ} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D) {n : β}
+ (hn : (n : ββ) β€ N) :
βiteratedFderiv π n (fun y => B (f y) (g y)) xβ β€
βBβ *
β i in Finset.range (n + 1),
@@ -2704,9 +2711,9 @@ theorem ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear (B : E βL[π]
iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_of_le_one
- (B : E βL[π] F βL[π] G) {f : D β E} {g : D β F} {N : WithTop β} {s : Set D} {x : D}
+ (B : E βL[π] F βL[π] G) {f : D β E} {g : D β F} {N : ββ} {s : Set D} {x : D}
(hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β}
- (hn : (n : WithTop β) β€ N) (hB : βBβ β€ 1) :
+ (hn : (n : ββ) β€ N) (hB : βBβ β€ 1) :
βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ β€
β i in Finset.range (n + 1),
(n.choose i : β) * βiteratedFderivWithin π i f s xβ *
@@ -2721,8 +2728,8 @@ theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_of_le_one
iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
theorem ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear_of_le_one (B : E βL[π] F βL[π] G)
- {f : D β E} {g : D β F} {N : WithTop β} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D)
- {n : β} (hn : (n : WithTop β) β€ N) (hB : βBβ β€ 1) :
+ {f : D β E} {g : D β F} {N : ββ} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D) {n : β}
+ (hn : (n : ββ) β€ N) (hB : βBβ β€ 1) :
βiteratedFderiv π n (fun y => B (f y) (g y)) xβ β€
β i in Finset.range (n + 1),
(n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
@@ -2738,9 +2745,9 @@ section
variable {π' : Type _} [NormedField π'] [NormedAlgebra π π'] [NormedSpace π' F]
[IsScalarTower π π' F]
-theorem norm_iteratedFderivWithin_smul_le {f : E β π'} {g : E β F} {N : WithTop β}
+theorem norm_iteratedFderivWithin_smul_le {f : E β π'} {g : E β F} {N : ββ}
(hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s)
- {n : β} (hn : (n : WithTop β) β€ N) :
+ {n : β} (hn : (n : ββ) β€ N) :
βiteratedFderivWithin π n (fun y => f y β’ g y) s xβ β€
β i in Finset.range (n + 1),
(n.choose i : β) * βiteratedFderivWithin π i f s xβ *
@@ -2750,8 +2757,8 @@ theorem norm_iteratedFderivWithin_smul_le {f : E β π'} {g : E β F} {N : W
hf hg hs hx hn ContinuousLinearMap.op_norm_lsmul_le
#align norm_iterated_fderiv_within_smul_le norm_iteratedFderivWithin_smul_le
-theorem norm_iteratedFderiv_smul_le {f : E β π'} {g : E β F} {N : WithTop β} (hf : ContDiff π N f)
- (hg : ContDiff π N g) (x : E) {n : β} (hn : (n : WithTop β) β€ N) :
+theorem norm_iteratedFderiv_smul_le {f : E β π'} {g : E β F} {N : ββ} (hf : ContDiff π N f)
+ (hg : ContDiff π N g) (x : E) {n : β} (hn : (n : ββ) β€ N) :
βiteratedFderiv π n (fun y => f y β’ g y) xβ β€
β i in Finset.range (n + 1),
(n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
@@ -2765,9 +2772,9 @@ section
variable {A : Type _} [NormedRing A] [NormedAlgebra π A]
-theorem norm_iteratedFderivWithin_mul_le {f : E β A} {g : E β A} {N : WithTop β}
- (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s)
- {n : β} (hn : (n : WithTop β) β€ N) :
+theorem norm_iteratedFderivWithin_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiffOn π N f s)
+ (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s) {n : β}
+ (hn : (n : ββ) β€ N) :
βiteratedFderivWithin π n (fun y => f y * g y) s xβ β€
β i in Finset.range (n + 1),
(n.choose i : β) * βiteratedFderivWithin π i f s xβ *
@@ -2777,8 +2784,8 @@ theorem norm_iteratedFderivWithin_mul_le {f : E β A} {g : E β A} {N : WithTo
hf hg hs hx hn (ContinuousLinearMap.op_norm_mul_le _ _)
#align norm_iterated_fderiv_within_mul_le norm_iteratedFderivWithin_mul_le
-theorem norm_iteratedFderiv_mul_le {f : E β A} {g : E β A} {N : WithTop β} (hf : ContDiff π N f)
- (hg : ContDiff π N g) (x : E) {n : β} (hn : (n : WithTop β) β€ N) :
+theorem norm_iteratedFderiv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiff π N f)
+ (hg : ContDiff π N g) (x : E) {n : β} (hn : (n : ββ) β€ N) :
βiteratedFderiv π n (fun y => f y * g y) xβ β€
β i in Finset.range (n + 1),
(n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
@@ -2791,6 +2798,217 @@ theorem norm_iteratedFderiv_mul_le {f : E β A} {g : E β A} {N : WithTop β}
end
+/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
+within a set of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
+of `g β f` is bounded by `n! * C * D^n`.
+This lemma proves this estimate assuming additionally that two of the spaces live in the same
+universe, to make an induction possible. Use instead `norm_iterated_fderiv_within_comp_le` that
+removes this assumption. -/
+theorem norm_iteratedFderivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGroup Fu]
+ [NormedSpace π Fu] [NormedAddCommGroup Gu] [NormedSpace π Gu] {g : Fu β Gu} {f : E β Fu} {n : β}
+ {s : Set E} {t : Set Fu} {x : E} (hg : ContDiffOn π n g t) (hf : ContDiffOn π n f s)
+ (ht : UniqueDiffOn π t) (hs : UniqueDiffOn π s) (hst : MapsTo f s t) (hx : x β s) {C : β}
+ {D : β} (hC : β i, i β€ n β βiteratedFderivWithin π i g t (f x)β β€ C)
+ (hD : β i, 1 β€ i β i β€ n β βiteratedFderivWithin π i f s xβ β€ D ^ i) :
+ βiteratedFderivWithin π n (g β f) s xβ β€ n ! * C * D ^ n :=
+ by
+ /- We argue by induction on `n`, using that `D^(n+1) (g β f) = D^n (g ' β f β¬ f')`. The successive
+ derivatives of `g' β f` are controlled thanks to the inductive assumption, and those of `f'` are
+ controlled by assumption.
+ As composition of linear maps is a bilinear map, one may use
+ `continuous_linear_map.norm_iterated_fderiv_le_of_bilinear_of_le_one` to get from these a bound
+ on `D^n (g ' β f β¬ f')`. -/
+ induction' n using Nat.case_strong_induction_on with n IH generalizing Gu
+ Β·
+ simpa only [norm_iteratedFderivWithin_zero, Nat.factorial_zero, algebraMap.coe_one, one_mul,
+ pow_zero, mul_one] using hC 0 le_rfl
+ have M : (n : ββ) < n.succ := Nat.cast_lt.2 n.lt_succ_self
+ have Cnonneg : 0 β€ C := (norm_nonneg _).trans (hC 0 bot_le)
+ have Dnonneg : 0 β€ D :=
+ by
+ have : 1 β€ n + 1 := by simp only [le_add_iff_nonneg_left, zero_le']
+ simpa only [pow_one] using (norm_nonneg _).trans (hD 1 le_rfl this)
+ -- use the inductive assumption to bound the derivatives of `g' β f`.
+ have I :
+ β i β Finset.range (n + 1),
+ βiteratedFderivWithin π i (fderivWithin π g t β f) s xβ β€ i ! * C * D ^ i :=
+ by
+ intro i hi
+ simp only [Finset.mem_range_succ_iff] at hi
+ apply IH i hi
+ apply hf.of_le (Nat.cast_le.2 (hi.trans n.le_succ))
+ Β· intro j hj h'j
+ exact hD j hj (h'j.trans (hi.trans n.le_succ))
+ Β· apply hg.fderiv_within ht
+ simp only [Nat.cast_succ]
+ exact add_le_add_right (Nat.cast_le.2 hi) _
+ Β· intro j hj
+ have :
+ βiteratedFderivWithin π j (fderivWithin π g t) t (f x)β =
+ βiteratedFderivWithin π (j + 1) g t (f x)β :=
+ by rw [iteratedFderivWithin_succ_eq_comp_right ht (hst hx), LinearIsometryEquiv.norm_map]
+ rw [this]
+ exact hC (j + 1) (add_le_add (hj.trans hi) le_rfl)
+ -- reformulate `hD` as a bound for the derivatives of `f'`.
+ have J : β i, βiteratedFderivWithin π (n - i) (fderivWithin π f s) s xβ β€ D ^ (n - i + 1) :=
+ by
+ intro i
+ have :
+ βiteratedFderivWithin π (n - i) (fderivWithin π f s) s xβ =
+ βiteratedFderivWithin π (n - i + 1) f s xβ :=
+ by rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
+ rw [this]
+ apply hD
+ Β· simp only [le_add_iff_nonneg_left, zero_le']
+ Β· apply Nat.succ_le_succ tsub_le_self
+ -- Now put these together: first, notice that we have to bound `D^n (g' β f β¬ f')`.
+ calc
+ βiteratedFderivWithin π (n + 1) (g β f) s xβ =
+ βiteratedFderivWithin π n (fun y : E => fderivWithin π (g β f) s y) s xβ :=
+ by rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
+ _ =
+ βiteratedFderivWithin π n
+ (fun y : E =>
+ ContinuousLinearMap.compL π E Fu Gu (fderivWithin π g t (f y)) (fderivWithin π f s y))
+ s xβ :=
+ by
+ have L : (1 : ββ) β€ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using n.succ_pos
+ congr 1
+ apply iteratedFderivWithin_congr hs (fun y hy => _) hx
+ apply fderivWithin.comp _ _ _ hst (hs y hy)
+ Β· exact hg.differentiable_on L _ (hst hy)
+ Β· exact hf.differentiable_on L _ hy
+ -- bound it using the fact that the composition of linear maps is a bilinear operation,
+ -- for which we have bounds for the`n`-th derivative.
+ _ β€
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderivWithin π i (fderivWithin π g t β f) s xβ *
+ βiteratedFderivWithin π (n - i) (fderivWithin π f s) s xβ :=
+ by
+ have A : ContDiffOn π n (fderivWithin π g t β f) s :=
+ by
+ apply ContDiffOn.comp _ (hf.of_le M.le) hst
+ apply hg.fderiv_within ht
+ simp only [Nat.cast_succ, le_refl]
+ have B : ContDiffOn π n (fderivWithin π f s) s :=
+ by
+ apply hf.fderiv_within hs
+ simp only [Nat.cast_succ, le_refl]
+ exact
+ (ContinuousLinearMap.compL π E Fu Gu).norm_iteratedFderivWithin_le_of_bilinear_of_le_one A B
+ hs hx le_rfl (ContinuousLinearMap.norm_compL_le π E Fu Gu)
+ -- bound each of the terms using the estimates on previous derivatives (that use the inductive
+ -- assumption for `g' β f`).
+ _ β€
+ β i in Finset.range (n + 1), (n.choose i : β) * (i ! * C * D ^ i) * D ^ (n - i + 1) :=
+ by
+ apply Finset.sum_le_sum fun i hi => _
+ simp only [mul_assoc (n.choose i : β)]
+ refine' mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg _)
+ apply mul_le_mul (I i hi) (J i) (norm_nonneg _)
+ positivity
+ -- We are left with trivial algebraic manipulations to see that this is smaller than
+ -- the claimed bound.
+ _ =
+ β i in Finset.range (n + 1),
+ (n ! : β) * (i !β»ΒΉ * i !) * C * (D ^ i * D ^ (n - i + 1)) * (n - i)!β»ΒΉ :=
+ by
+ apply Finset.sum_congr rfl fun i hi => _
+ simp only [Nat.cast_choose β (Finset.mem_range_succ_iff.1 hi), div_eq_inv_mul, mul_inv]
+ ring
+ _ = β i in Finset.range (n + 1), (n ! : β) * 1 * C * D ^ (n + 1) * (n - i)!β»ΒΉ :=
+ by
+ apply Finset.sum_congr rfl fun i hi => _
+ congr 2
+ Β· congr
+ apply inv_mul_cancel
+ simpa only [Ne.def, Nat.cast_eq_zero] using i.factorial_ne_zero
+ Β· rw [β pow_add]
+ congr 1
+ rw [Nat.add_succ, Nat.succ_inj']
+ exact Nat.add_sub_of_le (Finset.mem_range_succ_iff.1 hi)
+ _ β€ β i in Finset.range (n + 1), (n ! : β) * 1 * C * D ^ (n + 1) * 1 :=
+ by
+ apply Finset.sum_le_sum fun i hi => _
+ refine' mul_le_mul_of_nonneg_left _ (by positivity)
+ apply inv_le_one
+ simpa only [Nat.one_le_cast] using (n - i).factorial_pos
+ _ = (n + 1)! * C * D ^ (n + 1) := by
+ simp only [mul_assoc, mul_one, Finset.sum_const, Finset.card_range, nsmul_eq_mul,
+ Nat.factorial_succ, Nat.cast_mul]
+
+#align norm_iterated_fderiv_within_comp_le_aux norm_iteratedFderivWithin_comp_le_aux
+
+/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
+within a set of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
+of `g β f` is bounded by `n! * C * D^n`. -/
+theorem norm_iteratedFderivWithin_comp_le {g : F β G} {f : E β F} {n : β} {s : Set E} {t : Set F}
+ {x : E} {N : ββ} (hg : ContDiffOn π N g t) (hf : ContDiffOn π N f s) (hn : (n : ββ) β€ N)
+ (ht : UniqueDiffOn π t) (hs : UniqueDiffOn π s) (hst : MapsTo f s t) (hx : x β s) {C : β}
+ {D : β} (hC : β i, i β€ n β βiteratedFderivWithin π i g t (f x)β β€ C)
+ (hD : β i, 1 β€ i β i β€ n β βiteratedFderivWithin π i f s xβ β€ D ^ i) :
+ βiteratedFderivWithin π n (g β f) s xβ β€ n ! * C * D ^ n :=
+ by
+ /- We reduce the bound to the case where all spaces live in the same universe (in which we
+ already have proved the result), by using linear isometries between the spaces and their `ulift`
+ to a common universe. These linear isometries preserve the norm of the iterated derivative. -/
+ let Fu : Type max uF uG := ULift.{uG, uF} F
+ let Gu : Type max uF uG := ULift.{uF, uG} G
+ have isoF : Fu ββα΅’[π] F := LinearIsometryEquiv.ulift π F
+ have isoG : Gu ββα΅’[π] G := LinearIsometryEquiv.ulift π G
+ -- lift `f` and `g` to versions `fu` and `gu` on the lifted spaces.
+ let fu : E β Fu := isoF.symm β f
+ let gu : Fu β Gu := isoG.symm β g β isoF
+ let tu := isoF β»ΒΉ' t
+ have htu : UniqueDiffOn π tu := isoF.to_continuous_linear_equiv.unique_diff_on_preimage_iff.2 ht
+ have hstu : maps_to fu s tu := by
+ intro y hy
+ simpa only [mem_preimage, LinearIsometryEquiv.apply_symm_apply] using hst hy
+ have Ffu : isoF (fu x) = f x := by simp only [LinearIsometryEquiv.apply_symm_apply]
+ -- All norms are preserved by the lifting process.
+ have hfu : ContDiffOn π n fu s := isoF.symm.cont_diff.comp_cont_diff_on (hf.of_le hn)
+ have hgu : ContDiffOn π n gu tu :=
+ isoG.symm.cont_diff.comp_cont_diff_on
+ ((hg.of_le hn).compContinuousLinearMap (isoF : Fu βL[π] F))
+ have Nfu : β i, βiteratedFderivWithin π i fu s xβ = βiteratedFderivWithin π i f s xβ :=
+ by
+ intro i
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hs hx]
+ simp_rw [β Nfu] at hD
+ have Ngu : β i, βiteratedFderivWithin π i gu tu (fu x)β = βiteratedFderivWithin π i g t (f x)β :=
+ by
+ intro i
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ htu (hstu hx)]
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right _ _ ht, Ffu]
+ rw [Ffu]
+ exact hst hx
+ simp_rw [β Ngu] at hC
+ have Nfgu : βiteratedFderivWithin π n (g β f) s xβ = βiteratedFderivWithin π n (gu β fu) s xβ :=
+ by
+ have : gu β fu = isoG.symm β g β f := by
+ ext x
+ simp only [comp_app, LinearIsometryEquiv.map_eq_iff, LinearIsometryEquiv.apply_symm_apply]
+ rw [this, LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hs hx]
+ -- deduce the required bound from the one for `gu β fu`.
+ rw [Nfgu]
+ exact norm_iteratedFderivWithin_comp_le_aux hgu hfu htu hs hstu hx hC hD
+#align norm_iterated_fderiv_within_comp_le norm_iteratedFderivWithin_comp_le
+
+/-- If the derivatives of `g` at `f x` are bounded by `C`, and the `i`-th derivative
+of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
+of `g β f` is bounded by `n! * C * D^n`. -/
+theorem norm_iteratedFderiv_comp_le {g : F β G} {f : E β F} {n : β} {N : ββ} (hg : ContDiff π N g)
+ (hf : ContDiff π N f) (hn : (n : ββ) β€ N) (x : E) {C : β} {D : β}
+ (hC : β i, i β€ n β βiteratedFderiv π i g (f x)β β€ C)
+ (hD : β i, 1 β€ i β i β€ n β βiteratedFderiv π i f xβ β€ D ^ i) :
+ βiteratedFderiv π n (g β f) xβ β€ n ! * C * D ^ n :=
+ by
+ simp_rw [β iteratedFderivWithin_univ] at hC hDβ’
+ exact
+ norm_iteratedFderivWithin_comp_le hg.cont_diff_on hf.cont_diff_on hn uniqueDiffOn_univ
+ uniqueDiffOn_univ (maps_to_univ _ _) (mem_univ x) hC hD
+#align norm_iterated_fderiv_comp_le norm_iteratedFderiv_comp_le
+
section Apply
theorem norm_iteratedFderivWithin_clm_apply {f : E β F βL[π] G} {g : E β F} {s : Set E} {x : E}
mathlib commit https://github.com/leanprover-community/mathlib/commit/09079525fd01b3dda35e96adaa08d2f943e1648c
@@ -40,7 +40,7 @@ local notation "β" => (β€ : ββ)
universe u v w uD uE uF uG
-attribute [local instance]
+attribute [local instance 1001]
NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid
namespace Finset
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e281deff072232a3c5b3e90034bd65dde396312
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 91862a6001a8b6ae3f261cdd8eea42f6ac596886
+! leanprover-community/mathlib commit 323b7f2616426313505aae4e09ffbea6013862fc
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -187,6 +187,20 @@ theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π n f s :=
exact contDiffOn_const
#align cont_diff_on_of_subsingleton contDiffOn_of_subsingleton
+theorem iteratedFderiv_succ_const (n : β) (c : F) : (iteratedFderiv π (n + 1) fun y : E => c) = 0 :=
+ by
+ ext (x m)
+ simp only [iteratedFderiv_succ_apply_right, fderiv_const, Pi.zero_apply, iteratedFderiv_zero_fun,
+ ContinuousMultilinearMap.zero_apply, ContinuousLinearMap.zero_apply]
+#align iterated_fderiv_succ_const iteratedFderiv_succ_const
+
+theorem iteratedFderiv_const_of_ne {n : β} (hn : n β 0) (c : F) :
+ (iteratedFderiv π n fun y : E => c) = 0 :=
+ by
+ cases' Nat.exists_eq_succ_of_ne_zero hn with k hk
+ rw [hk, iteratedFderiv_succ_const]
+#align iterated_fderiv_const_of_ne iteratedFderiv_const_of_ne
+
/-! ### Smoothness of linear functions -/
@@ -2777,3 +2791,58 @@ theorem norm_iteratedFderiv_mul_le {f : E β A} {g : E β A} {N : WithTop β}
end
+section Apply
+
+theorem norm_iteratedFderivWithin_clm_apply {f : E β F βL[π] G} {g : E β F} {s : Set E} {x : E}
+ {N : ββ} {n : β} (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s)
+ (hx : x β s) (hn : βn β€ N) :
+ βiteratedFderivWithin π n (fun y => (f y) (g y)) s xβ β€
+ (Finset.range (n + 1)).Sum fun i =>
+ β(n.choose i) * βiteratedFderivWithin π i f s xβ * βiteratedFderivWithin π (n - i) g s xβ :=
+ by
+ let B : (F βL[π] G) βL[π] F βL[π] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply π G)
+ have hB : βBβ β€ 1 :=
+ by
+ simp only [ContinuousLinearMap.op_norm_flip, ContinuousLinearMap.apply]
+ refine' ContinuousLinearMap.op_norm_le_bound _ zero_le_one fun f => _
+ simp only [ContinuousLinearMap.coe_id', id.def, one_mul]
+ exact B.norm_iterated_fderiv_within_le_of_bilinear_of_le_one hf hg hs hx hn hB
+#align norm_iterated_fderiv_within_clm_apply norm_iteratedFderivWithin_clm_apply
+
+theorem norm_iteratedFderiv_clm_apply {f : E β F βL[π] G} {g : E β F} {N : ββ} {n : β}
+ (hf : ContDiff π N f) (hg : ContDiff π N g) (x : E) (hn : βn β€ N) :
+ βiteratedFderiv π n (fun y : E => (f y) (g y)) xβ β€
+ (Finset.range (n + 1)).Sum fun i : β =>
+ β(n.choose i) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ by
+ simp only [β iteratedFderivWithin_univ]
+ exact
+ norm_iteratedFderivWithin_clm_apply hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ
+ (Set.mem_univ x) hn
+#align norm_iterated_fderiv_clm_apply norm_iteratedFderiv_clm_apply
+
+theorem norm_iteratedFderivWithin_clm_apply_const {f : E β F βL[π] G} {c : F} {s : Set E} {x : E}
+ {N : ββ} {n : β} (hf : ContDiffOn π N f s) (hs : UniqueDiffOn π s) (hx : x β s) (hn : βn β€ N) :
+ βiteratedFderivWithin π n (fun y : E => (f y) c) s xβ β€
+ βcβ * βiteratedFderivWithin π n f s xβ :=
+ by
+ let g : (F βL[π] G) βL[π] G := ContinuousLinearMap.apply π G c
+ have h := g.norm_comp_continuous_multilinear_map_le (iteratedFderivWithin π n f s x)
+ rw [β g.iterated_fderiv_within_comp_left hf hs hx hn] at h
+ refine' h.trans (mul_le_mul_of_nonneg_right _ (norm_nonneg _))
+ refine' g.op_norm_le_bound (norm_nonneg _) fun f => _
+ rw [ContinuousLinearMap.apply_apply, mul_comm]
+ exact f.le_op_norm c
+#align norm_iterated_fderiv_within_clm_apply_const norm_iteratedFderivWithin_clm_apply_const
+
+theorem norm_iteratedFderiv_clm_apply_const {f : E β F βL[π] G} {c : F} {x : E} {N : ββ} {n : β}
+ (hf : ContDiff π N f) (hn : βn β€ N) :
+ βiteratedFderiv π n (fun y : E => (f y) c) xβ β€ βcβ * βiteratedFderiv π n f xβ :=
+ by
+ simp only [β iteratedFderivWithin_univ]
+ refine'
+ norm_iteratedFderivWithin_clm_apply_const hf.cont_diff_on uniqueDiffOn_univ (Set.mem_univ x) hn
+#align norm_iterated_fderiv_clm_apply_const norm_iteratedFderiv_clm_apply_const
+
+end Apply
+
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 0187644979f2d3e10a06e916a869c994facd9a87
+! leanprover-community/mathlib commit 91862a6001a8b6ae3f261cdd8eea42f6ac596886
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -38,20 +38,80 @@ open Classical BigOperators NNReal
-- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
-universe u v w uE uF uG
+universe u v w uD uE uF uG
attribute [local instance]
NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid
+namespace Finset
+
+-- TODO porting note: move the next two lemmas to the file `data.nat.choose.sum`
+/-- The sum of `(n+1).choose i * f i (n+1-i)` can be split into two sums at rank `n`,
+respectively of `n.choose i * f i (n+1-i)` and `n.choose i * f (i+1) (n-i)`. -/
+theorem sum_choose_succ_mul {R : Type _} [Semiring R] (f : β β β β R) (n : β) :
+ (β i in range (n + 2), ((n + 1).choose i : R) * f i (n + 1 - i)) =
+ (β i in range (n + 1), (n.choose i : R) * f i (n + 1 - i)) +
+ β i in range (n + 1), (n.choose i : R) * f (i + 1) (n - i) :=
+ by
+ have A :
+ (β i in range (n + 1), (n.choose (i + 1) : R) * f (i + 1) (n - i)) + f 0 (n + 1) =
+ β i in range (n + 1), n.choose i * f i (n + 1 - i) :=
+ by
+ rw [Finset.sum_range_succ, Finset.sum_range_succ']
+ simp only [Nat.choose_succ_self, algebraMap.coe_zero, MulZeroClass.zero_mul, add_zero,
+ Nat.succ_sub_succ_eq_sub, Nat.choose_zero_right, algebraMap.coe_one, one_mul, tsub_zero]
+ calc
+ (β i in Finset.range (n + 2), ((n + 1).choose i : R) * f i (n + 1 - i)) =
+ (β i in Finset.range (n + 1), ((n + 1).choose (i + 1) : R) * f (i + 1) (n + 1 - (i + 1))) +
+ f 0 (n + 1 - 0) :=
+ by
+ rw [Finset.sum_range_succ']
+ simp only [Nat.choose_zero_right, algebraMap.coe_one, one_mul]
+ _ =
+ (β i in Finset.range (n + 1), (n.choose i : R) * f i (n + 1 - i)) +
+ β i in Finset.range (n + 1), n.choose i * f (i + 1) (n - i) :=
+ by
+ simp only [Nat.choose_succ_succ, Nat.cast_add, Nat.succ_sub_succ_eq_sub, tsub_zero, add_mul]
+ rw [Finset.sum_add_distrib, β A]
+ abel
+
+#align finset.sum_choose_succ_mul Finset.sum_choose_succ_mul
+
+/-- The sum along the antidiagonal of `(n+1).choose i * f i j` can be split into two sums along the
+antidiagonal at rank `n`, respectively of `n.choose i * f i (j+1)` and `n.choose j * f (i+1) j`. -/
+theorem sum_antidiagonal_choose_succ_mul {R : Type _} [Semiring R] (f : β β β β R) (n : β) :
+ (β ij in Nat.antidiagonal (n + 1), ((n + 1).choose ij.1 : R) * f ij.1 ij.2) =
+ (β ij in Nat.antidiagonal n, (n.choose ij.1 : R) * f ij.1 (ij.2 + 1)) +
+ β ij in Nat.antidiagonal n, (n.choose ij.2 : R) * f (ij.1 + 1) ij.2 :=
+ by
+ convert sum_choose_succ_mul f n using 1
+ Β· exact nat.sum_antidiagonal_eq_sum_range_succ (fun i j => ((n + 1).choose i : R) * f i j) (n + 1)
+ congr 1
+ Β· rw [nat.sum_antidiagonal_eq_sum_range_succ (fun i j => (n.choose i : R) * f i (j + 1)) n]
+ apply Finset.sum_congr rfl fun i hi => _
+ have : n + 1 - i = n - i + 1 := Nat.sub_add_comm (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi))
+ simp only [this]
+ Β· suffices H :
+ (β ij in nat.antidiagonal n, (n.choose ij.2 : R) * f (ij.1 + 1) ij.2) =
+ β ij in nat.antidiagonal n, (n.choose ij.1 : R) * f (ij.1 + 1) ij.2
+ Β· rw [H, nat.sum_antidiagonal_eq_sum_range_succ (fun i j => (n.choose i : R) * f (i + 1) j) n]
+ apply Finset.sum_congr rfl fun i hi => _
+ congr 2
+ apply Nat.choose_symm_of_eq_add
+ rw [β nat.mem_antidiagonal.1 hi, add_comm]
+#align finset.sum_antidiagonal_choose_succ_mul Finset.sum_antidiagonal_choose_succ_mul
+
+end Finset
+
open Set Fin Filter Function
open Topology
-variable {π : Type _} [NontriviallyNormedField π] {E : Type uE} [NormedAddCommGroup E]
- [NormedSpace π E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π F] {G : Type uG}
- [NormedAddCommGroup G] [NormedSpace π G] {X : Type _} [NormedAddCommGroup X] [NormedSpace π X]
- {s sβ t u : Set E} {f fβ : E β F} {g : F β G} {x xβ : E} {c : F} {b : E Γ F β G} {m n : ββ}
- {p : E β FormalMultilinearSeries π E F}
+variable {π : Type _} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
+ [NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
+ [NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
+ {X : Type _} [NormedAddCommGroup X] [NormedSpace π X] {s sβ t u : Set E} {f fβ : E β F}
+ {g : F β G} {x xβ : E} {c : F} {b : E Γ F β G} {m n : ββ} {p : E β FormalMultilinearSeries π E F}
/-! ### Constants -/
@@ -2398,3 +2458,322 @@ theorem ContDiff.restrict_scalars (h : ContDiff π' n f) : ContDiff π n f :
end RestrictScalars
+/-!## Quantitative bounds -/
+
+
+/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
+iterated derivatives of `f` and `g` when `B` is bilinear. This lemma is an auxiliary version
+assuming all spaces live in the same universe, to enable an induction. Use instead
+`continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear` that removes this assumption. -/
+theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux {Du Eu Fu Gu : Type u}
+ [NormedAddCommGroup Du] [NormedSpace π Du] [NormedAddCommGroup Eu] [NormedSpace π Eu]
+ [NormedAddCommGroup Fu] [NormedSpace π Fu] [NormedAddCommGroup Gu] [NormedSpace π Gu]
+ (B : Eu βL[π] Fu βL[π] Gu) {f : Du β Eu} {g : Du β Fu} {n : β} {s : Set Du} {x : Du}
+ (hf : ContDiffOn π n f s) (hg : ContDiffOn π n g s) (hs : UniqueDiffOn π s) (hx : x β s) :
+ βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ β€
+ βBβ *
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
+ βiteratedFderivWithin π (n - i) g s xβ :=
+ by
+ /- We argue by induction on `n`. The bound is trivial for `n = 0`. For `n + 1`, we write
+ the `(n+1)`-th derivative as the `n`-th derivative of the derivative `B f g' + B f' g`, and apply
+ the inductive assumption to each of those two terms. For this induction to make sense,
+ the spaces of linear maps that appear in the induction should be in the same universe as the
+ original spaces, which explains why we assume in the lemma that all spaces live in the same
+ universe. -/
+ induction' n with n IH generalizing Eu Fu Gu
+ Β· simp only [β mul_assoc, norm_iteratedFderivWithin_zero, Finset.range_one, Finset.sum_singleton,
+ Nat.choose_self, algebraMap.coe_one, one_mul]
+ apply ((B (f x)).le_op_norm (g x)).trans
+ apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)
+ exact B.le_op_norm (f x)
+ Β· have In : (n : WithTop β) + 1 β€ n.succ := by simp only [Nat.cast_succ, le_refl]
+ have I1 :
+ βiteratedFderivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
+ βBβ *
+ β i : β in Finset.range (n + 1),
+ n.choose i * βiteratedFderivWithin π i f s xβ *
+ βiteratedFderivWithin π (n + 1 - i) g s xβ :=
+ calc
+ βiteratedFderivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
+ βB.precompR Duβ *
+ β i : β in Finset.range (n + 1),
+ n.choose i * βiteratedFderivWithin π i f s xβ *
+ βiteratedFderivWithin π (n - i) (fderivWithin π g s) s xβ :=
+ IH _ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderiv_within hs In)
+ _ β€
+ βBβ *
+ β i : β in Finset.range (n + 1),
+ n.choose i * βiteratedFderivWithin π i f s xβ *
+ βiteratedFderivWithin π (n - i) (fderivWithin π g s) s xβ :=
+ (mul_le_mul_of_nonneg_right (B.norm_precompR_le Du)
+ (Finset.sum_nonneg' fun i => by positivity))
+ _ = _ := by
+ congr 1
+ apply Finset.sum_congr rfl fun i hi => _
+ rw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)),
+ iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
+
+ have I2 :
+ βiteratedFderivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
+ βBβ *
+ β i : β in Finset.range (n + 1),
+ n.choose i * βiteratedFderivWithin π (i + 1) f s xβ *
+ βiteratedFderivWithin π (n - i) g s xβ :=
+ calc
+ βiteratedFderivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
+ βB.precompL Duβ *
+ β i : β in Finset.range (n + 1),
+ n.choose i * βiteratedFderivWithin π i (fderivWithin π f s) s xβ *
+ βiteratedFderivWithin π (n - i) g s xβ :=
+ IH _ (hf.fderiv_within hs In) (hg.of_le (Nat.cast_le.2 (Nat.le_succ n)))
+ _ β€
+ βBβ *
+ β i : β in Finset.range (n + 1),
+ n.choose i * βiteratedFderivWithin π i (fderivWithin π f s) s xβ *
+ βiteratedFderivWithin π (n - i) g s xβ :=
+ (mul_le_mul_of_nonneg_right (B.norm_precompL_le Du)
+ (Finset.sum_nonneg' fun i => by positivity))
+ _ = _ := by
+ congr 1
+ apply Finset.sum_congr rfl fun i hi => _
+ rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
+
+ have J :
+ iteratedFderivWithin π n (fun y : Du => fderivWithin π (fun y : Du => B (f y) (g y)) s y) s
+ x =
+ iteratedFderivWithin π n
+ (fun y =>
+ B.precompR Du (f y) (fderivWithin π g s y) + B.precompL Du (fderivWithin π f s y) (g y))
+ s x :=
+ by
+ apply iteratedFderivWithin_congr hs (fun y hy => _) hx
+ have L : (1 : WithTop β) β€ n.succ := by
+ simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n
+ exact
+ B.fderiv_within_of_bilinear (hf.differentiable_on L y hy) (hg.differentiable_on L y hy)
+ (hs y hy)
+ rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map, J]
+ have A : ContDiffOn π n (fun y => B.precompR Du (f y) (fderivWithin π g s y)) s :=
+ (B.precompR Du).IsBoundedBilinearMap.ContDiff.comp_contDiff_onβ
+ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderiv_within hs In)
+ have A' : ContDiffOn π n (fun y => B.precompL Du (fderivWithin π f s y) (g y)) s :=
+ (B.precompL Du).IsBoundedBilinearMap.ContDiff.comp_contDiff_onβ (hf.fderiv_within hs In)
+ (hg.of_le (Nat.cast_le.2 (Nat.le_succ n)))
+ rw [iteratedFderivWithin_add_apply' A A' hs hx]
+ apply (norm_add_le _ _).trans ((add_le_add I1 I2).trans (le_of_eq _))
+ simp_rw [β mul_add, mul_assoc]
+ congr 1
+ exact
+ (Finset.sum_choose_succ_mul
+ (fun i j => βiteratedFderivWithin π i f s xβ * βiteratedFderivWithin π j g s xβ) n).symm
+#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_aux ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_aux
+
+/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
+iterated derivatives of `f` and `g` when `B` is bilinear:
+`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
+theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear (B : E βL[π] F βL[π] G)
+ {f : D β E} {g : D β F} {N : WithTop β} {s : Set D} {x : D} (hf : ContDiffOn π N f s)
+ (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β}
+ (hn : (n : WithTop β) β€ N) :
+ βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ β€
+ βBβ *
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
+ βiteratedFderivWithin π (n - i) g s xβ :=
+ by
+ /- We reduce the bound to the case where all spaces live in the same universe (in which we
+ already have proved the result), by using linear isometries between the spaces and their `ulift`
+ to a common universe. These linear isometries preserve the norm of the iterated derivative. -/
+ let Du : Type max uD uE uF uG := ULift.{max uE uF uG, uD} D
+ let Eu : Type max uD uE uF uG := ULift.{max uD uF uG, uE} E
+ let Fu : Type max uD uE uF uG := ULift.{max uD uE uG, uF} F
+ let Gu : Type max uD uE uF uG := ULift.{max uD uE uF, uG} G
+ have isoD : Du ββα΅’[π] D := LinearIsometryEquiv.ulift π D
+ have isoE : Eu ββα΅’[π] E := LinearIsometryEquiv.ulift π E
+ have isoF : Fu ββα΅’[π] F := LinearIsometryEquiv.ulift π F
+ have isoG : Gu ββα΅’[π] G := LinearIsometryEquiv.ulift π G
+ -- lift `f` and `g` to versions `fu` and `gu` on the lifted spaces.
+ let fu : Du β Eu := isoE.symm β f β isoD
+ let gu : Du β Fu := isoF.symm β g β isoD
+ -- lift the bilinear map `B` to a bilinear map `Bu` on the lifted spaces.
+ let Buβ : Eu βL[π] Fu βL[π] G
+ exact ((B.comp (isoE : Eu βL[π] E)).flip.comp (isoF : Fu βL[π] F)).flip
+ let Bu : Eu βL[π] Fu βL[π] Gu
+ exact
+ ContinuousLinearMap.compL π Eu (Fu βL[π] G) (Fu βL[π] Gu)
+ (ContinuousLinearMap.compL π Fu G Gu (isoG.symm : G βL[π] Gu)) Buβ
+ have Bu_eq : (fun y => Bu (fu y) (gu y)) = isoG.symm β (fun y => B (f y) (g y)) β isoD :=
+ by
+ ext1 y
+ simp only [Bu, ContinuousLinearMap.compL_apply, Function.comp_apply,
+ ContinuousLinearMap.coe_comp', LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply,
+ LinearIsometryEquiv.apply_symm_apply]
+ -- All norms are preserved by the lifting process.
+ have Bu_le : βBuβ β€ βBβ :=
+ by
+ refine' ContinuousLinearMap.op_norm_le_bound _ (norm_nonneg _) fun y => _
+ refine' ContinuousLinearMap.op_norm_le_bound _ (by positivity) fun x => _
+ simp only [Bu, ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
+ Function.comp_apply, LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply,
+ LinearIsometryEquiv.norm_map]
+ calc
+ βB (isoE y) (isoF x)β β€ βB (isoE y)β * βisoF xβ := ContinuousLinearMap.le_op_norm _ _
+ _ β€ βBβ * βisoE yβ * βisoF xβ :=
+ (mul_le_mul_of_nonneg_right (ContinuousLinearMap.le_op_norm _ _) (norm_nonneg _))
+ _ = βBβ * βyβ * βxβ := by simp only [LinearIsometryEquiv.norm_map]
+
+ let su := isoD β»ΒΉ' s
+ have hsu : UniqueDiffOn π su := isoD.to_continuous_linear_equiv.unique_diff_on_preimage_iff.2 hs
+ let xu := isoD.symm x
+ have hxu : xu β su := by
+ simpa only [Set.mem_preimage, LinearIsometryEquiv.apply_symm_apply] using hx
+ have xu_x : isoD xu = x := by simp only [LinearIsometryEquiv.apply_symm_apply]
+ have hfu : ContDiffOn π n fu su :=
+ isoE.symm.cont_diff.comp_cont_diff_on
+ ((hf.of_le hn).compContinuousLinearMap (isoD : Du βL[π] D))
+ have hgu : ContDiffOn π n gu su :=
+ isoF.symm.cont_diff.comp_cont_diff_on
+ ((hg.of_le hn).compContinuousLinearMap (isoD : Du βL[π] D))
+ have Nfu : β i, βiteratedFderivWithin π i fu su xuβ = βiteratedFderivWithin π i f s xβ :=
+ by
+ intro i
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hsu hxu]
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right _ _ hs, xu_x]
+ rwa [β xu_x] at hx
+ have Ngu : β i, βiteratedFderivWithin π i gu su xuβ = βiteratedFderivWithin π i g s xβ :=
+ by
+ intro i
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hsu hxu]
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right _ _ hs, xu_x]
+ rwa [β xu_x] at hx
+ have NBu :
+ βiteratedFderivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ =
+ βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ :=
+ by
+ rw [Bu_eq]
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left _ _ hsu hxu]
+ rw [LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right _ _ hs, xu_x]
+ rwa [β xu_x] at hx
+ -- state the bound for the lifted objects, and deduce the original bound from it.
+ have :
+ βiteratedFderivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ β€
+ βBuβ *
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderivWithin π i fu su xuβ *
+ βiteratedFderivWithin π (n - i) gu su xuβ :=
+ Bu.norm_iterated_fderiv_within_le_of_bilinear_aux hfu hgu hsu hxu
+ simp only [Nfu, Ngu, NBu] at this
+ apply this.trans (mul_le_mul_of_nonneg_right Bu_le _)
+ exact Finset.sum_nonneg' fun i => by positivity
+#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear
+
+/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
+iterated derivatives of `f` and `g` when `B` is bilinear:
+`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
+theorem ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear (B : E βL[π] F βL[π] G) {f : D β E}
+ {g : D β F} {N : WithTop β} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D) {n : β}
+ (hn : (n : WithTop β) β€ N) :
+ βiteratedFderiv π n (fun y => B (f y) (g y)) xβ β€
+ βBβ *
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ by
+ simp_rw [β iteratedFderivWithin_univ]
+ exact
+ B.norm_iterated_fderiv_within_le_of_bilinear hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ
+ (mem_univ x) hn
+#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear
+
+/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
+iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
+`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
+theorem ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_of_le_one
+ (B : E βL[π] F βL[π] G) {f : D β E} {g : D β F} {N : WithTop β} {s : Set D} {x : D}
+ (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β}
+ (hn : (n : WithTop β) β€ N) (hB : βBβ β€ 1) :
+ βiteratedFderivWithin π n (fun y => B (f y) (g y)) s xβ β€
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
+ βiteratedFderivWithin π (n - i) g s xβ :=
+ by
+ apply (B.norm_iterated_fderiv_within_le_of_bilinear hf hg hs hx hn).trans
+ apply mul_le_of_le_one_left (Finset.sum_nonneg' fun i => _) hB
+ positivity
+#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFderivWithin_le_of_bilinear_of_le_one
+
+/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
+iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
+`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
+theorem ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear_of_le_one (B : E βL[π] F βL[π] G)
+ {f : D β E} {g : D β F} {N : WithTop β} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D)
+ {n : β} (hn : (n : WithTop β) β€ N) (hB : βBβ β€ 1) :
+ βiteratedFderiv π n (fun y => B (f y) (g y)) xβ β€
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ by
+ simp_rw [β iteratedFderivWithin_univ]
+ exact
+ B.norm_iterated_fderiv_within_le_of_bilinear_of_le_one hf.cont_diff_on hg.cont_diff_on
+ uniqueDiffOn_univ (mem_univ x) hn hB
+#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFderiv_le_of_bilinear_of_le_one
+
+section
+
+variable {π' : Type _} [NormedField π'] [NormedAlgebra π π'] [NormedSpace π' F]
+ [IsScalarTower π π' F]
+
+theorem norm_iteratedFderivWithin_smul_le {f : E β π'} {g : E β F} {N : WithTop β}
+ (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s)
+ {n : β} (hn : (n : WithTop β) β€ N) :
+ βiteratedFderivWithin π n (fun y => f y β’ g y) s xβ β€
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
+ βiteratedFderivWithin π (n - i) g s xβ :=
+ (ContinuousLinearMap.lsmul π π' :
+ π' βL[π] F βL[π] F).norm_iteratedFderivWithin_le_of_bilinear_of_le_one
+ hf hg hs hx hn ContinuousLinearMap.op_norm_lsmul_le
+#align norm_iterated_fderiv_within_smul_le norm_iteratedFderivWithin_smul_le
+
+theorem norm_iteratedFderiv_smul_le {f : E β π'} {g : E β F} {N : WithTop β} (hf : ContDiff π N f)
+ (hg : ContDiff π N g) (x : E) {n : β} (hn : (n : WithTop β) β€ N) :
+ βiteratedFderiv π n (fun y => f y β’ g y) xβ β€
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ (ContinuousLinearMap.lsmul π π' : π' βL[π] F βL[π] F).norm_iteratedFderiv_le_of_bilinear_of_le_one
+ hf hg x hn ContinuousLinearMap.op_norm_lsmul_le
+#align norm_iterated_fderiv_smul_le norm_iteratedFderiv_smul_le
+
+end
+
+section
+
+variable {A : Type _} [NormedRing A] [NormedAlgebra π A]
+
+theorem norm_iteratedFderivWithin_mul_le {f : E β A} {g : E β A} {N : WithTop β}
+ (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s)
+ {n : β} (hn : (n : WithTop β) β€ N) :
+ βiteratedFderivWithin π n (fun y => f y * g y) s xβ β€
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderivWithin π i f s xβ *
+ βiteratedFderivWithin π (n - i) g s xβ :=
+ (ContinuousLinearMap.mul π A :
+ A βL[π] A βL[π] A).norm_iteratedFderivWithin_le_of_bilinear_of_le_one
+ hf hg hs hx hn (ContinuousLinearMap.op_norm_mul_le _ _)
+#align norm_iterated_fderiv_within_mul_le norm_iteratedFderivWithin_mul_le
+
+theorem norm_iteratedFderiv_mul_le {f : E β A} {g : E β A} {N : WithTop β} (hf : ContDiff π N f)
+ (hg : ContDiff π N g) (x : E) {n : β} (hn : (n : WithTop β) β€ N) :
+ βiteratedFderiv π n (fun y => f y * g y) xβ β€
+ β i in Finset.range (n + 1),
+ (n.choose i : β) * βiteratedFderiv π i f xβ * βiteratedFderiv π (n - i) g xβ :=
+ by
+ simp_rw [β iteratedFderivWithin_univ]
+ exact
+ norm_iteratedFderivWithin_mul_le hf.cont_diff_on hg.cont_diff_on uniqueDiffOn_univ (mem_univ x)
+ hn
+#align norm_iterated_fderiv_mul_le norm_iteratedFderiv_mul_le
+
+end
+
mathlib commit https://github.com/leanprover-community/mathlib/commit/b685f506164f8d17a6404048bc4d696739c5d976
@@ -1,10 +1,10 @@
/-
Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
-Authors: SΓ©bastien GouΓ«zel
+Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit dd6388c44e6f6b4547070b887c5905d5cfe6c9f8
+! leanprover-community/mathlib commit 0187644979f2d3e10a06e916a869c994facd9a87
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/dd6388c44e6f6b4547070b887c5905d5cfe6c9f8
@@ -4,153 +4,19 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel
! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 8c8c544bf24ced19b1e76c34bb3262bdae620f82
+! leanprover-community/mathlib commit dd6388c44e6f6b4547070b887c5905d5cfe6c9f8
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
+import Mathbin.Analysis.Calculus.ContDiffDef
import Mathbin.Analysis.Calculus.MeanValue
import Mathbin.Analysis.NormedSpace.FiniteDimension
-import Mathbin.Analysis.NormedSpace.Multilinear
-import Mathbin.Analysis.Calculus.FormalMultilinearSeries
-import Mathbin.Data.Enat.Basic
-import Mathbin.Tactic.Congrm
/-!
-# Higher differentiability
-
-A function is `C^1` on a domain if it is differentiable there, and its derivative is continuous.
-By induction, it is `C^n` if it is `C^{n-1}` and its (n-1)-th derivative is `C^1` there or,
-equivalently, if it is `C^1` and its derivative is `C^{n-1}`.
-Finally, it is `C^β` if it is `C^n` for all n.
-
-We formalize these notions by defining iteratively the `n+1`-th derivative of a function as the
-derivative of the `n`-th derivative. It is called `iterated_fderiv π n f x` where `π` is the
-field, `n` is the number of iterations, `f` is the function and `x` is the point, and it is given
-as an `n`-multilinear map. We also define a version `iterated_fderiv_within` relative to a domain,
-as well as predicates `cont_diff_within_at`, `cont_diff_at`, `cont_diff_on` and
-`cont_diff` saying that the function is `C^n` within a set at a point, at a point, on a set
-and on the whole space respectively.
-
-To avoid the issue of choice when choosing a derivative in sets where the derivative is not
-necessarily unique, `cont_diff_on` is not defined directly in terms of the
-regularity of the specific choice `iterated_fderiv_within π n f s` inside `s`, but in terms of the
-existence of a nice sequence of derivatives, expressed with a predicate
-`has_ftaylor_series_up_to_on`.
-
-We prove basic properties of these notions.
-
-## Main definitions and results
-Let `f : E β F` be a map between normed vector spaces over a nontrivially normed field `π`.
-
-* `has_ftaylor_series_up_to n f p`: expresses that the formal multilinear series `p` is a sequence
- of iterated derivatives of `f`, up to the `n`-th term (where `n` is a natural number or `β`).
-* `has_ftaylor_series_up_to_on n f p s`: same thing, but inside a set `s`. The notion of derivative
- is now taken inside `s`. In particular, derivatives don't have to be unique.
-* `cont_diff π n f`: expresses that `f` is `C^n`, i.e., it admits a Taylor series up to
- rank `n`.
-* `cont_diff_on π n f s`: expresses that `f` is `C^n` in `s`.
-* `cont_diff_at π n f x`: expresses that `f` is `C^n` around `x`.
-* `cont_diff_within_at π n f s x`: expresses that `f` is `C^n` around `x` within the set `s`.
-* `iterated_fderiv_within π n f s x` is an `n`-th derivative of `f` over the field `π` on the
- set `s` at the point `x`. It is a continuous multilinear map from `E^n` to `F`, defined as a
- derivative within `s` of `iterated_fderiv_within π (n-1) f s` if one exists, and `0` otherwise.
-* `iterated_fderiv π n f x` is the `n`-th derivative of `f` over the field `π` at the point `x`.
- It is a continuous multilinear map from `E^n` to `F`, defined as a derivative of
- `iterated_fderiv π (n-1) f` if one exists, and `0` otherwise.
-
-In sets of unique differentiability, `cont_diff_on π n f s` can be expressed in terms of the
-properties of `iterated_fderiv_within π m f s` for `m β€ n`. In the whole space,
-`cont_diff π n f` can be expressed in terms of the properties of `iterated_fderiv π m f`
-for `m β€ n`.
-
-We also prove that the usual operations (addition, multiplication, difference, composition, and
-so on) preserve `C^n` functions.
-
-## Implementation notes
-
-The definitions in this file are designed to work on any field `π`. They are sometimes slightly more
-complicated than the naive definitions one would guess from the intuition over the real or complex
-numbers, but they are designed to circumvent the lack of gluing properties and partitions of unity
-in general. In the usual situations, they coincide with the usual definitions.
-
-### Definition of `C^n` functions in domains
-
-One could define `C^n` functions in a domain `s` by fixing an arbitrary choice of derivatives (this
-is what we do with `iterated_fderiv_within`) and requiring that all these derivatives up to `n` are
-continuous. If the derivative is not unique, this could lead to strange behavior like two `C^n`
-functions `f` and `g` on `s` whose sum is not `C^n`. A better definition is thus to say that a
-function is `C^n` inside `s` if it admits a sequence of derivatives up to `n` inside `s`.
-
-This definition still has the problem that a function which is locally `C^n` would not need to
-be `C^n`, as different choices of sequences of derivatives around different points might possibly
-not be glued together to give a globally defined sequence of derivatives. (Note that this issue
-can not happen over reals, thanks to partition of unity, but the behavior over a general field is
-not so clear, and we want a definition for general fields). Also, there are locality
-problems for the order parameter: one could image a function which, for each `n`, has a nice
-sequence of derivatives up to order `n`, but they do not coincide for varying `n` and can therefore
-not be glued to give rise to an infinite sequence of derivatives. This would give a function
-which is `C^n` for all `n`, but not `C^β`. We solve this issue by putting locality conditions
-in space and order in our definition of `cont_diff_within_at` and `cont_diff_on`.
-The resulting definition is slightly more complicated to work with (in fact not so much), but it
-gives rise to completely satisfactory theorems.
-
-For instance, with this definition, a real function which is `C^m` (but not better) on `(-1/m, 1/m)`
-for each natural `m` is by definition `C^β` at `0`.
-
-There is another issue with the definition of `cont_diff_within_at π n f s x`. We can
-require the existence and good behavior of derivatives up to order `n` on a neighborhood of `x`
-within `s`. However, this does not imply continuity or differentiability within `s` of the function
-at `x` when `x` does not belong to `s`. Therefore, we require such existence and good behavior on
-a neighborhood of `x` within `s βͺ {x}` (which appears as `insert x s` in this file).
-
-### Side of the composition, and universe issues
-
-With a naΓ―ve direct definition, the `n`-th derivative of a function belongs to the space
-`E βL[π] (E βL[π] (E ... F)...)))` where there are n iterations of `E βL[π]`. This space
-may also be seen as the space of continuous multilinear functions on `n` copies of `E` with
-values in `F`, by uncurrying. This is the point of view that is usually adopted in textbooks,
-and that we also use. This means that the definition and the first proofs are slightly involved,
-as one has to keep track of the uncurrying operation. The uncurrying can be done from the
-left or from the right, amounting to defining the `n+1`-th derivative either as the derivative of
-the `n`-th derivative, or as the `n`-th derivative of the derivative.
-For proofs, it would be more convenient to use the latter approach (from the right),
-as it means to prove things at the `n+1`-th step we only need to understand well enough the
-derivative in `E βL[π] F` (contrary to the approach from the left, where one would need to know
-enough on the `n`-th derivative to deduce things on the `n+1`-th derivative).
-
-However, the definition from the right leads to a universe polymorphism problem: if we define
-`iterated_fderiv π (n + 1) f x = iterated_fderiv π n (fderiv π f) x` by induction, we need to
-generalize over all spaces (as `f` and `fderiv π f` don't take values in the same space). It is
-only possible to generalize over all spaces in some fixed universe in an inductive definition.
-For `f : E β F`, then `fderiv π f` is a map `E β (E βL[π] F)`. Therefore, the definition will only
-work if `F` and `E βL[π] F` are in the same universe.
-
-This issue does not appear with the definition from the left, where one does not need to generalize
-over all spaces. Therefore, we use the definition from the left. This means some proofs later on
-become a little bit more complicated: to prove that a function is `C^n`, the most efficient approach
-is to exhibit a formula for its `n`-th derivative and prove it is continuous (contrary to the
-inductive approach where one would prove smoothness statements without giving a formula for the
-derivative). In the end, this approach is still satisfactory as it is good to have formulas for the
-iterated derivatives in various constructions.
-
-One point where we depart from this explicit approach is in the proof of smoothness of a
-composition: there is a formula for the `n`-th derivative of a composition (FaΓ di Bruno's formula),
-but it is very complicated and barely usable, while the inductive proof is very simple. Thus, we
-give the inductive proof. As explained above, it works by generalizing over the target space, hence
-it only works well if all spaces belong to the same universe. To get the general version, we lift
-things to a common universe using a trick.
-
-### Variables management
-
-The textbook definitions and proofs use various identifications and abuse of notations, for instance
-when saying that the natural space in which the derivative lives, i.e.,
-`E βL[π] (E βL[π] ( ... βL[π] F))`, is the same as a space of multilinear maps. When doing things
-formally, we need to provide explicit maps for these identifications, and chase some diagrams to see
-everything is compatible with the identifications. In particular, one needs to check that taking the
-derivative and then doing the identification, or first doing the identification and then taking the
-derivative, gives the same result. The key point for this is that taking the derivative commutes
-with continuous linear equivalences. Therefore, we need to implement all our identifications with
-continuous linear equivs.
+# Higher differentiability of usual operations
+
+We prove that the usual operations (addition, multiplication, difference, composition, and
+so on) preserve `C^n` functions. We also expand the API aound `C^n` functions.
## Notations
@@ -172,7 +38,7 @@ open Classical BigOperators NNReal
-- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
-universe u v w
+universe u v w uE uF uG
attribute [local instance]
NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid
@@ -181,1565 +47,11 @@ open Set Fin Filter Function
open Topology
-variable {π : Type _} [NontriviallyNormedField π] {E : Type _} [NormedAddCommGroup E]
- [NormedSpace π E] {F : Type _} [NormedAddCommGroup F] [NormedSpace π F] {G : Type _}
+variable {π : Type _} [NontriviallyNormedField π] {E : Type uE} [NormedAddCommGroup E]
+ [NormedSpace π E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace π F] {G : Type uG}
[NormedAddCommGroup G] [NormedSpace π G] {X : Type _} [NormedAddCommGroup X] [NormedSpace π X]
{s sβ t u : Set E} {f fβ : E β F} {g : F β G} {x xβ : E} {c : F} {b : E Γ F β G} {m n : ββ}
-
-/-! ### Functions with a Taylor series on a domain -/
-
-
-variable {p : E β FormalMultilinearSeries π E F}
-
-/-- `has_ftaylor_series_up_to_on n f p s` registers the fact that `p 0 = f` and `p (m+1)` is a
-derivative of `p m` for `m < n`, and is continuous for `m β€ n`. This is a predicate analogous to
-`has_fderiv_within_at` but for higher order derivatives. -/
-structure HasFtaylorSeriesUpToOn (n : ββ) (f : E β F) (p : E β FormalMultilinearSeries π E F)
- (s : Set E) : Prop where
- zero_eq : β x β s, (p x 0).uncurry0 = f x
- fderivWithin :
- β (m : β) (hm : (m : ββ) < n),
- β x β s, HasFderivWithinAt (fun y => p y m) (p x m.succ).curryLeft s x
- cont : β (m : β) (hm : (m : ββ) β€ n), ContinuousOn (fun x => p x m) s
-#align has_ftaylor_series_up_to_on HasFtaylorSeriesUpToOn
-
-theorem HasFtaylorSeriesUpToOn.zero_eq' (h : HasFtaylorSeriesUpToOn n f p s) {x : E} (hx : x β s) :
- p x 0 = (continuousMultilinearCurryFin0 π E F).symm (f x) :=
- by
- rw [β h.zero_eq x hx]
- symm
- exact ContinuousMultilinearMap.uncurry0_curry0 _
-#align has_ftaylor_series_up_to_on.zero_eq' HasFtaylorSeriesUpToOn.zero_eq'
-
-/-- If two functions coincide on a set `s`, then a Taylor series for the first one is as well a
-Taylor series for the second one. -/
-theorem HasFtaylorSeriesUpToOn.congr (h : HasFtaylorSeriesUpToOn n f p s)
- (hβ : β x β s, fβ x = f x) : HasFtaylorSeriesUpToOn n fβ p s :=
- by
- refine' β¨fun x hx => _, h.fderiv_within, h.contβ©
- rw [hβ x hx]
- exact h.zero_eq x hx
-#align has_ftaylor_series_up_to_on.congr HasFtaylorSeriesUpToOn.congr
-
-theorem HasFtaylorSeriesUpToOn.mono (h : HasFtaylorSeriesUpToOn n f p s) {t : Set E} (hst : t β s) :
- HasFtaylorSeriesUpToOn n f p t :=
- β¨fun x hx => h.zero_eq x (hst hx), fun m hm x hx => (h.fderivWithin m hm x (hst hx)).mono hst,
- fun m hm => (h.cont m hm).mono hstβ©
-#align has_ftaylor_series_up_to_on.mono HasFtaylorSeriesUpToOn.mono
-
-theorem HasFtaylorSeriesUpToOn.ofLe (h : HasFtaylorSeriesUpToOn n f p s) (hmn : m β€ n) :
- HasFtaylorSeriesUpToOn m f p s :=
- β¨h.zero_eq, fun k hk x hx => h.fderivWithin k (lt_of_lt_of_le hk hmn) x hx, fun k hk =>
- h.cont k (le_trans hk hmn)β©
-#align has_ftaylor_series_up_to_on.of_le HasFtaylorSeriesUpToOn.ofLe
-
-theorem HasFtaylorSeriesUpToOn.continuousOn (h : HasFtaylorSeriesUpToOn n f p s) :
- ContinuousOn f s :=
- by
- have := (h.cont 0 bot_le).congr fun x hx => (h.zero_eq' hx).symm
- rwa [LinearIsometryEquiv.comp_continuousOn_iff] at this
-#align has_ftaylor_series_up_to_on.continuous_on HasFtaylorSeriesUpToOn.continuousOn
-
-theorem hasFtaylorSeriesUpToOn_zero_iff :
- HasFtaylorSeriesUpToOn 0 f p s β ContinuousOn f s β§ β x β s, (p x 0).uncurry0 = f x :=
- by
- refine'
- β¨fun H => β¨H.ContinuousOn, H.zero_eqβ©, fun H =>
- β¨H.2, fun m hm => False.elim (not_le.2 hm bot_le), _β©β©
- intro m hm
- obtain rfl : m = 0 := by exact_mod_cast hm.antisymm (zero_le _)
- have : β x β s, p x 0 = (continuousMultilinearCurryFin0 π E F).symm (f x) :=
- by
- intro x hx
- rw [β H.2 x hx]
- symm
- exact ContinuousMultilinearMap.uncurry0_curry0 _
- rw [continuousOn_congr this, LinearIsometryEquiv.comp_continuousOn_iff]
- exact H.1
-#align has_ftaylor_series_up_to_on_zero_iff hasFtaylorSeriesUpToOn_zero_iff
-
-theorem hasFtaylorSeriesUpToOn_top_iff :
- HasFtaylorSeriesUpToOn β f p s β β n : β, HasFtaylorSeriesUpToOn n f p s :=
- by
- constructor
- Β· intro H n
- exact H.of_le le_top
- Β· intro H
- constructor
- Β· exact (H 0).zero_eq
- Β· intro m hm
- apply (H m.succ).fderivWithin m (WithTop.coe_lt_coe.2 (lt_add_one m))
- Β· intro m hm
- apply (H m).cont m le_rfl
-#align has_ftaylor_series_up_to_on_top_iff hasFtaylorSeriesUpToOn_top_iff
-
-/-- If a function has a Taylor series at order at least `1`, then the term of order `1` of this
-series is a derivative of `f`. -/
-theorem HasFtaylorSeriesUpToOn.hasFderivWithinAt (h : HasFtaylorSeriesUpToOn n f p s) (hn : 1 β€ n)
- (hx : x β s) : HasFderivWithinAt f (continuousMultilinearCurryFin1 π E F (p x 1)) s x :=
- by
- have A : β y β s, f y = (continuousMultilinearCurryFin0 π E F) (p y 0) :=
- by
- intro y hy
- rw [β h.zero_eq y hy]
- rfl
- suffices H :
- HasFderivWithinAt (fun y => continuousMultilinearCurryFin0 π E F (p y 0))
- (continuousMultilinearCurryFin1 π E F (p x 1)) s x
- Β· exact H.congr A (A x hx)
- rw [LinearIsometryEquiv.comp_hasFderivWithinAt_iff']
- have : ((0 : β) : ββ) < n := lt_of_lt_of_le (WithTop.coe_lt_coe.2 Nat.zero_lt_one) hn
- convert h.fderiv_within _ this x hx
- ext (y v)
- change (p x 1) (snoc 0 y) = (p x 1) (cons y v)
- unfold_coes
- congr with i
- rw [Unique.eq_default i]
- rfl
-#align has_ftaylor_series_up_to_on.has_fderiv_within_at HasFtaylorSeriesUpToOn.hasFderivWithinAt
-
-theorem HasFtaylorSeriesUpToOn.differentiableOn (h : HasFtaylorSeriesUpToOn n f p s) (hn : 1 β€ n) :
- DifferentiableOn π f s := fun x hx => (h.HasFderivWithinAt hn hx).DifferentiableWithinAt
-#align has_ftaylor_series_up_to_on.differentiable_on HasFtaylorSeriesUpToOn.differentiableOn
-
-/-- If a function has a Taylor series at order at least `1` on a neighborhood of `x`, then the term
-of order `1` of this series is a derivative of `f` at `x`. -/
-theorem HasFtaylorSeriesUpToOn.hasFderivAt (h : HasFtaylorSeriesUpToOn n f p s) (hn : 1 β€ n)
- (hx : s β π x) : HasFderivAt f (continuousMultilinearCurryFin1 π E F (p x 1)) x :=
- (h.HasFderivWithinAt hn (mem_of_mem_nhds hx)).HasFderivAt hx
-#align has_ftaylor_series_up_to_on.has_fderiv_at HasFtaylorSeriesUpToOn.hasFderivAt
-
-/-- If a function has a Taylor series at order at least `1` on a neighborhood of `x`, then
-in a neighborhood of `x`, the term of order `1` of this series is a derivative of `f`. -/
-theorem HasFtaylorSeriesUpToOn.eventually_hasFderivAt (h : HasFtaylorSeriesUpToOn n f p s)
- (hn : 1 β€ n) (hx : s β π x) :
- βαΆ y in π x, HasFderivAt f (continuousMultilinearCurryFin1 π E F (p y 1)) y :=
- (eventually_eventually_nhds.2 hx).mono fun y hy => h.HasFderivAt hn hy
-#align has_ftaylor_series_up_to_on.eventually_has_fderiv_at HasFtaylorSeriesUpToOn.eventually_hasFderivAt
-
-/-- If a function has a Taylor series at order at least `1` on a neighborhood of `x`, then
-it is differentiable at `x`. -/
-theorem HasFtaylorSeriesUpToOn.differentiableAt (h : HasFtaylorSeriesUpToOn n f p s) (hn : 1 β€ n)
- (hx : s β π x) : DifferentiableAt π f x :=
- (h.HasFderivAt hn hx).DifferentiableAt
-#align has_ftaylor_series_up_to_on.differentiable_at HasFtaylorSeriesUpToOn.differentiableAt
-
-/-- `p` is a Taylor series of `f` up to `n+1` if and only if `p` is a Taylor series up to `n`, and
-`p (n + 1)` is a derivative of `p n`. -/
-theorem hasFtaylorSeriesUpToOn_succ_iff_left {n : β} :
- HasFtaylorSeriesUpToOn (n + 1) f p s β
- HasFtaylorSeriesUpToOn n f p s β§
- (β x β s, HasFderivWithinAt (fun y => p y n) (p x n.succ).curryLeft s x) β§
- ContinuousOn (fun x => p x (n + 1)) s :=
- by
- constructor
- Β· intro h
- exact
- β¨h.of_le (WithTop.coe_le_coe.2 (Nat.le_succ n)),
- h.fderiv_within _ (WithTop.coe_lt_coe.2 (lt_add_one n)), h.cont (n + 1) le_rflβ©
- Β· intro h
- constructor
- Β· exact h.1.zero_eq
- Β· intro m hm
- by_cases h' : m < n
- Β· exact h.1.fderivWithin m (WithTop.coe_lt_coe.2 h')
- Β· have : m = n := Nat.eq_of_lt_succ_of_not_lt (WithTop.coe_lt_coe.1 hm) h'
- rw [this]
- exact h.2.1
- Β· intro m hm
- by_cases h' : m β€ n
- Β· apply h.1.cont m (WithTop.coe_le_coe.2 h')
- Β· have : m = n + 1 := le_antisymm (WithTop.coe_le_coe.1 hm) (not_le.1 h')
- rw [this]
- exact h.2.2
-#align has_ftaylor_series_up_to_on_succ_iff_left hasFtaylorSeriesUpToOn_succ_iff_left
-
-/-- `p` is a Taylor series of `f` up to `n+1` if and only if `p.shift` is a Taylor series up to `n`
-for `p 1`, which is a derivative of `f`. -/
-theorem hasFtaylorSeriesUpToOn_succ_iff_right {n : β} :
- HasFtaylorSeriesUpToOn (n + 1 : β) f p s β
- (β x β s, (p x 0).uncurry0 = f x) β§
- (β x β s, HasFderivWithinAt (fun y => p y 0) (p x 1).curryLeft s x) β§
- HasFtaylorSeriesUpToOn n (fun x => continuousMultilinearCurryFin1 π E F (p x 1))
- (fun x => (p x).shift) s :=
- by
- constructor
- Β· intro H
- refine' β¨H.zero_eq, H.fderiv_within 0 (WithTop.coe_lt_coe.2 (Nat.succ_pos n)), _β©
- constructor
- Β· intro x hx
- rfl
- Β· intro m(hm : (m : ββ) < n)x(hx : x β s)
- have A : (m.succ : ββ) < n.succ :=
- by
- rw [WithTop.coe_lt_coe] at hmβ’
- exact nat.lt_succ_iff.mpr hm
- change
- HasFderivWithinAt
- ((continuousMultilinearCurryRightEquiv' π m E F).symm β fun y : E => p y m.succ)
- (p x m.succ.succ).curryRight.curryLeft s x
- rw [LinearIsometryEquiv.comp_hasFderivWithinAt_iff']
- convert H.fderiv_within _ A x hx
- ext (y v)
- change
- (p x m.succ.succ) (snoc (cons y (init v)) (v (last _))) =
- (p x (Nat.succ (Nat.succ m))) (cons y v)
- rw [β cons_snoc_eq_snoc_cons, snoc_init_self]
- Β· intro m(hm : (m : ββ) β€ n)
- have A : (m.succ : ββ) β€ n.succ :=
- by
- rw [WithTop.coe_le_coe] at hmβ’
- exact nat.pred_le_iff.mp hm
- change
- ContinuousOn
- ((continuousMultilinearCurryRightEquiv' π m E F).symm β fun y : E => p y m.succ) s
- rw [LinearIsometryEquiv.comp_continuousOn_iff]
- exact H.cont _ A
- Β· rintro β¨Hzero_eq, Hfderiv_zero, Htaylorβ©
- constructor
- Β· exact Hzero_eq
- Β· intro m(hm : (m : ββ) < n.succ)x(hx : x β s)
- cases m
- Β· exact Hfderiv_zero x hx
- Β· have A : (m : ββ) < n := by
- rw [WithTop.coe_lt_coe] at hmβ’
- exact Nat.lt_of_succ_lt_succ hm
- have :
- HasFderivWithinAt
- ((continuousMultilinearCurryRightEquiv' π m E F).symm β fun y : E => p y m.succ)
- ((p x).shift m.succ).curryLeft s x :=
- Htaylor.fderiv_within _ A x hx
- rw [LinearIsometryEquiv.comp_hasFderivWithinAt_iff'] at this
- convert this
- ext (y v)
- change
- (p x (Nat.succ (Nat.succ m))) (cons y v) =
- (p x m.succ.succ) (snoc (cons y (init v)) (v (last _)))
- rw [β cons_snoc_eq_snoc_cons, snoc_init_self]
- Β· intro m(hm : (m : ββ) β€ n.succ)
- cases m
- Β· have : DifferentiableOn π (fun x => p x 0) s := fun x hx =>
- (Hfderiv_zero x hx).DifferentiableWithinAt
- exact this.continuous_on
- Β· have A : (m : ββ) β€ n := by
- rw [WithTop.coe_le_coe] at hmβ’
- exact nat.lt_succ_iff.mp hm
- have :
- ContinuousOn
- ((continuousMultilinearCurryRightEquiv' π m E F).symm β fun y : E => p y m.succ) s :=
- Htaylor.cont _ A
- rwa [LinearIsometryEquiv.comp_continuousOn_iff] at this
-#align has_ftaylor_series_up_to_on_succ_iff_right hasFtaylorSeriesUpToOn_succ_iff_right
-
-/-! ### Smooth functions within a set around a point -/
-
-
-variable (π)
-
-/-- A function is continuously differentiable up to order `n` within a set `s` at a point `x` if
-it admits continuous derivatives up to order `n` in a neighborhood of `x` in `s βͺ {x}`.
-For `n = β`, we only require that this holds up to any finite order (where the neighborhood may
-depend on the finite order we consider).
-
-For instance, a real function which is `C^m` on `(-1/m, 1/m)` for each natural `m`, but not
-better, is `C^β` at `0` within `univ`.
--/
-def ContDiffWithinAt (n : ββ) (f : E β F) (s : Set E) (x : E) : Prop :=
- β m : β,
- (m : ββ) β€ n β
- β u β π[insert x s] x, β p : E β FormalMultilinearSeries π E F, HasFtaylorSeriesUpToOn m f p u
-#align cont_diff_within_at ContDiffWithinAt
-
-variable {π}
-
-theorem contDiffWithinAt_nat {n : β} :
- ContDiffWithinAt π n f s x β
- β u β π[insert x s] x,
- β p : E β FormalMultilinearSeries π E F, HasFtaylorSeriesUpToOn n f p u :=
- β¨fun H => H n le_rfl, fun β¨u, hu, p, hpβ© m hm => β¨u, hu, p, hp.of_le hmβ©β©
-#align cont_diff_within_at_nat contDiffWithinAt_nat
-
-theorem ContDiffWithinAt.of_le (h : ContDiffWithinAt π n f s x) (hmn : m β€ n) :
- ContDiffWithinAt π m f s x := fun k hk => h k (le_trans hk hmn)
-#align cont_diff_within_at.of_le ContDiffWithinAt.of_le
-
-theorem contDiffWithinAt_iff_forall_nat_le :
- ContDiffWithinAt π n f s x β β m : β, βm β€ n β ContDiffWithinAt π m f s x :=
- β¨fun H m hm => H.of_le hm, fun H m hm => H m hm _ le_rflβ©
-#align cont_diff_within_at_iff_forall_nat_le contDiffWithinAt_iff_forall_nat_le
-
-theorem contDiffWithinAt_top : ContDiffWithinAt π β f s x β β n : β, ContDiffWithinAt π n f s x :=
- contDiffWithinAt_iff_forall_nat_le.trans <| by simp only [forall_prop_of_true, le_top]
-#align cont_diff_within_at_top contDiffWithinAt_top
-
-theorem ContDiffWithinAt.continuousWithinAt (h : ContDiffWithinAt π n f s x) :
- ContinuousWithinAt f s x :=
- by
- rcases h 0 bot_le with β¨u, hu, p, Hβ©
- rw [mem_nhdsWithin_insert] at hu
- exact (H.continuous_on.continuous_within_at hu.1).mono_of_mem hu.2
-#align cont_diff_within_at.continuous_within_at ContDiffWithinAt.continuousWithinAt
-
-theorem ContDiffWithinAt.congr_of_eventuallyEq (h : ContDiffWithinAt π n f s x)
- (hβ : fβ =αΆ [π[s] x] f) (hx : fβ x = f x) : ContDiffWithinAt π n fβ s x := fun m hm =>
- let β¨u, hu, p, Hβ© := h m hm
- β¨{ x β u | fβ x = f x }, Filter.inter_mem hu (mem_nhdsWithin_insert.2 β¨hx, hββ©), p,
- (H.mono (sep_subset _ _)).congr fun _ => And.rightβ©
-#align cont_diff_within_at.congr_of_eventually_eq ContDiffWithinAt.congr_of_eventuallyEq
-
-theorem ContDiffWithinAt.congr_of_eventuallyEq_insert (h : ContDiffWithinAt π n f s x)
- (hβ : fβ =αΆ [π[insert x s] x] f) : ContDiffWithinAt π n fβ s x :=
- h.congr_of_eventuallyEq (nhdsWithin_mono x (subset_insert x s) hβ)
- (mem_of_mem_nhdsWithin (mem_insert x s) hβ : _)
-#align cont_diff_within_at.congr_of_eventually_eq_insert ContDiffWithinAt.congr_of_eventuallyEq_insert
-
-theorem ContDiffWithinAt.congr_of_eventually_eq' (h : ContDiffWithinAt π n f s x)
- (hβ : fβ =αΆ [π[s] x] f) (hx : x β s) : ContDiffWithinAt π n fβ s x :=
- h.congr_of_eventuallyEq hβ <| hβ.self_of_nhdsWithin hx
-#align cont_diff_within_at.congr_of_eventually_eq' ContDiffWithinAt.congr_of_eventually_eq'
-
-theorem Filter.EventuallyEq.contDiffWithinAt_iff (hβ : fβ =αΆ [π[s] x] f) (hx : fβ x = f x) :
- ContDiffWithinAt π n fβ s x β ContDiffWithinAt π n f s x :=
- β¨fun H => ContDiffWithinAt.congr_of_eventuallyEq H hβ.symm hx.symm, fun H =>
- H.congr_of_eventuallyEq hβ hxβ©
-#align filter.eventually_eq.cont_diff_within_at_iff Filter.EventuallyEq.contDiffWithinAt_iff
-
-theorem ContDiffWithinAt.congr (h : ContDiffWithinAt π n f s x) (hβ : β y β s, fβ y = f y)
- (hx : fβ x = f x) : ContDiffWithinAt π n fβ s x :=
- h.congr_of_eventuallyEq (Filter.eventuallyEq_of_mem self_mem_nhdsWithin hβ) hx
-#align cont_diff_within_at.congr ContDiffWithinAt.congr
-
-theorem ContDiffWithinAt.congr' (h : ContDiffWithinAt π n f s x) (hβ : β y β s, fβ y = f y)
- (hx : x β s) : ContDiffWithinAt π n fβ s x :=
- h.congr hβ (hβ _ hx)
-#align cont_diff_within_at.congr' ContDiffWithinAt.congr'
-
-theorem ContDiffWithinAt.mono_of_mem (h : ContDiffWithinAt π n f s x) {t : Set E}
- (hst : s β π[t] x) : ContDiffWithinAt π n f t x :=
- by
- intro m hm
- rcases h m hm with β¨u, hu, p, Hβ©
- exact β¨u, nhdsWithin_le_of_mem (insert_mem_nhdsWithin_insert hst) hu, p, Hβ©
-#align cont_diff_within_at.mono_of_mem ContDiffWithinAt.mono_of_mem
-
-theorem ContDiffWithinAt.mono (h : ContDiffWithinAt π n f s x) {t : Set E} (hst : t β s) :
- ContDiffWithinAt π n f t x :=
- h.mono_of_mem <| Filter.mem_of_superset self_mem_nhdsWithin hst
-#align cont_diff_within_at.mono ContDiffWithinAt.mono
-
-theorem ContDiffWithinAt.congr_nhds (h : ContDiffWithinAt π n f s x) {t : Set E}
- (hst : π[s] x = π[t] x) : ContDiffWithinAt π n f t x :=
- h.mono_of_mem <| hst βΈ self_mem_nhdsWithin
-#align cont_diff_within_at.congr_nhds ContDiffWithinAt.congr_nhds
-
-theorem contDiffWithinAt_congr_nhds {t : Set E} (hst : π[s] x = π[t] x) :
- ContDiffWithinAt π n f s x β ContDiffWithinAt π n f t x :=
- β¨fun h => h.congr_nhds hst, fun h => h.congr_nhds hst.symmβ©
-#align cont_diff_within_at_congr_nhds contDiffWithinAt_congr_nhds
-
-theorem contDiffWithinAt_inter' (h : t β π[s] x) :
- ContDiffWithinAt π n f (s β© t) x β ContDiffWithinAt π n f s x :=
- contDiffWithinAt_congr_nhds <| Eq.symm <| nhdsWithin_restrict'' _ h
-#align cont_diff_within_at_inter' contDiffWithinAt_inter'
-
-theorem contDiffWithinAt_inter (h : t β π x) :
- ContDiffWithinAt π n f (s β© t) x β ContDiffWithinAt π n f s x :=
- contDiffWithinAt_inter' (mem_nhdsWithin_of_mem_nhds h)
-#align cont_diff_within_at_inter contDiffWithinAt_inter
-
-theorem contDiffWithinAt_insert {y : E} :
- ContDiffWithinAt π n f (insert y s) x β ContDiffWithinAt π n f s x :=
- by
- simp_rw [ContDiffWithinAt]
- rcases eq_or_ne x y with (rfl | h)
- Β· simp_rw [insert_eq_of_mem (mem_insert _ _)]
- simp_rw [insert_comm x y, nhdsWithin_insert_of_ne h]
-#align cont_diff_within_at_insert contDiffWithinAt_insert
-
-alias contDiffWithinAt_insert β ContDiffWithinAt.of_insert ContDiffWithinAt.insert'
-#align cont_diff_within_at.of_insert ContDiffWithinAt.of_insert
-#align cont_diff_within_at.insert' ContDiffWithinAt.insert'
-
-theorem ContDiffWithinAt.insert (h : ContDiffWithinAt π n f s x) :
- ContDiffWithinAt π n f (insert x s) x :=
- h.insert'
-#align cont_diff_within_at.insert ContDiffWithinAt.insert
-
-/-- If a function is `C^n` within a set at a point, with `n β₯ 1`, then it is differentiable
-within this set at this point. -/
-theorem ContDiffWithinAt.differentiable_within_at' (h : ContDiffWithinAt π n f s x) (hn : 1 β€ n) :
- DifferentiableWithinAt π f (insert x s) x :=
- by
- rcases h 1 hn with β¨u, hu, p, Hβ©
- rcases mem_nhdsWithin.1 hu with β¨t, t_open, xt, tuβ©
- rw [inter_comm] at tu
- have := ((H.mono tu).DifferentiableOn le_rfl) x β¨mem_insert x s, xtβ©
- exact (differentiableWithinAt_inter (IsOpen.mem_nhds t_open xt)).1 this
-#align cont_diff_within_at.differentiable_within_at' ContDiffWithinAt.differentiable_within_at'
-
-theorem ContDiffWithinAt.differentiableWithinAt (h : ContDiffWithinAt π n f s x) (hn : 1 β€ n) :
- DifferentiableWithinAt π f s x :=
- (h.differentiable_within_at' hn).mono (subset_insert x s)
-#align cont_diff_within_at.differentiable_within_at ContDiffWithinAt.differentiableWithinAt
-
-/-- A function is `C^(n + 1)` on a domain iff locally, it has a derivative which is `C^n`. -/
-theorem contDiffWithinAt_succ_iff_hasFderivWithinAt {n : β} :
- ContDiffWithinAt π (n + 1 : β) f s x β
- β u β π[insert x s] x,
- β f' : E β E βL[π] F,
- (β x β u, HasFderivWithinAt f (f' x) u x) β§ ContDiffWithinAt π n f' u x :=
- by
- constructor
- Β· intro h
- rcases h n.succ le_rfl with β¨u, hu, p, Hpβ©
- refine'
- β¨u, hu, fun y => (continuousMultilinearCurryFin1 π E F) (p y 1), fun y hy =>
- Hp.has_fderiv_within_at (WithTop.coe_le_coe.2 (Nat.le_add_left 1 n)) hy, _β©
- intro m hm
- refine' β¨u, _, fun y : E => (p y).shift, _β©
- Β· convert self_mem_nhdsWithin
- have : x β insert x s := by simp
- exact insert_eq_of_mem (mem_of_mem_nhdsWithin this hu)
- Β· rw [hasFtaylorSeriesUpToOn_succ_iff_right] at Hp
- exact Hp.2.2.of_le hm
- Β· rintro β¨u, hu, f', f'_eq_deriv, Hf'β©
- rw [contDiffWithinAt_nat]
- rcases Hf' n le_rfl with β¨v, hv, p', Hp'β©
- refine' β¨v β© u, _, fun x => (p' x).unshift (f x), _β©
- Β· apply Filter.inter_mem _ hu
- apply nhdsWithin_le_of_mem hu
- exact nhdsWithin_mono _ (subset_insert x u) hv
- Β· rw [hasFtaylorSeriesUpToOn_succ_iff_right]
- refine' β¨fun y hy => rfl, fun y hy => _, _β©
- Β· change
- HasFderivWithinAt (fun z => (continuousMultilinearCurryFin0 π E F).symm (f z))
- (FormalMultilinearSeries.unshift (p' y) (f y) 1).curryLeft (v β© u) y
- rw [LinearIsometryEquiv.comp_hasFderivWithinAt_iff']
- convert(f'_eq_deriv y hy.2).mono (inter_subset_right v u)
- rw [β Hp'.zero_eq y hy.1]
- ext z
- change
- ((p' y 0) (init (@cons 0 (fun i => E) z 0))) (@cons 0 (fun i => E) z 0 (last 0)) =
- ((p' y 0) 0) z
- unfold_coes
- congr
- Β· convert(Hp'.mono (inter_subset_left v u)).congr fun x hx => Hp'.zero_eq x hx.1
- Β· ext (x y)
- change p' x 0 (init (@snoc 0 (fun i : Fin 1 => E) 0 y)) y = p' x 0 0 y
- rw [init_snoc]
- Β· ext (x k v y)
- change
- p' x k (init (@snoc k (fun i : Fin k.succ => E) v y))
- (@snoc k (fun i : Fin k.succ => E) v y (last k)) =
- p' x k v y
- rw [snoc_last, init_snoc]
-#align cont_diff_within_at_succ_iff_has_fderiv_within_at contDiffWithinAt_succ_iff_hasFderivWithinAt
-
-/-- A version of `cont_diff_within_at_succ_iff_has_fderiv_within_at` where all derivatives
- are taken within the same set. -/
-theorem contDiffWithinAt_succ_iff_has_fderiv_within_at' {n : β} :
- ContDiffWithinAt π (n + 1 : β) f s x β
- β u β π[insert x s] x,
- u β insert x s β§
- β f' : E β E βL[π] F,
- (β x β u, HasFderivWithinAt f (f' x) s x) β§ ContDiffWithinAt π n f' s x :=
- by
- refine' β¨fun hf => _, _β©
- Β· obtain β¨u, hu, f', huf', hf'β© := cont_diff_within_at_succ_iff_has_fderiv_within_at.mp hf
- obtain β¨w, hw, hxw, hwuβ© := mem_nhds_within.mp hu
- rw [inter_comm] at hwu
- refine'
- β¨insert x s β© w, inter_mem_nhdsWithin _ (hw.mem_nhds hxw), inter_subset_left _ _, f',
- fun y hy => _, _β©
- Β· refine' ((huf' y <| hwu hy).mono hwu).mono_of_mem _
- refine' mem_of_superset _ (inter_subset_inter_left _ (subset_insert _ _))
- refine' inter_mem_nhdsWithin _ (hw.mem_nhds hy.2)
- Β· exact hf'.mono_of_mem (nhdsWithin_mono _ (subset_insert _ _) hu)
- Β· rw [β contDiffWithinAt_insert, contDiffWithinAt_succ_iff_hasFderivWithinAt,
- insert_eq_of_mem (mem_insert _ _)]
- rintro β¨u, hu, hus, f', huf', hf'β©
- refine' β¨u, hu, f', fun y hy => (huf' y hy).insert'.mono hus, hf'.insert.mono husβ©
-#align cont_diff_within_at_succ_iff_has_fderiv_within_at' contDiffWithinAt_succ_iff_has_fderiv_within_at'
-
-/-! ### Smooth functions within a set -/
-
-
-variable (π)
-
-/-- A function is continuously differentiable up to `n` on `s` if, for any point `x` in `s`, it
-admits continuous derivatives up to order `n` on a neighborhood of `x` in `s`.
-
-For `n = β`, we only require that this holds up to any finite order (where the neighborhood may
-depend on the finite order we consider).
--/
-def ContDiffOn (n : ββ) (f : E β F) (s : Set E) : Prop :=
- β x β s, ContDiffWithinAt π n f s x
-#align cont_diff_on ContDiffOn
-
-variable {π}
-
-theorem ContDiffOn.contDiffWithinAt (h : ContDiffOn π n f s) (hx : x β s) :
- ContDiffWithinAt π n f s x :=
- h x hx
-#align cont_diff_on.cont_diff_within_at ContDiffOn.contDiffWithinAt
-
-theorem ContDiffWithinAt.contDiffOn {m : β} (hm : (m : ββ) β€ n) (h : ContDiffWithinAt π n f s x) :
- β u β π[insert x s] x, u β insert x s β§ ContDiffOn π m f u :=
- by
- rcases h m hm with β¨u, u_nhd, p, hpβ©
- refine' β¨u β© insert x s, Filter.inter_mem u_nhd self_mem_nhdsWithin, inter_subset_right _ _, _β©
- intro y hy m' hm'
- refine' β¨u β© insert x s, _, p, (hp.mono (inter_subset_left _ _)).of_le hm'β©
- convert self_mem_nhdsWithin
- exact insert_eq_of_mem hy
-#align cont_diff_within_at.cont_diff_on ContDiffWithinAt.contDiffOn
-
-protected theorem ContDiffWithinAt.eventually {n : β} (h : ContDiffWithinAt π n f s x) :
- βαΆ y in π[insert x s] x, ContDiffWithinAt π n f s y :=
- by
- rcases h.cont_diff_on le_rfl with β¨u, hu, hu_sub, hdβ©
- have : βαΆ y : E in π[insert x s] x, u β π[insert x s] y β§ y β u :=
- (eventually_nhdsWithin_nhdsWithin.2 hu).And hu
- refine' this.mono fun y hy => (hd y hy.2).mono_of_mem _
- exact nhdsWithin_mono y (subset_insert _ _) hy.1
-#align cont_diff_within_at.eventually ContDiffWithinAt.eventually
-
-theorem ContDiffOn.of_le (h : ContDiffOn π n f s) (hmn : m β€ n) : ContDiffOn π m f s := fun x hx =>
- (h x hx).of_le hmn
-#align cont_diff_on.of_le ContDiffOn.of_le
-
-theorem ContDiffOn.of_succ {n : β} (h : ContDiffOn π (n + 1) f s) : ContDiffOn π n f s :=
- h.of_le <| WithTop.coe_le_coe.mpr le_self_add
-#align cont_diff_on.of_succ ContDiffOn.of_succ
-
-theorem ContDiffOn.one_of_succ {n : β} (h : ContDiffOn π (n + 1) f s) : ContDiffOn π 1 f s :=
- h.of_le <| WithTop.coe_le_coe.mpr le_add_self
-#align cont_diff_on.one_of_succ ContDiffOn.one_of_succ
-
-theorem contDiffOn_iff_forall_nat_le : ContDiffOn π n f s β β m : β, βm β€ n β ContDiffOn π m f s :=
- β¨fun H m hm => H.of_le hm, fun H x hx m hm => H m hm x hx m le_rflβ©
-#align cont_diff_on_iff_forall_nat_le contDiffOn_iff_forall_nat_le
-
-theorem contDiffOn_top : ContDiffOn π β f s β β n : β, ContDiffOn π n f s :=
- contDiffOn_iff_forall_nat_le.trans <| by simp only [le_top, forall_prop_of_true]
-#align cont_diff_on_top contDiffOn_top
-
-theorem contDiffOn_all_iff_nat : (β n, ContDiffOn π n f s) β β n : β, ContDiffOn π n f s :=
- by
- refine' β¨fun H n => H n, _β©
- rintro H (_ | n)
- exacts[contDiffOn_top.2 H, H n]
-#align cont_diff_on_all_iff_nat contDiffOn_all_iff_nat
-
-theorem ContDiffOn.continuousOn (h : ContDiffOn π n f s) : ContinuousOn f s := fun x hx =>
- (h x hx).ContinuousWithinAt
-#align cont_diff_on.continuous_on ContDiffOn.continuousOn
-
-theorem ContDiffOn.congr (h : ContDiffOn π n f s) (hβ : β x β s, fβ x = f x) :
- ContDiffOn π n fβ s := fun x hx => (h x hx).congr hβ (hβ x hx)
-#align cont_diff_on.congr ContDiffOn.congr
-
-theorem contDiffOn_congr (hβ : β x β s, fβ x = f x) : ContDiffOn π n fβ s β ContDiffOn π n f s :=
- β¨fun H => H.congr fun x hx => (hβ x hx).symm, fun H => H.congr hββ©
-#align cont_diff_on_congr contDiffOn_congr
-
-theorem ContDiffOn.mono (h : ContDiffOn π n f s) {t : Set E} (hst : t β s) : ContDiffOn π n f t :=
- fun x hx => (h x (hst hx)).mono hst
-#align cont_diff_on.mono ContDiffOn.mono
-
-theorem ContDiffOn.congr_mono (hf : ContDiffOn π n f s) (hβ : β x β sβ, fβ x = f x) (hs : sβ β s) :
- ContDiffOn π n fβ sβ :=
- (hf.mono hs).congr hβ
-#align cont_diff_on.congr_mono ContDiffOn.congr_mono
-
-/-- If a function is `C^n` on a set with `n β₯ 1`, then it is differentiable there. -/
-theorem ContDiffOn.differentiableOn (h : ContDiffOn π n f s) (hn : 1 β€ n) :
- DifferentiableOn π f s := fun x hx => (h x hx).DifferentiableWithinAt hn
-#align cont_diff_on.differentiable_on ContDiffOn.differentiableOn
-
-/-- If a function is `C^n` around each point in a set, then it is `C^n` on the set. -/
-theorem contDiffOn_of_locally_contDiffOn
- (h : β x β s, β u, IsOpen u β§ x β u β§ ContDiffOn π n f (s β© u)) : ContDiffOn π n f s :=
- by
- intro x xs
- rcases h x xs with β¨u, u_open, xu, huβ©
- apply (contDiffWithinAt_inter _).1 (hu x β¨xs, xuβ©)
- exact IsOpen.mem_nhds u_open xu
-#align cont_diff_on_of_locally_cont_diff_on contDiffOn_of_locally_contDiffOn
-
-/-- A function is `C^(n + 1)` on a domain iff locally, it has a derivative which is `C^n`. -/
-theorem contDiffOn_succ_iff_hasFderivWithinAt {n : β} :
- ContDiffOn π (n + 1 : β) f s β
- β x β s,
- β u β π[insert x s] x,
- β f' : E β E βL[π] F, (β x β u, HasFderivWithinAt f (f' x) u x) β§ ContDiffOn π n f' u :=
- by
- constructor
- Β· intro h x hx
- rcases(h x hx) n.succ le_rfl with β¨u, hu, p, Hpβ©
- refine'
- β¨u, hu, fun y => (continuousMultilinearCurryFin1 π E F) (p y 1), fun y hy =>
- Hp.has_fderiv_within_at (WithTop.coe_le_coe.2 (Nat.le_add_left 1 n)) hy, _β©
- rw [hasFtaylorSeriesUpToOn_succ_iff_right] at Hp
- intro z hz m hm
- refine' β¨u, _, fun x : E => (p x).shift, Hp.2.2.of_le hmβ©
- convert self_mem_nhdsWithin
- exact insert_eq_of_mem hz
- Β· intro h x hx
- rw [contDiffWithinAt_succ_iff_hasFderivWithinAt]
- rcases h x hx with β¨u, u_nhbd, f', hu, hf'β©
- have : x β u := mem_of_mem_nhdsWithin (mem_insert _ _) u_nhbd
- exact β¨u, u_nhbd, f', hu, hf' x thisβ©
-#align cont_diff_on_succ_iff_has_fderiv_within_at contDiffOn_succ_iff_hasFderivWithinAt
-
-/-! ### Iterated derivative within a set -/
-
-
-variable (π)
-
-/-- The `n`-th derivative of a function along a set, defined inductively by saying that the `n+1`-th
-derivative of `f` is the derivative of the `n`-th derivative of `f` along this set, together with
-an uncurrying step to see it as a multilinear map in `n+1` variables..
--/
-noncomputable def iteratedFderivWithin (n : β) (f : E β F) (s : Set E) : E β E[Γn]βL[π] F :=
- Nat.recOn n (fun x => ContinuousMultilinearMap.curry0 π E (f x)) fun n rec x =>
- ContinuousLinearMap.uncurryLeft (fderivWithin π rec s x)
-#align iterated_fderiv_within iteratedFderivWithin
-
-/-- Formal Taylor series associated to a function within a set. -/
-def ftaylorSeriesWithin (f : E β F) (s : Set E) (x : E) : FormalMultilinearSeries π E F := fun n =>
- iteratedFderivWithin π n f s x
-#align ftaylor_series_within ftaylorSeriesWithin
-
-variable {π}
-
-@[simp]
-theorem iteratedFderivWithin_zero_apply (m : Fin 0 β E) :
- (iteratedFderivWithin π 0 f s x : (Fin 0 β E) β F) m = f x :=
- rfl
-#align iterated_fderiv_within_zero_apply iteratedFderivWithin_zero_apply
-
-theorem iteratedFderivWithin_zero_eq_comp :
- iteratedFderivWithin π 0 f s = (continuousMultilinearCurryFin0 π E F).symm β f :=
- rfl
-#align iterated_fderiv_within_zero_eq_comp iteratedFderivWithin_zero_eq_comp
-
-theorem norm_iteratedFderivWithin_zero : βiteratedFderivWithin π 0 f s xβ = βf xβ := by
- rw [iteratedFderivWithin_zero_eq_comp, LinearIsometryEquiv.norm_map]
-#align norm_iterated_fderiv_within_zero norm_iteratedFderivWithin_zero
-
-theorem iteratedFderivWithin_succ_apply_left {n : β} (m : Fin (n + 1) β E) :
- (iteratedFderivWithin π (n + 1) f s x : (Fin (n + 1) β E) β F) m =
- (fderivWithin π (iteratedFderivWithin π n f s) s x : E β E[Γn]βL[π] F) (m 0) (tail m) :=
- rfl
-#align iterated_fderiv_within_succ_apply_left iteratedFderivWithin_succ_apply_left
-
-/-- Writing explicitly the `n+1`-th derivative as the composition of a currying linear equiv,
-and the derivative of the `n`-th derivative. -/
-theorem iteratedFderivWithin_succ_eq_comp_left {n : β} :
- iteratedFderivWithin π (n + 1) f s =
- continuousMultilinearCurryLeftEquiv π (fun i : Fin (n + 1) => E) F β
- fderivWithin π (iteratedFderivWithin π n f s) s :=
- rfl
-#align iterated_fderiv_within_succ_eq_comp_left iteratedFderivWithin_succ_eq_comp_left
-
-theorem norm_fderivWithin_iteratedFderivWithin {n : β} :
- βfderivWithin π (iteratedFderivWithin π n f s) s xβ = βiteratedFderivWithin π (n + 1) f s xβ :=
- by rw [iteratedFderivWithin_succ_eq_comp_left, LinearIsometryEquiv.norm_map]
-#align norm_fderiv_within_iterated_fderiv_within norm_fderivWithin_iteratedFderivWithin
-
-theorem iteratedFderivWithin_succ_apply_right {n : β} (hs : UniqueDiffOn π s) (hx : x β s)
- (m : Fin (n + 1) β E) :
- (iteratedFderivWithin π (n + 1) f s x : (Fin (n + 1) β E) β F) m =
- iteratedFderivWithin π n (fun y => fderivWithin π f s y) s x (init m) (m (last n)) :=
- by
- induction' n with n IH generalizing x
- Β· rw [iteratedFderivWithin_succ_eq_comp_left, iteratedFderivWithin_zero_eq_comp,
- iteratedFderivWithin_zero_apply, Function.comp_apply,
- LinearIsometryEquiv.comp_fderivWithin _ (hs x hx)]
- rfl
- Β· let I := continuousMultilinearCurryRightEquiv' π n E F
- have A :
- β y β s,
- iteratedFderivWithin π n.succ f s y =
- (I β iteratedFderivWithin π n (fun y => fderivWithin π f s y) s) y :=
- by
- intro y hy
- ext m
- rw [@IH m y hy]
- rfl
- calc
- (iteratedFderivWithin π (n + 2) f s x : (Fin (n + 2) β E) β F) m =
- (fderivWithin π (iteratedFderivWithin π n.succ f s) s x : E β E[Γn + 1]βL[π] F) (m 0)
- (tail m) :=
- rfl
- _ =
- (fderivWithin π (I β iteratedFderivWithin π n (fderivWithin π f s) s) s x :
- E β E[Γn + 1]βL[π] F)
- (m 0) (tail m) :=
- by rw [fderivWithin_congr (hs x hx) A (A x hx)]
- _ =
- (I β fderivWithin π (iteratedFderivWithin π n (fderivWithin π f s) s) s x :
- E β E[Γn + 1]βL[π] F)
- (m 0) (tail m) :=
- by
- rw [LinearIsometryEquiv.comp_fderivWithin _ (hs x hx)]
- rfl
- _ =
- (fderivWithin π (iteratedFderivWithin π n (fun y => fderivWithin π f s y) s) s x :
- E β E[Γn]βL[π] E βL[π] F)
- (m 0) (init (tail m)) ((tail m) (last n)) :=
- rfl
- _ =
- iteratedFderivWithin π (Nat.succ n) (fun y => fderivWithin π f s y) s x (init m)
- (m (last (n + 1))) :=
- by
- rw [iteratedFderivWithin_succ_apply_left, tail_init_eq_init_tail]
- rfl
-
-#align iterated_fderiv_within_succ_apply_right iteratedFderivWithin_succ_apply_right
-
-/-- Writing explicitly the `n+1`-th derivative as the composition of a currying linear equiv,
-and the `n`-th derivative of the derivative. -/
-theorem iteratedFderivWithin_succ_eq_comp_right {n : β} (hs : UniqueDiffOn π s) (hx : x β s) :
- iteratedFderivWithin π (n + 1) f s x =
- (continuousMultilinearCurryRightEquiv' π n E F β
- iteratedFderivWithin π n (fun y => fderivWithin π f s y) s)
- x :=
- by
- ext m
- rw [iteratedFderivWithin_succ_apply_right hs hx]
- rfl
-#align iterated_fderiv_within_succ_eq_comp_right iteratedFderivWithin_succ_eq_comp_right
-
-theorem norm_iteratedFderivWithin_fderivWithin {n : β} (hs : UniqueDiffOn π s) (hx : x β s) :
- βiteratedFderivWithin π n (fderivWithin π f s) s xβ = βiteratedFderivWithin π (n + 1) f s xβ :=
- by rw [iteratedFderivWithin_succ_eq_comp_right hs hx, LinearIsometryEquiv.norm_map]
-#align norm_iterated_fderiv_within_fderiv_within norm_iteratedFderivWithin_fderivWithin
-
-@[simp]
-theorem iteratedFderivWithin_one_apply (hs : UniqueDiffOn π s) (hx : x β s) (m : Fin 1 β E) :
- (iteratedFderivWithin π 1 f s x : (Fin 1 β E) β F) m = (fderivWithin π f s x : E β F) (m 0) :=
- by
- rw [iteratedFderivWithin_succ_apply_right hs hx, iteratedFderivWithin_zero_apply]
- rfl
-#align iterated_fderiv_within_one_apply iteratedFderivWithin_one_apply
-
-/-- If two functions coincide on a set `s` of unique differentiability, then their iterated
-differentials within this set coincide. -/
-theorem iteratedFderivWithin_congr {n : β} (hs : UniqueDiffOn π s) (hL : β y β s, fβ y = f y)
- (hx : x β s) : iteratedFderivWithin π n fβ s x = iteratedFderivWithin π n f s x :=
- by
- induction' n with n IH generalizing x
- Β· ext m
- simp [hL x hx]
- Β· have :
- fderivWithin π (fun y => iteratedFderivWithin π n fβ s y) s x =
- fderivWithin π (fun y => iteratedFderivWithin π n f s y) s x :=
- fderivWithin_congr (hs x hx) (fun y hy => IH hy) (IH hx)
- ext m
- rw [iteratedFderivWithin_succ_apply_left, iteratedFderivWithin_succ_apply_left, this]
-#align iterated_fderiv_within_congr iteratedFderivWithin_congr
-
-/-- The iterated differential within a set `s` at a point `x` is not modified if one intersects
-`s` with an open set containing `x`. -/
-theorem iteratedFderivWithin_inter_open {n : β} (hu : IsOpen u) (hs : UniqueDiffOn π (s β© u))
- (hx : x β s β© u) : iteratedFderivWithin π n f (s β© u) x = iteratedFderivWithin π n f s x :=
- by
- induction' n with n IH generalizing x
- Β· ext m
- simp
- Β· have A :
- fderivWithin π (fun y => iteratedFderivWithin π n f (s β© u) y) (s β© u) x =
- fderivWithin π (fun y => iteratedFderivWithin π n f s y) (s β© u) x :=
- fderivWithin_congr (hs x hx) (fun y hy => IH hy) (IH hx)
- have B :
- fderivWithin π (fun y => iteratedFderivWithin π n f s y) (s β© u) x =
- fderivWithin π (fun y => iteratedFderivWithin π n f s y) s x :=
- fderivWithin_inter (IsOpen.mem_nhds hu hx.2)
- ((uniqueDiffWithinAt_inter (IsOpen.mem_nhds hu hx.2)).1 (hs x hx))
- ext m
- rw [iteratedFderivWithin_succ_apply_left, iteratedFderivWithin_succ_apply_left, A, B]
-#align iterated_fderiv_within_inter_open iteratedFderivWithin_inter_open
-
-/-- The iterated differential within a set `s` at a point `x` is not modified if one intersects
-`s` with a neighborhood of `x` within `s`. -/
-theorem iteratedFderivWithin_inter' {n : β} (hu : u β π[s] x) (hs : UniqueDiffOn π s) (xs : x β s) :
- iteratedFderivWithin π n f (s β© u) x = iteratedFderivWithin π n f s x :=
- by
- obtain β¨v, v_open, xv, vuβ© : β v, IsOpen v β§ x β v β§ v β© s β u := mem_nhdsWithin.1 hu
- have A : s β© u β© v = s β© v :=
- by
- apply subset.antisymm (inter_subset_inter (inter_subset_left _ _) (subset.refl _))
- exact fun y β¨ys, yvβ© => β¨β¨ys, vu β¨yv, ysβ©β©, yvβ©
- have : iteratedFderivWithin π n f (s β© v) x = iteratedFderivWithin π n f s x :=
- iteratedFderivWithin_inter_open v_open (hs.inter v_open) β¨xs, xvβ©
- rw [β this]
- have : iteratedFderivWithin π n f (s β© u β© v) x = iteratedFderivWithin π n f (s β© u) x :=
- by
- refine' iteratedFderivWithin_inter_open v_open _ β¨β¨xs, vu β¨xv, xsβ©β©, xvβ©
- rw [A]
- exact hs.inter v_open
- rw [A] at this
- rw [β this]
-#align iterated_fderiv_within_inter' iteratedFderivWithin_inter'
-
-/-- The iterated differential within a set `s` at a point `x` is not modified if one intersects
-`s` with a neighborhood of `x`. -/
-theorem iteratedFderivWithin_inter {n : β} (hu : u β π x) (hs : UniqueDiffOn π s) (xs : x β s) :
- iteratedFderivWithin π n f (s β© u) x = iteratedFderivWithin π n f s x :=
- iteratedFderivWithin_inter' (mem_nhdsWithin_of_mem_nhds hu) hs xs
-#align iterated_fderiv_within_inter iteratedFderivWithin_inter
-
-@[simp]
-theorem contDiffOn_zero : ContDiffOn π 0 f s β ContinuousOn f s :=
- by
- refine' β¨fun H => H.ContinuousOn, fun H => _β©
- intro x hx m hm
- have : (m : ββ) = 0 := le_antisymm hm bot_le
- rw [this]
- refine' β¨insert x s, self_mem_nhdsWithin, ftaylorSeriesWithin π f s, _β©
- rw [hasFtaylorSeriesUpToOn_zero_iff]
- exact β¨by rwa [insert_eq_of_mem hx], fun x hx => by simp [ftaylorSeriesWithin]β©
-#align cont_diff_on_zero contDiffOn_zero
-
-theorem contDiffWithinAt_zero (hx : x β s) :
- ContDiffWithinAt π 0 f s x β β u β π[s] x, ContinuousOn f (s β© u) :=
- by
- constructor
- Β· intro h
- obtain β¨u, H, p, hpβ© := h 0 (by norm_num)
- refine' β¨u, _, _β©
- Β· simpa [hx] using H
- Β· simp only [WithTop.coe_zero, hasFtaylorSeriesUpToOn_zero_iff] at hp
- exact hp.1.mono (inter_subset_right s u)
- Β· rintro β¨u, H, huβ©
- rw [β contDiffWithinAt_inter' H]
- have h' : x β s β© u := β¨hx, mem_of_mem_nhdsWithin hx Hβ©
- exact (cont_diff_on_zero.mpr hu).ContDiffWithinAt h'
-#align cont_diff_within_at_zero contDiffWithinAt_zero
-
-/-- On a set with unique differentiability, any choice of iterated differential has to coincide
-with the one we have chosen in `iterated_fderiv_within π m f s`. -/
-theorem HasFtaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn
- (h : HasFtaylorSeriesUpToOn n f p s) {m : β} (hmn : (m : ββ) β€ n) (hs : UniqueDiffOn π s)
- (hx : x β s) : p x m = iteratedFderivWithin π m f s x :=
- by
- induction' m with m IH generalizing x
- Β· rw [h.zero_eq' hx, iteratedFderivWithin_zero_eq_comp]
- Β· have A : (m : ββ) < n := lt_of_lt_of_le (WithTop.coe_lt_coe.2 (lt_add_one m)) hmn
- have :
- HasFderivWithinAt (fun y : E => iteratedFderivWithin π m f s y)
- (ContinuousMultilinearMap.curryLeft (p x (Nat.succ m))) s x :=
- (h.fderiv_within m A x hx).congr (fun y hy => (IH (le_of_lt A) hy).symm)
- (IH (le_of_lt A) hx).symm
- rw [iteratedFderivWithin_succ_eq_comp_left, Function.comp_apply, this.fderiv_within (hs x hx)]
- exact (ContinuousMultilinearMap.uncurry_curryLeft _).symm
-#align has_ftaylor_series_up_to_on.eq_ftaylor_series_of_unique_diff_on HasFtaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn
-
-/-- When a function is `C^n` in a set `s` of unique differentiability, it admits
-`ftaylor_series_within π f s` as a Taylor series up to order `n` in `s`. -/
-theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueDiffOn π s) :
- HasFtaylorSeriesUpToOn n f (ftaylorSeriesWithin π f s) s :=
- by
- constructor
- Β· intro x hx
- simp only [ftaylorSeriesWithin, ContinuousMultilinearMap.uncurry0_apply,
- iteratedFderivWithin_zero_apply]
- Β· intro m hm x hx
- rcases(h x hx) m.succ (ENat.add_one_le_of_lt hm) with β¨u, hu, p, Hpβ©
- rw [insert_eq_of_mem hx] at hu
- rcases mem_nhdsWithin.1 hu with β¨o, o_open, xo, hoβ©
- rw [inter_comm] at ho
- have : p x m.succ = ftaylorSeriesWithin π f s x m.succ :=
- by
- change p x m.succ = iteratedFderivWithin π m.succ f s x
- rw [β iteratedFderivWithin_inter (IsOpen.mem_nhds o_open xo) hs hx]
- exact (Hp.mono ho).eq_ftaylor_series_of_uniqueDiffOn le_rfl (hs.inter o_open) β¨hx, xoβ©
- rw [β this, β hasFderivWithinAt_inter (IsOpen.mem_nhds o_open xo)]
- have A : β y β s β© o, p y m = ftaylorSeriesWithin π f s y m :=
- by
- rintro y β¨hy, yoβ©
- change p y m = iteratedFderivWithin π m f s y
- rw [β iteratedFderivWithin_inter (IsOpen.mem_nhds o_open yo) hs hy]
- exact
- (Hp.mono ho).eq_ftaylor_series_of_uniqueDiffOn (WithTop.coe_le_coe.2 (Nat.le_succ m))
- (hs.inter o_open) β¨hy, yoβ©
- exact
- ((Hp.mono ho).fderivWithin m (WithTop.coe_lt_coe.2 (lt_add_one m)) x β¨hx, xoβ©).congr
- (fun y hy => (A y hy).symm) (A x β¨hx, xoβ©).symm
- Β· intro m hm
- apply continuousOn_of_locally_continuousOn
- intro x hx
- rcases h x hx m hm with β¨u, hu, p, Hpβ©
- rcases mem_nhdsWithin.1 hu with β¨o, o_open, xo, hoβ©
- rw [insert_eq_of_mem hx] at ho
- rw [inter_comm] at ho
- refine' β¨o, o_open, xo, _β©
- have A : β y β s β© o, p y m = ftaylorSeriesWithin π f s y m :=
- by
- rintro y β¨hy, yoβ©
- change p y m = iteratedFderivWithin π m f s y
- rw [β iteratedFderivWithin_inter (IsOpen.mem_nhds o_open yo) hs hy]
- exact (Hp.mono ho).eq_ftaylor_series_of_uniqueDiffOn le_rfl (hs.inter o_open) β¨hy, yoβ©
- exact ((Hp.mono ho).cont m le_rfl).congr fun y hy => (A y hy).symm
-#align cont_diff_on.ftaylor_series_within ContDiffOn.ftaylorSeriesWithin
-
-theorem contDiffOn_of_continuousOn_differentiableOn
- (Hcont : β m : β, (m : ββ) β€ n β ContinuousOn (fun x => iteratedFderivWithin π m f s x) s)
- (Hdiff :
- β m : β, (m : ββ) < n β DifferentiableOn π (fun x => iteratedFderivWithin π m f s x) s) :
- ContDiffOn π n f s := by
- intro x hx m hm
- rw [insert_eq_of_mem hx]
- refine' β¨s, self_mem_nhdsWithin, ftaylorSeriesWithin π f s, _β©
- constructor
- Β· intro y hy
- simp only [ftaylorSeriesWithin, ContinuousMultilinearMap.uncurry0_apply,
- iteratedFderivWithin_zero_apply]
- Β· intro k hk y hy
- convert(Hdiff k (lt_of_lt_of_le hk hm) y hy).HasFderivWithinAt
- simp only [ftaylorSeriesWithin, iteratedFderivWithin_succ_eq_comp_left,
- ContinuousLinearEquiv.coe_apply, Function.comp_apply, coeFn_coeBase]
- exact ContinuousLinearMap.curry_uncurryLeft _
- Β· intro k hk
- exact Hcont k (le_trans hk hm)
-#align cont_diff_on_of_continuous_on_differentiable_on contDiffOn_of_continuousOn_differentiableOn
-
-theorem contDiffOn_of_differentiableOn
- (h : β m : β, (m : ββ) β€ n β DifferentiableOn π (iteratedFderivWithin π m f s) s) :
- ContDiffOn π n f s :=
- contDiffOn_of_continuousOn_differentiableOn (fun m hm => (h m hm).ContinuousOn) fun m hm =>
- h m (le_of_lt hm)
-#align cont_diff_on_of_differentiable_on contDiffOn_of_differentiableOn
-
-theorem ContDiffOn.continuousOn_iteratedFderivWithin {m : β} (h : ContDiffOn π n f s)
- (hmn : (m : ββ) β€ n) (hs : UniqueDiffOn π s) : ContinuousOn (iteratedFderivWithin π m f s) s :=
- (h.ftaylorSeriesWithin hs).cont m hmn
-#align cont_diff_on.continuous_on_iterated_fderiv_within ContDiffOn.continuousOn_iteratedFderivWithin
-
-theorem ContDiffOn.differentiableOn_iteratedFderivWithin {m : β} (h : ContDiffOn π n f s)
- (hmn : (m : ββ) < n) (hs : UniqueDiffOn π s) :
- DifferentiableOn π (iteratedFderivWithin π m f s) s := fun x hx =>
- ((h.ftaylorSeriesWithin hs).fderivWithin m hmn x hx).DifferentiableWithinAt
-#align cont_diff_on.differentiable_on_iterated_fderiv_within ContDiffOn.differentiableOn_iteratedFderivWithin
-
-theorem contDiffOn_iff_continuousOn_differentiableOn (hs : UniqueDiffOn π s) :
- ContDiffOn π n f s β
- (β m : β, (m : ββ) β€ n β ContinuousOn (fun x => iteratedFderivWithin π m f s x) s) β§
- β m : β, (m : ββ) < n β DifferentiableOn π (fun x => iteratedFderivWithin π m f s x) s :=
- by
- constructor
- Β· intro h
- constructor
- Β· intro m hm
- exact h.continuous_on_iterated_fderiv_within hm hs
- Β· intro m hm
- exact h.differentiable_on_iterated_fderiv_within hm hs
- Β· intro h
- exact contDiffOn_of_continuousOn_differentiableOn h.1 h.2
-#align cont_diff_on_iff_continuous_on_differentiable_on contDiffOn_iff_continuousOn_differentiableOn
-
-theorem contDiffOn_succ_of_fderivWithin {n : β} (hf : DifferentiableOn π f s)
- (h : ContDiffOn π n (fun y => fderivWithin π f s y) s) : ContDiffOn π (n + 1 : β) f s :=
- by
- intro x hx
- rw [contDiffWithinAt_succ_iff_hasFderivWithinAt, insert_eq_of_mem hx]
- exact
- β¨s, self_mem_nhdsWithin, fderivWithin π f s, fun y hy => (hf y hy).HasFderivWithinAt, h x hxβ©
-#align cont_diff_on_succ_of_fderiv_within contDiffOn_succ_of_fderivWithin
-
-/-- A function is `C^(n + 1)` on a domain with unique derivatives if and only if it is
-differentiable there, and its derivative (expressed with `fderiv_within`) is `C^n`. -/
-theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
- ContDiffOn π (n + 1 : β) f s β
- DifferentiableOn π f s β§ ContDiffOn π n (fun y => fderivWithin π f s y) s :=
- by
- refine' β¨fun H => _, fun h => contDiffOn_succ_of_fderivWithin h.1 h.2β©
- refine' β¨H.differentiable_on (WithTop.coe_le_coe.2 (Nat.le_add_left 1 n)), fun x hx => _β©
- rcases contDiffWithinAt_succ_iff_hasFderivWithinAt.1 (H x hx) with β¨u, hu, f', hff', hf'β©
- rcases mem_nhdsWithin.1 hu with β¨o, o_open, xo, hoβ©
- rw [inter_comm, insert_eq_of_mem hx] at ho
- have := hf'.mono ho
- rw [contDiffWithinAt_inter' (mem_nhdsWithin_of_mem_nhds (IsOpen.mem_nhds o_open xo))] at this
- apply this.congr_of_eventually_eq' _ hx
- have : o β© s β π[s] x := mem_nhdsWithin.2 β¨o, o_open, xo, subset.refl _β©
- rw [inter_comm] at this
- apply Filter.eventuallyEq_of_mem this fun y hy => _
- have A : fderivWithin π f (s β© o) y = f' y :=
- ((hff' y (ho hy)).mono ho).fderivWithin (hs.inter o_open y hy)
- rwa [fderivWithin_inter (IsOpen.mem_nhds o_open hy.2) (hs y hy.1)] at A
-#align cont_diff_on_succ_iff_fderiv_within contDiffOn_succ_iff_fderivWithin
-
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
-/-- A function is `C^(n + 1)` on an open domain if and only if it is
-differentiable there, and its derivative (expressed with `fderiv`) is `C^n`. -/
-theorem contDiffOn_succ_iff_fderiv_of_open {n : β} (hs : IsOpen s) :
- ContDiffOn π (n + 1 : β) f s β
- DifferentiableOn π f s β§ ContDiffOn π n (fun y => fderiv π f y) s :=
- by
- rw [contDiffOn_succ_iff_fderivWithin hs.unique_diff_on]
- trace
- "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
- apply contDiffOn_congr
- intro x hx
- exact fderivWithin_of_open hs hx
-#align cont_diff_on_succ_iff_fderiv_of_open contDiffOn_succ_iff_fderiv_of_open
-
-/-- A function is `C^β` on a domain with unique derivatives if and only if it is differentiable
-there, and its derivative (expressed with `fderiv_within`) is `C^β`. -/
-theorem contDiffOn_top_iff_fderivWithin (hs : UniqueDiffOn π s) :
- ContDiffOn π β f s β
- DifferentiableOn π f s β§ ContDiffOn π β (fun y => fderivWithin π f s y) s :=
- by
- constructor
- Β· intro h
- refine' β¨h.differentiable_on le_top, _β©
- apply contDiffOn_top.2 fun n => ((contDiffOn_succ_iff_fderivWithin hs).1 _).2
- exact h.of_le le_top
- Β· intro h
- refine' contDiffOn_top.2 fun n => _
- have A : (n : ββ) β€ β := le_top
- apply ((contDiffOn_succ_iff_fderivWithin hs).2 β¨h.1, h.2.of_le Aβ©).of_le
- exact WithTop.coe_le_coe.2 (Nat.le_succ n)
-#align cont_diff_on_top_iff_fderiv_within contDiffOn_top_iff_fderivWithin
-
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
-/-- A function is `C^β` on an open domain if and only if it is differentiable there, and its
-derivative (expressed with `fderiv`) is `C^β`. -/
-theorem contDiffOn_top_iff_fderiv_of_open (hs : IsOpen s) :
- ContDiffOn π β f s β DifferentiableOn π f s β§ ContDiffOn π β (fun y => fderiv π f y) s :=
- by
- rw [contDiffOn_top_iff_fderivWithin hs.unique_diff_on]
- trace
- "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
- apply contDiffOn_congr
- intro x hx
- exact fderivWithin_of_open hs hx
-#align cont_diff_on_top_iff_fderiv_of_open contDiffOn_top_iff_fderiv_of_open
-
-theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s)
- (hmn : m + 1 β€ n) : ContDiffOn π m (fun y => fderivWithin π f s y) s :=
- by
- cases m
- Β· change β + 1 β€ n at hmn
- have : n = β := by simpa using hmn
- rw [this] at hf
- exact ((contDiffOn_top_iff_fderivWithin hs).1 hf).2
- Β· change (m.succ : ββ) β€ n at hmn
- exact ((contDiffOn_succ_iff_fderivWithin hs).1 (hf.of_le hmn)).2
-#align cont_diff_on.fderiv_within ContDiffOn.fderivWithin
-
-theorem ContDiffOn.fderiv_of_open (hf : ContDiffOn π n f s) (hs : IsOpen s) (hmn : m + 1 β€ n) :
- ContDiffOn π m (fun y => fderiv π f y) s :=
- (hf.fderivWithin hs.UniqueDiffOn hmn).congr fun x hx => (fderivWithin_of_open hs hx).symm
-#align cont_diff_on.fderiv_of_open ContDiffOn.fderiv_of_open
-
-theorem ContDiffOn.continuousOn_fderivWithin (h : ContDiffOn π n f s) (hs : UniqueDiffOn π s)
- (hn : 1 β€ n) : ContinuousOn (fun x => fderivWithin π f s x) s :=
- ((contDiffOn_succ_iff_fderivWithin hs).1 (h.of_le hn)).2.ContinuousOn
-#align cont_diff_on.continuous_on_fderiv_within ContDiffOn.continuousOn_fderivWithin
-
-theorem ContDiffOn.continuousOn_fderiv_of_open (h : ContDiffOn π n f s) (hs : IsOpen s)
- (hn : 1 β€ n) : ContinuousOn (fun x => fderiv π f x) s :=
- ((contDiffOn_succ_iff_fderiv_of_open hs).1 (h.of_le hn)).2.ContinuousOn
-#align cont_diff_on.continuous_on_fderiv_of_open ContDiffOn.continuousOn_fderiv_of_open
-
-/-! ### Functions with a Taylor series on the whole space -/
-
-
-/-- `has_ftaylor_series_up_to n f p` registers the fact that `p 0 = f` and `p (m+1)` is a
-derivative of `p m` for `m < n`, and is continuous for `m β€ n`. This is a predicate analogous to
-`has_fderiv_at` but for higher order derivatives. -/
-structure HasFtaylorSeriesUpTo (n : ββ) (f : E β F) (p : E β FormalMultilinearSeries π E F) :
- Prop where
- zero_eq : β x, (p x 0).uncurry0 = f x
- fderiv : β (m : β) (hm : (m : ββ) < n), β x, HasFderivAt (fun y => p y m) (p x m.succ).curryLeft x
- cont : β (m : β) (hm : (m : ββ) β€ n), Continuous fun x => p x m
-#align has_ftaylor_series_up_to HasFtaylorSeriesUpTo
-
-theorem HasFtaylorSeriesUpTo.zero_eq' (h : HasFtaylorSeriesUpTo n f p) (x : E) :
- p x 0 = (continuousMultilinearCurryFin0 π E F).symm (f x) :=
- by
- rw [β h.zero_eq x]
- symm
- exact ContinuousMultilinearMap.uncurry0_curry0 _
-#align has_ftaylor_series_up_to.zero_eq' HasFtaylorSeriesUpTo.zero_eq'
-
-theorem hasFtaylorSeriesUpToOn_univ_iff :
- HasFtaylorSeriesUpToOn n f p univ β HasFtaylorSeriesUpTo n f p :=
- by
- constructor
- Β· intro H
- constructor
- Β· exact fun x => H.zero_eq x (mem_univ x)
- Β· intro m hm x
- rw [β hasFderivWithinAt_univ]
- exact H.fderiv_within m hm x (mem_univ x)
- Β· intro m hm
- rw [continuous_iff_continuousOn_univ]
- exact H.cont m hm
- Β· intro H
- constructor
- Β· exact fun x hx => H.zero_eq x
- Β· intro m hm x hx
- rw [hasFderivWithinAt_univ]
- exact H.fderiv m hm x
- Β· intro m hm
- rw [β continuous_iff_continuousOn_univ]
- exact H.cont m hm
-#align has_ftaylor_series_up_to_on_univ_iff hasFtaylorSeriesUpToOn_univ_iff
-
-theorem HasFtaylorSeriesUpTo.hasFtaylorSeriesUpToOn (h : HasFtaylorSeriesUpTo n f p) (s : Set E) :
- HasFtaylorSeriesUpToOn n f p s :=
- (hasFtaylorSeriesUpToOn_univ_iff.2 h).mono (subset_univ _)
-#align has_ftaylor_series_up_to.has_ftaylor_series_up_to_on HasFtaylorSeriesUpTo.hasFtaylorSeriesUpToOn
-
-theorem HasFtaylorSeriesUpTo.ofLe (h : HasFtaylorSeriesUpTo n f p) (hmn : m β€ n) :
- HasFtaylorSeriesUpTo m f p :=
- by
- rw [β hasFtaylorSeriesUpToOn_univ_iff] at hβ’
- exact h.of_le hmn
-#align has_ftaylor_series_up_to.of_le HasFtaylorSeriesUpTo.ofLe
-
-theorem HasFtaylorSeriesUpTo.continuous (h : HasFtaylorSeriesUpTo n f p) : Continuous f :=
- by
- rw [β hasFtaylorSeriesUpToOn_univ_iff] at h
- rw [continuous_iff_continuousOn_univ]
- exact h.continuous_on
-#align has_ftaylor_series_up_to.continuous HasFtaylorSeriesUpTo.continuous
-
-theorem hasFtaylorSeriesUpTo_zero_iff :
- HasFtaylorSeriesUpTo 0 f p β Continuous f β§ β x, (p x 0).uncurry0 = f x := by
- simp [has_ftaylor_series_up_to_on_univ_iff.symm, continuous_iff_continuousOn_univ,
- hasFtaylorSeriesUpToOn_zero_iff]
-#align has_ftaylor_series_up_to_zero_iff hasFtaylorSeriesUpTo_zero_iff
-
-/-- If a function has a Taylor series at order at least `1`, then the term of order `1` of this
-series is a derivative of `f`. -/
-theorem HasFtaylorSeriesUpTo.hasFderivAt (h : HasFtaylorSeriesUpTo n f p) (hn : 1 β€ n) (x : E) :
- HasFderivAt f (continuousMultilinearCurryFin1 π E F (p x 1)) x :=
- by
- rw [β hasFderivWithinAt_univ]
- exact (hasFtaylorSeriesUpToOn_univ_iff.2 h).HasFderivWithinAt hn (mem_univ _)
-#align has_ftaylor_series_up_to.has_fderiv_at HasFtaylorSeriesUpTo.hasFderivAt
-
-theorem HasFtaylorSeriesUpTo.differentiable (h : HasFtaylorSeriesUpTo n f p) (hn : 1 β€ n) :
- Differentiable π f := fun x => (h.HasFderivAt hn x).DifferentiableAt
-#align has_ftaylor_series_up_to.differentiable HasFtaylorSeriesUpTo.differentiable
-
-/-- `p` is a Taylor series of `f` up to `n+1` if and only if `p.shift` is a Taylor series up to `n`
-for `p 1`, which is a derivative of `f`. -/
-theorem hasFtaylorSeriesUpTo_succ_iff_right {n : β} :
- HasFtaylorSeriesUpTo (n + 1 : β) f p β
- (β x, (p x 0).uncurry0 = f x) β§
- (β x, HasFderivAt (fun y => p y 0) (p x 1).curryLeft x) β§
- HasFtaylorSeriesUpTo n (fun x => continuousMultilinearCurryFin1 π E F (p x 1)) fun x =>
- (p x).shift :=
- by
- simp only [hasFtaylorSeriesUpToOn_succ_iff_right, β hasFtaylorSeriesUpToOn_univ_iff, mem_univ,
- forall_true_left, hasFderivWithinAt_univ]
-#align has_ftaylor_series_up_to_succ_iff_right hasFtaylorSeriesUpTo_succ_iff_right
-
-/-! ### Smooth functions at a point -/
-
-
-variable (π)
-
-/-- A function is continuously differentiable up to `n` at a point `x` if, for any integer `k β€ n`,
-there is a neighborhood of `x` where `f` admits derivatives up to order `n`, which are continuous.
--/
-def ContDiffAt (n : ββ) (f : E β F) (x : E) : Prop :=
- ContDiffWithinAt π n f univ x
-#align cont_diff_at ContDiffAt
-
-variable {π}
-
-theorem contDiffWithinAt_univ : ContDiffWithinAt π n f univ x β ContDiffAt π n f x :=
- Iff.rfl
-#align cont_diff_within_at_univ contDiffWithinAt_univ
-
-theorem contDiffAt_top : ContDiffAt π β f x β β n : β, ContDiffAt π n f x := by
- simp [β contDiffWithinAt_univ, contDiffWithinAt_top]
-#align cont_diff_at_top contDiffAt_top
-
-theorem ContDiffAt.contDiffWithinAt (h : ContDiffAt π n f x) : ContDiffWithinAt π n f s x :=
- h.mono (subset_univ _)
-#align cont_diff_at.cont_diff_within_at ContDiffAt.contDiffWithinAt
-
-theorem ContDiffWithinAt.contDiffAt (h : ContDiffWithinAt π n f s x) (hx : s β π x) :
- ContDiffAt π n f x := by rwa [ContDiffAt, β contDiffWithinAt_inter hx, univ_inter]
-#align cont_diff_within_at.cont_diff_at ContDiffWithinAt.contDiffAt
-
-theorem ContDiffAt.congr_of_eventuallyEq (h : ContDiffAt π n f x) (hg : fβ =αΆ [π x] f) :
- ContDiffAt π n fβ x :=
- h.congr_of_eventually_eq' (by rwa [nhdsWithin_univ]) (mem_univ x)
-#align cont_diff_at.congr_of_eventually_eq ContDiffAt.congr_of_eventuallyEq
-
-theorem ContDiffAt.of_le (h : ContDiffAt π n f x) (hmn : m β€ n) : ContDiffAt π m f x :=
- h.of_le hmn
-#align cont_diff_at.of_le ContDiffAt.of_le
-
-theorem ContDiffAt.continuousAt (h : ContDiffAt π n f x) : ContinuousAt f x := by
- simpa [continuousWithinAt_univ] using h.continuous_within_at
-#align cont_diff_at.continuous_at ContDiffAt.continuousAt
-
-/-- If a function is `C^n` with `n β₯ 1` at a point, then it is differentiable there. -/
-theorem ContDiffAt.differentiableAt (h : ContDiffAt π n f x) (hn : 1 β€ n) :
- DifferentiableAt π f x := by
- simpa [hn, differentiableWithinAt_univ] using h.differentiable_within_at
-#align cont_diff_at.differentiable_at ContDiffAt.differentiableAt
-
-/-- A function is `C^(n + 1)` at a point iff locally, it has a derivative which is `C^n`. -/
-theorem contDiffAt_succ_iff_hasFderivAt {n : β} :
- ContDiffAt π (n + 1 : β) f x β
- β f' : E β E βL[π] F, (β u β π x, β x β u, HasFderivAt f (f' x) x) β§ ContDiffAt π n f' x :=
- by
- rw [β contDiffWithinAt_univ, contDiffWithinAt_succ_iff_hasFderivWithinAt]
- simp only [nhdsWithin_univ, exists_prop, mem_univ, insert_eq_of_mem]
- constructor
- Β· rintro β¨u, H, f', h_fderiv, h_cont_diffβ©
- rcases mem_nhds_iff.mp H with β¨t, htu, ht, hxtβ©
- refine' β¨f', β¨t, _β©, h_cont_diff.cont_diff_at Hβ©
- refine' β¨mem_nhds_iff.mpr β¨t, subset.rfl, ht, hxtβ©, _β©
- intro y hyt
- refine' (h_fderiv y (htu hyt)).HasFderivAt _
- exact mem_nhds_iff.mpr β¨t, htu, ht, hytβ©
- Β· rintro β¨f', β¨u, H, h_fderivβ©, h_cont_diffβ©
- refine' β¨u, H, f', _, h_cont_diff.cont_diff_within_atβ©
- intro x hxu
- exact (h_fderiv x hxu).HasFderivWithinAt
-#align cont_diff_at_succ_iff_has_fderiv_at contDiffAt_succ_iff_hasFderivAt
-
-protected theorem ContDiffAt.eventually {n : β} (h : ContDiffAt π n f x) :
- βαΆ y in π x, ContDiffAt π n f y := by simpa [nhdsWithin_univ] using h.eventually
-#align cont_diff_at.eventually ContDiffAt.eventually
-
-/-! ### Smooth functions -/
-
-
-variable (π)
-
-/-- A function is continuously differentiable up to `n` if it admits derivatives up to
-order `n`, which are continuous. Contrary to the case of definitions in domains (where derivatives
-might not be unique) we do not need to localize the definition in space or time.
--/
-def ContDiff (n : ββ) (f : E β F) : Prop :=
- β p : E β FormalMultilinearSeries π E F, HasFtaylorSeriesUpTo n f p
-#align cont_diff ContDiff
-
-variable {π}
-
-theorem contDiffOn_univ : ContDiffOn π n f univ β ContDiff π n f :=
- by
- constructor
- Β· intro H
- use ftaylorSeriesWithin π f univ
- rw [β hasFtaylorSeriesUpToOn_univ_iff]
- exact H.ftaylor_series_within uniqueDiffOn_univ
- Β· rintro β¨p, hpβ© x hx m hm
- exact β¨univ, Filter.univ_sets _, p, (hp.has_ftaylor_series_up_to_on univ).of_le hmβ©
-#align cont_diff_on_univ contDiffOn_univ
-
-theorem contDiff_iff_contDiffAt : ContDiff π n f β β x, ContDiffAt π n f x := by
- simp [β contDiffOn_univ, ContDiffOn, ContDiffAt]
-#align cont_diff_iff_cont_diff_at contDiff_iff_contDiffAt
-
-theorem ContDiff.contDiffAt (h : ContDiff π n f) : ContDiffAt π n f x :=
- contDiff_iff_contDiffAt.1 h x
-#align cont_diff.cont_diff_at ContDiff.contDiffAt
-
-theorem ContDiff.contDiffWithinAt (h : ContDiff π n f) : ContDiffWithinAt π n f s x :=
- h.ContDiffAt.ContDiffWithinAt
-#align cont_diff.cont_diff_within_at ContDiff.contDiffWithinAt
-
-theorem contDiff_top : ContDiff π β f β β n : β, ContDiff π n f := by
- simp [cont_diff_on_univ.symm, contDiffOn_top]
-#align cont_diff_top contDiff_top
-
-theorem contDiff_all_iff_nat : (β n, ContDiff π n f) β β n : β, ContDiff π n f := by
- simp only [β contDiffOn_univ, contDiffOn_all_iff_nat]
-#align cont_diff_all_iff_nat contDiff_all_iff_nat
-
-theorem ContDiff.contDiffOn (h : ContDiff π n f) : ContDiffOn π n f s :=
- (contDiffOn_univ.2 h).mono (subset_univ _)
-#align cont_diff.cont_diff_on ContDiff.contDiffOn
-
-@[simp]
-theorem contDiff_zero : ContDiff π 0 f β Continuous f :=
- by
- rw [β contDiffOn_univ, continuous_iff_continuousOn_univ]
- exact contDiffOn_zero
-#align cont_diff_zero contDiff_zero
-
-theorem contDiffAt_zero : ContDiffAt π 0 f x β β u β π x, ContinuousOn f u :=
- by
- rw [β contDiffWithinAt_univ]
- simp [contDiffWithinAt_zero, nhdsWithin_univ]
-#align cont_diff_at_zero contDiffAt_zero
-
-theorem contDiffAt_one_iff :
- ContDiffAt π 1 f x β
- β f' : E β E βL[π] F, β u β π x, ContinuousOn f' u β§ β x β u, HasFderivAt f (f' x) x :=
- by
- simp_rw [show (1 : ββ) = (0 + 1 : β) from (zero_add 1).symm, contDiffAt_succ_iff_hasFderivAt,
- show ((0 : β) : ββ) = 0 from rfl, contDiffAt_zero,
- exists_mem_and_iff antitone_bforall antitone_continuousOn, and_comm']
-#align cont_diff_at_one_iff contDiffAt_one_iff
-
-theorem ContDiff.of_le (h : ContDiff π n f) (hmn : m β€ n) : ContDiff π m f :=
- contDiffOn_univ.1 <| (contDiffOn_univ.2 h).of_le hmn
-#align cont_diff.of_le ContDiff.of_le
-
-theorem ContDiff.of_succ {n : β} (h : ContDiff π (n + 1) f) : ContDiff π n f :=
- h.of_le <| WithTop.coe_le_coe.mpr le_self_add
-#align cont_diff.of_succ ContDiff.of_succ
-
-theorem ContDiff.one_of_succ {n : β} (h : ContDiff π (n + 1) f) : ContDiff π 1 f :=
- h.of_le <| WithTop.coe_le_coe.mpr le_add_self
-#align cont_diff.one_of_succ ContDiff.one_of_succ
-
-theorem ContDiff.continuous (h : ContDiff π n f) : Continuous f :=
- contDiff_zero.1 (h.of_le bot_le)
-#align cont_diff.continuous ContDiff.continuous
-
-/-- If a function is `C^n` with `n β₯ 1`, then it is differentiable. -/
-theorem ContDiff.differentiable (h : ContDiff π n f) (hn : 1 β€ n) : Differentiable π f :=
- differentiableOn_univ.1 <| (contDiffOn_univ.2 h).DifferentiableOn hn
-#align cont_diff.differentiable ContDiff.differentiable
-
-theorem contDiff_iff_forall_nat_le : ContDiff π n f β β m : β, βm β€ n β ContDiff π m f :=
- by
- simp_rw [β contDiffOn_univ]
- exact contDiffOn_iff_forall_nat_le
-#align cont_diff_iff_forall_nat_le contDiff_iff_forall_nat_le
-
-/-! ### Iterated derivative -/
-
-
-variable (π)
-
-/-- The `n`-th derivative of a function, as a multilinear map, defined inductively. -/
-noncomputable def iteratedFderiv (n : β) (f : E β F) : E β E[Γn]βL[π] F :=
- Nat.recOn n (fun x => ContinuousMultilinearMap.curry0 π E (f x)) fun n rec x =>
- ContinuousLinearMap.uncurryLeft (fderiv π rec x)
-#align iterated_fderiv iteratedFderiv
-
-/-- Formal Taylor series associated to a function within a set. -/
-def ftaylorSeries (f : E β F) (x : E) : FormalMultilinearSeries π E F := fun n =>
- iteratedFderiv π n f x
-#align ftaylor_series ftaylorSeries
-
-variable {π}
-
-@[simp]
-theorem iteratedFderiv_zero_apply (m : Fin 0 β E) :
- (iteratedFderiv π 0 f x : (Fin 0 β E) β F) m = f x :=
- rfl
-#align iterated_fderiv_zero_apply iteratedFderiv_zero_apply
-
-theorem iteratedFderiv_zero_eq_comp :
- iteratedFderiv π 0 f = (continuousMultilinearCurryFin0 π E F).symm β f :=
- rfl
-#align iterated_fderiv_zero_eq_comp iteratedFderiv_zero_eq_comp
-
-theorem norm_iteratedFderiv_zero : βiteratedFderiv π 0 f xβ = βf xβ := by
- rw [iteratedFderiv_zero_eq_comp, LinearIsometryEquiv.norm_map]
-#align norm_iterated_fderiv_zero norm_iteratedFderiv_zero
-
-theorem iteratedFderiv_with_zero_eq : iteratedFderivWithin π 0 f s = iteratedFderiv π 0 f :=
- by
- ext
- rfl
-#align iterated_fderiv_with_zero_eq iteratedFderiv_with_zero_eq
-
-theorem iteratedFderiv_succ_apply_left {n : β} (m : Fin (n + 1) β E) :
- (iteratedFderiv π (n + 1) f x : (Fin (n + 1) β E) β F) m =
- (fderiv π (iteratedFderiv π n f) x : E β E[Γn]βL[π] F) (m 0) (tail m) :=
- rfl
-#align iterated_fderiv_succ_apply_left iteratedFderiv_succ_apply_left
-
-/-- Writing explicitly the `n+1`-th derivative as the composition of a currying linear equiv,
-and the derivative of the `n`-th derivative. -/
-theorem iteratedFderiv_succ_eq_comp_left {n : β} :
- iteratedFderiv π (n + 1) f =
- continuousMultilinearCurryLeftEquiv π (fun i : Fin (n + 1) => E) F β
- fderiv π (iteratedFderiv π n f) :=
- rfl
-#align iterated_fderiv_succ_eq_comp_left iteratedFderiv_succ_eq_comp_left
-
-/-- Writing explicitly the derivative of the `n`-th derivative as the composition of a currying
-linear equiv, and the `n + 1`-th derivative. -/
-theorem fderiv_iteratedFderiv {n : β} :
- fderiv π (iteratedFderiv π n f) =
- (continuousMultilinearCurryLeftEquiv π (fun i : Fin (n + 1) => E) F).symm β
- iteratedFderiv π (n + 1) f :=
- by
- rw [iteratedFderiv_succ_eq_comp_left]
- ext1 x
- simp only [Function.comp_apply, LinearIsometryEquiv.symm_apply_apply]
-#align fderiv_iterated_fderiv fderiv_iteratedFderiv
-
-theorem HasCompactSupport.iteratedFderiv (hf : HasCompactSupport f) (n : β) :
- HasCompactSupport (iteratedFderiv π n f) :=
- by
- induction' n with n IH
- Β· rw [iteratedFderiv_zero_eq_comp]
- apply hf.comp_left
- exact LinearIsometryEquiv.map_zero _
- Β· rw [iteratedFderiv_succ_eq_comp_left]
- apply (IH.fderiv π).compLeft
- exact LinearIsometryEquiv.map_zero _
-#align has_compact_support.iterated_fderiv HasCompactSupport.iteratedFderiv
-
-theorem norm_fderiv_iteratedFderiv {n : β} :
- βfderiv π (iteratedFderiv π n f) xβ = βiteratedFderiv π (n + 1) f xβ := by
- rw [iteratedFderiv_succ_eq_comp_left, LinearIsometryEquiv.norm_map]
-#align norm_fderiv_iterated_fderiv norm_fderiv_iteratedFderiv
-
-theorem iteratedFderivWithin_univ {n : β} :
- iteratedFderivWithin π n f univ = iteratedFderiv π n f :=
- by
- induction' n with n IH
- Β· ext x
- simp
- Β· ext (x m)
- rw [iteratedFderiv_succ_apply_left, iteratedFderivWithin_succ_apply_left, IH, fderivWithin_univ]
-#align iterated_fderiv_within_univ iteratedFderivWithin_univ
-
-/-- In an open set, the iterated derivative within this set coincides with the global iterated
-derivative. -/
-theorem iteratedFderivWithin_of_isOpen (n : β) (hs : IsOpen s) :
- EqOn (iteratedFderivWithin π n f s) (iteratedFderiv π n f) s :=
- by
- induction' n with n IH
- Β· intro x hx
- ext1 m
- simp only [iteratedFderivWithin_zero_apply, iteratedFderiv_zero_apply]
- Β· intro x hx
- rw [iteratedFderiv_succ_eq_comp_left, iteratedFderivWithin_succ_eq_comp_left]
- dsimp
- congr 1
- rw [fderivWithin_of_open hs hx]
- apply Filter.EventuallyEq.fderiv_eq
- filter_upwards [hs.mem_nhds hx]
- exact IH
-#align iterated_fderiv_within_of_is_open iteratedFderivWithin_of_isOpen
-
-theorem ftaylorSeriesWithin_univ : ftaylorSeriesWithin π f univ = ftaylorSeries π f :=
- by
- ext1 x; ext1 n
- change iteratedFderivWithin π n f univ x = iteratedFderiv π n f x
- rw [iteratedFderivWithin_univ]
-#align ftaylor_series_within_univ ftaylorSeriesWithin_univ
-
-theorem iteratedFderiv_succ_apply_right {n : β} (m : Fin (n + 1) β E) :
- (iteratedFderiv π (n + 1) f x : (Fin (n + 1) β E) β F) m =
- iteratedFderiv π n (fun y => fderiv π f y) x (init m) (m (last n)) :=
- by
- rw [β iteratedFderivWithin_univ, β iteratedFderivWithin_univ, β fderivWithin_univ]
- exact iteratedFderivWithin_succ_apply_right uniqueDiffOn_univ (mem_univ _) _
-#align iterated_fderiv_succ_apply_right iteratedFderiv_succ_apply_right
-
-/-- Writing explicitly the `n+1`-th derivative as the composition of a currying linear equiv,
-and the `n`-th derivative of the derivative. -/
-theorem iteratedFderiv_succ_eq_comp_right {n : β} :
- iteratedFderiv π (n + 1) f x =
- (continuousMultilinearCurryRightEquiv' π n E F β iteratedFderiv π n fun y => fderiv π f y)
- x :=
- by
- ext m
- rw [iteratedFderiv_succ_apply_right]
- rfl
-#align iterated_fderiv_succ_eq_comp_right iteratedFderiv_succ_eq_comp_right
-
-theorem norm_iteratedFderiv_fderiv {n : β} :
- βiteratedFderiv π n (fderiv π f) xβ = βiteratedFderiv π (n + 1) f xβ := by
- rw [iteratedFderiv_succ_eq_comp_right, LinearIsometryEquiv.norm_map]
-#align norm_iterated_fderiv_fderiv norm_iteratedFderiv_fderiv
-
-@[simp]
-theorem iteratedFderiv_one_apply (m : Fin 1 β E) :
- (iteratedFderiv π 1 f x : (Fin 1 β E) β F) m = (fderiv π f x : E β F) (m 0) :=
- by
- rw [iteratedFderiv_succ_apply_right, iteratedFderiv_zero_apply]
- rfl
-#align iterated_fderiv_one_apply iteratedFderiv_one_apply
-
-/-- When a function is `C^n` in a set `s` of unique differentiability, it admits
-`ftaylor_series_within π f s` as a Taylor series up to order `n` in `s`. -/
-theorem contDiff_on_iff_ftaylorSeries :
- ContDiff π n f β HasFtaylorSeriesUpTo n f (ftaylorSeries π f) :=
- by
- constructor
- Β· rw [β contDiffOn_univ, β hasFtaylorSeriesUpToOn_univ_iff, β ftaylorSeriesWithin_univ]
- exact fun h => ContDiffOn.ftaylorSeriesWithin h uniqueDiffOn_univ
- Β· intro h
- exact β¨ftaylorSeries π f, hβ©
-#align cont_diff_on_iff_ftaylor_series contDiff_on_iff_ftaylorSeries
-
-theorem contDiff_iff_continuous_differentiable :
- ContDiff π n f β
- (β m : β, (m : ββ) β€ n β Continuous fun x => iteratedFderiv π m f x) β§
- β m : β, (m : ββ) < n β Differentiable π fun x => iteratedFderiv π m f x :=
- by
- simp [cont_diff_on_univ.symm, continuous_iff_continuousOn_univ, differentiable_on_univ.symm,
- iteratedFderivWithin_univ, contDiffOn_iff_continuousOn_differentiableOn uniqueDiffOn_univ]
-#align cont_diff_iff_continuous_differentiable contDiff_iff_continuous_differentiable
-
-/-- If `f` is `C^n` then its `m`-times iterated derivative is continuous for `m β€ n`. -/
-theorem ContDiff.continuous_iteratedFderiv {m : β} (hm : (m : ββ) β€ n) (hf : ContDiff π n f) :
- Continuous fun x => iteratedFderiv π m f x :=
- (contDiff_iff_continuous_differentiable.mp hf).1 m hm
-#align cont_diff.continuous_iterated_fderiv ContDiff.continuous_iteratedFderiv
-
-/-- If `f` is `C^n` then its `m`-times iterated derivative is differentiable for `m < n`. -/
-theorem ContDiff.differentiable_iteratedFderiv {m : β} (hm : (m : ββ) < n) (hf : ContDiff π n f) :
- Differentiable π fun x => iteratedFderiv π m f x :=
- (contDiff_iff_continuous_differentiable.mp hf).2 m hm
-#align cont_diff.differentiable_iterated_fderiv ContDiff.differentiable_iteratedFderiv
-
-theorem contDiff_of_differentiable_iteratedFderiv
- (h : β m : β, (m : ββ) β€ n β Differentiable π (iteratedFderiv π m f)) : ContDiff π n f :=
- contDiff_iff_continuous_differentiable.2
- β¨fun m hm => (h m hm).Continuous, fun m hm => h m (le_of_lt hm)β©
-#align cont_diff_of_differentiable_iterated_fderiv contDiff_of_differentiable_iteratedFderiv
-
-/-- A function is `C^(n + 1)` if and only if it is differentiable,
-and its derivative (formulated in terms of `fderiv`) is `C^n`. -/
-theorem contDiff_succ_iff_fderiv {n : β} :
- ContDiff π (n + 1 : β) f β Differentiable π f β§ ContDiff π n fun y => fderiv π f y := by
- simp only [β contDiffOn_univ, β differentiableOn_univ, β fderivWithin_univ,
- contDiffOn_succ_iff_fderivWithin uniqueDiffOn_univ]
-#align cont_diff_succ_iff_fderiv contDiff_succ_iff_fderiv
-
-theorem contDiff_one_iff_fderiv : ContDiff π 1 f β Differentiable π f β§ Continuous (fderiv π f) :=
- contDiff_succ_iff_fderiv.trans <| Iff.rfl.And contDiff_zero
-#align cont_diff_one_iff_fderiv contDiff_one_iff_fderiv
-
-/-- A function is `C^β` if and only if it is differentiable,
-and its derivative (formulated in terms of `fderiv`) is `C^β`. -/
-theorem contDiff_top_iff_fderiv :
- ContDiff π β f β Differentiable π f β§ ContDiff π β fun y => fderiv π f y :=
- by
- simp only [β contDiffOn_univ, β differentiableOn_univ, β fderivWithin_univ]
- rw [contDiffOn_top_iff_fderivWithin uniqueDiffOn_univ]
-#align cont_diff_top_iff_fderiv contDiff_top_iff_fderiv
-
-theorem ContDiff.continuous_fderiv (h : ContDiff π n f) (hn : 1 β€ n) :
- Continuous fun x => fderiv π f x :=
- (contDiff_succ_iff_fderiv.1 (h.of_le hn)).2.Continuous
-#align cont_diff.continuous_fderiv ContDiff.continuous_fderiv
-
-/-- If a function is at least `C^1`, its bundled derivative (mapping `(x, v)` to `Df(x) v`) is
-continuous. -/
-theorem ContDiff.continuous_fderiv_apply (h : ContDiff π n f) (hn : 1 β€ n) :
- Continuous fun p : E Γ E => (fderiv π f p.1 : E β F) p.2 :=
- have A : Continuous fun q : (E βL[π] F) Γ E => q.1 q.2 := isBoundedBilinearMapApply.Continuous
- have B : Continuous fun p : E Γ E => (fderiv π f p.1, p.2) :=
- ((h.continuous_fderiv hn).comp continuous_fst).prod_mk continuous_snd
- A.comp B
-#align cont_diff.continuous_fderiv_apply ContDiff.continuous_fderiv_apply
+ {p : E β FormalMultilinearSeries π E F}
/-! ### Constants -/
@@ -1918,6 +230,105 @@ theorem ContDiff.continuousLinearMap_comp {f : E β F} (g : F βL[π] G) (hf
contDiffOn_univ.1 <| ContDiffOn.continuousLinearMap_comp _ (contDiffOn_univ.2 hf)
#align cont_diff.continuous_linear_map_comp ContDiff.continuousLinearMap_comp
+/-- The iterated derivative within a set of the composition with a linear map on the left is
+obtained by applying the linear map to the iterated derivative. -/
+theorem ContinuousLinearMap.iteratedFderivWithin_comp_left {f : E β F} (g : F βL[π] G)
+ (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β}
+ (hi : (i : WithTop β) β€ n) :
+ iteratedFderivWithin π i (g β f) s x =
+ g.compContinuousMultilinearMap (iteratedFderivWithin π i f s x) :=
+ (((hf.ftaylorSeriesWithin hs).continuousLinearMapComp g).eq_ftaylor_series_of_uniqueDiffOn hi hs
+ hx).symm
+#align continuous_linear_map.iterated_fderiv_within_comp_left ContinuousLinearMap.iteratedFderivWithin_comp_left
+
+/-- The iterated derivative of the composition with a linear map on the left is
+obtained by applying the linear map to the iterated derivative. -/
+theorem ContinuousLinearMap.iteratedFderiv_comp_left {f : E β F} (g : F βL[π] G)
+ (hf : ContDiff π n f) (x : E) {i : β} (hi : (i : WithTop β) β€ n) :
+ iteratedFderiv π i (g β f) x = g.compContinuousMultilinearMap (iteratedFderiv π i f x) :=
+ by
+ simp only [β iteratedFderivWithin_univ]
+ exact g.iterated_fderiv_within_comp_left hf.cont_diff_on uniqueDiffOn_univ (mem_univ x) hi
+#align continuous_linear_map.iterated_fderiv_comp_left ContinuousLinearMap.iteratedFderiv_comp_left
+
+/-- The iterated derivative within a set of the composition with a linear equiv on the left is
+obtained by applying the linear equiv to the iterated derivative. This is true without
+differentiability assumptions. -/
+theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_left (g : F βL[π] G) (f : E β F)
+ (hs : UniqueDiffOn π s) (hx : x β s) (i : β) :
+ iteratedFderivWithin π i (g β f) s x =
+ (g : F βL[π] G).compContinuousMultilinearMap (iteratedFderivWithin π i f s x) :=
+ by
+ induction' i with i IH generalizing x
+ Β· ext1 m
+ simp only [iteratedFderivWithin_zero_apply, ContinuousLinearEquiv.coe_coe,
+ ContinuousLinearMap.compContinuousMultilinearMap_coe, EmbeddingLike.apply_eq_iff_eq]
+ Β· ext1 m
+ rw [iteratedFderivWithin_succ_apply_left]
+ have Z :
+ fderivWithin π (iteratedFderivWithin π i (g β f) s) s x =
+ fderivWithin π
+ (fun y =>
+ g.comp_continuous_multilinear_mapL (fun j : Fin i => E)
+ (iteratedFderivWithin π i f s y))
+ s x :=
+ fderivWithin_congr' (hs x hx) (fun y hy => IH hy) hx
+ simp_rw [Z]
+ rw [(g.comp_continuous_multilinear_mapL fun j : Fin i => E).comp_fderivWithin (hs x hx)]
+ simp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_app,
+ ContinuousLinearEquiv.compContinuousMultilinearMapL_apply,
+ ContinuousLinearMap.compContinuousMultilinearMap_coe, EmbeddingLike.apply_eq_iff_eq]
+ rw [iteratedFderivWithin_succ_apply_left]
+#align continuous_linear_equiv.iterated_fderiv_within_comp_left ContinuousLinearEquiv.iteratedFderivWithin_comp_left
+
+/-- Composition with a linear isometry on the left preserves the norm of the iterated
+derivative within a set. -/
+theorem LinearIsometry.norm_iteratedFderivWithin_comp_left {f : E β F} (g : F ββα΅’[π] G)
+ (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (hx : x β s) {i : β}
+ (hi : (i : WithTop β) β€ n) :
+ βiteratedFderivWithin π i (g β f) s xβ = βiteratedFderivWithin π i f s xβ :=
+ by
+ have :
+ iteratedFderivWithin π i (g β f) s x =
+ g.to_continuous_linear_map.comp_continuous_multilinear_map (iteratedFderivWithin π i f s x) :=
+ g.to_continuous_linear_map.iterated_fderiv_within_comp_left hf hs hx hi
+ rw [this]
+ apply LinearIsometry.norm_compContinuousMultilinearMap
+#align linear_isometry.norm_iterated_fderiv_within_comp_left LinearIsometry.norm_iteratedFderivWithin_comp_left
+
+/-- Composition with a linear isometry on the left preserves the norm of the iterated
+derivative. -/
+theorem LinearIsometry.norm_iteratedFderiv_comp_left {f : E β F} (g : F ββα΅’[π] G)
+ (hf : ContDiff π n f) (x : E) {i : β} (hi : (i : WithTop β) β€ n) :
+ βiteratedFderiv π i (g β f) xβ = βiteratedFderiv π i f xβ :=
+ by
+ simp only [β iteratedFderivWithin_univ]
+ exact g.norm_iterated_fderiv_within_comp_left hf.cont_diff_on uniqueDiffOn_univ (mem_univ x) hi
+#align linear_isometry.norm_iterated_fderiv_comp_left LinearIsometry.norm_iteratedFderiv_comp_left
+
+/-- Composition with a linear isometry equiv on the left preserves the norm of the iterated
+derivative within a set. -/
+theorem LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left (g : F ββα΅’[π] G) (f : E β F)
+ (hs : UniqueDiffOn π s) (hx : x β s) (i : β) :
+ βiteratedFderivWithin π i (g β f) s xβ = βiteratedFderivWithin π i f s xβ :=
+ by
+ have :
+ iteratedFderivWithin π i (g β f) s x =
+ (g : F βL[π] G).compContinuousMultilinearMap (iteratedFderivWithin π i f s x) :=
+ g.to_continuous_linear_equiv.iterated_fderiv_within_comp_left f hs hx i
+ rw [this]
+ apply LinearIsometry.norm_compContinuousMultilinearMap g.to_linear_isometry
+#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_left LinearIsometryEquiv.norm_iteratedFderivWithin_comp_left
+
+/-- Composition with a linear isometry equiv on the left preserves the norm of the iterated
+derivative. -/
+theorem LinearIsometryEquiv.norm_iteratedFderiv_comp_left (g : F ββα΅’[π] G) (f : E β F) (x : E)
+ (i : β) : βiteratedFderiv π i (g β f) xβ = βiteratedFderiv π i f xβ :=
+ by
+ rw [β iteratedFderivWithin_univ, β iteratedFderivWithin_univ]
+ apply g.norm_iterated_fderiv_within_comp_left f uniqueDiffOn_univ (mem_univ x) i
+#align linear_isometry_equiv.norm_iterated_fderiv_comp_left LinearIsometryEquiv.norm_iteratedFderiv_comp_left
+
/-- Composition by continuous linear equivs on the left respects higher differentiability at a
point in a domain. -/
theorem ContinuousLinearEquiv.comp_contDiffWithinAt_iff (e : F βL[π] G) :
@@ -2002,6 +413,83 @@ theorem ContDiff.comp_continuousLinearMap {f : E β F} {g : G βL[π] E} (hf
contDiffOn_univ.1 <| ContDiffOn.comp_continuousLinearMap (contDiffOn_univ.2 hf) _
#align cont_diff.comp_continuous_linear_map ContDiff.comp_continuousLinearMap
+/-- The iterated derivative within a set of the composition with a linear map on the right is
+obtained by composing the iterated derivative with the linear map. -/
+theorem ContinuousLinearMap.iteratedFderivWithin_comp_right {f : E β F} (g : G βL[π] E)
+ (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s) (h's : UniqueDiffOn π (g β»ΒΉ' s)) {x : G}
+ (hx : g x β s) {i : β} (hi : (i : WithTop β) β€ n) :
+ iteratedFderivWithin π i (f β g) (g β»ΒΉ' s) x =
+ (iteratedFderivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
+ (((hf.ftaylorSeriesWithin hs).compContinuousLinearMap g).eq_ftaylor_series_of_uniqueDiffOn hi h's
+ hx).symm
+#align continuous_linear_map.iterated_fderiv_within_comp_right ContinuousLinearMap.iteratedFderivWithin_comp_right
+
+/-- The iterated derivative within a set of the composition with a linear equiv on the right is
+obtained by composing the iterated derivative with the linear equiv. -/
+theorem ContinuousLinearEquiv.iteratedFderivWithin_comp_right (g : G βL[π] E) (f : E β F)
+ (hs : UniqueDiffOn π s) {x : G} (hx : g x β s) (i : β) :
+ iteratedFderivWithin π i (f β g) (g β»ΒΉ' s) x =
+ (iteratedFderivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
+ by
+ induction' i with i IH generalizing x
+ Β· ext1 m
+ simp only [iteratedFderivWithin_zero_apply,
+ ContinuousMultilinearMap.compContinuousLinearMap_apply]
+ Β· ext1 m
+ simp only [ContinuousMultilinearMap.compContinuousLinearMap_apply,
+ ContinuousLinearEquiv.coe_coe, iteratedFderivWithin_succ_apply_left]
+ have :
+ fderivWithin π (iteratedFderivWithin π i (f β βg) (βg β»ΒΉ' s)) (βg β»ΒΉ' s) x =
+ fderivWithin π
+ (fun y =>
+ ContinuousMultilinearMap.compContinuousLinearMapEquivL _ (fun _x : Fin i => g)
+ (iteratedFderivWithin π i f s (g y)))
+ (g β»ΒΉ' s) x :=
+ fderivWithin_congr' (g.unique_diff_on_preimage_iff.2 hs x hx) (fun y hy => IH hy) hx
+ rw [this]
+ rw [ContinuousLinearEquiv.comp_fderivWithin _ (g.unique_diff_on_preimage_iff.2 hs x hx)]
+ simp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_app,
+ ContinuousMultilinearMap.compContinuousLinearMapEquivL_apply,
+ ContinuousMultilinearMap.compContinuousLinearMap_apply]
+ rw [ContinuousLinearEquiv.comp_right_fderivWithin _ (g.unique_diff_on_preimage_iff.2 hs x hx)]
+ rfl
+#align continuous_linear_equiv.iterated_fderiv_within_comp_right ContinuousLinearEquiv.iteratedFderivWithin_comp_right
+
+/-- The iterated derivative of the composition with a linear map on the right is
+obtained by composing the iterated derivative with the linear map. -/
+theorem ContinuousLinearMap.iteratedFderiv_comp_right (g : G βL[π] E) {f : E β F}
+ (hf : ContDiff π n f) (x : G) {i : β} (hi : (i : WithTop β) β€ n) :
+ iteratedFderiv π i (f β g) x =
+ (iteratedFderiv π i f (g x)).compContinuousLinearMap fun _ => g :=
+ by
+ simp only [β iteratedFderivWithin_univ]
+ apply
+ g.iterated_fderiv_within_comp_right hf.cont_diff_on uniqueDiffOn_univ uniqueDiffOn_univ
+ (mem_univ _) hi
+#align continuous_linear_map.iterated_fderiv_comp_right ContinuousLinearMap.iteratedFderiv_comp_right
+
+/-- Composition with a linear isometry on the right preserves the norm of the iterated derivative
+within a set. -/
+theorem LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right (g : G ββα΅’[π] E) (f : E β F)
+ (hs : UniqueDiffOn π s) {x : G} (hx : g x β s) (i : β) :
+ βiteratedFderivWithin π i (f β g) (g β»ΒΉ' s) xβ = βiteratedFderivWithin π i f s (g x)β :=
+ by
+ have :
+ iteratedFderivWithin π i (f β g) (g β»ΒΉ' s) x =
+ (iteratedFderivWithin π i f s (g x)).compContinuousLinearMap fun _ => g :=
+ g.to_continuous_linear_equiv.iterated_fderiv_within_comp_right f hs hx i
+ rw [this, ContinuousMultilinearMap.norm_comp_continuous_linearIsometryEquiv]
+#align linear_isometry_equiv.norm_iterated_fderiv_within_comp_right LinearIsometryEquiv.norm_iteratedFderivWithin_comp_right
+
+/-- Composition with a linear isometry on the right preserves the norm of the iterated derivative
+within a set. -/
+theorem LinearIsometryEquiv.norm_iteratedFderiv_comp_right (g : G ββα΅’[π] E) (f : E β F) (x : G)
+ (i : β) : βiteratedFderiv π i (f β g) xβ = βiteratedFderiv π i f (g x)β :=
+ by
+ simp only [β iteratedFderivWithin_univ]
+ apply g.norm_iterated_fderiv_within_comp_right f uniqueDiffOn_univ (mem_univ (g x)) i
+#align linear_isometry_equiv.norm_iterated_fderiv_comp_right LinearIsometryEquiv.norm_iteratedFderiv_comp_right
+
/-- Composition by continuous linear equivs on the right respects higher differentiability at a
point in a domain. -/
theorem ContinuousLinearEquiv.contDiffWithinAt_comp_iff (e : G βL[π] E) :
@@ -2179,22 +667,14 @@ theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F} (hg
(hf : ContDiffOn π n f s) (st : s β f β»ΒΉ' t) : ContDiffOn π n (g β f) s :=
by
/- we lift all the spaces to a common universe, as we have already proved the result in this
- situation. For the lift, we use the trick that `H` is isomorphic through a
- continuous linear equiv to `continuous_multilinear_map π (Ξ» (i : fin 0), (E Γ F Γ G)) H`, and
- continuous linear equivs respect smoothness classes. -/
- let Eu := ContinuousMultilinearMap π (fun i : Fin 0 => E Γ F Γ G) E
- letI : NormedAddCommGroup Eu := by infer_instance
- letI : NormedSpace π Eu := by infer_instance
- let Fu := ContinuousMultilinearMap π (fun i : Fin 0 => E Γ F Γ G) F
- letI : NormedAddCommGroup Fu := by infer_instance
- letI : NormedSpace π Fu := by infer_instance
- let Gu := ContinuousMultilinearMap π (fun i : Fin 0 => E Γ F Γ G) G
- letI : NormedAddCommGroup Gu := by infer_instance
- letI : NormedSpace π Gu := by infer_instance
+ situation. -/
+ let Eu : Type max uE uF uG := ULift E
+ let Fu : Type max uE uF uG := ULift.{max uE uG, uF} F
+ let Gu : Type max uE uF uG := ULift.{max uE uF, uG} G
-- declare the isomorphisms
- let isoE : Eu βL[π] E := continuousMultilinearCurryFin0 π (E Γ F Γ G) E
- let isoF : Fu βL[π] F := continuousMultilinearCurryFin0 π (E Γ F Γ G) F
- let isoG : Gu βL[π] G := continuousMultilinearCurryFin0 π (E Γ F Γ G) G
+ have isoE : Eu βL[π] E := ContinuousLinearEquiv.ulift
+ have isoF : Fu βL[π] F := ContinuousLinearEquiv.ulift
+ have isoG : Gu βL[π] G := ContinuousLinearEquiv.ulift
-- lift the functions to the new spaces, check smoothness there, and then go back.
let fu : Eu β Fu := (isoF.symm β f) β isoE
have fu_diff : ContDiffOn π n fu (isoE β»ΒΉ' s) := by
@@ -2630,7 +1110,7 @@ theorem ContDiffWithinAt.fderivWithin_right (hf : ContDiffWithinAt π n f s x
#align cont_diff_within_at.fderiv_within_right ContDiffWithinAt.fderivWithin_right
/-- `x β¦ fderiv π (f x) (g x)` is smooth at `xβ`. -/
-theorem ContDiffAt.contDiffAt_fderiv {f : E β F β G} {g : E β F} {n : ββ}
+theorem ContDiffAt.fderiv {f : E β F β G} {g : E β F} {n : ββ}
(hf : ContDiffAt π n (Function.uncurry f) (xβ, g xβ)) (hg : ContDiffAt π m g xβ)
(hmn : m + 1 β€ n) : ContDiffAt π m (fun x => fderiv π (f x) (g x)) xβ :=
by
@@ -2640,15 +1120,27 @@ theorem ContDiffAt.contDiffAt_fderiv {f : E β F β G} {g : E β F} {n : β
hmn (mem_univ xβ) _).ContDiffAt
univ_mem
rw [preimage_univ]
-#align cont_diff_at.cont_diff_at_fderiv ContDiffAt.contDiffAt_fderiv
+#align cont_diff_at.fderiv ContDiffAt.fderiv
+
+/-- `fderiv π f` is smooth at `xβ`. -/
+theorem ContDiffAt.fderiv_right (hf : ContDiffAt π n f xβ) (hmn : (m + 1 : ββ) β€ n) :
+ ContDiffAt π m (fderiv π f) xβ :=
+ ContDiffAt.fderiv (ContDiffAt.comp (xβ, xβ) hf contDiffAt_snd) contDiffAt_id hmn
+#align cont_diff_at.fderiv_right ContDiffAt.fderiv_right
/-- `x β¦ fderiv π (f x) (g x)` is smooth. -/
theorem ContDiff.fderiv {f : E β F β G} {g : E β F} {n m : ββ}
(hf : ContDiff π m <| Function.uncurry f) (hg : ContDiff π n g) (hnm : n + 1 β€ m) :
ContDiff π n fun x => fderiv π (f x) (g x) :=
- contDiff_iff_contDiffAt.mpr fun x => hf.ContDiffAt.contDiffAt_fderiv hg.ContDiffAt hnm
+ contDiff_iff_contDiffAt.mpr fun x => hf.ContDiffAt.fderiv hg.ContDiffAt hnm
#align cont_diff.fderiv ContDiff.fderiv
+/-- `fderiv π f` is smooth. -/
+theorem ContDiff.fderiv_right (hf : ContDiff π n f) (hmn : (m + 1 : ββ) β€ n) :
+ ContDiff π m (fderiv π f) :=
+ contDiff_iff_contDiffAt.mpr fun x => hf.ContDiffAt.fderiv_right hmn
+#align cont_diff.fderiv_right ContDiff.fderiv_right
+
/-- `x β¦ fderiv π (f x) (g x)` is continuous. -/
theorem Continuous.fderiv {f : E β F β G} {g : E β F} {n : ββ}
(hf : ContDiff π n <| Function.uncurry f) (hg : Continuous g) (hn : 1 β€ n) :
@@ -2813,6 +1305,9 @@ theorem ContDiffOn.add {s : Set E} {f g : E β F} (hf : ContDiffOn π n f s)
variable {i : β}
+/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
+See also `iterated_fderiv_within_add_apply'`, which uses the spelling `(Ξ» x, f x + g x)`
+instead of `f + g`. -/
theorem iteratedFderivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f s)
(hg : ContDiffOn π i g s) (hu : UniqueDiffOn π s) (hx : x β s) :
iteratedFderivWithin π i (f + g) s x =
@@ -2848,6 +1343,17 @@ theorem iteratedFderivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f
#align iterated_fderiv_within_add_apply iteratedFderivWithin_add_apply
+/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
+This is the same as `iterated_fderiv_within_add_apply`, but using the spelling `(Ξ» x, f x + g x)`
+instead of `f + g`, which can be handy for some rewrites.
+TODO: use one form consistently. -/
+theorem iteratedFderivWithin_add_apply' {f g : E β F} (hf : ContDiffOn π i f s)
+ (hg : ContDiffOn π i g s) (hu : UniqueDiffOn π s) (hx : x β s) :
+ iteratedFderivWithin π i (fun x => f x + g x) s x =
+ iteratedFderivWithin π i f s x + iteratedFderivWithin π i g s x :=
+ iteratedFderivWithin_add_apply hf hg hu hx
+#align iterated_fderiv_within_add_apply' iteratedFderivWithin_add_apply'
+
theorem iteratedFderiv_add_apply {i : β} {f g : E β F} (hf : ContDiff π i f) (hg : ContDiff π i g) :
iteratedFderiv π i (f + g) x = iteratedFderiv π i f x + iteratedFderiv π i g x :=
by
@@ -2855,6 +1361,12 @@ theorem iteratedFderiv_add_apply {i : β} {f g : E β F} (hf : ContDiff π i
exact iteratedFderivWithin_add_apply hf hg uniqueDiffOn_univ (Set.mem_univ _)
#align iterated_fderiv_add_apply iteratedFderiv_add_apply
+theorem iteratedFderiv_add_apply' {i : β} {f g : E β F} (hf : ContDiff π i f)
+ (hg : ContDiff π i g) :
+ iteratedFderiv π i (fun x => f x + g x) x = iteratedFderiv π i f x + iteratedFderiv π i g x :=
+ iteratedFderiv_add_apply hf hg
+#align iterated_fderiv_add_apply' iteratedFderiv_add_apply'
+
end Add
/-! ### Negative -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -615,7 +615,7 @@ theorem contDiffWithinAt_succ_iff_hasFderivWithinAt {n : β} :
HasFderivWithinAt (fun z => (continuousMultilinearCurryFin0 π E F).symm (f z))
(FormalMultilinearSeries.unshift (p' y) (f y) 1).curryLeft (v β© u) y
rw [LinearIsometryEquiv.comp_hasFderivWithinAt_iff']
- convert (f'_eq_deriv y hy.2).mono (inter_subset_right v u)
+ convert(f'_eq_deriv y hy.2).mono (inter_subset_right v u)
rw [β Hp'.zero_eq y hy.1]
ext z
change
@@ -623,7 +623,7 @@ theorem contDiffWithinAt_succ_iff_hasFderivWithinAt {n : β} :
((p' y 0) 0) z
unfold_coes
congr
- Β· convert (Hp'.mono (inter_subset_left v u)).congr fun x hx => Hp'.zero_eq x hx.1
+ Β· convert(Hp'.mono (inter_subset_left v u)).congr fun x hx => Hp'.zero_eq x hx.1
Β· ext (x y)
change p' x 0 (init (@snoc 0 (fun i : Fin 1 => E) 0 y)) y = p' x 0 0 y
rw [init_snoc]
@@ -1098,7 +1098,7 @@ theorem contDiffOn_of_continuousOn_differentiableOn
simp only [ftaylorSeriesWithin, ContinuousMultilinearMap.uncurry0_apply,
iteratedFderivWithin_zero_apply]
Β· intro k hk y hy
- convert (Hdiff k (lt_of_lt_of_le hk hm) y hy).HasFderivWithinAt
+ convert(Hdiff k (lt_of_lt_of_le hk hm) y hy).HasFderivWithinAt
simp only [ftaylorSeriesWithin, iteratedFderivWithin_succ_eq_comp_left,
ContinuousLinearEquiv.coe_apply, Function.comp_apply, coeFn_coeBase]
exact ContinuousLinearMap.curry_uncurryLeft _
@@ -1885,9 +1885,9 @@ theorem HasFtaylorSeriesUpToOn.continuousLinearMapComp (g : F βL[π] G)
constructor
Β· exact fun x hx => congr_arg g (hf.zero_eq x hx)
Β· intro m hm x hx
- convert (L m).HasFderivAt.comp_hasFderivWithinAt x (hf.fderiv_within m hm x hx)
+ convert(L m).HasFderivAt.comp_hasFderivWithinAt x (hf.fderiv_within m hm x hx)
Β· intro m hm
- convert (L m).Continuous.comp_continuousOn (hf.cont m hm)
+ convert(L m).Continuous.comp_continuousOn (hf.cont m hm)
#align has_ftaylor_series_up_to_on.continuous_linear_map_comp HasFtaylorSeriesUpToOn.continuousLinearMapComp
/-- Composition by continuous linear maps on the left preserves `C^n` functions in a domain
@@ -1965,8 +1965,7 @@ theorem HasFtaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFtaylorSeriesUpT
rw [ContinuousLinearMap.map_zero]
rfl
Β· intro m hm x hx
- convert
- (hA m).HasFderivAt.comp_hasFderivWithinAt x
+ convert(hA m).HasFderivAt.comp_hasFderivWithinAt x
((hf.fderiv_within m hm (g x) hx).comp x g.has_fderiv_within_at (subset.refl _))
ext (y v)
change p (g x) (Nat.succ m) (g β cons y v) = p (g x) m.succ (cons (g y) (g β v))
@@ -2063,8 +2062,7 @@ theorem HasFtaylorSeriesUpToOn.prod (hf : HasFtaylorSeriesUpToOn n f p s) {g : E
rw [β hf.zero_eq x hx, β hg.zero_eq x hx]
rfl
Β· intro m hm x hx
- convert
- (L m).HasFderivAt.comp_hasFderivWithinAt x
+ convert(L m).HasFderivAt.comp_hasFderivWithinAt x
((hf.fderiv_within m hm x hx).Prod (hg.fderiv_within m hm x hx))
Β· intro m hm
exact (L m).Continuous.comp_continuousOn ((hf.cont m hm).Prod (hg.cont m hm))
@@ -2720,10 +2718,10 @@ theorem hasFtaylorSeriesUpToOn_pi :
exact (h i).zero_eq x hx
Β· intro m hm x hx
have := hasFderivWithinAt_pi.2 fun i => (h i).fderivWithin m hm x hx
- convert (L m).HasFderivAt.comp_hasFderivWithinAt x this
+ convert(L m).HasFderivAt.comp_hasFderivWithinAt x this
Β· intro m hm
have := continuousOn_pi.2 fun i => (h i).cont m hm
- convert (L m).Continuous.comp_continuousOn this
+ convert(L m).Continuous.comp_continuousOn this
#align has_ftaylor_series_up_to_on_pi hasFtaylorSeriesUpToOn_pi
@[simp]
@@ -3314,8 +3312,8 @@ theorem contDiffAt_ring_inverse [CompleteSpace R] (x : RΛ£) : ContDiffAt π n
rw [inverse_unit]
exact hasFderivAt_ring_inverse y
Β·
- convert
- (mul_left_right_is_bounded_bilinear π R).ContDiff.neg.comp_contDiffAt (x : R) (IH.prod IH)
+ convert(mul_left_right_is_bounded_bilinear π R).ContDiff.neg.comp_contDiffAt (x : R)
+ (IH.prod IH)
Β· exact cont_diff_at_top.mpr Itop
#align cont_diff_at_ring_inverse contDiffAt_ring_inverse
@@ -3861,8 +3859,7 @@ theorem HasFtaylorSeriesUpToOn.restrictScalars (h : HasFtaylorSeriesUpToOn n f p
{ zero_eq := fun x hx => h.zero_eq x hx
fderivWithin := by
intro m hm x hx
- convert
- (ContinuousMultilinearMap.restrictScalarsLinear π).HasFderivAt.comp_hasFderivWithinAt _
+ convert(ContinuousMultilinearMap.restrictScalarsLinear π).HasFderivAt.comp_hasFderivWithinAt _
((h.fderiv_within m hm x hx).restrictScalars π)
cont := fun m hm =>
ContinuousMultilinearMap.continuous_restrictScalars.comp_continuousOn (h.cont m hm) }
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -1171,7 +1171,7 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
rwa [fderivWithin_inter (IsOpen.mem_nhds o_open hy.2) (hs y hy.1)] at A
#align cont_diff_on_succ_iff_fderiv_within contDiffOn_succ_iff_fderivWithin
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
/-- A function is `C^(n + 1)` on an open domain if and only if it is
differentiable there, and its derivative (expressed with `fderiv`) is `C^n`. -/
theorem contDiffOn_succ_iff_fderiv_of_open {n : β} (hs : IsOpen s) :
@@ -1180,7 +1180,7 @@ theorem contDiffOn_succ_iff_fderiv_of_open {n : β} (hs : IsOpen s) :
by
rw [contDiffOn_succ_iff_fderivWithin hs.unique_diff_on]
trace
- "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
+ "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
apply contDiffOn_congr
intro x hx
exact fderivWithin_of_open hs hx
@@ -1204,7 +1204,7 @@ theorem contDiffOn_top_iff_fderivWithin (hs : UniqueDiffOn π s) :
exact WithTop.coe_le_coe.2 (Nat.le_succ n)
#align cont_diff_on_top_iff_fderiv_within contDiffOn_top_iff_fderivWithin
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
/-- A function is `C^β` on an open domain if and only if it is differentiable there, and its
derivative (expressed with `fderiv`) is `C^β`. -/
theorem contDiffOn_top_iff_fderiv_of_open (hs : IsOpen s) :
@@ -1212,7 +1212,7 @@ theorem contDiffOn_top_iff_fderiv_of_open (hs : IsOpen s) :
by
rw [contDiffOn_top_iff_fderivWithin hs.unique_diff_on]
trace
- "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
+ "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
apply contDiffOn_congr
intro x hx
exact fderivWithin_of_open hs hx
@@ -3742,7 +3742,7 @@ theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ)
exact (this.is_bounded_linear_map_right _).ContDiff
#align cont_diff_on_succ_iff_deriv_within contDiffOn_succ_iff_derivWithin
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
/-- A function is `C^(n + 1)` on an open domain if and only if it is
differentiable there, and its derivative (formulated with `deriv`) is `C^n`. -/
theorem contDiffOn_succ_iff_deriv_of_open {n : β} (hs : IsOpen sβ) :
@@ -3750,7 +3750,7 @@ theorem contDiffOn_succ_iff_deriv_of_open {n : β} (hs : IsOpen sβ) :
by
rw [contDiffOn_succ_iff_derivWithin hs.unique_diff_on]
trace
- "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
+ "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
exact contDiffOn_congr fun _ => derivWithin_of_open hs
#align cont_diff_on_succ_iff_deriv_of_open contDiffOn_succ_iff_deriv_of_open
@@ -3771,7 +3771,7 @@ theorem contDiffOn_top_iff_derivWithin (hs : UniqueDiffOn π sβ) :
exact WithTop.coe_le_coe.2 (Nat.le_succ n)
#align cont_diff_on_top_iff_deriv_within contDiffOn_top_iff_derivWithin
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
/-- A function is `C^β` on an open domain if and only if it is differentiable
there, and its derivative (formulated with `deriv`) is `C^β`. -/
theorem contDiffOn_top_iff_deriv_of_open (hs : IsOpen sβ) :
@@ -3779,7 +3779,7 @@ theorem contDiffOn_top_iff_deriv_of_open (hs : IsOpen sβ) :
by
rw [contDiffOn_top_iff_derivWithin hs.unique_diff_on]
trace
- "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:76:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
+ "./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]]"
exact contDiffOn_congr fun _ => derivWithin_of_open hs
#align cont_diff_on_top_iff_deriv_of_open contDiffOn_top_iff_deriv_of_open
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -607,19 +607,19 @@ private theorem ContDiffOn.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu]
have wu : w β u := fun y hy => hy.2.1
have ws : w β s := fun y hy => hy.1
refine' β¨w, _, fun y => (g' (f y)).comp (f' y), _, _β©
- show w β π[s] x
- Β· apply Filter.inter_mem self_mem_nhdsWithin
+ Β· show w β π[s] x
+ apply Filter.inter_mem self_mem_nhdsWithin
apply Filter.inter_mem hu
apply ContinuousWithinAt.preimage_mem_nhdsWithin'
Β· rw [β continuousWithinAt_inter' hu]
exact (hf' x xu).differentiableWithinAt.continuousWithinAt.mono (inter_subset_right _ _)
Β· apply nhdsWithin_mono _ _ hv
exact Subset.trans (image_subset_iff.mpr st) (subset_insert (f x) t)
- show β y β w, HasFDerivWithinAt (g β f) ((g' (f y)).comp (f' y)) w y
- Β· rintro y β¨-, yu, yvβ©
+ Β· show β y β w, HasFDerivWithinAt (g β f) ((g' (f y)).comp (f' y)) w y
+ rintro y β¨-, yu, yvβ©
exact (hg' (f y) yv).comp y ((hf' y yu).mono wu) wv
- show ContDiffOn π n (fun y => (g' (f y)).comp (f' y)) w
- Β· have A : ContDiffOn π n (fun y => g' (f y)) w :=
+ Β· show ContDiffOn π n (fun y => (g' (f y)).comp (f' y)) w
+ have A : ContDiffOn π n (fun y => g' (f y)) w :=
IH g'_diff ((hf.of_le (WithTop.coe_le_coe.2 (Nat.le_succ n))).mono ws) wv
have B : ContDiffOn π n f' w := f'_diff.mono wu
have C : ContDiffOn π n (fun y => (g' (f y), f' y)) w := A.prod B
There is a technical issue: I need to register two local instances to be even able to state the norm estimates. The issue is typeclass inference getting stuck in complicated types of linear maps...
@@ -1673,6 +1673,10 @@ theorem iteratedFDeriv_const_smul_apply {x : E} (hf : ContDiff π i f) :
exact iteratedFDerivWithin_const_smul_apply hf uniqueDiffOn_univ (Set.mem_univ _)
#align iterated_fderiv_const_smul_apply iteratedFDeriv_const_smul_apply
+theorem iteratedFDeriv_const_smul_apply' {x : E} (hf : ContDiff π i f) :
+ iteratedFDeriv π i (fun x β¦ a β’ f x) x = a β’ iteratedFDeriv π i f x :=
+ iteratedFDeriv_const_smul_apply hf
+
end ConstSMul
/-! ### Cartesian product of two functions -/
@@ -544,7 +544,7 @@ theorem norm_iteratedFDerivWithin_clm_apply {f : E β F βL[π] G} {g : E
have hB : βBβ β€ 1 := by
simp only [B, ContinuousLinearMap.opNorm_flip, ContinuousLinearMap.apply]
refine' ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun f => _
- simp only [ContinuousLinearMap.coe_id', id.def, one_mul]
+ simp only [ContinuousLinearMap.coe_id', id, one_mul]
rfl
exact B.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one hf hg hs hx hn hB
#align norm_iterated_fderiv_within_clm_apply norm_iteratedFDerivWithin_clm_apply
@@ -155,36 +155,14 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
(ContinuousLinearMap.compL π Fu G Gu (isoG.symm : G βL[π] Gu)) Buβ := rfl
have Bu_eq : (fun y => Bu (fu y) (gu y)) = isoG.symm β (fun y => B (f y) (g y)) β isoD := by
ext1 y
- -- Porting note: the two blocks of `rw`s below were
- -- ```
- -- simp only [ContinuousLinearMap.compL_apply, Function.comp_apply,
- -- ContinuousLinearMap.coe_comp', LinearIsometryEquiv.coe_coe'',
- -- ContinuousLinearMap.flip_apply, LinearIsometryEquiv.apply_symm_apply]
- -- ```
- rw [hBu]
- iterate 2 rw [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
- Function.comp_apply]
- rw [hBuβ]
- iterate 2 rw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp',
- Function.comp_apply]
- rw [hfu, Function.comp_apply, LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.coe_coe'',
- LinearIsometryEquiv.apply_symm_apply isoE, Function.comp_apply,
- hgu, LinearIsometryEquiv.coe_coe'', Function.comp_apply,
- LinearIsometryEquiv.apply_symm_apply isoF]
- simp only [Function.comp_apply]
+ simp [hBu, hBuβ, hfu, hgu]
-- All norms are preserved by the lifting process.
have Bu_le : βBuβ β€ βBβ := by
refine' ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) fun y => _
refine' ContinuousLinearMap.opNorm_le_bound _ (by positivity) fun x => _
- set_option tactic.skipAssignedInstances false in
- simp only [Bu, ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
- Function.comp_apply, LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply,
+ simp only [hBu, hBuβ, compL_apply, coe_comp', Function.comp_apply,
+ ContinuousLinearEquiv.coe_coe, LinearIsometryEquiv.coe_coe, flip_apply,
LinearIsometryEquiv.norm_map]
- rw [ContinuousLinearMap.coe_comp', Function.comp_apply, ContinuousLinearMap.compL_apply,
- ContinuousLinearMap.coe_comp', Function.comp_apply]
- iterate 2 rw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp',
- Function.comp_apply]
- simp only [LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.norm_map]
calc
βB (isoE y) (isoF x)β β€ βB (isoE y)β * βisoF xβ := ContinuousLinearMap.le_opNorm _ _
_ β€ βBβ * βisoE yβ * βisoF xβ := by gcongr; apply ContinuousLinearMap.le_opNorm
Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.
@@ -550,7 +550,7 @@ theorem ContDiffAt.prod {f : E β F} {g : E β G} (hf : ContDiffAt π n f x)
ContDiffWithinAt.prod (contDiffWithinAt_univ.2 hf) (contDiffWithinAt_univ.2 hg)
#align cont_diff_at.prod ContDiffAt.prod
-/-- The cartesian product of `C^n` functions is `C^n`.-/
+/-- The cartesian product of `C^n` functions is `C^n`. -/
theorem ContDiff.prod {f : E β F} {g : E β G} (hf : ContDiff π n f) (hg : ContDiff π n g) :
ContDiff π n fun x : E => (f x, g x) :=
contDiffOn_univ.1 <| ContDiffOn.prod (contDiffOn_univ.2 hf) (contDiffOn_univ.2 hg)
@@ -476,7 +476,7 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
_ = β i in Finset.range (n + 1), (n ! : β) * 1 * C * D ^ (n + 1) * ((n - i)! : β)β»ΒΉ := by
congr! with i hi
Β· apply inv_mul_cancel
- simpa only [Ne.def, Nat.cast_eq_zero] using i.factorial_ne_zero
+ simpa only [Ne, Nat.cast_eq_zero] using i.factorial_ne_zero
Β· rw [β pow_add]
congr 1
rw [Nat.add_succ, Nat.succ_inj']
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : β (n : β) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^
in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n x
and notnpowRec n x * x
in the definition to make sure that definitional unfolding ofnpowRec
is blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ
and pow_succ'
have switched their meanings.Ideal.IsPrime.mul_mem_pow
which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul
.@@ -1543,7 +1543,7 @@ theorem contDiff_prod {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'} (h : β i β t,
theorem ContDiff.pow {f : E β πΈ} (hf : ContDiff π n f) : β m : β, ContDiff π n fun x => f x ^ m
| 0 => by simpa using contDiff_const
- | m + 1 => by simpa [pow_succ] using hf.mul (hf.pow m)
+ | m + 1 => by simpa [pow_succ] using (hf.pow m).mul hf
#align cont_diff.pow ContDiff.pow
theorem ContDiffWithinAt.pow {f : E β πΈ} (hf : ContDiffWithinAt π n f s x) (m : β) :
IsROrC
to RCLike
(#10819)
IsROrC
contains data, which goes against the expectation that classes prefixed with Is
are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC
to RCLike
.
@@ -26,7 +26,7 @@ section Real
its extension fields such as `β`).
-/
-variable {n : ββ} {π : Type*} [IsROrC π] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π E']
+variable {n : ββ} {π : Type*} [RCLike π] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π E']
{F' : Type*} [NormedAddCommGroup F'] [NormedSpace π F']
/-- If a function has a Taylor series at order at least 1, then at points in the interior of the
apply foo.mpr
by rw [foo]
(#11515)
Sometimes, that line can be golfed into the next line. Inspired by a comment of @loefflerd; any decisions are my own.
@@ -1765,7 +1765,7 @@ theorem contDiffAt_ring_inverse [CompleteSpace R] (x : RΛ£) :
Β· rintro _ β¨x', rflβ©
exact (inverse_continuousAt x').continuousWithinAt
Β· simp [ftaylorSeriesWithin]
- Β· apply contDiffAt_succ_iff_hasFDerivAt.mpr
+ Β· rw [contDiffAt_succ_iff_hasFDerivAt]
refine' β¨fun x : R => -mulLeftRight π R (inverse x) (inverse x), _, _β©
Β· refine' β¨{ y : R | IsUnit y }, x.nhds, _β©
rintro _ β¨y, rflβ©
@@ -1883,7 +1883,7 @@ theorem PartialHomeomorph.contDiffAt_symm [CompleteSpace E] (f : PartialHomeomor
Β· rw [contDiffAt_zero]
exact β¨f.target, IsOpen.mem_nhds f.open_target ha, f.continuousOn_invFunβ©
Β· obtain β¨f', β¨u, hu, hff'β©, hf'β© := contDiffAt_succ_iff_hasFDerivAt.mp hf
- apply contDiffAt_succ_iff_hasFDerivAt.mpr
+ rw [contDiffAt_succ_iff_hasFDerivAt]
-- For showing `n.succ` times continuous differentiability (the main inductive step), it
-- suffices to produce the derivative and show that it is `n` times continuously differentiable
have eq_fβ' : f' (f.symm a) = fβ' := (hff' (f.symm a) (mem_of_mem_nhds hu)).unique hfβ'
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -859,7 +859,6 @@ theorem contDiffWithinAt_snd {s : Set (E Γ F)} {p : E Γ F} :
section NAry
variable {Eβ Eβ Eβ Eβ : Type*}
-
variable [NormedAddCommGroup Eβ] [NormedAddCommGroup Eβ] [NormedAddCommGroup Eβ]
[NormedAddCommGroup Eβ] [NormedSpace π Eβ] [NormedSpace π Eβ] [NormedSpace π Eβ]
[NormedSpace π Eβ]
@@ -1629,7 +1628,6 @@ Porting note (#11215): TODO: generalize results in this section.
section ConstSMul
variable {R : Type*} [Semiring R] [Module R F] [SMulCommClass π R F]
-
variable [ContinuousConstSMul R F]
-- The scalar multiplication with a constant is smooth.
@@ -1682,7 +1680,6 @@ end ConstSMul
section Prod_map
variable {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π E']
-
variable {F' : Type*} [NormedAddCommGroup F'] [NormedSpace π F']
/-- The product map of two `C^n` functions within a set at a point is `C^n`
@@ -2140,11 +2137,8 @@ over `π`.
variable (π) {π' : Type*} [NontriviallyNormedField π']
-- Porting note: this couldn't be on the same line as the binder type update of `π`
variable [NormedAlgebra π π']
-
variable [NormedSpace π' E] [IsScalarTower π π' E]
-
variable [NormedSpace π' F] [IsScalarTower π π' F]
-
variable {p' : E β FormalMultilinearSeries π' E F}
theorem HasFTaylorSeriesUpToOn.restrictScalars (h : HasFTaylorSeriesUpToOn n f p' s) :
@@ -1230,7 +1230,8 @@ theorem contDiff_pi : ContDiff π n Ξ¦ β β i, ContDiff π n fun x => Ξ¦
simp only [β contDiffOn_univ, contDiffOn_pi]
#align cont_diff_pi contDiff_pi
-theorem contDiff_update (k : ββ) (x : β i, F' i) (i : ΞΉ) : ContDiff π k (update x i) := by
+theorem contDiff_update [DecidableEq ΞΉ] (k : ββ) (x : β i, F' i) (i : ΞΉ) :
+ ContDiff π k (update x i) := by
rw [contDiff_pi]
intro j
dsimp [Function.update]
@@ -1240,7 +1241,8 @@ theorem contDiff_update (k : ββ) (x : β i, F' i) (i : ΞΉ) : ContDiff π
Β· exact contDiff_const
variable (F') in
-theorem contDiff_single (k : ββ) (i : ΞΉ) : ContDiff π k (Pi.single i : F' i β β i, F' i) :=
+theorem contDiff_single [DecidableEq ΞΉ] (k : ββ) (i : ΞΉ) :
+ ContDiff π k (Pi.single i : F' i β β i, F' i) :=
contDiff_update k 0 i
variable (π E)
@@ -1365,7 +1365,7 @@ theorem ContDiffOn.neg {s : Set E} {f : E β F} (hf : ContDiffOn π n f s) :
variable {i : β}
--- Porting note: TODO: define `Neg` instance on `ContinuousLinearEquiv`,
+-- Porting note (#11215): TODO: define `Neg` instance on `ContinuousLinearEquiv`,
-- prove it from `ContinuousLinearEquiv.iteratedFDerivWithin_comp_left`
theorem iteratedFDerivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s) (hx : x β s) :
iteratedFDerivWithin π i (-f) s x = -iteratedFDerivWithin π i f s x := by
@@ -1617,7 +1617,7 @@ end SMul
/-! ### Constant scalar multiplication
-Porting note: TODO: generalize results in this section.
+Porting note (#11215): TODO: generalize results in this section.
1. It should be possible to assume `[Monoid R] [DistribMulAction R F] [SMulCommClass π R F]`.
2. If `c` is a unit (or `R` is a group), then one can drop `ContDiff*` assumptions in some
This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0
branch as we update to intermediate nightlies.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>
@@ -176,6 +176,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
have Bu_le : βBuβ β€ βBβ := by
refine' ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) fun y => _
refine' ContinuousLinearMap.opNorm_le_bound _ (by positivity) fun x => _
+ set_option tactic.skipAssignedInstances false in
simp only [Bu, ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
Function.comp_apply, LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply,
LinearIsometryEquiv.norm_map]
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -466,7 +466,7 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
-- We are left with trivial algebraic manipulations to see that this is smaller than
-- the claimed bound.
_ = β i in Finset.range (n + 1),
- -- porting note: had to insert a few more explicit type ascriptions in this and similar
+ -- Porting note: had to insert a few more explicit type ascriptions in this and similar
-- expressions.
(n ! : β) * ((i ! : β)β»ΒΉ * i !) * C * (D ^ i * D ^ (n - i + 1)) * ((n - i)! : β)β»ΒΉ := by
congr! 1 with i hi
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -912,7 +912,7 @@ theorem ContDiffOn.clm_apply {f : E β F βL[π] G} {g : E β F} {n : β
isBoundedBilinearMap_apply.contDiff.comp_contDiff_onβ hf hg
#align cont_diff_on.clm_apply ContDiffOn.clm_apply
--- porting note: In Lean 3 we had to give implicit arguments in proofs like the following,
+-- Porting note: In Lean 3 we had to give implicit arguments in proofs like the following,
-- to speed up elaboration. In Lean 4 this isn't necessary anymore.
theorem ContDiff.smulRight {f : E β F βL[π] π} {g : E β G} {n : ββ} (hf : ContDiff π n f)
(hg : ContDiff π n g) : ContDiff π n fun x => (f x).smulRight (g x) :=
@@ -1365,7 +1365,7 @@ theorem ContDiffOn.neg {s : Set E} {f : E β F} (hf : ContDiffOn π n f s) :
variable {i : β}
--- porting note: TODO: define `Neg` instance on `ContinuousLinearEquiv`,
+-- Porting note: TODO: define `Neg` instance on `ContinuousLinearEquiv`,
-- prove it from `ContinuousLinearEquiv.iteratedFDerivWithin_comp_left`
theorem iteratedFDerivWithin_neg_apply {f : E β F} (hu : UniqueDiffOn π s) (hx : x β s) :
iteratedFDerivWithin π i (-f) s x = -iteratedFDerivWithin π i f s x := by
@@ -1745,7 +1745,7 @@ end Prod_map
section AlgebraInverse
variable (π) {R : Type*} [NormedRing R]
--- porting note: this couldn't be on the same line as the binder type update of `π`
+-- Porting note: this couldn't be on the same line as the binder type update of `π`
variable [NormedAlgebra π R]
open NormedRing ContinuousLinearMap Ring
@@ -2136,7 +2136,7 @@ over `π`.
variable (π) {π' : Type*} [NontriviallyNormedField π']
--- porting note: this couldn't be on the same line as the binder type update of `π`
+-- Porting note: this couldn't be on the same line as the binder type update of `π`
variable [NormedAlgebra π π']
variable [NormedSpace π' E] [IsScalarTower π π' E]
@@ -2149,7 +2149,7 @@ theorem HasFTaylorSeriesUpToOn.restrictScalars (h : HasFTaylorSeriesUpToOn n f p
HasFTaylorSeriesUpToOn n f (fun x => (p' x).restrictScalars π) s where
zero_eq x hx := h.zero_eq x hx
fderivWithin m hm x hx := by
- simpa only using -- porting note: added `by simpa only using`
+ simpa only using -- Porting note: added `by simpa only using`
(ContinuousMultilinearMap.restrictScalarsLinear π).hasFDerivAt.comp_hasFDerivWithinAt x <|
(h.fderivWithin m hm x hx).restrictScalars π
cont m hm := ContinuousMultilinearMap.continuous_restrictScalars.comp_continuousOn (h.cont m hm)
add (iterated) deriv for prod
HasFDerivAt
+ variants for Finset.prod
(and ContinuousMultilinearMap.mkPiAlgebra
)iteratedFDerivWithin
equivalents for zero, const (resolves a todo in Analysis.Calculus.ContDiff.Basic
)iteratedFDeriv[Within]_sum
for symmetrySym
and Finset.{prod,sum}
@@ -4,7 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-/
import Mathlib.Analysis.Calculus.ContDiff.Basic
+import Mathlib.Data.Finset.Sym
import Mathlib.Data.Nat.Choose.Cast
+import Mathlib.Data.Nat.Choose.Multinomial
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
@@ -290,7 +292,8 @@ end
section
-variable {A : Type*} [NormedRing A] [NormedAlgebra π A]
+variable {ΞΉ : Type*} {A : Type*} [NormedRing A] [NormedAlgebra π A] {A' : Type*} [NormedCommRing A']
+ [NormedAlgebra π A']
theorem norm_iteratedFDerivWithin_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiffOn π N f s)
(hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s) {n : β}
@@ -311,6 +314,62 @@ theorem norm_iteratedFDeriv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf
hf.contDiffOn hg.contDiffOn uniqueDiffOn_univ (mem_univ x) hn
#align norm_iterated_fderiv_mul_le norm_iteratedFDeriv_mul_le
+-- TODO: Add `norm_iteratedFDeriv[Within]_list_prod_le` for non-commutative `NormedRing A`.
+
+theorem norm_iteratedFDerivWithin_prod_le [DecidableEq ΞΉ] [NormOneClass A'] {u : Finset ΞΉ}
+ {f : ΞΉ β E β A'} {N : ββ} (hf : β i β u, ContDiffOn π N (f i) s) (hs : UniqueDiffOn π s) {x : E}
+ (hx : x β s) {n : β} (hn : (n : ββ) β€ N) :
+ βiteratedFDerivWithin π n (β j in u, f j Β·) s xβ β€
+ β p in u.sym n, (p : Multiset ΞΉ).multinomial *
+ β j in u, βiteratedFDerivWithin π (Multiset.count j p) (f j) s xβ := by
+ induction u using Finset.induction generalizing n with
+ | empty =>
+ cases n with
+ | zero => simp [Sym.eq_nil_of_card_zero]
+ | succ n => simp [iteratedFDerivWithin_succ_const _ _ hs hx]
+ | @insert i u hi IH =>
+ conv => lhs; simp only [Finset.prod_insert hi]
+ simp only [Finset.mem_insert, forall_eq_or_imp] at hf
+ refine le_trans (norm_iteratedFDerivWithin_mul_le hf.1 (contDiffOn_prod hf.2) hs hx hn) ?_
+ rw [β Finset.sum_coe_sort (Finset.sym _ _)]
+ rw [Finset.sum_equiv (Finset.symInsertEquiv hi) (t := Finset.univ)
+ (g := (fun v β¦ v.multinomial *
+ β j in insert i u, βiteratedFDerivWithin π (v.count j) (f j) s xβ) β
+ Sym.toMultiset β Subtype.val β (Finset.symInsertEquiv hi).symm)
+ (by simp) (by simp only [β comp_apply (g := Finset.symInsertEquiv hi), comp.assoc]; simp)]
+ rw [β Finset.univ_sigma_univ, Finset.sum_sigma, Finset.sum_range]
+ simp only [comp_apply, Finset.symInsertEquiv_symm_apply_coe]
+ refine Finset.sum_le_sum ?_
+ intro m _
+ specialize IH hf.2 (n := n - m) (le_trans (WithTop.coe_le_coe.mpr (n.sub_le m)) hn)
+ refine le_trans (mul_le_mul_of_nonneg_left IH (by simp [mul_nonneg])) ?_
+ rw [Finset.mul_sum, β Finset.sum_coe_sort]
+ refine Finset.sum_le_sum ?_
+ simp only [Finset.mem_univ, forall_true_left, Subtype.forall, Finset.mem_sym_iff]
+ intro p hp
+ refine le_of_eq ?_
+ rw [Finset.prod_insert hi]
+ have hip : i β p := mt (hp i) hi
+ rw [Sym.count_coe_fill_self_of_not_mem hip, Sym.multinomial_coe_fill_of_not_mem hip]
+ suffices β j in u, βiteratedFDerivWithin π (Multiset.count j p) (f j) s xβ =
+ β j in u, βiteratedFDerivWithin π (Multiset.count j (Sym.fill i m p)) (f j) s xβ by
+ rw [this, Nat.cast_mul]
+ ring
+ refine Finset.prod_congr rfl ?_
+ intro j hj
+ have hji : j β i := mt (Β· βΈ hj) hi
+ rw [Sym.count_coe_fill_of_ne hji]
+
+theorem norm_iteratedFDeriv_prod_le [DecidableEq ΞΉ] [NormOneClass A'] {u : Finset ΞΉ}
+ {f : ΞΉ β E β A'} {N : ββ} (hf : β i β u, ContDiff π N (f i)) {x : E} {n : β}
+ (hn : (n : ββ) β€ N) :
+ βiteratedFDeriv π n (β j in u, f j Β·) xβ β€
+ β p in u.sym n, (p : Multiset ΞΉ).multinomial *
+ β j in u, βiteratedFDeriv π ((p : Multiset ΞΉ).count j) (f j) xβ := by
+ simpa [iteratedFDerivWithin_univ] using
+ norm_iteratedFDerivWithin_prod_le (fun i hi β¦ (hf i hi).contDiffOn) uniqueDiffOn_univ
+ (mem_univ x) hn
+
end
/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
@@ -95,7 +95,7 @@ theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type*}
have hcont : ContinuousWithinAt f' s x :=
(continuousMultilinearCurryFin1 β E F).continuousAt.comp_continuousWithinAt
((hf.cont _ le_rfl _ (mem_insert _ _)).mono (subset_insert x s))
- replace hK : βf' xββ < K := by simpa only [LinearIsometryEquiv.nnnorm_map]
+ replace hK : βf' xββ < K := by simpa only [f', LinearIsometryEquiv.nnnorm_map]
exact
hs.exists_nhdsWithin_lipschitzOnWith_of_hasFDerivWithinAt_of_nnnorm_lt
(eventually_nhdsWithin_iff.2 <| eventually_of_forall hder) hcont K hK
@@ -174,7 +174,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
have Bu_le : βBuβ β€ βBβ := by
refine' ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) fun y => _
refine' ContinuousLinearMap.opNorm_le_bound _ (by positivity) fun x => _
- simp only [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
+ simp only [Bu, ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
Function.comp_apply, LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply,
LinearIsometryEquiv.norm_map]
rw [ContinuousLinearMap.coe_comp', Function.comp_apply, ContinuousLinearMap.compL_apply,
@@ -190,8 +190,8 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
have hsu : UniqueDiffOn π su := isoD.toContinuousLinearEquiv.uniqueDiffOn_preimage_iff.2 hs
let xu := isoD.symm x
have hxu : xu β su := by
- simpa only [Set.mem_preimage, LinearIsometryEquiv.apply_symm_apply] using hx
- have xu_x : isoD xu = x := by simp only [LinearIsometryEquiv.apply_symm_apply]
+ simpa only [xu, su, Set.mem_preimage, LinearIsometryEquiv.apply_symm_apply] using hx
+ have xu_x : isoD xu = x := by simp only [xu, LinearIsometryEquiv.apply_symm_apply]
have hfu : ContDiffOn π n fu su :=
isoE.symm.contDiff.comp_contDiffOn
((hf.of_le hn).comp_continuousLinearMap (isoD : Du βL[π] D))
@@ -452,8 +452,9 @@ theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β}
let tu := isoF β»ΒΉ' t
have htu : UniqueDiffOn π tu := isoF.toContinuousLinearEquiv.uniqueDiffOn_preimage_iff.2 ht
have hstu : MapsTo fu s tu := fun y hy β¦ by
- simpa only [mem_preimage, comp_apply, LinearIsometryEquiv.apply_symm_apply] using hst hy
- have Ffu : isoF (fu x) = f x := by simp only [comp_apply, LinearIsometryEquiv.apply_symm_apply]
+ simpa only [fu, tu, mem_preimage, comp_apply, LinearIsometryEquiv.apply_symm_apply] using hst hy
+ have Ffu : isoF (fu x) = f x := by
+ simp only [fu, comp_apply, LinearIsometryEquiv.apply_symm_apply]
-- All norms are preserved by the lifting process.
have hfu : ContDiffOn π n fu s := isoF.symm.contDiff.comp_contDiffOn (hf.of_le hn)
have hgu : ContDiffOn π n gu tu :=
@@ -473,7 +474,8 @@ theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β}
βiteratedFDerivWithin π n (g β f) s xβ = βiteratedFDerivWithin π n (gu β fu) s xβ := by
have : gu β fu = isoG.symm β g β f := by
ext x
- simp only [comp_apply, LinearIsometryEquiv.map_eq_iff, LinearIsometryEquiv.apply_symm_apply]
+ simp only [fu, gu, comp_apply, LinearIsometryEquiv.map_eq_iff,
+ LinearIsometryEquiv.apply_symm_apply]
rw [this, LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]
-- deduce the required bound from the one for `gu β fu`.
rw [Nfgu]
@@ -502,7 +504,7 @@ theorem norm_iteratedFDerivWithin_clm_apply {f : E β F βL[π] G} {g : E
βiteratedFDerivWithin π (n - i) g s xβ := by
let B : (F βL[π] G) βL[π] F βL[π] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply π G)
have hB : βBβ β€ 1 := by
- simp only [ContinuousLinearMap.opNorm_flip, ContinuousLinearMap.apply]
+ simp only [B, ContinuousLinearMap.opNorm_flip, ContinuousLinearMap.apply]
refine' ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun f => _
simp only [ContinuousLinearMap.coe_id', id.def, one_mul]
rfl
@@ -651,12 +651,12 @@ theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F β G} {f : E β F} (hg
have main : ContDiffOn π n (gu β fu) (isoE β»ΒΉ' s) := by
apply ContDiffOn.comp_same_univ gu_diff fu_diff
intro y hy
- simp only [ContinuousLinearEquiv.coe_apply, Function.comp_apply, mem_preimage]
+ simp only [fu, ContinuousLinearEquiv.coe_apply, Function.comp_apply, mem_preimage]
rw [isoF.apply_symm_apply (f (isoE y))]
exact st hy
have : gu β fu = (isoG.symm β g β f) β isoE := by
ext y
- simp only [Function.comp_apply]
+ simp only [fu, gu, Function.comp_apply]
rw [isoF.apply_symm_apply (f (isoE y))]
rwa [this, isoE.contDiffOn_comp_iff, isoG.symm.comp_contDiffOn_iff] at main
#align cont_diff_on.comp ContDiffOn.comp
@@ -1859,7 +1859,7 @@ theorem contDiffAt_map_inverse [CompleteSpace E] (e : E βL[π] F) :
have hβ : ContDiff π n Oβ := contDiff_const.clm_comp contDiff_id
refine' hβ.contDiffAt.comp _ (ContDiffAt.comp _ _ hβ.contDiffAt)
convert contDiffAt_ring_inverse π (1 : (E βL[π] E)Λ£)
- simp [one_def]
+ simp [Oβ, one_def]
#align cont_diff_at_map_inverse contDiffAt_map_inverse
end MapInverse
Finset.sum
(#10538)
Also define a new aesop
rule-set and an auxiliary metaprogram proveFinsetNonempty
for dealing with Finset.Nonempty
conditions.
From LeanAPAP
Co-authored-by: Alex J. Best <alex.j.best@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Alex J Best <alex.j.best@gmail.com>
@@ -69,8 +69,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
IH _ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In)
_ β€ βBβ * β i : β in Finset.range (n + 1), n.choose i * βiteratedFDerivWithin π i f s xβ *
βiteratedFDerivWithin π (n - i) (fderivWithin π g s) s xβ :=
- (mul_le_mul_of_nonneg_right (B.norm_precompR_le Du)
- (Finset.sum_nonneg' fun i => by positivity))
+ mul_le_mul_of_nonneg_right (B.norm_precompR_le Du) (by positivity)
_ = _ := by
congr 1
apply Finset.sum_congr rfl fun i hi => ?_
@@ -92,8 +91,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
_ β€ βBβ * β i : β in Finset.range (n + 1),
n.choose i * βiteratedFDerivWithin π i (fderivWithin π f s) s xβ *
βiteratedFDerivWithin π (n - i) g s xβ :=
- (mul_le_mul_of_nonneg_right (B.norm_precompL_le Du)
- (Finset.sum_nonneg' fun i => by positivity))
+ mul_le_mul_of_nonneg_right (B.norm_precompL_le Du) (by positivity)
_ = _ := by
congr 1
apply Finset.sum_congr rfl fun i _ => ?_
@@ -223,8 +221,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
βiteratedFDerivWithin π (n - i) gu su xuβ :=
Bu.norm_iteratedFDerivWithin_le_of_bilinear_aux hfu hgu hsu hxu
simp only [Nfu, Ngu, NBu] at this
- apply this.trans (mul_le_mul_of_nonneg_right Bu_le ?_)
- exact Finset.sum_nonneg' fun i => by positivity
+ exact this.trans (mul_le_mul_of_nonneg_right Bu_le (by positivity))
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
@@ -250,8 +247,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
β i in Finset.range (n + 1), (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
βiteratedFDerivWithin π (n - i) g s xβ := by
apply (B.norm_iteratedFDerivWithin_le_of_bilinear hf hg hs hx hn).trans
- apply mul_le_of_le_one_left (Finset.sum_nonneg' fun i => ?_) hB
- positivity
+ exact mul_le_of_le_one_left (by positivity) hB
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
refine
s (#10762)
I replaced a few "terminal" refine/refine'
s with exact
.
The strategy was very simple-minded: essentially any refine
whose following line had smaller indentation got replaced by exact
and then I cleaned up the mess.
This PR certainly leaves some further terminal refine
s, but maybe the current change is beneficial.
@@ -1005,7 +1005,7 @@ theorem ContDiffWithinAt.hasFDerivWithinAt_nhds {f : E β F β G} {g : E β F
refine' mem_nhdsWithin_insert.mpr β¨this, _β©
refine' (continuousWithinAt_id.prod hg.continuousWithinAt).preimage_mem_nhdsWithin' _
rw [β nhdsWithin_le_iff] at hst hv β’
- refine' (hst.trans <| nhdsWithin_mono _ <| subset_insert _ _).trans hv
+ exact (hst.trans <| nhdsWithin_mono _ <| subset_insert _ _).trans hv
Β· intro z hz
have := hvf' (z, g z) hz.1
refine' this.comp _ (hasFDerivAt_prod_mk_right _ _).hasFDerivWithinAt _
@@ -1670,7 +1670,7 @@ theorem iteratedFDerivWithin_const_smul_apply (hf : ContDiffOn π i f s) (hu :
theorem iteratedFDeriv_const_smul_apply {x : E} (hf : ContDiff π i f) :
iteratedFDeriv π i (a β’ f) x = a β’ iteratedFDeriv π i f x := by
simp_rw [β contDiffOn_univ, β iteratedFDerivWithin_univ] at *
- refine' iteratedFDerivWithin_const_smul_apply hf uniqueDiffOn_univ (Set.mem_univ _)
+ exact iteratedFDerivWithin_const_smul_apply hf uniqueDiffOn_univ (Set.mem_univ _)
#align iterated_fderiv_const_smul_apply iteratedFDeriv_const_smul_apply
end ConstSMul
Basic theorems for iteratedFDerivWithin
@@ -58,17 +58,21 @@ variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddC
/-! ### Constants -/
--- porting note: TODO: prove `HasFTaylorSeriesUpToOn` theorems for zero and a constant
-
@[simp]
-theorem iteratedFDeriv_zero_fun {n : β} : (iteratedFDeriv π n fun _ : E => (0 : F)) = 0 := by
- induction' n with n IH
- Β· ext m; simp
- Β· ext x m
- rw [iteratedFDeriv_succ_apply_left, IH]
- change (fderiv π (fun _ : E => (0 : E[Γn]βL[π] F)) x : E β E[Γn]βL[π] F) (m 0) (tail m) = _
- rw [fderiv_const]
+theorem iteratedFDerivWithin_zero_fun (hs : UniqueDiffOn π s) (hx : x β s) {i : β} :
+ iteratedFDerivWithin π i (fun _ : E β¦ (0 : F)) s x = 0 := by
+ induction i generalizing x with
+ | zero => ext; simp
+ | succ i IH =>
+ ext m
+ rw [iteratedFDerivWithin_succ_apply_left, fderivWithin_congr (fun _ β¦ IH) (IH hx)]
+ rw [fderivWithin_const_apply _ (hs x hx)]
rfl
+
+@[simp]
+theorem iteratedFDeriv_zero_fun {n : β} : (iteratedFDeriv π n fun _ : E β¦ (0 : F)) = 0 :=
+ funext fun x β¦ by simpa [β iteratedFDerivWithin_univ] using
+ iteratedFDerivWithin_zero_fun uniqueDiffOn_univ (mem_univ x)
#align iterated_fderiv_zero_fun iteratedFDeriv_zero_fun
theorem contDiff_zero_fun : ContDiff π n fun _ : E => (0 : F) :=
@@ -119,18 +123,31 @@ theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn π n f s := b
rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const
#align cont_diff_on_of_subsingleton contDiffOn_of_subsingleton
--- porting note: TODO: add a `fderivWithin` version
+theorem iteratedFDerivWithin_succ_const (n : β) (c : F) (hs : UniqueDiffOn π s) (hx : x β s) :
+ iteratedFDerivWithin π (n + 1) (fun _ : E β¦ c) s x = 0 := by
+ ext m
+ rw [iteratedFDerivWithin_succ_apply_right hs hx]
+ rw [iteratedFDerivWithin_congr (fun y hy β¦ fderivWithin_const_apply c (hs y hy)) hx]
+ rw [iteratedFDerivWithin_zero_fun hs hx]
+ simp [ContinuousMultilinearMap.zero_apply (R := π)]
+
theorem iteratedFDeriv_succ_const (n : β) (c : F) :
- (iteratedFDeriv π (n + 1) fun _ : E => c) = 0 := by
- ext x
- simp only [iteratedFDeriv_succ_eq_comp_right, fderiv_const, Pi.zero_apply,
- iteratedFDeriv_zero_fun, comp_apply, LinearIsometryEquiv.map_zero]
+ (iteratedFDeriv π (n + 1) fun _ : E β¦ c) = 0 :=
+ funext fun x β¦ by simpa [β iteratedFDerivWithin_univ] using
+ iteratedFDerivWithin_succ_const n c uniqueDiffOn_univ (mem_univ x)
#align iterated_fderiv_succ_const iteratedFDeriv_succ_const
+theorem iteratedFDerivWithin_const_of_ne {n : β} (hn : n β 0) (c : F)
+ (hs : UniqueDiffOn π s) (hx : x β s) :
+ iteratedFDerivWithin π n (fun _ : E β¦ c) s x = 0 := by
+ cases n with
+ | zero => contradiction
+ | succ n => exact iteratedFDerivWithin_succ_const n c hs hx
+
theorem iteratedFDeriv_const_of_ne {n : β} (hn : n β 0) (c : F) :
- (iteratedFDeriv π n fun _ : E => c) = 0 := by
- cases' Nat.exists_eq_succ_of_ne_zero hn with k hk
- rw [hk, iteratedFDeriv_succ_const]
+ (iteratedFDeriv π n fun _ : E β¦ c) = 0 :=
+ funext fun x β¦ by simpa [β iteratedFDerivWithin_univ] using
+ iteratedFDerivWithin_const_of_ne hn c uniqueDiffOn_univ (mem_univ x)
#align iterated_fderiv_const_of_ne iteratedFDeriv_const_of_ne
/-! ### Smoothness of linear functions -/
@@ -1429,6 +1446,23 @@ theorem ContDiff.sum {ΞΉ : Type*} {f : ΞΉ β E β F} {s : Finset ΞΉ}
simp only [β contDiffOn_univ] at *; exact ContDiffOn.sum h
#align cont_diff.sum ContDiff.sum
+theorem iteratedFDerivWithin_sum_apply {ΞΉ : Type*} {f : ΞΉ β E β F} {u : Finset ΞΉ} {i : β} {x : E}
+ (hs : UniqueDiffOn π s) (hx : x β s) (h : β j β u, ContDiffOn π i (f j) s) :
+ iteratedFDerivWithin π i (β j in u, f j Β·) s x =
+ β j in u, iteratedFDerivWithin π i (f j) s x := by
+ induction u using Finset.cons_induction with
+ | empty => ext; simp [hs, hx]
+ | @cons a u ha IH =>
+ simp only [Finset.mem_cons, forall_eq_or_imp] at h
+ simp only [Finset.sum_cons]
+ rw [iteratedFDerivWithin_add_apply' h.1 (ContDiffOn.sum h.2) hs hx, IH h.2]
+
+theorem iteratedFDeriv_sum {ΞΉ : Type*} {f : ΞΉ β E β F} {u : Finset ΞΉ} {i : β}
+ (h : β j β u, ContDiff π i (f j)) :
+ iteratedFDeriv π i (β j in u, f j Β·) = β j in u, iteratedFDeriv π i (f j) :=
+ funext fun x β¦ by simpa [iteratedFDerivWithin_univ] using
+ iteratedFDerivWithin_sum_apply uniqueDiffOn_univ (mem_univ x) fun j hj β¦ (h j hj).contDiffOn
+
/-! ### Product of two functions -/
section MulProd
Ξ» x,
in doc comments (#10727)
Use Lean 4 syntax fun x β¦
instead, matching the style guide.
This is close to exhaustive for doc comments; mathlib has about 460 remaining uses of Ξ» (not all in Lean 3 syntax).
@@ -562,7 +562,7 @@ in any universe in `u, v, w, max u v, max v w, max u v w`, but it would be extre
lead to a lot of duplication. Instead, we formulate the above proof when all spaces live in the same
universe (where everything is fine), and then we deduce the general result by lifting all our spaces
to a common universe. We use the trick that any space `H` is isomorphic through a continuous linear
-equiv to `ContinuousMultilinearMap (Ξ» (i : Fin 0), E Γ F Γ G) H` to change the universe level,
+equiv to `ContinuousMultilinearMap (fun (i : Fin 0) β¦ E Γ F Γ G) H` to change the universe level,
and then argue that composing with such a linear equiv does not change the fact of being `C^n`,
which we have already proved previously.
-/
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -95,7 +95,7 @@ theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type*}
have hcont : ContinuousWithinAt f' s x :=
(continuousMultilinearCurryFin1 β E F).continuousAt.comp_continuousWithinAt
((hf.cont _ le_rfl _ (mem_insert _ _)).mono (subset_insert x s))
- replace hK : βf' xββ < K; Β· simpa only [LinearIsometryEquiv.nnnorm_map]
+ replace hK : βf' xββ < K := by simpa only [LinearIsometryEquiv.nnnorm_map]
exact
hs.exists_nhdsWithin_lipschitzOnWith_of_hasFDerivWithinAt_of_nnnorm_lt
(eventually_nhdsWithin_iff.2 <| eventually_of_forall hder) hcont K hK
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -11,9 +11,11 @@ import Mathlib.Data.Nat.Choose.Cast
/-!
# Bounds on higher derivatives
+`norm_iteratedFDeriv_comp_le` gives the bound `n! * C * D ^ n` for the `n`-th derivative
+ of `g β f` assuming that the derivatives of `g` are bounded by `C` and the `i`-th
+ derivative of `f` is bounded by `D ^ i`.
-/
-
noncomputable section
open scoped Classical BigOperators NNReal Nat
@@ -146,8 +148,8 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
-- lift the bilinear map `B` to a bilinear map `Bu` on the lifted spaces.
set Buβ : Eu βL[π] Fu βL[π] G := ((B.comp (isoE : Eu βL[π] E)).flip.comp (isoF : Fu βL[π] F)).flip
with hBuβ
- let Bu : Eu βL[π] Fu βL[π] Gu;
- exact ContinuousLinearMap.compL π Eu (Fu βL[π] G) (Fu βL[π] Gu)
+ let Bu : Eu βL[π] Fu βL[π] Gu :=
+ ContinuousLinearMap.compL π Eu (Fu βL[π] G) (Fu βL[π] Gu)
(ContinuousLinearMap.compL π Fu G Gu (isoG.symm : G βL[π] Gu)) Buβ
have hBu : Bu = ContinuousLinearMap.compL π Eu (Fu βL[π] G) (Fu βL[π] Gu)
(ContinuousLinearMap.compL π Fu G Gu (isoG.symm : G βL[π] Gu)) Buβ := rfl
@@ -344,8 +346,8 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
simpa only [pow_one] using (norm_nonneg _).trans (hD 1 le_rfl this)
-- use the inductive assumption to bound the derivatives of `g' β f`.
have I : β i β Finset.range (n + 1),
- βiteratedFDerivWithin π i (fderivWithin π g t β f) s xβ β€ i ! * C * D ^ i
- Β· intro i hi
+ βiteratedFDerivWithin π i (fderivWithin π g t β f) s xβ β€ i ! * C * D ^ i := by
+ intro i hi
simp only [Finset.mem_range_succ_iff] at hi
apply IH i hi
Β· apply hg.fderivWithin ht
@@ -365,8 +367,8 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
have J : β i, βiteratedFDerivWithin π (n - i) (fderivWithin π f s) s xβ β€ D ^ (n - i + 1) := by
intro i
have : βiteratedFDerivWithin π (n - i) (fderivWithin π f s) s xβ =
- βiteratedFDerivWithin π (n - i + 1) f s xβ
- Β· rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, comp_apply, LinearIsometryEquiv.norm_map]
+ βiteratedFDerivWithin π (n - i + 1) f s xβ := by
+ rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, comp_apply, LinearIsometryEquiv.norm_map]
rw [this]
apply hD
Β· simp only [le_add_iff_nonneg_left, zero_le']
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -19,9 +19,6 @@ so on) preserve `C^n` functions. We also expand the API around `C^n` functions.
## Main results
* `ContDiff.comp` states that the composition of two `C^n` functions is `C^n`.
-* `norm_iteratedFDeriv_comp_le` gives the bound `n! * C * D ^ n` for the `n`-th derivative
- of `g β f` assuming that the derivatives of `g` are bounded by `C` and the `i`-th
- derivative of `f` is bounded by `D ^ i`.
Similar results are given for `C^n` functions on domains.
@@ -1982,14 +1979,14 @@ theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ)
intro _
constructor
Β· intro h
- have : derivWithin fβ sβ = (fun u : π βL[π] F => u 1) β fderivWithin π fβ sβ
- Β· ext x; rfl
+ have : derivWithin fβ sβ = (fun u : π βL[π] F => u 1) β fderivWithin π fβ sβ := by
+ ext x; rfl
simp_rw [this]
apply ContDiff.comp_contDiffOn _ h
exact (isBoundedBilinearMap_apply.isBoundedLinearMap_left _).contDiff
Β· intro h
- have : fderivWithin π fβ sβ = smulRight (1 : π βL[π] π) β derivWithin fβ sβ
- Β· ext x; simp [derivWithin]
+ have : fderivWithin π fβ sβ = smulRight (1 : π βL[π] π) β derivWithin fβ sβ := by
+ ext x; simp [derivWithin]
simp only [this]
apply ContDiff.comp_contDiffOn _ h
have : IsBoundedBilinearMap π fun _ : (π βL[π] π) Γ F => _ := isBoundedBilinearMap_smulRight
add ContinuousMultilinearMap.apply
; use for fderiv
, iteratedFDeriv
, SchwartzMap.iteratedPDeriv
Defining ContinuousMultilinearMap.apply
as a CLM (using existing proof of continuity) enables the proof that the application of a ContinuousMultilinearMap
to a constant commutes with differentiation.
This closes a todo in Mathlib/Analysis/Distribution/SchwartzSpace.lean
.
Co-authored-by: Jack Valmadre <jvlmdr@users.noreply.github.com>
@@ -907,6 +907,40 @@ theorem ContDiff.smulRight {f : E β F βL[π] π} {g : E β G} {n : β
end SpecificBilinearMaps
+section ClmApplyConst
+
+/-- Application of a `ContinuousLinearMap` to a constant commutes with `iteratedFDerivWithin`. -/
+theorem iteratedFDerivWithin_clm_apply_const_apply
+ {s : Set E} (hs : UniqueDiffOn π s) {n : ββ} {c : E β F βL[π] G} (hc : ContDiffOn π n c s)
+ {i : β} (hi : i β€ n) {x : E} (hx : x β s) {u : F} {m : Fin i β E} :
+ (iteratedFDerivWithin π i (fun y β¦ (c y) u) s x) m = (iteratedFDerivWithin π i c s x) m u := by
+ induction i generalizing x with
+ | zero => simp
+ | succ i ih =>
+ replace hi : i < n := lt_of_lt_of_le (by norm_cast; simp) hi
+ have h_deriv_apply : DifferentiableOn π (iteratedFDerivWithin π i (fun y β¦ (c y) u) s) s :=
+ (hc.clm_apply contDiffOn_const).differentiableOn_iteratedFDerivWithin hi hs
+ have h_deriv : DifferentiableOn π (iteratedFDerivWithin π i c s) s :=
+ hc.differentiableOn_iteratedFDerivWithin hi hs
+ simp only [iteratedFDerivWithin_succ_apply_left]
+ rw [β fderivWithin_continuousMultilinear_apply_const_apply (hs x hx) (h_deriv_apply x hx)]
+ rw [fderivWithin_congr' (fun x hx β¦ ih hi.le hx) hx]
+ rw [fderivWithin_clm_apply (hs x hx) (h_deriv.continuousMultilinear_apply_const _ x hx)
+ (differentiableWithinAt_const u)]
+ rw [fderivWithin_const_apply _ (hs x hx)]
+ simp only [ContinuousLinearMap.flip_apply, ContinuousLinearMap.comp_zero, zero_add]
+ rw [fderivWithin_continuousMultilinear_apply_const_apply (hs x hx) (h_deriv x hx)]
+
+/-- Application of a `ContinuousLinearMap` to a constant commutes with `iteratedFDeriv`. -/
+theorem iteratedFDeriv_clm_apply_const_apply
+ {n : ββ} {c : E β F βL[π] G} (hc : ContDiff π n c)
+ {i : β} (hi : i β€ n) {x : E} {u : F} {m : Fin i β E} :
+ (iteratedFDeriv π i (fun y β¦ (c y) u) x) m = (iteratedFDeriv π i c x) m u := by
+ simp only [β iteratedFDerivWithin_univ]
+ exact iteratedFDerivWithin_clm_apply_const_apply uniqueDiffOn_univ hc.contDiffOn hi (mem_univ _)
+
+end ClmApplyConst
+
/-- The natural equivalence `(E Γ F) Γ G β E Γ (F Γ G)` is smooth.
Warning: if you think you need this lemma, it is likely that you can simplify your proof by
@@ -50,7 +50,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
induction' n with n IH generalizing Eu Fu Gu
Β· simp only [Nat.zero_eq, norm_iteratedFDerivWithin_zero, zero_add, Finset.range_one,
Finset.sum_singleton, Nat.choose_self, Nat.cast_one, one_mul, Nat.sub_zero, β mul_assoc]
- apply B.le_op_normβ
+ apply B.le_opNormβ
Β· have In : (n : ββ) + 1 β€ n.succ := by simp only [Nat.cast_succ, le_refl]
-- Porting note: the next line is a hack allowing Lean to find the operator norm instance.
let norm := @ContinuousLinearMap.hasOpNorm _ _ Eu ((Du βL[π] Fu) βL[π] Du βL[π] Gu) _ _ _ _ _ _
@@ -172,8 +172,8 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
simp only [Function.comp_apply]
-- All norms are preserved by the lifting process.
have Bu_le : βBuβ β€ βBβ := by
- refine' ContinuousLinearMap.op_norm_le_bound _ (norm_nonneg _) fun y => _
- refine' ContinuousLinearMap.op_norm_le_bound _ (by positivity) fun x => _
+ refine' ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) fun y => _
+ refine' ContinuousLinearMap.opNorm_le_bound _ (by positivity) fun x => _
simp only [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
Function.comp_apply, LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply,
LinearIsometryEquiv.norm_map]
@@ -183,8 +183,8 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
Function.comp_apply]
simp only [LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.norm_map]
calc
- βB (isoE y) (isoF x)β β€ βB (isoE y)β * βisoF xβ := ContinuousLinearMap.le_op_norm _ _
- _ β€ βBβ * βisoE yβ * βisoF xβ := by gcongr; apply ContinuousLinearMap.le_op_norm
+ βB (isoE y) (isoF x)β β€ βB (isoE y)β * βisoF xβ := ContinuousLinearMap.le_opNorm _ _
+ _ β€ βBβ * βisoE yβ * βisoF xβ := by gcongr; apply ContinuousLinearMap.le_opNorm
_ = βBβ * βyβ * βxβ := by simp only [LinearIsometryEquiv.norm_map]
let su := isoD β»ΒΉ' s
have hsu : UniqueDiffOn π su := isoD.toContinuousLinearEquiv.uniqueDiffOn_preimage_iff.2 hs
@@ -277,7 +277,7 @@ theorem norm_iteratedFDerivWithin_smul_le {f : E β π'} {g : E β F} {N :
βiteratedFDerivWithin π (n - i) g s xβ :=
(ContinuousLinearMap.lsmul π π' :
π' βL[π] F βL[π] F).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
- hf hg hs hx hn ContinuousLinearMap.op_norm_lsmul_le
+ hf hg hs hx hn ContinuousLinearMap.opNorm_lsmul_le
#align norm_iterated_fderiv_within_smul_le norm_iteratedFDerivWithin_smul_le
theorem norm_iteratedFDeriv_smul_le {f : E β π'} {g : E β F} {N : ββ} (hf : ContDiff π N f)
@@ -285,7 +285,7 @@ theorem norm_iteratedFDeriv_smul_le {f : E β π'} {g : E β F} {N : ββ}
βiteratedFDeriv π n (fun y => f y β’ g y) xβ β€ β i in Finset.range (n + 1),
(n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ :=
(ContinuousLinearMap.lsmul π π' : π' βL[π] F βL[π] F).norm_iteratedFDeriv_le_of_bilinear_of_le_one
- hf hg x hn ContinuousLinearMap.op_norm_lsmul_le
+ hf hg x hn ContinuousLinearMap.opNorm_lsmul_le
#align norm_iterated_fderiv_smul_le norm_iteratedFDeriv_smul_le
end
@@ -301,7 +301,7 @@ theorem norm_iteratedFDerivWithin_mul_le {f : E β A} {g : E β A} {N : ββ
βiteratedFDerivWithin π (n - i) g s xβ :=
(ContinuousLinearMap.mul π A :
A βL[π] A βL[π] A).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
- hf hg hs hx hn (ContinuousLinearMap.op_norm_mul_le _ _)
+ hf hg hs hx hn (ContinuousLinearMap.opNorm_mul_le _ _)
#align norm_iterated_fderiv_within_mul_le norm_iteratedFDerivWithin_mul_le
theorem norm_iteratedFDeriv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiff π N f)
@@ -504,8 +504,8 @@ theorem norm_iteratedFDerivWithin_clm_apply {f : E β F βL[π] G} {g : E
βiteratedFDerivWithin π (n - i) g s xβ := by
let B : (F βL[π] G) βL[π] F βL[π] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply π G)
have hB : βBβ β€ 1 := by
- simp only [ContinuousLinearMap.op_norm_flip, ContinuousLinearMap.apply]
- refine' ContinuousLinearMap.op_norm_le_bound _ zero_le_one fun f => _
+ simp only [ContinuousLinearMap.opNorm_flip, ContinuousLinearMap.apply]
+ refine' ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun f => _
simp only [ContinuousLinearMap.coe_id', id.def, one_mul]
rfl
exact B.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one hf hg hs hx hn hB
@@ -528,9 +528,9 @@ theorem norm_iteratedFDerivWithin_clm_apply_const {f : E β F βL[π] G} {c
have h := g.norm_compContinuousMultilinearMap_le (iteratedFDerivWithin π n f s x)
rw [β g.iteratedFDerivWithin_comp_left hf hs hx hn] at h
refine' h.trans (mul_le_mul_of_nonneg_right _ (norm_nonneg _))
- refine' g.op_norm_le_bound (norm_nonneg _) fun f => _
+ refine' g.opNorm_le_bound (norm_nonneg _) fun f => _
rw [ContinuousLinearMap.apply_apply, mul_comm]
- exact f.le_op_norm c
+ exact f.le_opNorm c
#align norm_iterated_fderiv_within_clm_apply_const norm_iteratedFDerivWithin_clm_apply_const
theorem norm_iteratedFDeriv_clm_apply_const {f : E β F βL[π] G} {c : F} {x : E} {N : ββ} {n : β}
With multiple changes, it is a good time to check if existing set_option maxHeartbeats
and set_option synthInstance.maxHeartbeats
remain necessary. This brings the number of files with such down from 23 to 9. Most are straight deletions though I did change one proof.
@@ -120,7 +120,6 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
(fun i j => βiteratedFDerivWithin π i f s xβ * βiteratedFDerivWithin π j g s xβ) n).symm
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_aux ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux
-set_option maxHeartbeats 700000 in -- 3.5Γ the default limit
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear:
`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
@@ -3,7 +3,7 @@ Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-/
-import Mathlib.Analysis.Calculus.ContDiff.Basic
+import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.MeanValue
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
Function.left_id
and Function.comp.left_id
into Function.id_comp
.Function.right_id
and Function.comp.right_id
into Function.comp_id
.Function.comp_const_right
and Function.comp_const
into Function.comp_const
, use explicit arguments.Function.const_comp
to Mathlib.Init.Function
, use explicit arguments.@@ -39,7 +39,7 @@ theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E}
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
- rw [β comp.left_id f, β eβ.symm_comp_self]
+ rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
#align cont_diff_on_clm_apply contDiffOn_clm_apply
@@ -1910,7 +1910,7 @@ def restrContDiff (f : PartialHomeomorph E F) (n : β) : PartialHomeomorph E F
haveI H : f.IsImage {x | ContDiffAt π n f x β§ ContDiffAt π n f.symm (f x)}
{y | ContDiffAt π n f.symm y β§ ContDiffAt π n f (f.symm y)} := fun x hx β¦ by
simp [hx, and_comm]
- H.restr <| isOpen_iff_mem_nhds.2 <| fun x β¨hxs, hxf, hxf'β© β¦
+ H.restr <| isOpen_iff_mem_nhds.2 fun x β¨hxs, hxf, hxf'β© β¦
inter_mem (f.open_source.mem_nhds hxs) <| hxf.eventually.and <|
f.continuousAt hxs hxf'.eventually
@@ -1899,7 +1899,7 @@ namespace PartialHomeomorph
variable (π)
-/-- Restrict a local homeomorphism to the subsets of the source and target
+/-- Restrict a partial homeomorphism to the subsets of the source and target
that consist of points `x β f.source`, `y = f x β f.target`
such that `f` is `C^n` at `x` and `f.symm` is `C^n` at `y`.
Nsmul
-> NSMul
, Zpow
-> ZPow
, etc (#9067)
Normalising to naming convention rule number 6.
@@ -1516,7 +1516,7 @@ end MulProd
/-! ### Scalar multiplication -/
-section Smul
+section SMul
-- The scalar multiplication is smooth.
theorem contDiff_smul : ContDiff π n fun p : π Γ F => p.1 β’ p.2 :=
@@ -1548,7 +1548,7 @@ theorem ContDiffOn.smul {s : Set E} {f : E β π} {g : E β F} (hf : ContDif
(hf x hx).smul (hg x hx)
#align cont_diff_on.smul ContDiffOn.smul
-end Smul
+end SMul
/-! ### Constant scalar multiplication
@@ -1559,7 +1559,7 @@ Porting note: TODO: generalize results in this section.
lemmas.
-/
-section ConstSmul
+section ConstSMul
variable {R : Type*} [Semiring R] [Module R F] [SMulCommClass π R F]
@@ -1608,7 +1608,7 @@ theorem iteratedFDeriv_const_smul_apply {x : E} (hf : ContDiff π i f) :
refine' iteratedFDerivWithin_const_smul_apply hf uniqueDiffOn_univ (Set.mem_univ _)
#align iterated_fderiv_const_smul_apply iteratedFDeriv_const_smul_apply
-end ConstSmul
+end ConstSMul
/-! ### Cartesian product of two functions -/
LocalHomeomorph
evokes a "local homeomorphism": this is not what this means.
Instead, this is a homeomorphism on an open set of the domain (extended to the whole space, by the junk value pattern). Hence, partial homeomorphism is more appropriate, and avoids confusion with IsLocallyHomeomorph
.
A future PR will rename LocalEquiv
to PartialEquiv
.
@@ -1810,7 +1810,7 @@ then `f.symm` is `n` times continuously differentiable at the point `a`.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
-theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E F)
+theorem PartialHomeomorph.contDiffAt_symm [CompleteSpace E] (f : PartialHomeomorph E F)
{fβ' : E βL[π] F} {a : F} (ha : a β f.target)
(hfβ' : HasFDerivAt f (fβ' : E βL[π] F) (f.symm a)) (hf : ContDiffAt π n f (f.symm a)) :
ContDiffAt π n f.symm a := by
@@ -1855,7 +1855,7 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
Β· refine' contDiffAt_top.mpr _
intro n
exact Itop n (contDiffAt_top.mp hf n)
-#align local_homeomorph.cont_diff_at_symm LocalHomeomorph.contDiffAt_symm
+#align local_homeomorph.cont_diff_at_symm PartialHomeomorph.contDiffAt_symm
/-- If `f` is an `n` times continuously differentiable homeomorphism,
and if the derivative of `f` at each point is a continuous linear equivalence,
@@ -1867,7 +1867,7 @@ theorem Homeomorph.contDiff_symm [CompleteSpace E] (f : E ββ F) {fβ' : E
(hfβ' : β a, HasFDerivAt f (fβ' a : E βL[π] F) a) (hf : ContDiff π n (f : E β F)) :
ContDiff π n (f.symm : F β E) :=
contDiff_iff_contDiffAt.2 fun x =>
- f.toLocalHomeomorph.contDiffAt_symm (mem_univ x) (hfβ' _) hf.contDiffAt
+ f.toPartialHomeomorph.contDiffAt_symm (mem_univ x) (hfβ' _) hf.contDiffAt
#align homeomorph.cont_diff_symm Homeomorph.contDiff_symm
/-- Let `f` be a local homeomorphism of a nontrivially normed field, let `a` be a point in its
@@ -1876,11 +1876,11 @@ target. if `f` is `n` times continuously differentiable at `f.symm a`, and if th
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
-theorem LocalHomeomorph.contDiffAt_symm_deriv [CompleteSpace π] (f : LocalHomeomorph π π)
+theorem PartialHomeomorph.contDiffAt_symm_deriv [CompleteSpace π] (f : PartialHomeomorph π π)
{fβ' a : π} (hβ : fβ' β 0) (ha : a β f.target) (hfβ' : HasDerivAt f fβ' (f.symm a))
(hf : ContDiffAt π n f (f.symm a)) : ContDiffAt π n f.symm a :=
f.contDiffAt_symm ha (hfβ'.hasFDerivAt_equiv hβ) hf
-#align local_homeomorph.cont_diff_at_symm_deriv LocalHomeomorph.contDiffAt_symm_deriv
+#align local_homeomorph.cont_diff_at_symm_deriv PartialHomeomorph.contDiffAt_symm_deriv
/-- Let `f` be an `n` times continuously differentiable homeomorphism of a nontrivially normed
field. Suppose that the derivative of `f` is never equal to zero. Then `f.symm` is `n` times
@@ -1892,10 +1892,10 @@ theorem Homeomorph.contDiff_symm_deriv [CompleteSpace π] (f : π ββ
(hβ : β x, f' x β 0) (hf' : β x, HasDerivAt f (f' x) x) (hf : ContDiff π n (f : π β π)) :
ContDiff π n (f.symm : π β π) :=
contDiff_iff_contDiffAt.2 fun x =>
- f.toLocalHomeomorph.contDiffAt_symm_deriv (hβ _) (mem_univ x) (hf' _) hf.contDiffAt
+ f.toPartialHomeomorph.contDiffAt_symm_deriv (hβ _) (mem_univ x) (hf' _) hf.contDiffAt
#align homeomorph.cont_diff_symm_deriv Homeomorph.contDiff_symm_deriv
-namespace LocalHomeomorph
+namespace PartialHomeomorph
variable (π)
@@ -1906,7 +1906,7 @@ such that `f` is `C^n` at `x` and `f.symm` is `C^n` at `y`.
Note that `n` is a natural number, not `β`,
because the set of points of `C^β`-smoothness of `f` is not guaranteed to be open. -/
@[simps! apply symm_apply source target]
-def restrContDiff (f : LocalHomeomorph E F) (n : β) : LocalHomeomorph E F :=
+def restrContDiff (f : PartialHomeomorph E F) (n : β) : PartialHomeomorph E F :=
haveI H : f.IsImage {x | ContDiffAt π n f x β§ ContDiffAt π n f.symm (f x)}
{y | ContDiffAt π n f.symm y β§ ContDiffAt π n f (f.symm y)} := fun x hx β¦ by
simp [hx, and_comm]
@@ -1914,13 +1914,13 @@ def restrContDiff (f : LocalHomeomorph E F) (n : β) : LocalHomeomorph E F :=
inter_mem (f.open_source.mem_nhds hxs) <| hxf.eventually.and <|
f.continuousAt hxs hxf'.eventually
-lemma contDiffOn_restrContDiff_source (f : LocalHomeomorph E F) (n : β) :
+lemma contDiffOn_restrContDiff_source (f : PartialHomeomorph E F) (n : β) :
ContDiffOn π n f (f.restrContDiff π n).source := fun _x hx β¦ hx.2.1.contDiffWithinAt
-lemma contDiffOn_restrContDiff_target (f : LocalHomeomorph E F) (n : β) :
+lemma contDiffOn_restrContDiff_target (f : PartialHomeomorph E F) (n : β) :
ContDiffOn π n f.symm (f.restrContDiff π n).target := fun _x hx β¦ hx.2.1.contDiffWithinAt
-end LocalHomeomorph
+end PartialHomeomorph
end FunctionInverse
They have type ContinuousOn ..., hence should be named accordingly. Suggested by @fpvandoorn in #8736.
@@ -1817,7 +1817,7 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
-- We prove this by induction on `n`
induction' n using ENat.nat_induction with n IH Itop
Β· rw [contDiffAt_zero]
- exact β¨f.target, IsOpen.mem_nhds f.open_target ha, f.continuous_invFunβ©
+ exact β¨f.target, IsOpen.mem_nhds f.open_target ha, f.continuousOn_invFunβ©
Β· obtain β¨f', β¨u, hu, hff'β©, hf'β© := contDiffAt_succ_iff_hasFDerivAt.mp hf
apply contDiffAt_succ_iff_hasFDerivAt.mpr
-- For showing `n.succ` times continuous differentiability (the main inductive step), it
[@foo](https://github.com/foo) _ _ _ _ _ ...
by named arguments (#8702)
Using Lean4's named arguments, we manage to remove a few hard-to-read explicit function calls [@foo](https://github.com/foo) _ _ _ _ _ ...
which used to be necessary in Lean3.
Occasionally, this results in slightly longer code. The benefit of named arguments is readability, as well as to reduce the brittleness of the code when the argument order is changed.
Co-authored-by: Michael Rothgang <rothgami@math.hu-berlin.de>
@@ -1437,7 +1437,7 @@ theorem ContDiff.mul {f g : E β πΈ} (hf : ContDiff π n f) (hg : ContDiff
theorem contDiffWithinAt_prod' {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'}
(h : β i β t, ContDiffWithinAt π n (f i) s x) : ContDiffWithinAt π n (β i in t, f i) s x :=
Finset.prod_induction f (fun f => ContDiffWithinAt π n f s x) (fun _ _ => ContDiffWithinAt.mul)
- (@contDiffWithinAt_const _ _ _ _ _ _ _ _ _ _ _ 1) h
+ (contDiffWithinAt_const (c := 1)) h
#align cont_diff_within_at_prod' contDiffWithinAt_prod'
theorem contDiffWithinAt_prod {t : Finset ΞΉ} {f : ΞΉ β E β πΈ'}
LocalHomeomorph.restrContDiff
(#8605)
Restrict the source and the target of a local homeomorphism
to the sets where both f
and f.symm
are C^n
.
@@ -1895,6 +1895,33 @@ theorem Homeomorph.contDiff_symm_deriv [CompleteSpace π] (f : π ββ
f.toLocalHomeomorph.contDiffAt_symm_deriv (hβ _) (mem_univ x) (hf' _) hf.contDiffAt
#align homeomorph.cont_diff_symm_deriv Homeomorph.contDiff_symm_deriv
+namespace LocalHomeomorph
+
+variable (π)
+
+/-- Restrict a local homeomorphism to the subsets of the source and target
+that consist of points `x β f.source`, `y = f x β f.target`
+such that `f` is `C^n` at `x` and `f.symm` is `C^n` at `y`.
+
+Note that `n` is a natural number, not `β`,
+because the set of points of `C^β`-smoothness of `f` is not guaranteed to be open. -/
+@[simps! apply symm_apply source target]
+def restrContDiff (f : LocalHomeomorph E F) (n : β) : LocalHomeomorph E F :=
+ haveI H : f.IsImage {x | ContDiffAt π n f x β§ ContDiffAt π n f.symm (f x)}
+ {y | ContDiffAt π n f.symm y β§ ContDiffAt π n f (f.symm y)} := fun x hx β¦ by
+ simp [hx, and_comm]
+ H.restr <| isOpen_iff_mem_nhds.2 <| fun x β¨hxs, hxf, hxf'β© β¦
+ inter_mem (f.open_source.mem_nhds hxs) <| hxf.eventually.and <|
+ f.continuousAt hxs hxf'.eventually
+
+lemma contDiffOn_restrContDiff_source (f : LocalHomeomorph E F) (n : β) :
+ ContDiffOn π n f (f.restrContDiff π n).source := fun _x hx β¦ hx.2.1.contDiffWithinAt
+
+lemma contDiffOn_restrContDiff_target (f : LocalHomeomorph E F) (n : β) :
+ ContDiffOn π n f.symm (f.restrContDiff π n).target := fun _x hx β¦ hx.2.1.contDiffWithinAt
+
+end LocalHomeomorph
+
end FunctionInverse
section deriv
Mostly, this means replacing "of_open" by "of_isOpen". A few lemmas names were misleading and are corrected differently. Zulip discussion.
@@ -1833,7 +1833,7 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
obtain β¨t, htu, ht, htfβ© := mem_nhds_iff.mp (Filter.inter_mem hu h_nhds)
use f.target β© f.symm β»ΒΉ' t
refine' β¨IsOpen.mem_nhds _ _, _β©
- Β· exact f.preimage_open_of_open_symm ht
+ Β· exact f.isOpen_inter_preimage_symm ht
Β· exact mem_inter ha (mem_preimage.mpr htf)
intro x hx
obtain β¨hxu, e, heβ© := htu hx.2
@@ -1937,11 +1937,11 @@ theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ)
/-- A function is `C^(n + 1)` on an open domain if and only if it is
differentiable there, and its derivative (formulated with `deriv`) is `C^n`. -/
-theorem contDiffOn_succ_iff_deriv_of_open {n : β} (hs : IsOpen sβ) :
+theorem contDiffOn_succ_iff_deriv_of_isOpen {n : β} (hs : IsOpen sβ) :
ContDiffOn π (n + 1 : β) fβ sβ β DifferentiableOn π fβ sβ β§ ContDiffOn π n (deriv fβ) sβ := by
rw [contDiffOn_succ_iff_derivWithin hs.uniqueDiffOn]
- exact Iff.rfl.and (contDiffOn_congr fun _ => derivWithin_of_open hs)
-#align cont_diff_on_succ_iff_deriv_of_open contDiffOn_succ_iff_deriv_of_open
+ exact Iff.rfl.and (contDiffOn_congr fun _ => derivWithin_of_isOpen hs)
+#align cont_diff_on_succ_iff_deriv_of_open contDiffOn_succ_iff_deriv_of_isOpen
/-- A function is `C^β` on a domain with unique derivatives if and only if it is differentiable
there, and its derivative (formulated with `derivWithin`) is `C^β`. -/
@@ -1961,11 +1961,11 @@ theorem contDiffOn_top_iff_derivWithin (hs : UniqueDiffOn π sβ) :
/-- A function is `C^β` on an open domain if and only if it is differentiable
there, and its derivative (formulated with `deriv`) is `C^β`. -/
-theorem contDiffOn_top_iff_deriv_of_open (hs : IsOpen sβ) :
+theorem contDiffOn_top_iff_deriv_of_isOpen (hs : IsOpen sβ) :
ContDiffOn π β fβ sβ β DifferentiableOn π fβ sβ β§ ContDiffOn π β (deriv fβ) sβ := by
rw [contDiffOn_top_iff_derivWithin hs.uniqueDiffOn]
- exact Iff.rfl.and <| contDiffOn_congr fun _ => derivWithin_of_open hs
-#align cont_diff_on_top_iff_deriv_of_open contDiffOn_top_iff_deriv_of_open
+ exact Iff.rfl.and <| contDiffOn_congr fun _ => derivWithin_of_isOpen hs
+#align cont_diff_on_top_iff_deriv_of_open contDiffOn_top_iff_deriv_of_isOpen
protected theorem ContDiffOn.derivWithin (hf : ContDiffOn π n fβ sβ) (hs : UniqueDiffOn π sβ)
(hmn : m + 1 β€ n) : ContDiffOn π m (derivWithin fβ sβ) sβ := by
@@ -1978,26 +1978,26 @@ protected theorem ContDiffOn.derivWithin (hf : ContDiffOn π n fβ sβ) (hs
exact ((contDiffOn_succ_iff_derivWithin hs).1 (hf.of_le hmn)).2
#align cont_diff_on.deriv_within ContDiffOn.derivWithin
-theorem ContDiffOn.deriv_of_open (hf : ContDiffOn π n fβ sβ) (hs : IsOpen sβ) (hmn : m + 1 β€ n) :
+theorem ContDiffOn.deriv_of_isOpen (hf : ContDiffOn π n fβ sβ) (hs : IsOpen sβ) (hmn : m + 1 β€ n) :
ContDiffOn π m (deriv fβ) sβ :=
- (hf.derivWithin hs.uniqueDiffOn hmn).congr fun _ hx => (derivWithin_of_open hs hx).symm
-#align cont_diff_on.deriv_of_open ContDiffOn.deriv_of_open
+ (hf.derivWithin hs.uniqueDiffOn hmn).congr fun _ hx => (derivWithin_of_isOpen hs hx).symm
+#align cont_diff_on.deriv_of_open ContDiffOn.deriv_of_isOpen
theorem ContDiffOn.continuousOn_derivWithin (h : ContDiffOn π n fβ sβ) (hs : UniqueDiffOn π sβ)
(hn : 1 β€ n) : ContinuousOn (derivWithin fβ sβ) sβ :=
((contDiffOn_succ_iff_derivWithin hs).1 (h.of_le hn)).2.continuousOn
#align cont_diff_on.continuous_on_deriv_within ContDiffOn.continuousOn_derivWithin
-theorem ContDiffOn.continuousOn_deriv_of_open (h : ContDiffOn π n fβ sβ) (hs : IsOpen sβ)
+theorem ContDiffOn.continuousOn_deriv_of_isOpen (h : ContDiffOn π n fβ sβ) (hs : IsOpen sβ)
(hn : 1 β€ n) : ContinuousOn (deriv fβ) sβ :=
- ((contDiffOn_succ_iff_deriv_of_open hs).1 (h.of_le hn)).2.continuousOn
-#align cont_diff_on.continuous_on_deriv_of_open ContDiffOn.continuousOn_deriv_of_open
+ ((contDiffOn_succ_iff_deriv_of_isOpen hs).1 (h.of_le hn)).2.continuousOn
+#align cont_diff_on.continuous_on_deriv_of_open ContDiffOn.continuousOn_deriv_of_isOpen
/-- A function is `C^(n + 1)` if and only if it is differentiable,
and its derivative (formulated in terms of `deriv`) is `C^n`. -/
theorem contDiff_succ_iff_deriv {n : β} :
ContDiff π (n + 1 : β) fβ β Differentiable π fβ β§ ContDiff π n (deriv fβ) := by
- simp only [β contDiffOn_univ, contDiffOn_succ_iff_deriv_of_open, isOpen_univ,
+ simp only [β contDiffOn_univ, contDiffOn_succ_iff_deriv_of_isOpen, isOpen_univ,
differentiableOn_univ]
#align cont_diff_succ_iff_deriv contDiff_succ_iff_deriv
Following on from previous gcongr
golfing PRs #4702 and #4784.
This is a replacement for #7901: this round of golfs, first introduced there, there exposed some performance issues in gcongr
, hopefully fixed by #8731, and I am opening a new PR so that the performance can be checked against current master rather than master at the time of #7901.
@@ -185,8 +185,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL
simp only [LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.norm_map]
calc
βB (isoE y) (isoF x)β β€ βB (isoE y)β * βisoF xβ := ContinuousLinearMap.le_op_norm _ _
- _ β€ βBβ * βisoE yβ * βisoF xβ :=
- (mul_le_mul_of_nonneg_right (ContinuousLinearMap.le_op_norm _ _) (norm_nonneg _))
+ _ β€ βBβ * βisoE yβ * βisoF xβ := by gcongr; apply ContinuousLinearMap.le_op_norm
_ = βBβ * βyβ * βxβ := by simp only [LinearIsometryEquiv.norm_map]
let su := isoD β»ΒΉ' s
have hsu : UniqueDiffOn π su := isoD.toContinuousLinearEquiv.uniqueDiffOn_preimage_iff.2 hs
@@ -404,33 +403,29 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
-- bound each of the terms using the estimates on previous derivatives (that use the inductive
-- assumption for `g' β f`).
_ β€ β i in Finset.range (n + 1), (n.choose i : β) * (i ! * C * D ^ i) * D ^ (n - i + 1) := by
- apply Finset.sum_le_sum fun i hi => ?_
- simp only [mul_assoc (n.choose i : β)]
- refine' mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg _)
- apply mul_le_mul (I i hi) (J i) (norm_nonneg _)
- positivity
+ gcongr with i hi
+ Β· simp only [mul_assoc (n.choose i : β)]
+ exact I i hi
+ Β· exact J i
-- We are left with trivial algebraic manipulations to see that this is smaller than
-- the claimed bound.
_ = β i in Finset.range (n + 1),
-- porting note: had to insert a few more explicit type ascriptions in this and similar
-- expressions.
(n ! : β) * ((i ! : β)β»ΒΉ * i !) * C * (D ^ i * D ^ (n - i + 1)) * ((n - i)! : β)β»ΒΉ := by
- apply Finset.sum_congr rfl fun i hi => ?_
+ congr! 1 with i hi
simp only [Nat.cast_choose β (Finset.mem_range_succ_iff.1 hi), div_eq_inv_mul, mul_inv]
ring
_ = β i in Finset.range (n + 1), (n ! : β) * 1 * C * D ^ (n + 1) * ((n - i)! : β)β»ΒΉ := by
- apply Finset.sum_congr rfl fun i hi => ?_
- congr 2
- Β· congr
- apply inv_mul_cancel
+ congr! with i hi
+ Β· apply inv_mul_cancel
simpa only [Ne.def, Nat.cast_eq_zero] using i.factorial_ne_zero
Β· rw [β pow_add]
congr 1
rw [Nat.add_succ, Nat.succ_inj']
exact Nat.add_sub_of_le (Finset.mem_range_succ_iff.1 hi)
_ β€ β i in Finset.range (n + 1), (n ! : β) * 1 * C * D ^ (n + 1) * 1 := by
- apply Finset.sum_le_sum fun i _hi => ?_
- refine' mul_le_mul_of_nonneg_left _ (by positivity)
+ gcongr with i
apply inv_le_one
simpa only [Nat.one_le_cast] using (n - i).factorial_pos
_ = (n + 1)! * C * D ^ (n + 1) := by
@@ -4,6 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-/
import Mathlib.Analysis.Calculus.ContDiff.Defs
+import Mathlib.Analysis.Calculus.FDeriv.Add
+import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Inverse
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
@@ -5,9 +5,6 @@ Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-/
import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.Deriv.Inverse
-import Mathlib.Analysis.Calculus.MeanValue
-import Mathlib.Analysis.NormedSpace.FiniteDimension
-import Mathlib.Data.Nat.Choose.Cast
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
@@ -1898,202 +1895,6 @@ theorem Homeomorph.contDiff_symm_deriv [CompleteSpace π] (f : π ββ
end FunctionInverse
-/-! ### Finite dimensional results -/
-
-
-section FiniteDimensional
-
-open Function FiniteDimensional
-
-variable [CompleteSpace π]
-
-/-- A family of continuous linear maps is `C^n` on `s` if all its applications are. -/
-theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
- ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by
- refine' β¨fun h y => h.clm_apply contDiffOn_const, fun h => _β©
- let d := finrank π F
- have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
- let eβ := ContinuousLinearEquiv.ofFinrankEq hd
- let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
- rw [β comp.left_id f, β eβ.symm_comp_self]
- exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
-#align cont_diff_on_clm_apply contDiffOn_clm_apply
-
-theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDimensional π F] :
- ContDiff π n f β β y, ContDiff π n fun x => f x y := by
- simp_rw [β contDiffOn_univ, contDiffOn_clm_apply]
-#align cont_diff_clm_apply_iff contDiff_clm_apply_iff
-
-/-- This is a useful lemma to prove that a certain operation preserves functions being `C^n`.
-When you do induction on `n`, this gives a useful characterization of a function being `C^(n+1)`,
-assuming you have already computed the derivative. The advantage of this version over
-`contDiff_succ_iff_fderiv` is that both occurrences of `ContDiff` are for functions with the same
-domain and codomain (`E` and `F`). This is not the case for `contDiff_succ_iff_fderiv`, which
-often requires an inconvenient need to generalize `F`, which results in universe issues
-(see the discussion in the section of `ContDiff.comp`).
-
-This lemma avoids these universe issues, but only applies for finite dimensional `E`. -/
-theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} :
- ContDiff π (n + 1 : β) f β Differentiable π f β§ β y, ContDiff π n fun x => fderiv π f x y := by
- rw [contDiff_succ_iff_fderiv, contDiff_clm_apply_iff]
-#align cont_diff_succ_iff_fderiv_apply contDiff_succ_iff_fderiv_apply
-
-theorem contDiffOn_succ_of_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} {s : Set E}
- (hf : DifferentiableOn π f s) (h : β y, ContDiffOn π n (fun x => fderivWithin π f s x y) s) :
- ContDiffOn π (n + 1 : β) f s :=
- contDiffOn_succ_of_fderivWithin hf <| contDiffOn_clm_apply.mpr h
-#align cont_diff_on_succ_of_fderiv_apply contDiffOn_succ_of_fderiv_apply
-
-theorem contDiffOn_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} {s : Set E}
- (hs : UniqueDiffOn π s) :
- ContDiffOn π (n + 1 : β) f s β
- DifferentiableOn π f s β§ β y, ContDiffOn π n (fun x => fderivWithin π f s x y) s :=
- by rw [contDiffOn_succ_iff_fderivWithin hs, contDiffOn_clm_apply]
-#align cont_diff_on_succ_iff_fderiv_apply contDiffOn_succ_iff_fderiv_apply
-
-end FiniteDimensional
-
-section Real
-
-/-!
-### Results over `β` or `β`
- The results in this section rely on the Mean Value Theorem, and therefore hold only over `β` (and
- its extension fields such as `β`).
--/
-
-
-variable {π : Type*} [IsROrC π] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π E']
- {F' : Type*} [NormedAddCommGroup F'] [NormedSpace π F']
-
-/-- If a function has a Taylor series at order at least 1, then at points in the interior of the
- domain of definition, the term of order 1 of this series is a strict derivative of `f`. -/
-theorem HasFTaylorSeriesUpToOn.hasStrictFDerivAt {s : Set E'} {f : E' β F'} {x : E'}
- {p : E' β FormalMultilinearSeries π E' F'} (hf : HasFTaylorSeriesUpToOn n f p s) (hn : 1 β€ n)
- (hs : s β π x) : HasStrictFDerivAt f ((continuousMultilinearCurryFin1 π E' F') (p x 1)) x :=
- hasStrictFDerivAt_of_hasFDerivAt_of_continuousAt (hf.eventually_hasFDerivAt hn hs) <|
- (continuousMultilinearCurryFin1 π E' F').continuousAt.comp <| (hf.cont 1 hn).continuousAt hs
-#align has_ftaylor_series_up_to_on.has_strict_fderiv_at HasFTaylorSeriesUpToOn.hasStrictFDerivAt
-
-/-- If a function is `C^n` with `1 β€ n` around a point, and its derivative at that point is given to
-us as `f'`, then `f'` is also a strict derivative. -/
-theorem ContDiffAt.hasStrictFDerivAt' {f : E' β F'} {f' : E' βL[π] F'} {x : E'}
- (hf : ContDiffAt π n f x) (hf' : HasFDerivAt f f' x) (hn : 1 β€ n) :
- HasStrictFDerivAt f f' x := by
- rcases hf 1 hn with β¨u, H, p, hpβ©
- simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
- have := hp.hasStrictFDerivAt le_rfl H
- rwa [hf'.unique this.hasFDerivAt]
-#align cont_diff_at.has_strict_fderiv_at' ContDiffAt.hasStrictFDerivAt'
-
-/-- If a function is `C^n` with `1 β€ n` around a point, and its derivative at that point is given to
-us as `f'`, then `f'` is also a strict derivative. -/
-theorem ContDiffAt.hasStrictDerivAt' {f : π β F'} {f' : F'} {x : π} (hf : ContDiffAt π n f x)
- (hf' : HasDerivAt f f' x) (hn : 1 β€ n) : HasStrictDerivAt f f' x :=
- hf.hasStrictFDerivAt' hf' hn
-#align cont_diff_at.has_strict_deriv_at' ContDiffAt.hasStrictDerivAt'
-
-/-- If a function is `C^n` with `1 β€ n` around a point, then the derivative of `f` at this point
-is also a strict derivative. -/
-theorem ContDiffAt.hasStrictFDerivAt {f : E' β F'} {x : E'} (hf : ContDiffAt π n f x) (hn : 1 β€ n) :
- HasStrictFDerivAt f (fderiv π f x) x :=
- hf.hasStrictFDerivAt' (hf.differentiableAt hn).hasFDerivAt hn
-#align cont_diff_at.has_strict_fderiv_at ContDiffAt.hasStrictFDerivAt
-
-/-- If a function is `C^n` with `1 β€ n` around a point, then the derivative of `f` at this point
-is also a strict derivative. -/
-theorem ContDiffAt.hasStrictDerivAt {f : π β F'} {x : π} (hf : ContDiffAt π n f x) (hn : 1 β€ n) :
- HasStrictDerivAt f (deriv f x) x :=
- (hf.hasStrictFDerivAt hn).hasStrictDerivAt
-#align cont_diff_at.has_strict_deriv_at ContDiffAt.hasStrictDerivAt
-
-/-- If a function is `C^n` with `1 β€ n`, then the derivative of `f` is also a strict derivative. -/
-theorem ContDiff.hasStrictFDerivAt {f : E' β F'} {x : E'} (hf : ContDiff π n f) (hn : 1 β€ n) :
- HasStrictFDerivAt f (fderiv π f x) x :=
- hf.contDiffAt.hasStrictFDerivAt hn
-#align cont_diff.has_strict_fderiv_at ContDiff.hasStrictFDerivAt
-
-/-- If a function is `C^n` with `1 β€ n`, then the derivative of `f` is also a strict derivative. -/
-theorem ContDiff.hasStrictDerivAt {f : π β F'} {x : π} (hf : ContDiff π n f) (hn : 1 β€ n) :
- HasStrictDerivAt f (deriv f x) x :=
- hf.contDiffAt.hasStrictDerivAt hn
-#align cont_diff.has_strict_deriv_at ContDiff.hasStrictDerivAt
-
-/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} βͺ s`, where `s` is a convex set,
-and `βp x 1ββ < K`, then `f` is `K`-Lipschitz in a neighborhood of `x` within `s`. -/
-theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type*}
- [NormedAddCommGroup E] [NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F}
- {p : E β FormalMultilinearSeries β E F} {s : Set E} {x : E}
- (hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex β s) (K : ββ₯0)
- (hK : βp x 1ββ < K) : β t β π[s] x, LipschitzOnWith K f t := by
- set f' := fun y => continuousMultilinearCurryFin1 β E F (p y 1)
- have hder : β y β s, HasFDerivWithinAt f (f' y) s y := fun y hy =>
- (hf.hasFDerivWithinAt le_rfl (subset_insert x s hy)).mono (subset_insert x s)
- have hcont : ContinuousWithinAt f' s x :=
- (continuousMultilinearCurryFin1 β E F).continuousAt.comp_continuousWithinAt
- ((hf.cont _ le_rfl _ (mem_insert _ _)).mono (subset_insert x s))
- replace hK : βf' xββ < K; Β· simpa only [LinearIsometryEquiv.nnnorm_map]
- exact
- hs.exists_nhdsWithin_lipschitzOnWith_of_hasFDerivWithinAt_of_nnnorm_lt
- (eventually_nhdsWithin_iff.2 <| eventually_of_forall hder) hcont K hK
-#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with_of_nnnorm_lt HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt
-
-/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} βͺ s`, where `s` is a convex set,
-then `f` is Lipschitz in a neighborhood of `x` within `s`. -/
-theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
- [NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F}
- {p : E β FormalMultilinearSeries β E F} {s : Set E} {x : E}
- (hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex β s) :
- β K, β t β π[s] x, LipschitzOnWith K f t :=
- (exists_gt _).imp <| hf.exists_lipschitzOnWith_of_nnnorm_lt hs
-#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with HasFTaylorSeriesUpToOn.exists_lipschitzOnWith
-
-/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
-within `s`. -/
-theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
- [NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F} {s : Set E} {x : E}
- (hf : ContDiffWithinAt β 1 f s x) (hs : Convex β s) :
- β K : ββ₯0, β t β π[s] x, LipschitzOnWith K f t := by
- rcases hf 1 le_rfl with β¨t, hst, p, hpβ©
- rcases Metric.mem_nhdsWithin_iff.mp hst with β¨Ξ΅, Ξ΅0, hΞ΅β©
- replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x Ξ΅ β© insert x s) := hp.mono hΞ΅
- clear hst hΞ΅ t
- rw [β insert_eq_of_mem (Metric.mem_ball_self Ξ΅0), β insert_inter_distrib] at hp
- rcases hp.exists_lipschitzOnWith ((convex_ball _ _).inter hs) with β¨K, t, hst, hftβ©
- rw [inter_comm, β nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ Ξ΅0)] at hst
- exact β¨K, t, hst, hftβ©
-#align cont_diff_within_at.exists_lipschitz_on_with ContDiffWithinAt.exists_lipschitzOnWith
-
-/-- If `f` is `C^1` at `x` and `K > βfderiv π f xβ`, then `f` is `K`-Lipschitz in a neighborhood of
-`x`. -/
-theorem ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt {f : E' β F'} {x : E'}
- (hf : ContDiffAt π 1 f x) (K : ββ₯0) (hK : βfderiv π f xββ < K) :
- β t β π x, LipschitzOnWith K f t :=
- (hf.hasStrictFDerivAt le_rfl).exists_lipschitzOnWith_of_nnnorm_lt K hK
-#align cont_diff_at.exists_lipschitz_on_with_of_nnnorm_lt ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt
-
-/-- If `f` is `C^1` at `x`, then `f` is Lipschitz in a neighborhood of `x`. -/
-theorem ContDiffAt.exists_lipschitzOnWith {f : E' β F'} {x : E'} (hf : ContDiffAt π 1 f x) :
- β K, β t β π x, LipschitzOnWith K f t :=
- (hf.hasStrictFDerivAt le_rfl).exists_lipschitzOnWith
-#align cont_diff_at.exists_lipschitz_on_with ContDiffAt.exists_lipschitzOnWith
-
-/-- If `f` is `C^1`, it is locally Lipschitz. -/
-lemma ContDiff.locallyLipschitz {f : E' β F'} (hf : ContDiff π 1 f) : LocallyLipschitz f := by
- intro x
- rcases hf.contDiffAt.exists_lipschitzOnWith with β¨K, t, ht, hfβ©
- use K, t
-
-/-- A `C^1` function with compact support is Lipschitz. -/
-theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' β F'} {n : ββ}
- (hf : HasCompactSupport f) (h'f : ContDiff π n f) (hn : 1 β€ n) :
- β C, LipschitzWith C f := by
- obtain β¨C, hCβ© := (hf.fderiv π).exists_bound_of_continuous (h'f.continuous_fderiv hn)
- refine β¨β¨max C 0, le_max_right _ _β©, ?_β©
- apply lipschitzWith_of_nnnorm_fderiv_le (h'f.differentiable hn) (fun x β¦ ?_)
- simp [β NNReal.coe_le_coe, hC x]
-
-end Real
-
section deriv
/-!
@@ -2279,525 +2080,3 @@ theorem ContDiff.restrict_scalars (h : ContDiff π' n f) : ContDiff π n f :
#align cont_diff.restrict_scalars ContDiff.restrict_scalars
end RestrictScalars
-
-/-!## Quantitative bounds -/
-
-/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
-iterated derivatives of `f` and `g` when `B` is bilinear. This lemma is an auxiliary version
-assuming all spaces live in the same universe, to enable an induction. Use instead
-`ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear` that removes this assumption. -/
-theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu Fu Gu : Type u}
- [NormedAddCommGroup Du] [NormedSpace π Du] [NormedAddCommGroup Eu] [NormedSpace π Eu]
- [NormedAddCommGroup Fu] [NormedSpace π Fu] [NormedAddCommGroup Gu] [NormedSpace π Gu]
- (B : Eu βL[π] Fu βL[π] Gu) {f : Du β Eu} {g : Du β Fu} {n : β} {s : Set Du} {x : Du}
- (hf : ContDiffOn π n f s) (hg : ContDiffOn π n g s) (hs : UniqueDiffOn π s) (hx : x β s) :
- βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ β€
- βBβ * β i in Finset.range (n + 1), (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ := by
- /- We argue by induction on `n`. The bound is trivial for `n = 0`. For `n + 1`, we write
- the `(n+1)`-th derivative as the `n`-th derivative of the derivative `B f g' + B f' g`,
- and apply the inductive assumption to each of those two terms. For this induction to make sense,
- the spaces of linear maps that appear in the induction should be in the same universe as the
- original spaces, which explains why we assume in the lemma that all spaces live in the same
- universe. -/
- induction' n with n IH generalizing Eu Fu Gu
- Β· simp only [Nat.zero_eq, norm_iteratedFDerivWithin_zero, zero_add, Finset.range_one,
- Finset.sum_singleton, Nat.choose_self, Nat.cast_one, one_mul, Nat.sub_zero, β mul_assoc]
- apply B.le_op_normβ
- Β· have In : (n : ββ) + 1 β€ n.succ := by simp only [Nat.cast_succ, le_refl]
- -- Porting note: the next line is a hack allowing Lean to find the operator norm instance.
- let norm := @ContinuousLinearMap.hasOpNorm _ _ Eu ((Du βL[π] Fu) βL[π] Du βL[π] Gu) _ _ _ _ _ _
- (RingHom.id π)
- have I1 :
- βiteratedFDerivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
- βBβ * β i : β in Finset.range (n + 1), n.choose i * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n + 1 - i) g s xβ := by
- calc
- βiteratedFDerivWithin π n (fun y : Du => B.precompR Du (f y) (fderivWithin π g s y)) s xβ β€
- βB.precompR Duβ * β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n - i) (fderivWithin π g s) s xβ :=
- IH _ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In)
- _ β€ βBβ * β i : β in Finset.range (n + 1), n.choose i * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n - i) (fderivWithin π g s) s xβ :=
- (mul_le_mul_of_nonneg_right (B.norm_precompR_le Du)
- (Finset.sum_nonneg' fun i => by positivity))
- _ = _ := by
- congr 1
- apply Finset.sum_congr rfl fun i hi => ?_
- rw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)),
- β norm_iteratedFDerivWithin_fderivWithin hs hx]
- -- Porting note: the next line is a hack allowing Lean to find the operator norm instance.
- let norm := @ContinuousLinearMap.hasOpNorm _ _ (Du βL[π] Eu) (Fu βL[π] Du βL[π] Gu) _ _ _ _ _ _
- (RingHom.id π)
- have I2 :
- βiteratedFDerivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
- βBβ * β i : β in Finset.range (n + 1), n.choose i * βiteratedFDerivWithin π (i + 1) f s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ :=
- calc
- βiteratedFDerivWithin π n (fun y : Du => B.precompL Du (fderivWithin π f s y) (g y)) s xβ β€
- βB.precompL Duβ * β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFDerivWithin π i (fderivWithin π f s) s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ :=
- IH _ (hf.fderivWithin hs In) (hg.of_le (Nat.cast_le.2 (Nat.le_succ n)))
- _ β€ βBβ * β i : β in Finset.range (n + 1),
- n.choose i * βiteratedFDerivWithin π i (fderivWithin π f s) s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ :=
- (mul_le_mul_of_nonneg_right (B.norm_precompL_le Du)
- (Finset.sum_nonneg' fun i => by positivity))
- _ = _ := by
- congr 1
- apply Finset.sum_congr rfl fun i _ => ?_
- rw [β norm_iteratedFDerivWithin_fderivWithin hs hx]
- have J : iteratedFDerivWithin π n
- (fun y : Du => fderivWithin π (fun y : Du => B (f y) (g y)) s y) s x =
- iteratedFDerivWithin π n (fun y => B.precompR Du (f y)
- (fderivWithin π g s y) + B.precompL Du (fderivWithin π f s y) (g y)) s x := by
- apply iteratedFDerivWithin_congr (fun y hy => ?_) hx
- have L : (1 : ββ) β€ n.succ := by
- simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n
- exact B.fderivWithin_of_bilinear (hf.differentiableOn L y hy) (hg.differentiableOn L y hy)
- (hs y hy)
- rw [β norm_iteratedFDerivWithin_fderivWithin hs hx, J]
- have A : ContDiffOn π n (fun y => B.precompR Du (f y) (fderivWithin π g s y)) s :=
- (B.precompR Du).isBoundedBilinearMap.contDiff.comp_contDiff_onβ
- (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In)
- have A' : ContDiffOn π n (fun y => B.precompL Du (fderivWithin π f s y) (g y)) s :=
- (B.precompL Du).isBoundedBilinearMap.contDiff.comp_contDiff_onβ (hf.fderivWithin hs In)
- (hg.of_le (Nat.cast_le.2 (Nat.le_succ n)))
- rw [iteratedFDerivWithin_add_apply' A A' hs hx]
- apply (norm_add_le _ _).trans ((add_le_add I1 I2).trans (le_of_eq ?_))
- simp_rw [β mul_add, mul_assoc]
- congr 1
- exact (Finset.sum_choose_succ_mul
- (fun i j => βiteratedFDerivWithin π i f s xβ * βiteratedFDerivWithin π j g s xβ) n).symm
-#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_aux ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux
-
-set_option maxHeartbeats 700000 in -- 3.5Γ the default limit
-/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
-iterated derivatives of `f` and `g` when `B` is bilinear:
-`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
-theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E βL[π] F βL[π] G)
- {f : D β E} {g : D β F} {N : ββ} {s : Set D} {x : D} (hf : ContDiffOn π N f s)
- (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β} (hn : (n : ββ) β€ N) :
- βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ β€
- βBβ * β i in Finset.range (n + 1), (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ := by
- /- We reduce the bound to the case where all spaces live in the same universe (in which we
- already have proved the result), by using linear isometries between the spaces and their `ULift`
- to a common universe. These linear isometries preserve the norm of the iterated derivative. -/
- let Du : Type max uD uE uF uG := ULift.{max uE uF uG, uD} D
- let Eu : Type max uD uE uF uG := ULift.{max uD uF uG, uE} E
- let Fu : Type max uD uE uF uG := ULift.{max uD uE uG, uF} F
- let Gu : Type max uD uE uF uG := ULift.{max uD uE uF, uG} G
- have isoD : Du ββα΅’[π] D := LinearIsometryEquiv.ulift π D
- have isoE : Eu ββα΅’[π] E := LinearIsometryEquiv.ulift π E
- have isoF : Fu ββα΅’[π] F := LinearIsometryEquiv.ulift π F
- have isoG : Gu ββα΅’[π] G := LinearIsometryEquiv.ulift π G
- -- lift `f` and `g` to versions `fu` and `gu` on the lifted spaces.
- set fu : Du β Eu := isoE.symm β f β isoD with hfu
- set gu : Du β Fu := isoF.symm β g β isoD with hgu
- -- lift the bilinear map `B` to a bilinear map `Bu` on the lifted spaces.
- set Buβ : Eu βL[π] Fu βL[π] G := ((B.comp (isoE : Eu βL[π] E)).flip.comp (isoF : Fu βL[π] F)).flip
- with hBuβ
- let Bu : Eu βL[π] Fu βL[π] Gu;
- exact ContinuousLinearMap.compL π Eu (Fu βL[π] G) (Fu βL[π] Gu)
- (ContinuousLinearMap.compL π Fu G Gu (isoG.symm : G βL[π] Gu)) Buβ
- have hBu : Bu = ContinuousLinearMap.compL π Eu (Fu βL[π] G) (Fu βL[π] Gu)
- (ContinuousLinearMap.compL π Fu G Gu (isoG.symm : G βL[π] Gu)) Buβ := rfl
- have Bu_eq : (fun y => Bu (fu y) (gu y)) = isoG.symm β (fun y => B (f y) (g y)) β isoD := by
- ext1 y
- -- Porting note: the two blocks of `rw`s below were
- -- ```
- -- simp only [ContinuousLinearMap.compL_apply, Function.comp_apply,
- -- ContinuousLinearMap.coe_comp', LinearIsometryEquiv.coe_coe'',
- -- ContinuousLinearMap.flip_apply, LinearIsometryEquiv.apply_symm_apply]
- -- ```
- rw [hBu]
- iterate 2 rw [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
- Function.comp_apply]
- rw [hBuβ]
- iterate 2 rw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp',
- Function.comp_apply]
- rw [hfu, Function.comp_apply, LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.coe_coe'',
- LinearIsometryEquiv.apply_symm_apply isoE, Function.comp_apply,
- hgu, LinearIsometryEquiv.coe_coe'', Function.comp_apply,
- LinearIsometryEquiv.apply_symm_apply isoF]
- simp only [Function.comp_apply]
- -- All norms are preserved by the lifting process.
- have Bu_le : βBuβ β€ βBβ := by
- refine' ContinuousLinearMap.op_norm_le_bound _ (norm_nonneg _) fun y => _
- refine' ContinuousLinearMap.op_norm_le_bound _ (by positivity) fun x => _
- simp only [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',
- Function.comp_apply, LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply,
- LinearIsometryEquiv.norm_map]
- rw [ContinuousLinearMap.coe_comp', Function.comp_apply, ContinuousLinearMap.compL_apply,
- ContinuousLinearMap.coe_comp', Function.comp_apply]
- iterate 2 rw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp',
- Function.comp_apply]
- simp only [LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.norm_map]
- calc
- βB (isoE y) (isoF x)β β€ βB (isoE y)β * βisoF xβ := ContinuousLinearMap.le_op_norm _ _
- _ β€ βBβ * βisoE yβ * βisoF xβ :=
- (mul_le_mul_of_nonneg_right (ContinuousLinearMap.le_op_norm _ _) (norm_nonneg _))
- _ = βBβ * βyβ * βxβ := by simp only [LinearIsometryEquiv.norm_map]
- let su := isoD β»ΒΉ' s
- have hsu : UniqueDiffOn π su := isoD.toContinuousLinearEquiv.uniqueDiffOn_preimage_iff.2 hs
- let xu := isoD.symm x
- have hxu : xu β su := by
- simpa only [Set.mem_preimage, LinearIsometryEquiv.apply_symm_apply] using hx
- have xu_x : isoD xu = x := by simp only [LinearIsometryEquiv.apply_symm_apply]
- have hfu : ContDiffOn π n fu su :=
- isoE.symm.contDiff.comp_contDiffOn
- ((hf.of_le hn).comp_continuousLinearMap (isoD : Du βL[π] D))
- have hgu : ContDiffOn π n gu su :=
- isoF.symm.contDiff.comp_contDiffOn
- ((hg.of_le hn).comp_continuousLinearMap (isoD : Du βL[π] D))
- have Nfu : β i, βiteratedFDerivWithin π i fu su xuβ = βiteratedFDerivWithin π i f s xβ := by
- intro i
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
- have Ngu : β i, βiteratedFDerivWithin π i gu su xuβ = βiteratedFDerivWithin π i g s xβ := by
- intro i
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
- have NBu :
- βiteratedFDerivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ =
- βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ := by
- rw [Bu_eq]
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]
- rwa [β xu_x] at hx
- -- state the bound for the lifted objects, and deduce the original bound from it.
- have : βiteratedFDerivWithin π n (fun y => Bu (fu y) (gu y)) su xuβ β€
- βBuβ * β i in Finset.range (n + 1), (n.choose i : β) * βiteratedFDerivWithin π i fu su xuβ *
- βiteratedFDerivWithin π (n - i) gu su xuβ :=
- Bu.norm_iteratedFDerivWithin_le_of_bilinear_aux hfu hgu hsu hxu
- simp only [Nfu, Ngu, NBu] at this
- apply this.trans (mul_le_mul_of_nonneg_right Bu_le ?_)
- exact Finset.sum_nonneg' fun i => by positivity
-#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear
-
-/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
-iterated derivatives of `f` and `g` when `B` is bilinear:
-`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
-theorem ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear (B : E βL[π] F βL[π] G) {f : D β E}
- {g : D β F} {N : ββ} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D) {n : β}
- (hn : (n : ββ) β€ N) :
- βiteratedFDeriv π n (fun y => B (f y) (g y)) xβ β€ βBβ * β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ := by
- simp_rw [β iteratedFDerivWithin_univ]
- exact B.norm_iteratedFDerivWithin_le_of_bilinear hf.contDiffOn hg.contDiffOn uniqueDiffOn_univ
- (mem_univ x) hn
-#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear
-
-/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
-iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
-`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
-theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
- (B : E βL[π] F βL[π] G) {f : D β E} {g : D β F} {N : ββ} {s : Set D} {x : D}
- (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) (hx : x β s) {n : β}
- (hn : (n : ββ) β€ N) (hB : βBβ β€ 1) : βiteratedFDerivWithin π n (fun y => B (f y) (g y)) s xβ β€
- β i in Finset.range (n + 1), (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ := by
- apply (B.norm_iteratedFDerivWithin_le_of_bilinear hf hg hs hx hn).trans
- apply mul_le_of_le_one_left (Finset.sum_nonneg' fun i => ?_) hB
- positivity
-#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
-
-/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` in terms of the
-iterated derivatives of `f` and `g` when `B` is bilinear of norm at most `1`:
-`βD^n (x β¦ B (f x) (g x))β β€ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
-theorem ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one (B : E βL[π] F βL[π] G)
- {f : D β E} {g : D β F} {N : ββ} (hf : ContDiff π N f) (hg : ContDiff π N g) (x : D) {n : β}
- (hn : (n : ββ) β€ N) (hB : βBβ β€ 1) : βiteratedFDeriv π n (fun y => B (f y) (g y)) xβ β€
- β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ := by
- simp_rw [β iteratedFDerivWithin_univ]
- exact B.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one hf.contDiffOn hg.contDiffOn
- uniqueDiffOn_univ (mem_univ x) hn hB
-#align continuous_linear_map.norm_iterated_fderiv_le_of_bilinear_of_le_one ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one
-
-section
-
-variable {π' : Type*} [NormedField π'] [NormedAlgebra π π'] [NormedSpace π' F]
- [IsScalarTower π π' F]
-
-theorem norm_iteratedFDerivWithin_smul_le {f : E β π'} {g : E β F} {N : ββ}
- (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s)
- {n : β} (hn : (n : ββ) β€ N) : βiteratedFDerivWithin π n (fun y => f y β’ g y) s xβ β€
- β i in Finset.range (n + 1), (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ :=
- (ContinuousLinearMap.lsmul π π' :
- π' βL[π] F βL[π] F).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
- hf hg hs hx hn ContinuousLinearMap.op_norm_lsmul_le
-#align norm_iterated_fderiv_within_smul_le norm_iteratedFDerivWithin_smul_le
-
-theorem norm_iteratedFDeriv_smul_le {f : E β π'} {g : E β F} {N : ββ} (hf : ContDiff π N f)
- (hg : ContDiff π N g) (x : E) {n : β} (hn : (n : ββ) β€ N) :
- βiteratedFDeriv π n (fun y => f y β’ g y) xβ β€ β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ :=
- (ContinuousLinearMap.lsmul π π' : π' βL[π] F βL[π] F).norm_iteratedFDeriv_le_of_bilinear_of_le_one
- hf hg x hn ContinuousLinearMap.op_norm_lsmul_le
-#align norm_iterated_fderiv_smul_le norm_iteratedFDeriv_smul_le
-
-end
-
-section
-
-variable {A : Type*} [NormedRing A] [NormedAlgebra π A]
-
-theorem norm_iteratedFDerivWithin_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiffOn π N f s)
- (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s) {n : β}
- (hn : (n : ββ) β€ N) : βiteratedFDerivWithin π n (fun y => f y * g y) s xβ β€
- β i in Finset.range (n + 1), (n.choose i : β) * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ :=
- (ContinuousLinearMap.mul π A :
- A βL[π] A βL[π] A).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
- hf hg hs hx hn (ContinuousLinearMap.op_norm_mul_le _ _)
-#align norm_iterated_fderiv_within_mul_le norm_iteratedFDerivWithin_mul_le
-
-theorem norm_iteratedFDeriv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiff π N f)
- (hg : ContDiff π N g) (x : E) {n : β} (hn : (n : ββ) β€ N) :
- βiteratedFDeriv π n (fun y => f y * g y) xβ β€ β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ := by
- simp_rw [β iteratedFDerivWithin_univ]
- exact norm_iteratedFDerivWithin_mul_le
- hf.contDiffOn hg.contDiffOn uniqueDiffOn_univ (mem_univ x) hn
-#align norm_iterated_fderiv_mul_le norm_iteratedFDeriv_mul_le
-
-end
-
-/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
-within a set of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
-of `g β f` is bounded by `n! * C * D^n`.
-This lemma proves this estimate assuming additionally that two of the spaces live in the same
-universe, to make an induction possible. Use instead `norm_iteratedFDerivWithin_comp_le` that
-removes this assumption. -/
-theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGroup Fu]
- [NormedSpace π Fu] [NormedAddCommGroup Gu] [NormedSpace π Gu] {g : Fu β Gu} {f : E β Fu} {n : β}
- {s : Set E} {t : Set Fu} {x : E} (hg : ContDiffOn π n g t) (hf : ContDiffOn π n f s)
- (ht : UniqueDiffOn π t) (hs : UniqueDiffOn π s) (hst : MapsTo f s t) (hx : x β s) {C : β}
- {D : β} (hC : β i, i β€ n β βiteratedFDerivWithin π i g t (f x)β β€ C)
- (hD : β i, 1 β€ i β i β€ n β βiteratedFDerivWithin π i f s xβ β€ D ^ i) :
- βiteratedFDerivWithin π n (g β f) s xβ β€ n ! * C * D ^ n := by
- /- We argue by induction on `n`, using that `D^(n+1) (g β f) = D^n (g ' β f β¬ f')`. The successive
- derivatives of `g' β f` are controlled thanks to the inductive assumption, and those of `f'` are
- controlled by assumption.
- As composition of linear maps is a bilinear map, one may use
- `ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one` to get from these a bound
- on `D^n (g ' β f β¬ f')`. -/
- induction' n using Nat.case_strong_induction_on with n IH generalizing Gu
- Β· simpa [norm_iteratedFDerivWithin_zero, Nat.factorial_zero, algebraMap.coe_one, one_mul,
- pow_zero, mul_one, comp_apply] using hC 0 le_rfl
- have M : (n : ββ) < n.succ := Nat.cast_lt.2 n.lt_succ_self
- have Cnonneg : 0 β€ C := (norm_nonneg _).trans (hC 0 bot_le)
- have Dnonneg : 0 β€ D := by
- have : 1 β€ n + 1 := by simp only [le_add_iff_nonneg_left, zero_le']
- simpa only [pow_one] using (norm_nonneg _).trans (hD 1 le_rfl this)
- -- use the inductive assumption to bound the derivatives of `g' β f`.
- have I : β i β Finset.range (n + 1),
- βiteratedFDerivWithin π i (fderivWithin π g t β f) s xβ β€ i ! * C * D ^ i
- Β· intro i hi
- simp only [Finset.mem_range_succ_iff] at hi
- apply IH i hi
- Β· apply hg.fderivWithin ht
- simp only [Nat.cast_succ]
- exact add_le_add_right (Nat.cast_le.2 hi) _
- Β· apply hf.of_le (Nat.cast_le.2 (hi.trans n.le_succ))
- Β· intro j hj
- have : βiteratedFDerivWithin π j (fderivWithin π g t) t (f x)β =
- βiteratedFDerivWithin π (j + 1) g t (f x)β :=
- by rw [iteratedFDerivWithin_succ_eq_comp_right ht (hst hx), comp_apply,
- LinearIsometryEquiv.norm_map]
- rw [this]
- exact hC (j + 1) (add_le_add (hj.trans hi) le_rfl)
- Β· intro j hj h'j
- exact hD j hj (h'j.trans (hi.trans n.le_succ))
- -- reformulate `hD` as a bound for the derivatives of `f'`.
- have J : β i, βiteratedFDerivWithin π (n - i) (fderivWithin π f s) s xβ β€ D ^ (n - i + 1) := by
- intro i
- have : βiteratedFDerivWithin π (n - i) (fderivWithin π f s) s xβ =
- βiteratedFDerivWithin π (n - i + 1) f s xβ
- Β· rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, comp_apply, LinearIsometryEquiv.norm_map]
- rw [this]
- apply hD
- Β· simp only [le_add_iff_nonneg_left, zero_le']
- Β· apply Nat.succ_le_succ tsub_le_self
- -- Now put these together: first, notice that we have to bound `D^n (g' β f β¬ f')`.
- calc
- βiteratedFDerivWithin π (n + 1) (g β f) s xβ =
- βiteratedFDerivWithin π n (fun y : E => fderivWithin π (g β f) s y) s xβ := by
- rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, comp_apply,
- LinearIsometryEquiv.norm_map]
- _ = βiteratedFDerivWithin π n (fun y : E => ContinuousLinearMap.compL π E Fu Gu
- (fderivWithin π g t (f y)) (fderivWithin π f s y)) s xβ := by
- have L : (1 : ββ) β€ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using n.succ_pos
- congr 1
- refine' iteratedFDerivWithin_congr (fun y hy => _) hx _
- apply fderivWithin.comp _ _ _ hst (hs y hy)
- Β· exact hg.differentiableOn L _ (hst hy)
- Β· exact hf.differentiableOn L _ hy
- -- bound it using the fact that the composition of linear maps is a bilinear operation,
- -- for which we have bounds for the`n`-th derivative.
- _ β€ β i in Finset.range (n + 1),
- (n.choose i : β) * βiteratedFDerivWithin π i (fderivWithin π g t β f) s xβ *
- βiteratedFDerivWithin π (n - i) (fderivWithin π f s) s xβ := by
- have A : ContDiffOn π n (fderivWithin π g t β f) s := by
- apply ContDiffOn.comp _ (hf.of_le M.le) hst
- apply hg.fderivWithin ht
- simp only [Nat.cast_succ, le_refl]
- have B : ContDiffOn π n (fderivWithin π f s) s := by
- apply hf.fderivWithin hs
- simp only [Nat.cast_succ, le_refl]
- exact (ContinuousLinearMap.compL π E Fu Gu).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one
- A B hs hx le_rfl (ContinuousLinearMap.norm_compL_le π E Fu Gu)
- -- bound each of the terms using the estimates on previous derivatives (that use the inductive
- -- assumption for `g' β f`).
- _ β€ β i in Finset.range (n + 1), (n.choose i : β) * (i ! * C * D ^ i) * D ^ (n - i + 1) := by
- apply Finset.sum_le_sum fun i hi => ?_
- simp only [mul_assoc (n.choose i : β)]
- refine' mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg _)
- apply mul_le_mul (I i hi) (J i) (norm_nonneg _)
- positivity
- -- We are left with trivial algebraic manipulations to see that this is smaller than
- -- the claimed bound.
- _ = β i in Finset.range (n + 1),
- -- porting note: had to insert a few more explicit type ascriptions in this and similar
- -- expressions.
- (n ! : β) * ((i ! : β)β»ΒΉ * i !) * C * (D ^ i * D ^ (n - i + 1)) * ((n - i)! : β)β»ΒΉ := by
- apply Finset.sum_congr rfl fun i hi => ?_
- simp only [Nat.cast_choose β (Finset.mem_range_succ_iff.1 hi), div_eq_inv_mul, mul_inv]
- ring
- _ = β i in Finset.range (n + 1), (n ! : β) * 1 * C * D ^ (n + 1) * ((n - i)! : β)β»ΒΉ := by
- apply Finset.sum_congr rfl fun i hi => ?_
- congr 2
- Β· congr
- apply inv_mul_cancel
- simpa only [Ne.def, Nat.cast_eq_zero] using i.factorial_ne_zero
- Β· rw [β pow_add]
- congr 1
- rw [Nat.add_succ, Nat.succ_inj']
- exact Nat.add_sub_of_le (Finset.mem_range_succ_iff.1 hi)
- _ β€ β i in Finset.range (n + 1), (n ! : β) * 1 * C * D ^ (n + 1) * 1 := by
- apply Finset.sum_le_sum fun i _hi => ?_
- refine' mul_le_mul_of_nonneg_left _ (by positivity)
- apply inv_le_one
- simpa only [Nat.one_le_cast] using (n - i).factorial_pos
- _ = (n + 1)! * C * D ^ (n + 1) := by
- simp only [mul_assoc, mul_one, Finset.sum_const, Finset.card_range, nsmul_eq_mul,
- Nat.factorial_succ, Nat.cast_mul]
-#align norm_iterated_fderiv_within_comp_le_aux norm_iteratedFDerivWithin_comp_le_aux
-
-/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
-within a set of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
-of `g β f` is bounded by `n! * C * D^n`. -/
-theorem norm_iteratedFDerivWithin_comp_le {g : F β G} {f : E β F} {n : β} {s : Set E} {t : Set F}
- {x : E} {N : ββ} (hg : ContDiffOn π N g t) (hf : ContDiffOn π N f s) (hn : (n : ββ) β€ N)
- (ht : UniqueDiffOn π t) (hs : UniqueDiffOn π s) (hst : MapsTo f s t) (hx : x β s) {C : β}
- {D : β} (hC : β i, i β€ n β βiteratedFDerivWithin π i g t (f x)β β€ C)
- (hD : β i, 1 β€ i β i β€ n β βiteratedFDerivWithin π i f s xβ β€ D ^ i) :
- βiteratedFDerivWithin π n (g β f) s xβ β€ n ! * C * D ^ n := by
- /- We reduce the bound to the case where all spaces live in the same universe (in which we
- already have proved the result), by using linear isometries between the spaces and their `ULift`
- to a common universe. These linear isometries preserve the norm of the iterated derivative. -/
- let Fu : Type max uF uG := ULift.{uG, uF} F
- let Gu : Type max uF uG := ULift.{uF, uG} G
- have isoF : Fu ββα΅’[π] F := LinearIsometryEquiv.ulift π F
- have isoG : Gu ββα΅’[π] G := LinearIsometryEquiv.ulift π G
- -- lift `f` and `g` to versions `fu` and `gu` on the lifted spaces.
- let fu : E β Fu := isoF.symm β f
- let gu : Fu β Gu := isoG.symm β g β isoF
- let tu := isoF β»ΒΉ' t
- have htu : UniqueDiffOn π tu := isoF.toContinuousLinearEquiv.uniqueDiffOn_preimage_iff.2 ht
- have hstu : MapsTo fu s tu := fun y hy β¦ by
- simpa only [mem_preimage, comp_apply, LinearIsometryEquiv.apply_symm_apply] using hst hy
- have Ffu : isoF (fu x) = f x := by simp only [comp_apply, LinearIsometryEquiv.apply_symm_apply]
- -- All norms are preserved by the lifting process.
- have hfu : ContDiffOn π n fu s := isoF.symm.contDiff.comp_contDiffOn (hf.of_le hn)
- have hgu : ContDiffOn π n gu tu :=
- isoG.symm.contDiff.comp_contDiffOn
- ((hg.of_le hn).comp_continuousLinearMap (isoF : Fu βL[π] F))
- have Nfu : β i, βiteratedFDerivWithin π i fu s xβ = βiteratedFDerivWithin π i f s xβ := fun i β¦ by
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]
- simp_rw [β Nfu] at hD
- have Ngu : β i,
- βiteratedFDerivWithin π i gu tu (fu x)β = βiteratedFDerivWithin π i g t (f x)β := fun i β¦ by
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ htu (hstu hx)]
- rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ ht, Ffu]
- rw [Ffu]
- exact hst hx
- simp_rw [β Ngu] at hC
- have Nfgu :
- βiteratedFDerivWithin π n (g β f) s xβ = βiteratedFDerivWithin π n (gu β fu) s xβ := by
- have : gu β fu = isoG.symm β g β f := by
- ext x
- simp only [comp_apply, LinearIsometryEquiv.map_eq_iff, LinearIsometryEquiv.apply_symm_apply]
- rw [this, LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]
- -- deduce the required bound from the one for `gu β fu`.
- rw [Nfgu]
- exact norm_iteratedFDerivWithin_comp_le_aux hgu hfu htu hs hstu hx hC hD
-#align norm_iterated_fderiv_within_comp_le norm_iteratedFDerivWithin_comp_le
-
-/-- If the derivatives of `g` at `f x` are bounded by `C`, and the `i`-th derivative
-of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
-of `g β f` is bounded by `n! * C * D^n`. -/
-theorem norm_iteratedFDeriv_comp_le {g : F β G} {f : E β F} {n : β} {N : ββ} (hg : ContDiff π N g)
- (hf : ContDiff π N f) (hn : (n : ββ) β€ N) (x : E) {C : β} {D : β}
- (hC : β i, i β€ n β βiteratedFDeriv π i g (f x)β β€ C)
- (hD : β i, 1 β€ i β i β€ n β βiteratedFDeriv π i f xβ β€ D ^ i) :
- βiteratedFDeriv π n (g β f) xβ β€ n ! * C * D ^ n := by
- simp_rw [β iteratedFDerivWithin_univ] at hC hD β’
- exact norm_iteratedFDerivWithin_comp_le hg.contDiffOn hf.contDiffOn hn uniqueDiffOn_univ
- uniqueDiffOn_univ (mapsTo_univ _ _) (mem_univ x) hC hD
-#align norm_iterated_fderiv_comp_le norm_iteratedFDeriv_comp_le
-
-section Apply
-
-theorem norm_iteratedFDerivWithin_clm_apply {f : E β F βL[π] G} {g : E β F} {s : Set E} {x : E}
- {N : ββ} {n : β} (hf : ContDiffOn π N f s) (hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s)
- (hx : x β s) (hn : βn β€ N) : βiteratedFDerivWithin π n (fun y => (f y) (g y)) s xβ β€
- β i in Finset.range (n + 1), β(n.choose i) * βiteratedFDerivWithin π i f s xβ *
- βiteratedFDerivWithin π (n - i) g s xβ := by
- let B : (F βL[π] G) βL[π] F βL[π] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply π G)
- have hB : βBβ β€ 1 := by
- simp only [ContinuousLinearMap.op_norm_flip, ContinuousLinearMap.apply]
- refine' ContinuousLinearMap.op_norm_le_bound _ zero_le_one fun f => _
- simp only [ContinuousLinearMap.coe_id', id.def, one_mul]
- rfl
- exact B.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one hf hg hs hx hn hB
-#align norm_iterated_fderiv_within_clm_apply norm_iteratedFDerivWithin_clm_apply
-
-theorem norm_iteratedFDeriv_clm_apply {f : E β F βL[π] G} {g : E β F} {N : ββ} {n : β}
- (hf : ContDiff π N f) (hg : ContDiff π N g) (x : E) (hn : βn β€ N) :
- βiteratedFDeriv π n (fun y : E => (f y) (g y)) xβ β€ β i in Finset.range (n + 1),
- β(n.choose i) * βiteratedFDeriv π i f xβ * βiteratedFDeriv π (n - i) g xβ := by
- simp only [β iteratedFDerivWithin_univ]
- exact norm_iteratedFDerivWithin_clm_apply hf.contDiffOn hg.contDiffOn uniqueDiffOn_univ
- (Set.mem_univ x) hn
-#align norm_iterated_fderiv_clm_apply norm_iteratedFDeriv_clm_apply
-
-theorem norm_iteratedFDerivWithin_clm_apply_const {f : E β F βL[π] G} {c : F} {s : Set E} {x : E}
- {N : ββ} {n : β} (hf : ContDiffOn π N f s) (hs : UniqueDiffOn π s) (hx : x β s) (hn : βn β€ N) :
- βiteratedFDerivWithin π n (fun y : E => (f y) c) s xβ β€
- βcβ * βiteratedFDerivWithin π n f s xβ := by
- let g : (F βL[π] G) βL[π] G := ContinuousLinearMap.apply π G c
- have h := g.norm_compContinuousMultilinearMap_le (iteratedFDerivWithin π n f s x)
- rw [β g.iteratedFDerivWithin_comp_left hf hs hx hn] at h
- refine' h.trans (mul_le_mul_of_nonneg_right _ (norm_nonneg _))
- refine' g.op_norm_le_bound (norm_nonneg _) fun f => _
- rw [ContinuousLinearMap.apply_apply, mul_comm]
- exact f.le_op_norm c
-#align norm_iterated_fderiv_within_clm_apply_const norm_iteratedFDerivWithin_clm_apply_const
-
-theorem norm_iteratedFDeriv_clm_apply_const {f : E β F βL[π] G} {c : F} {x : E} {N : ββ} {n : β}
- (hf : ContDiff π N f) (hn : βn β€ N) :
- βiteratedFDeriv π n (fun y : E => (f y) c) xβ β€ βcβ * βiteratedFDeriv π n f xβ := by
- simp only [β iteratedFDerivWithin_univ]
- exact norm_iteratedFDerivWithin_clm_apply_const hf.contDiffOn uniqueDiffOn_univ
- (Set.mem_univ x) hn
-#align norm_iterated_fderiv_clm_apply_const norm_iteratedFDeriv_clm_apply_const
-
-end Apply
@@ -3,7 +3,7 @@ Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-/
-import Mathlib.Analysis.Calculus.ContDiffDef
+import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.Deriv.Inverse
import Mathlib.Analysis.Calculus.MeanValue
import Mathlib.Analysis.NormedSpace.FiniteDimension
rcases
, convert
and congrm
(#7725)
Replace rcases(
with rcases (
. Same thing for convert(
and congrm(
. No other change.
@@ -1146,10 +1146,10 @@ theorem hasFTaylorSeriesUpToOn_pi :
exact (h i).zero_eq x hx
Β· intro m hm x hx
have := hasFDerivWithinAt_pi.2 fun i => (h i).fderivWithin m hm x hx
- convert(L m).hasFDerivAt.comp_hasFDerivWithinAt x this
+ convert (L m).hasFDerivAt.comp_hasFDerivWithinAt x this
Β· intro m hm
have := continuousOn_pi.2 fun i => (h i).cont m hm
- convert(L m).continuous.comp_continuousOn this
+ convert (L m).continuous.comp_continuousOn this
#align has_ftaylor_series_up_to_on_pi hasFTaylorSeriesUpToOn_pi
@[simp]
@@ -1183,6 +1183,19 @@ theorem contDiff_pi : ContDiff π n Ξ¦ β β i, ContDiff π n fun x => Ξ¦
simp only [β contDiffOn_univ, contDiffOn_pi]
#align cont_diff_pi contDiff_pi
+theorem contDiff_update (k : ββ) (x : β i, F' i) (i : ΞΉ) : ContDiff π k (update x i) := by
+ rw [contDiff_pi]
+ intro j
+ dsimp [Function.update]
+ split_ifs with h
+ Β· subst h
+ exact contDiff_id
+ Β· exact contDiff_const
+
+variable (F') in
+theorem contDiff_single (k : ββ) (i : ΞΉ) : ContDiff π k (Pi.single i : F' i β β i, F' i) :=
+ contDiff_update k 0 i
+
variable (π E)
theorem contDiff_apply (i : ΞΉ) : ContDiff π n fun f : ΞΉ β E => f i :=
@@ -2064,6 +2064,12 @@ theorem ContDiffAt.exists_lipschitzOnWith {f : E' β F'} {x : E'} (hf : ContDif
(hf.hasStrictFDerivAt le_rfl).exists_lipschitzOnWith
#align cont_diff_at.exists_lipschitz_on_with ContDiffAt.exists_lipschitzOnWith
+/-- If `f` is `C^1`, it is locally Lipschitz. -/
+lemma ContDiff.locallyLipschitz {f : E' β F'} (hf : ContDiff π 1 f) : LocallyLipschitz f := by
+ intro x
+ rcases hf.contDiffAt.exists_lipschitzOnWith with β¨K, t, ht, hfβ©
+ use K, t
+
/-- A `C^1` function with compact support is Lipschitz. -/
theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' β F'} {n : ββ}
(hf : HasCompactSupport f) (h'f : ContDiff π n f) (hn : 1 β€ n) :
@@ -84,7 +84,7 @@ theorem contDiff_zero_fun : ContDiff π n fun _ : E => (0 : F) :=
/-- Constants are `C^β`.
-/
theorem contDiff_const {c : F} : ContDiff π n fun _ : E => c := by
- suffices h : ContDiff π β fun _ : E => c; Β· exact h.of_le le_top
+ suffices h : ContDiff π β fun _ : E => c from h.of_le le_top
rw [contDiff_top_iff_fderiv]
refine' β¨differentiable_const c, _β©
rw [fderiv_const]
@@ -142,7 +142,7 @@ theorem iteratedFDeriv_const_of_ne {n : β} (hn : n β 0) (c : F) :
/-- Unbundled bounded linear functions are `C^β`.
-/
theorem IsBoundedLinearMap.contDiff (hf : IsBoundedLinearMap π f) : ContDiff π n f := by
- suffices h : ContDiff π β f; Β· exact h.of_le le_top
+ suffices h : ContDiff π β f from h.of_le le_top
rw [contDiff_top_iff_fderiv]
refine' β¨hf.differentiable, _β©
simp_rw [hf.fderiv]
@@ -186,7 +186,7 @@ theorem contDiffOn_id {s} : ContDiffOn π n (id : E β E) s :=
/-- Bilinear functions are `C^β`.
-/
theorem IsBoundedBilinearMap.contDiff (hb : IsBoundedBilinearMap π b) : ContDiff π n b := by
- suffices h : ContDiff π β b; Β· exact h.of_le le_top
+ suffices h : ContDiff π β b from h.of_le le_top
rw [contDiff_top_iff_fderiv]
refine' β¨hb.differentiable, _β©
simp only [hb.fderiv]
@@ -429,8 +429,8 @@ theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_right (g : G βL[π]
simp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_apply,
ContinuousMultilinearMap.compContinuousLinearMapEquivL_apply,
ContinuousMultilinearMap.compContinuousLinearMap_apply]
- rw [ContinuousLinearEquiv.comp_right_fderivWithin _ (g.uniqueDiffOn_preimage_iff.2 hs x hx)]
- rfl
+ rw [ContinuousLinearEquiv.comp_right_fderivWithin _ (g.uniqueDiffOn_preimage_iff.2 hs x hx),
+ ContinuousLinearMap.coe_comp', coe_coe, comp_apply, tail_def, tail_def]
#align continuous_linear_equiv.iterated_fderiv_within_comp_right ContinuousLinearEquiv.iteratedFDerivWithin_comp_right
/-- The iterated derivative of the composition with a linear map on the right is
@@ -2064,6 +2064,15 @@ theorem ContDiffAt.exists_lipschitzOnWith {f : E' β F'} {x : E'} (hf : ContDif
(hf.hasStrictFDerivAt le_rfl).exists_lipschitzOnWith
#align cont_diff_at.exists_lipschitz_on_with ContDiffAt.exists_lipschitzOnWith
+/-- A `C^1` function with compact support is Lipschitz. -/
+theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' β F'} {n : ββ}
+ (hf : HasCompactSupport f) (h'f : ContDiff π n f) (hn : 1 β€ n) :
+ β C, LipschitzWith C f := by
+ obtain β¨C, hCβ© := (hf.fderiv π).exists_bound_of_continuous (h'f.continuous_fderiv hn)
+ refine β¨β¨max C 0, le_max_right _ _β©, ?_β©
+ apply lipschitzWith_of_nnnorm_fderiv_le (h'f.differentiable hn) (fun x β¦ ?_)
+ simp [β NNReal.coe_le_coe, hC x]
+
end Real
section deriv
@@ -2345,7 +2345,7 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
(fun i j => βiteratedFDerivWithin π i f s xβ * βiteratedFDerivWithin π j g s xβ) n).symm
#align continuous_linear_map.norm_iterated_fderiv_within_le_of_bilinear_aux ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux
-set_option maxHeartbeats 900000 in -- 4.5Γ the default limit
+set_option maxHeartbeats 700000 in -- 3.5Γ the default limit
/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear:
`βD^n (x β¦ B (f x) (g x))β β€ βBβ β_{k β€ n} n.choose k βD^k fβ βD^{n-k} gβ` -/
@@ -2542,7 +2542,6 @@ theorem norm_iteratedFDeriv_mul_le {f : E β A} {g : E β A} {N : ββ} (hf
end
-set_option maxHeartbeats 300000 in
/-- If the derivatives within a set of `g` at `f x` are bounded by `C`, and the `i`-th derivative
within a set of `f` at `x` is bounded by `D^i` for all `1 β€ i β€ n`, then the `n`-th derivative
of `g β f` is bounded by `n! * C * D^n`.
@@ -891,12 +891,12 @@ theorem ContDiffOn.clm_comp {g : X β F βL[π] G} {f : X β E βL[π] F
theorem ContDiff.clm_apply {f : E β F βL[π] G} {g : E β F} {n : ββ} (hf : ContDiff π n f)
(hg : ContDiff π n g) : ContDiff π n fun x => (f x) (g x) :=
- isBoundedBilinearMapApply.contDiff.compβ hf hg
+ isBoundedBilinearMap_apply.contDiff.compβ hf hg
#align cont_diff.clm_apply ContDiff.clm_apply
theorem ContDiffOn.clm_apply {f : E β F βL[π] G} {g : E β F} {n : ββ} (hf : ContDiffOn π n f s)
(hg : ContDiffOn π n g s) : ContDiffOn π n (fun x => (f x) (g x)) s :=
- isBoundedBilinearMapApply.contDiff.comp_contDiff_onβ hf hg
+ isBoundedBilinearMap_apply.contDiff.comp_contDiff_onβ hf hg
#align cont_diff_on.clm_apply ContDiffOn.clm_apply
-- porting note: In Lean 3 we had to give implicit arguments in proofs like the following,
@@ -2094,7 +2094,7 @@ theorem contDiffOn_succ_iff_derivWithin {n : β} (hs : UniqueDiffOn π sβ)
Β· ext x; rfl
simp_rw [this]
apply ContDiff.comp_contDiffOn _ h
- exact (isBoundedBilinearMapApply.isBoundedLinearMap_left _).contDiff
+ exact (isBoundedBilinearMap_apply.isBoundedLinearMap_left _).contDiff
Β· intro h
have : fderivWithin π fβ sβ = smulRight (1 : π βL[π] π) β derivWithin fβ sβ
Β· ext x; simp [derivWithin]
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -54,10 +54,10 @@ open Set Fin Filter Function
open scoped Topology
-variable {π : Type _} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
+variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
- {X : Type _} [NormedAddCommGroup X] [NormedSpace π X] {s sβ t u : Set E} {f fβ : E β F}
+ {X : Type*} [NormedAddCommGroup X] [NormedSpace π X] {s sβ t u : Set E} {f fβ : E β F}
{g : F β G} {x xβ : E} {c : F} {b : E Γ F β G} {m n : ββ} {p : E β FormalMultilinearSeries π E F}
/-! ### Constants -/
@@ -845,7 +845,7 @@ theorem contDiffWithinAt_snd {s : Set (E Γ F)} {p : E Γ F} :
section NAry
-variable {Eβ Eβ Eβ Eβ : Type _}
+variable {Eβ Eβ Eβ Eβ : Type*}
variable [NormedAddCommGroup Eβ] [NormedAddCommGroup Eβ] [NormedAddCommGroup Eβ]
[NormedAddCommGroup Eβ] [NormedSpace π Eβ] [NormedSpace π Eβ] [NormedSpace π Eβ]
@@ -1128,7 +1128,7 @@ theorem ContDiff.contDiff_fderiv_apply {f : E β F} (hf : ContDiff π n f) (h
section Pi
-variable {ΞΉ ΞΉ' : Type _} [Fintype ΞΉ] [Fintype ΞΉ'] {F' : ΞΉ β Type _} [β i, NormedAddCommGroup (F' i)]
+variable {ΞΉ ΞΉ' : Type*} [Fintype ΞΉ] [Fintype ΞΉ'] {F' : ΞΉ β Type*} [β i, NormedAddCommGroup (F' i)]
[β i, NormedSpace π (F' i)] {Ο : β i, E β F' i} {p' : β i, E β FormalMultilinearSeries π E (F' i)}
{Ξ¦ : E β β i, F' i} {P' : E β FormalMultilinearSeries π E (β i, F' i)}
@@ -1358,7 +1358,7 @@ theorem ContDiff.sub {f g : E β F} (hf : ContDiff π n f) (hg : ContDiff
/-! ### Sum of finitely many functions -/
-theorem ContDiffWithinAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {t : Set E} {x : E}
+theorem ContDiffWithinAt.sum {ΞΉ : Type*} {f : ΞΉ β E β F} {s : Finset ΞΉ} {t : Set E} {x : E}
(h : β i β s, ContDiffWithinAt π n (fun x => f i x) t x) :
ContDiffWithinAt π n (fun x => β i in s, f i x) t x := by
classical
@@ -1369,19 +1369,19 @@ theorem ContDiffWithinAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ}
(IH fun j hj => h _ (Finset.mem_insert_of_mem hj))
#align cont_diff_within_at.sum ContDiffWithinAt.sum
-theorem ContDiffAt.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {x : E}
+theorem ContDiffAt.sum {ΞΉ : Type*} {f : ΞΉ β E β F} {s : Finset ΞΉ} {x : E}
(h : β i β s, ContDiffAt π n (fun x => f i x) x) :
ContDiffAt π n (fun x => β i in s, f i x) x := by
rw [β contDiffWithinAt_univ] at *; exact ContDiffWithinAt.sum h
#align cont_diff_at.sum ContDiffAt.sum
-theorem ContDiffOn.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ} {t : Set E}
+theorem ContDiffOn.sum {ΞΉ : Type*} {f : ΞΉ β E β F} {s : Finset ΞΉ} {t : Set E}
(h : β i β s, ContDiffOn π n (fun x => f i x) t) :
ContDiffOn π n (fun x => β i in s, f i x) t := fun x hx =>
ContDiffWithinAt.sum fun i hi => h i hi x hx
#align cont_diff_on.sum ContDiffOn.sum
-theorem ContDiff.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ}
+theorem ContDiff.sum {ΞΉ : Type*} {f : ΞΉ β E β F} {s : Finset ΞΉ}
(h : β i β s, ContDiff π n fun x => f i x) : ContDiff π n fun x => β i in s, f i x := by
simp only [β contDiffOn_univ] at *; exact ContDiffOn.sum h
#align cont_diff.sum ContDiff.sum
@@ -1390,7 +1390,7 @@ theorem ContDiff.sum {ΞΉ : Type _} {f : ΞΉ β E β F} {s : Finset ΞΉ}
section MulProd
-variable {πΈ πΈ' ΞΉ π' : Type _} [NormedRing πΈ] [NormedAlgebra π πΈ] [NormedCommRing πΈ']
+variable {πΈ πΈ' ΞΉ π' : Type*} [NormedRing πΈ] [NormedAlgebra π πΈ] [NormedCommRing πΈ']
[NormedAlgebra π πΈ'] [NormedField π'] [NormedAlgebra π π']
-- The product is smooth.
@@ -1549,7 +1549,7 @@ Porting note: TODO: generalize results in this section.
section ConstSmul
-variable {R : Type _} [Semiring R] [Module R F] [SMulCommClass π R F]
+variable {R : Type*} [Semiring R] [Module R F] [SMulCommClass π R F]
variable [ContinuousConstSMul R F]
@@ -1602,9 +1602,9 @@ end ConstSmul
section Prod_map
-variable {E' : Type _} [NormedAddCommGroup E'] [NormedSpace π E']
+variable {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π E']
-variable {F' : Type _} [NormedAddCommGroup F'] [NormedSpace π F']
+variable {F' : Type*} [NormedAddCommGroup F'] [NormedSpace π F']
/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
@@ -1622,7 +1622,7 @@ theorem ContDiffWithinAt.prod_map {s : Set E} {t : Set E'} {f : E β F} {g : E'
#align cont_diff_within_at.prod_map ContDiffWithinAt.prod_map
/-- The product map of two `C^n` functions on a set is `C^n` on the product set. -/
-theorem ContDiffOn.prod_map {E' : Type _} [NormedAddCommGroup E'] [NormedSpace π E'] {F' : Type _}
+theorem ContDiffOn.prod_map {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π E'] {F' : Type*}
[NormedAddCommGroup F'] [NormedSpace π F'] {s : Set E} {t : Set E'} {f : E β F} {g : E' β F'}
(hf : ContDiffOn π n f s) (hg : ContDiffOn π n g t) : ContDiffOn π n (Prod.map f g) (s ΓΛ’ t) :=
(hf.comp contDiffOn_fst (prod_subset_preimage_fst _ _)).prod
@@ -1667,7 +1667,7 @@ end Prod_map
section AlgebraInverse
-variable (π) {R : Type _} [NormedRing R]
+variable (π) {R : Type*} [NormedRing R]
-- porting note: this couldn't be on the same line as the binder type update of `π`
variable [NormedAlgebra π R]
@@ -1700,7 +1700,7 @@ theorem contDiffAt_ring_inverse [CompleteSpace R] (x : RΛ£) :
Β· exact contDiffAt_top.mpr Itop
#align cont_diff_at_ring_inverse contDiffAt_ring_inverse
-variable {π' : Type _} [NormedField π'] [NormedAlgebra π π'] [CompleteSpace π']
+variable {π' : Type*} [NormedField π'] [NormedAlgebra π π'] [CompleteSpace π']
theorem contDiffAt_inv {x : π'} (hx : x β 0) {n} : ContDiffAt π n Inv.inv x := by
simpa only [Ring.inverse_eq_inv'] using contDiffAt_ring_inverse π (Units.mk0 x hx)
@@ -1949,8 +1949,8 @@ section Real
-/
-variable {π : Type _} [IsROrC π] {E' : Type _} [NormedAddCommGroup E'] [NormedSpace π E']
- {F' : Type _} [NormedAddCommGroup F'] [NormedSpace π F']
+variable {π : Type*} [IsROrC π] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π E']
+ {F' : Type*} [NormedAddCommGroup F'] [NormedSpace π F']
/-- If a function has a Taylor series at order at least 1, then at points in the interior of the
domain of definition, the term of order 1 of this series is a strict derivative of `f`. -/
@@ -2007,7 +2007,7 @@ theorem ContDiff.hasStrictDerivAt {f : π β F'} {x : π} (hf : ContDiff
/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} βͺ s`, where `s` is a convex set,
and `βp x 1ββ < K`, then `f` is `K`-Lipschitz in a neighborhood of `x` within `s`. -/
-theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _}
+theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type*}
[NormedAddCommGroup E] [NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F}
{p : E β FormalMultilinearSeries β E F} {s : Set E} {x : E}
(hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex β s) (K : ββ₯0)
@@ -2026,7 +2026,7 @@ theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type _
/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} βͺ s`, where `s` is a convex set,
then `f` is Lipschitz in a neighborhood of `x` within `s`. -/
-theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGroup E]
+theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
[NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F}
{p : E β FormalMultilinearSeries β E F} {s : Set E} {x : E}
(hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex β s) :
@@ -2036,7 +2036,7 @@ theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type _} [NormedAddC
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
-theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGroup E]
+theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
[NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F} {s : Set E} {x : E}
(hf : ContDiffWithinAt β 1 f s x) (hs : Convex β s) :
β K : ββ₯0, β t β π[s] x, LipschitzOnWith K f t := by
@@ -2212,7 +2212,7 @@ over `π`.
-/
-variable (π) {π' : Type _} [NontriviallyNormedField π']
+variable (π) {π' : Type*} [NontriviallyNormedField π']
-- porting note: this couldn't be on the same line as the binder type update of `π`
variable [NormedAlgebra π π']
@@ -2494,7 +2494,7 @@ theorem ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear_of_le_one (B : E
section
-variable {π' : Type _} [NormedField π'] [NormedAlgebra π π'] [NormedSpace π' F]
+variable {π' : Type*} [NormedField π'] [NormedAlgebra π π'] [NormedSpace π' F]
[IsScalarTower π π' F]
theorem norm_iteratedFDerivWithin_smul_le {f : E β π'} {g : E β F} {N : ββ}
@@ -2519,7 +2519,7 @@ end
section
-variable {A : Type _} [NormedRing A] [NormedAlgebra π A]
+variable {A : Type*} [NormedRing A] [NormedAlgebra π A]
theorem norm_iteratedFDerivWithin_mul_le {f : E β A} {g : E β A} {N : ββ} (hf : ContDiffOn π N f s)
(hg : ContDiffOn π N g s) (hs : UniqueDiffOn π s) {x : E} (hx : x β s) {n : β}
@@ -1034,6 +1034,18 @@ theorem ContDiffWithinAt.fderivWithin_right (hf : ContDiffWithinAt π n f s x
contDiffWithinAt_id hs hmn hxβs (by rw [preimage_id'])
#align cont_diff_within_at.fderiv_within_right ContDiffWithinAt.fderivWithin_right
+-- TODO: can we make a version of `ContDiffWithinAt.fderivWithin` for iterated derivatives?
+theorem ContDiffWithinAt.iteratedFderivWithin_right {i : β} (hf : ContDiffWithinAt π n f s xβ)
+ (hs : UniqueDiffOn π s) (hmn : (m + i : ββ) β€ n) (hxβs : xβ β s) :
+ ContDiffWithinAt π m (iteratedFDerivWithin π i f s) s xβ := by
+ induction' i with i hi generalizing m
+ Β· rw [Nat.zero_eq, ENat.coe_zero, add_zero] at hmn
+ exact (hf.of_le hmn).continuousLinearMap_comp
+ ((continuousMultilinearCurryFin0 π E F).symm : _ βL[π] E [Γ0]βL[π] F)
+ Β· rw [Nat.cast_succ, add_comm _ 1, β add_assoc] at hmn
+ exact ((hi hmn).fderivWithin_right hs le_rfl hxβs).continuousLinearMap_comp
+ (continuousMultilinearCurryLeftEquiv π (fun _ : Fin (i+1) β¦ E) F : _ βL[π] E [Γ(i+1)]βL[π] F)
+
/-- `x β¦ fderiv π (f x) (g x)` is smooth at `xβ`. -/
protected theorem ContDiffAt.fderiv {f : E β F β G} {g : E β F} {n : ββ}
(hf : ContDiffAt π n (Function.uncurry f) (xβ, g xβ)) (hg : ContDiffAt π m g xβ)
@@ -1050,6 +1062,11 @@ theorem ContDiffAt.fderiv_right (hf : ContDiffAt π n f xβ) (hmn : (m + 1 :
ContDiffAt.fderiv (ContDiffAt.comp (xβ, xβ) hf contDiffAt_snd) contDiffAt_id hmn
#align cont_diff_at.fderiv_right ContDiffAt.fderiv_right
+theorem ContDiffAt.iteratedFDeriv_right {i : β} (hf : ContDiffAt π n f xβ)
+ (hmn : (m + i : ββ) β€ n) : ContDiffAt π m (iteratedFDeriv π i f) xβ := by
+ rw [β iteratedFDerivWithin_univ, β contDiffWithinAt_univ] at *
+ exact hf.iteratedFderivWithin_right uniqueDiffOn_univ hmn trivial
+
/-- `x β¦ fderiv π (f x) (g x)` is smooth. -/
protected theorem ContDiff.fderiv {f : E β F β G} {g : E β F} {n m : ββ}
(hf : ContDiff π m <| Function.uncurry f) (hg : ContDiff π n g) (hnm : n + 1 β€ m) :
@@ -1063,6 +1080,10 @@ theorem ContDiff.fderiv_right (hf : ContDiff π n f) (hmn : (m + 1 : ββ)
contDiff_iff_contDiffAt.mpr fun _x => hf.contDiffAt.fderiv_right hmn
#align cont_diff.fderiv_right ContDiff.fderiv_right
+theorem ContDiff.iteratedFDeriv_right {i : β} (hf : ContDiff π n f)
+ (hmn : (m + i : ββ) β€ n) : ContDiff π m (iteratedFDeriv π i f) :=
+ contDiff_iff_contDiffAt.mpr fun _x => hf.contDiffAt.iteratedFDeriv_right hmn
+
/-- `x β¦ fderiv π (f x) (g x)` is continuous. -/
theorem Continuous.fderiv {f : E β F β G} {g : E β F} {n : ββ}
(hf : ContDiff π n <| Function.uncurry f) (hg : Continuous g) (hn : 1 β€ n) :
@@ -2,11 +2,6 @@
Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Floris van Doorn
-
-! This file was ported from Lean 3 source module analysis.calculus.cont_diff
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.Calculus.ContDiffDef
import Mathlib.Analysis.Calculus.Deriv.Inverse
@@ -14,6 +9,8 @@ import Mathlib.Analysis.Calculus.MeanValue
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.Data.Nat.Choose.Cast
+#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
+
/-!
# Higher differentiability of usual operations
@@ -1688,7 +1688,7 @@ theorem contDiffAt_inv {x : π'} (hx : x β 0) {n} : ContDiffAt π n Inv.in
simpa only [Ring.inverse_eq_inv'] using contDiffAt_ring_inverse π (Units.mk0 x hx)
#align cont_diff_at_inv contDiffAt_inv
-theorem contDiffOn_inv {n} : ContDiffOn π n (Inv.inv : π' β π') ({0}αΆ) := fun _ hx =>
+theorem contDiffOn_inv {n} : ContDiffOn π n (Inv.inv : π' β π') {0}αΆ := fun _ hx =>
(contDiffAt_inv π hx).contDiffWithinAt
#align cont_diff_on_inv contDiffOn_inv
@@ -2169,13 +2169,13 @@ theorem ContDiff.continuous_deriv (h : ContDiff π n fβ) (hn : 1 β€ n) : Co
#align cont_diff.continuous_deriv ContDiff.continuous_deriv
theorem ContDiff.iterate_deriv :
- β (n : β) {fβ : π β F}, ContDiff π β fβ β ContDiff π β ((deriv^[n]) fβ)
+ β (n : β) {fβ : π β F}, ContDiff π β fβ β ContDiff π β (deriv^[n] fβ)
| 0, _, hf => hf
| n + 1, _, hf => ContDiff.iterate_deriv n (contDiff_top_iff_deriv.mp hf).2
#align cont_diff.iterate_deriv ContDiff.iterate_deriv
theorem ContDiff.iterate_deriv' (n : β) :
- β (k : β) {fβ : π β F}, ContDiff π (n + k : β) fβ β ContDiff π n ((deriv^[k]) fβ)
+ β (k : β) {fβ : π β F}, ContDiff π (n + k : β) fβ β ContDiff π n (deriv^[k] fβ)
| 0, _, hf => hf
| k + 1, _, hf => ContDiff.iterate_deriv' _ k (contDiff_succ_iff_deriv.mp hf).2
#align cont_diff.iterate_deriv' ContDiff.iterate_deriv'
Fix the set tactic to not time out when dealing with slow to elaborate terms and many local hypotheses.
The root cause of this is that the rewrite [blah] at *
tactic causes blah to be elaborated again and again for each local hypothesis, this is possibly a core issue that should be fixed separately, but in set
we have the elaborated term already so we can just use it.
We also add some functionality to simply test / demonstrate failures when elaboration takes too long, namely sleepAtLeastHeartbeats
and a sleep_heartbeats
tactic.
@urkud was facing some slow running set's in https://github.com/leanprover-community/mathlib4/pull/4912, see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Timeout.20in.20.60set.20.2E.2E.20with.60/near/367958828 that this issue was minimized from and should fix.
Some other linter failures show up due to changes to the set internals so fix these too.
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
@@ -506,7 +506,7 @@ product of `f` and `g` admits the cartesian product of `p` and `q` as a Taylor s
theorem HasFTaylorSeriesUpToOn.prod (hf : HasFTaylorSeriesUpToOn n f p s) {g : E β G}
{q : E β FormalMultilinearSeries π E G} (hg : HasFTaylorSeriesUpToOn n g q s) :
HasFTaylorSeriesUpToOn n (fun y => (f y, g y)) (fun y k => (p y k).prod (q y k)) s := by
- set L := fun m => ContinuousMultilinearMap.prodL π (fun i : Fin m => E) F G
+ set L := fun m => ContinuousMultilinearMap.prodL π (fun _ : Fin m => E) F G
constructor
Β· intro x hx; rw [β hf.zero_eq x hx, β hg.zero_eq x hx]; rfl
Β· intro m hm x hx
at
and goals (#5387)
Changes are of the form
some_tactic at hβ’
-> some_tactic at h β’
some_tactic at h
-> some_tactic at h
@@ -584,7 +584,7 @@ private theorem ContDiffOn.comp_same_univ {Eu : Type u} [NormedAddCommGroup Eu]
(hg : ContDiffOn π n g t) (hf : ContDiffOn π n f s) (st : s β f β»ΒΉ' t) :
ContDiffOn π n (g β f) s := by
induction' n using ENat.nat_induction with n IH Itop generalizing Eu Fu Gu
- Β· rw [contDiffOn_zero] at hf hgβ’
+ Β· rw [contDiffOn_zero] at hf hg β’
exact ContinuousOn.comp hg hf st
Β· rw [contDiffOn_succ_iff_hasFDerivWithinAt] at hg β’
intro x hx
ext
(#5258)
Co-authored-by: Xavier Roblot <46200072+xroblot@users.noreply.github.com> Co-authored-by: JoΓ«l Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Pol'tta / Miyahara KΕ <pol_tta@outlook.jp> Co-authored-by: Jason Yuen <jason_yuen2007@hotmail.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Jireh Loreaux <loreaujy@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com> Co-authored-by: Jujian Zhang <jujian.zhang1998@outlook.com> Co-authored-by: YaΓ«l Dillies <yael.dillies@gmail.com>
@@ -71,7 +71,7 @@ variable {π : Type _} [NontriviallyNormedField π] {D : Type uD} [NormedAdd
theorem iteratedFDeriv_zero_fun {n : β} : (iteratedFDeriv π n fun _ : E => (0 : F)) = 0 := by
induction' n with n IH
Β· ext m; simp
- Β· ext (x m)
+ Β· ext x m
rw [iteratedFDeriv_succ_apply_left, IH]
change (fderiv π (fun _ : E => (0 : E[Γn]βL[π] F)) x : E β E[Γn]βL[π] F) (m 0) (tail m) = _
rw [fderiv_const]
@@ -369,7 +369,7 @@ theorem HasFTaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFTaylorSeriesUpT
Β· intro m hm x hx
convert (hA m).hasFDerivAt.comp_hasFDerivWithinAt x
((hf.fderivWithin m hm (g x) hx).comp x g.hasFDerivWithinAt (Subset.refl _))
- ext (y v)
+ ext y v
change p (g x) (Nat.succ m) (g β cons y v) = p (g x) m.succ (cons (g y) (g β v))
rw [comp_cons]
Β· intro m hm
I wrote a script to find lines that contain an odd number of backticks
@@ -932,12 +932,12 @@ theorem contDiff_prodAssoc_symm : ContDiff π β€ <| (Equiv.prodAssoc E F G).s
/-! ### Bundled derivatives are smooth -/
/-- One direction of `contDiffWithinAt_succ_iff_hasFDerivWithinAt`, but where all derivatives
-taken within the same set. Version for partial derivatives / functions with parameters. f x` is a
+taken within the same set. Version for partial derivatives / functions with parameters. `f x` is a
`C^n+1` family of functions and `g x` is a `C^n` family of points, then the derivative of `f x` at
`g x` depends in a `C^n` way on `x`. We give a general version of this fact relative to sets which
-may not have unique derivatives, in the following form. If `f : E Γ F β G` is `C^n+1` at `(xβ,
-g(xβ))` in `(s βͺ {xβ}) Γ t β E Γ F` and `g : E β F` is `C^n` at `xβ` within some set `s β E`, then
-there is a function `f' : E β F βL[π] G` that is `C^n` at `xβ` within `s` such that for all `x`
+may not have unique derivatives, in the following form. If `f : E Γ F β G` is `C^n+1` at
+`(xβ, g(xβ))` in `(s βͺ {xβ}) Γ t β E Γ F` and `g : E β F` is `C^n` at `xβ` within some set `s β E`,
+then there is a function `f' : E β F βL[π] G` that is `C^n` at `xβ` within `s` such that for all `x`
sufficiently close to `xβ` within `s βͺ {xβ}` the function `y β¦ f x y` has derivative `f' x` at `g x`
within `t β F`. For convenience, we return an explicit set of `x`'s where this holds that is a
subset of `s βͺ {xβ}`. We need one additional condition, namely that `t` is a neighborhood of
@@ -1219,7 +1219,7 @@ theorem ContDiffOn.add {s : Set E} {f g : E β F} (hf : ContDiffOn π n f s)
variable {i : β}
/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
-See also `iteratedFDerivWithin_add_apply'`, which uses the spelling `(Ξ» x, f x + g x)`
+See also `iteratedFDerivWithin_add_apply'`, which uses the spelling `(fun x β¦ f x + g x)`
instead of `f + g`. -/
theorem iteratedFDerivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f s)
(hg : ContDiffOn π i g s) (hu : UniqueDiffOn π s) (hx : x β s) :
@@ -1230,7 +1230,7 @@ theorem iteratedFDerivWithin_add_apply {f g : E β F} (hf : ContDiffOn π i f
#align iterated_fderiv_within_add_apply iteratedFDerivWithin_add_apply
/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
-This is the same as `iteratedFDerivWithin_add_apply`, but using the spelling `(Ξ» x, f x + g x)`
+This is the same as `iteratedFDerivWithin_add_apply`, but using the spelling `(fun x β¦ f x + g x)`
instead of `f + g`, which can be handy for some rewrites.
TODO: use one form consistently. -/
theorem iteratedFDerivWithin_add_apply' {f g : E β F} (hf : ContDiffOn π i f s)
@@ -1896,7 +1896,7 @@ theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDi
/-- This is a useful lemma to prove that a certain operation preserves functions being `C^n`.
When you do induction on `n`, this gives a useful characterization of a function being `C^(n+1)`,
assuming you have already computed the derivative. The advantage of this version over
-`contDiff_succ_iff_fderiv` is that both occurences of `ContDiff` are for functions with the same
+`contDiff_succ_iff_fderiv` is that both occurrences of `ContDiff` are for functions with the same
domain and codomain (`E` and `F`). This is not the case for `contDiff_succ_iff_fderiv`, which
often requires an inconvenient need to generalize `F`, which results in universe issues
(see the discussion in the section of `ContDiff.comp`).
@@ -2016,7 +2016,7 @@ theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type _} [NormedAddC
(exists_gt _).imp <| hf.exists_lipschitzOnWith_of_nnnorm_lt hs
#align has_ftaylor_series_up_to_on.exists_lipschitz_on_with HasFTaylorSeriesUpToOn.exists_lipschitzOnWith
-/-- If `f` is `C^1` within a conves set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
+/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type _} [NormedAddCommGroup E]
[NormedSpace β E] [NormedAddCommGroup F] [NormedSpace β F] {f : E β F} {s : Set E} {x : E}
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file