analysis.calculus.cont_diff_def
β·
Mathlib.Analysis.Calculus.ContDiff.Defs
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)
(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
@@ -1803,7 +1803,7 @@ theorem contDiffAt_one_iff :
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']
+ exists_mem_and_iff antitone_bforall antitone_continuousOn, and_comm]
#align cont_diff_at_one_iff contDiffAt_one_iff
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,10 +3,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
-/
-import Analysis.Calculus.Fderiv.Add
-import Analysis.Calculus.Fderiv.Mul
-import Analysis.Calculus.Fderiv.Equiv
-import Analysis.Calculus.Fderiv.RestrictScalars
+import Analysis.Calculus.FDeriv.Add
+import Analysis.Calculus.FDeriv.Mul
+import Analysis.Calculus.FDeriv.Equiv
+import Analysis.Calculus.FDeriv.RestrictScalars
import Analysis.Calculus.FormalMultilinearSeries
#align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
@@ -1192,10 +1192,10 @@ theorem contDiffWithinAt_zero (hx : x β s) :
#align cont_diff_within_at_zero contDiffWithinAt_zero
-/
-#print HasFTaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn /-
+#print HasFTaylorSeriesUpToOn.eq_iteratedFDerivWithin_of_uniqueDiffOn /-
/-- 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
+theorem HasFTaylorSeriesUpToOn.eq_iteratedFDerivWithin_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
@@ -1209,7 +1209,7 @@ theorem HasFTaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn
(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
+#align has_ftaylor_series_up_to_on.eq_ftaylor_series_of_unique_diff_on HasFTaylorSeriesUpToOn.eq_iteratedFDerivWithin_of_uniqueDiffOn
-/
#print ContDiffOn.ftaylorSeriesWithin /-
@@ -1231,7 +1231,7 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
by
change p x m.succ = iteratedFDerivWithin π m.succ f s x
rw [β iteratedFDerivWithin_inter_open o_open xo]
- exact (Hp.mono ho).eq_ftaylor_series_of_uniqueDiffOn le_rfl (hs.inter o_open) β¨hx, xoβ©
+ exact (Hp.mono ho).eq_iteratedFDerivWithin_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
@@ -1239,7 +1239,7 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
change p y m = iteratedFDerivWithin π m f s y
rw [β iteratedFDerivWithin_inter_open o_open yo]
exact
- (Hp.mono ho).eq_ftaylor_series_of_uniqueDiffOn (WithTop.coe_le_coe.2 (Nat.le_succ m))
+ (Hp.mono ho).eq_iteratedFDerivWithin_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
@@ -1257,7 +1257,7 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
rintro y β¨hy, yoβ©
change p y m = iteratedFDerivWithin π m f s y
rw [β iteratedFDerivWithin_inter_open o_open yo]
- exact (Hp.mono ho).eq_ftaylor_series_of_uniqueDiffOn le_rfl (hs.inter o_open) β¨hy, yoβ©
+ exact (Hp.mono ho).eq_iteratedFDerivWithin_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
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -235,7 +235,7 @@ 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
+ rwa [LinearIsometryEquiv.comp_continuousOn_iff] at this
#align has_ftaylor_series_up_to_on.continuous_on HasFTaylorSeriesUpToOn.continuousOn
-/
@@ -426,7 +426,7 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
((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
+ rw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff'] at this
convert this
ext y v
change
@@ -443,7 +443,7 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
ContinuousOn
((continuousMultilinearCurryRightEquiv' π m E F).symm β fun y : E => p y m.succ) s :=
Htaylor.cont _ A
- rwa [LinearIsometryEquiv.comp_continuousOn_iff] at this
+ rwa [LinearIsometryEquiv.comp_continuousOn_iff] at this
#align has_ftaylor_series_up_to_on_succ_iff_right hasFTaylorSeriesUpToOn_succ_iff_right
-/
@@ -503,7 +503,7 @@ 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
+ 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
-/
@@ -629,7 +629,7 @@ theorem ContDiffWithinAt.differentiable_within_at' (h : ContDiffWithinAt π n
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
+ 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'
@@ -661,7 +661,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
Β· 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
+ Β· 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]
@@ -711,7 +711,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt' {n : β} :
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
+ rw [inter_comm] at hwu
refine'
β¨insert x s β© w, inter_mem_nhdsWithin _ (hw.mem_nhds hxw), inter_subset_left _ _, f',
fun y hy => _, _β©
@@ -769,7 +769,7 @@ theorem ContDiffWithinAt.contDiffOn' {m : β} (hm : (m : ββ) β€ n) (h : Co
by
rcases h m hm with β¨t, ht, p, hpβ©
rcases mem_nhdsWithin.1 ht with β¨u, huo, hxu, hutβ©
- rw [inter_comm] at hut
+ rw [inter_comm] at hut
exact β¨u, huo, hxu, (hp.mono hut).ContDiffOnβ©
#align cont_diff_within_at.cont_diff_on' ContDiffWithinAt.contDiffOn'
-/
@@ -897,7 +897,7 @@ theorem contDiffOn_succ_iff_hasFDerivWithinAt {n : β} :
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
+ 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
@@ -1183,7 +1183,7 @@ theorem contDiffWithinAt_zero (hx : x β s) :
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
+ Β· 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]
@@ -1224,9 +1224,9 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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
+ rw [insert_eq_of_mem hx] at hu
rcases mem_nhdsWithin.1 hu with β¨o, o_open, xo, hoβ©
- rw [inter_comm] at 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
@@ -1249,8 +1249,8 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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
+ 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
@@ -1327,7 +1327,7 @@ theorem ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin {m : β}
have C : DifferentiableWithinAt π (iteratedFDerivWithin π m f t) t x :=
hu.differentiable_on_iterated_fderiv_within (Nat.cast_lt.2 m.lt_succ_self) (hs.inter uo) x
β¨mem_insert _ _, xuβ©
- rw [differentiableWithinAt_congr_set' _ A] at C
+ rw [differentiableWithinAt_congr_set' _ A] at C
exact C.congr_of_eventually_eq (B.filter_mono inf_le_left) B.self_of_nhds
#align cont_diff_within_at.differentiable_within_at_iterated_fderiv_within ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin
-/
@@ -1366,16 +1366,16 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
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
+ 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
+ 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
+ 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 (o_open.mem_nhds hy.2)] at A
+ rwa [fderivWithin_inter (o_open.mem_nhds hy.2)] at A
#align cont_diff_on_succ_iff_fderiv_within contDiffOn_succ_iff_fderivWithin
-/
@@ -1450,11 +1450,11 @@ theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : UniqueDiffOn
(hmn : m + 1 β€ n) : ContDiffOn π m (fun y => fderivWithin π f s y) 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_fderivWithin hs).1 hf).2
- Β· change (m.succ : ββ) β€ n at hmn
+ Β· 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
-/
@@ -1545,7 +1545,7 @@ theorem HasFTaylorSeriesUpTo.ofLe (h : HasFTaylorSeriesUpTo n f p) (hmn : m β€
#print HasFTaylorSeriesUpTo.continuous /-
theorem HasFTaylorSeriesUpTo.continuous (h : HasFTaylorSeriesUpTo n f p) : Continuous f :=
by
- rw [β hasFTaylorSeriesUpToOn_univ_iff] at h
+ rw [β hasFTaylorSeriesUpToOn_univ_iff] at h
rw [continuous_iff_continuousOn_univ]
exact h.continuous_on
#align has_ftaylor_series_up_to.continuous HasFTaylorSeriesUpTo.continuous
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1062,7 +1062,7 @@ theorem Filter.EventuallyEq.iteratedFDerivWithin' (h : fβ =αΆ [π[s] x] f) (
iteratedFDerivWithin π n fβ t =αΆ [π[s] x] iteratedFDerivWithin π n f t :=
by
induction' n with n ihn
- Β· exact h.mono fun y hy => FunLike.ext _ _ fun _ => hy
+ Β· exact h.mono fun y hy => DFunLike.ext _ _ fun _ => hy
Β· have : fderivWithin π _ t =αΆ [π[s] x] fderivWithin π _ t := ihn.fderiv_within' ht
apply this.mono
intro y hy
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1057,8 +1057,8 @@ theorem iteratedFDerivWithin_one_apply (h : UniqueDiffWithinAt π s x) (m : Fi
#align iterated_fderiv_within_one_apply iteratedFDerivWithin_one_apply
-/
-#print Filter.EventuallyEq.iterated_fderiv_within' /-
-theorem Filter.EventuallyEq.iterated_fderiv_within' (h : fβ =αΆ [π[s] x] f) (ht : t β s) (n : β) :
+#print Filter.EventuallyEq.iteratedFDerivWithin' /-
+theorem Filter.EventuallyEq.iteratedFDerivWithin' (h : fβ =αΆ [π[s] x] f) (ht : t β s) (n : β) :
iteratedFDerivWithin π n fβ t =αΆ [π[s] x] iteratedFDerivWithin π n f t :=
by
induction' n with n ihn
@@ -1067,13 +1067,13 @@ theorem Filter.EventuallyEq.iterated_fderiv_within' (h : fβ =αΆ [π[s] x] f)
apply this.mono
intro y hy
simp only [iteratedFDerivWithin_succ_eq_comp_left, hy, (Β· β Β·)]
-#align filter.eventually_eq.iterated_fderiv_within' Filter.EventuallyEq.iterated_fderiv_within'
+#align filter.eventually_eq.iterated_fderiv_within' Filter.EventuallyEq.iteratedFDerivWithin'
-/
#print Filter.EventuallyEq.iteratedFDerivWithin /-
protected theorem Filter.EventuallyEq.iteratedFDerivWithin (h : fβ =αΆ [π[s] x] f) (n : β) :
iteratedFDerivWithin π n fβ s =αΆ [π[s] x] iteratedFDerivWithin π n f s :=
- h.iterated_fderiv_within' Subset.rfl n
+ h.iteratedFDerivWithin' Subset.rfl n
#align filter.eventually_eq.iterated_fderiv_within Filter.EventuallyEq.iteratedFDerivWithin
-/
@@ -1083,7 +1083,7 @@ iterated differentials within this set at `x` coincide. -/
theorem Filter.EventuallyEq.iteratedFDerivWithin_eq (h : fβ =αΆ [π[s] x] f) (hx : fβ x = f x)
(n : β) : iteratedFDerivWithin π n fβ s x = iteratedFDerivWithin π n f s x :=
have : fβ =αΆ [π[insert x s] x] f := by simpa [eventually_eq, hx]
- (this.iterated_fderiv_within' (subset_insert _ _) n).self_of_nhdsWithin (mem_insert _ _)
+ (this.iteratedFDerivWithin' (subset_insert _ _) n).self_of_nhdsWithin (mem_insert _ _)
#align filter.eventually_eq.iterated_fderiv_within_eq Filter.EventuallyEq.iteratedFDerivWithin_eq
-/
@@ -1379,8 +1379,8 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
#align cont_diff_on_succ_iff_fderiv_within contDiffOn_succ_iff_fderivWithin
-/
-#print contDiffOn_succ_iff_has_fderiv_within /-
-theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π s) :
+#print contDiffOn_succ_iff_hasFDerivWithin /-
+theorem contDiffOn_succ_iff_hasFDerivWithin {n : β} (hs : UniqueDiffOn π s) :
ContDiffOn π (n + 1 : β) f s β
β f' : E β E βL[π] F, ContDiffOn π n f' s β§ β x, x β s β HasFDerivWithinAt f (f' x) s x :=
by
@@ -1389,7 +1389,7 @@ theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π
rcases h with β¨f', h1, h2β©
refine' β¨fun x hx => (h2 x hx).DifferentiableWithinAt, fun x hx => _β©
exact (h1 x hx).congr' (fun y hy => (h2 y hy).fderivWithin (hs y hy)) hx
-#align cont_diff_on_succ_iff_has_fderiv_within contDiffOn_succ_iff_has_fderiv_within
+#align cont_diff_on_succ_iff_has_fderiv_within contDiffOn_succ_iff_hasFDerivWithin
-/
/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
@@ -1844,15 +1844,15 @@ theorem contDiff_iff_forall_nat_le : ContDiff π n f β β m : β, βm β€
#align cont_diff_iff_forall_nat_le contDiff_iff_forall_nat_le
-/
-#print contDiff_succ_iff_has_fderiv /-
+#print contDiff_succ_iff_hasFDerivAt /-
/-- A function is `C^(n+1)` iff it has a `C^n` derivative. -/
-theorem contDiff_succ_iff_has_fderiv {n : β} :
+theorem contDiff_succ_iff_hasFDerivAt {n : β} :
ContDiff π (n + 1 : β) f β
β f' : E β E βL[π] F, ContDiff π n f' β§ β x, HasFDerivAt f (f' x) x :=
by
simp only [β contDiffOn_univ, β hasFDerivWithinAt_univ,
- contDiffOn_succ_iff_has_fderiv_within uniqueDiffOn_univ, Set.mem_univ, forall_true_left]
-#align cont_diff_succ_iff_has_fderiv contDiff_succ_iff_has_fderiv
+ contDiffOn_succ_iff_hasFDerivWithin uniqueDiffOn_univ, Set.mem_univ, forall_true_left]
+#align cont_diff_succ_iff_has_fderiv contDiff_succ_iff_hasFDerivAt
-/
/-! ### Iterated derivative -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1393,10 +1393,10 @@ theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π
-/
/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
-#print contDiffOn_succ_iff_fderiv_of_open /-
+#print contDiffOn_succ_iff_fderiv_of_isOpen /-
/-- 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) :
+theorem contDiffOn_succ_iff_fderiv_of_isOpen {n : β} (hs : IsOpen s) :
ContDiffOn π (n + 1 : β) f s β
DifferentiableOn π f s β§ ContDiffOn π n (fun y => fderiv π f y) s :=
by
@@ -1406,7 +1406,7 @@ theorem contDiffOn_succ_iff_fderiv_of_open {n : β} (hs : IsOpen s) :
apply contDiffOn_congr
intro x hx
exact fderivWithin_of_isOpen hs hx
-#align cont_diff_on_succ_iff_fderiv_of_open contDiffOn_succ_iff_fderiv_of_open
+#align cont_diff_on_succ_iff_fderiv_of_open contDiffOn_succ_iff_fderiv_of_isOpen
-/
#print contDiffOn_top_iff_fderivWithin /-
@@ -1430,10 +1430,10 @@ theorem contDiffOn_top_iff_fderivWithin (hs : UniqueDiffOn π s) :
-/
/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
-#print contDiffOn_top_iff_fderiv_of_open /-
+#print contDiffOn_top_iff_fderiv_of_isOpen /-
/-- 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) :
+theorem contDiffOn_top_iff_fderiv_of_isOpen (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]
@@ -1442,7 +1442,7 @@ theorem contDiffOn_top_iff_fderiv_of_open (hs : IsOpen s) :
apply contDiffOn_congr
intro x hx
exact fderivWithin_of_isOpen hs hx
-#align cont_diff_on_top_iff_fderiv_of_open contDiffOn_top_iff_fderiv_of_open
+#align cont_diff_on_top_iff_fderiv_of_open contDiffOn_top_iff_fderiv_of_isOpen
-/
#print ContDiffOn.fderivWithin /-
@@ -1459,11 +1459,11 @@ theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : UniqueDiffOn
#align cont_diff_on.fderiv_within ContDiffOn.fderivWithin
-/
-#print ContDiffOn.fderiv_of_open /-
-theorem ContDiffOn.fderiv_of_open (hf : ContDiffOn π n f s) (hs : IsOpen s) (hmn : m + 1 β€ n) :
+#print ContDiffOn.fderiv_of_isOpen /-
+theorem ContDiffOn.fderiv_of_isOpen (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_isOpen hs hx).symm
-#align cont_diff_on.fderiv_of_open ContDiffOn.fderiv_of_open
+#align cont_diff_on.fderiv_of_open ContDiffOn.fderiv_of_isOpen
-/
#print ContDiffOn.continuousOn_fderivWithin /-
@@ -1473,11 +1473,11 @@ theorem ContDiffOn.continuousOn_fderivWithin (h : ContDiffOn π n f s) (hs : U
#align cont_diff_on.continuous_on_fderiv_within ContDiffOn.continuousOn_fderivWithin
-/
-#print ContDiffOn.continuousOn_fderiv_of_open /-
-theorem ContDiffOn.continuousOn_fderiv_of_open (h : ContDiffOn π n f s) (hs : IsOpen s)
+#print ContDiffOn.continuousOn_fderiv_of_isOpen /-
+theorem ContDiffOn.continuousOn_fderiv_of_isOpen (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
+ ((contDiffOn_succ_iff_fderiv_of_isOpen hs).1 (h.of_le hn)).2.ContinuousOn
+#align cont_diff_on.continuous_on_fderiv_of_open ContDiffOn.continuousOn_fderiv_of_isOpen
-/
/-! ### Functions with a Taylor series on the whole space -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1405,7 +1405,7 @@ theorem contDiffOn_succ_iff_fderiv_of_open {n : β} (hs : IsOpen s) :
"./././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
+ exact fderivWithin_of_isOpen hs hx
#align cont_diff_on_succ_iff_fderiv_of_open contDiffOn_succ_iff_fderiv_of_open
-/
@@ -1441,7 +1441,7 @@ theorem contDiffOn_top_iff_fderiv_of_open (hs : IsOpen s) :
"./././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
+ exact fderivWithin_of_isOpen hs hx
#align cont_diff_on_top_iff_fderiv_of_open contDiffOn_top_iff_fderiv_of_open
-/
@@ -1462,7 +1462,7 @@ theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : UniqueDiffOn
#print ContDiffOn.fderiv_of_open /-
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
+ (hf.fderivWithin hs.UniqueDiffOn hmn).congr fun x hx => (fderivWithin_of_isOpen hs hx).symm
#align cont_diff_on.fderiv_of_open ContDiffOn.fderiv_of_open
-/
@@ -1984,7 +1984,7 @@ theorem iteratedFDerivWithin_of_isOpen (n : β) (hs : IsOpen s) :
rw [iteratedFDeriv_succ_eq_comp_left, iteratedFDerivWithin_succ_eq_comp_left]
dsimp
congr 1
- rw [fderivWithin_of_open hs hx]
+ rw [fderivWithin_of_isOpen hs hx]
apply Filter.EventuallyEq.fderiv_eq
filter_upwards [hs.mem_nhds hx]
exact IH
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
-/
-import Mathbin.Analysis.Calculus.Fderiv.Add
-import Mathbin.Analysis.Calculus.Fderiv.Mul
-import Mathbin.Analysis.Calculus.Fderiv.Equiv
-import Mathbin.Analysis.Calculus.Fderiv.RestrictScalars
-import Mathbin.Analysis.Calculus.FormalMultilinearSeries
+import Analysis.Calculus.Fderiv.Add
+import Analysis.Calculus.Fderiv.Mul
+import Analysis.Calculus.Fderiv.Equiv
+import Analysis.Calculus.Fderiv.RestrictScalars
+import Analysis.Calculus.FormalMultilinearSeries
#align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
mathlib commit https://github.com/leanprover-community/mathlib/commit/442a83d738cb208d3600056c489be16900ba701d
@@ -2123,7 +2123,7 @@ theorem ContDiff.continuous_fderiv (h : ContDiff π n f) (hn : 1 β€ n) :
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 A : Continuous fun q : (E βL[π] F) Γ E => q.1 q.2 := isBoundedBilinearMap_apply.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
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -610,7 +610,7 @@ theorem contDiffWithinAt_insert {y : E} :
#align cont_diff_within_at_insert contDiffWithinAt_insert
-/
-alias contDiffWithinAt_insert β ContDiffWithinAt.of_insert ContDiffWithinAt.insert'
+alias β¨ContDiffWithinAt.of_insert, ContDiffWithinAt.insert'β© := contDiffWithinAt_insert
#align cont_diff_within_at.of_insert ContDiffWithinAt.of_insert
#align cont_diff_within_at.insert' ContDiffWithinAt.insert'
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
-
-! This file was ported from Lean 3 source module analysis.calculus.cont_diff_def
-! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.Fderiv.Add
import Mathbin.Analysis.Calculus.Fderiv.Mul
@@ -14,6 +9,8 @@ import Mathbin.Analysis.Calculus.Fderiv.Equiv
import Mathbin.Analysis.Calculus.Fderiv.RestrictScalars
import Mathbin.Analysis.Calculus.FormalMultilinearSeries
+#align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
+
/-!
# Higher differentiability
mathlib commit https://github.com/leanprover-community/mathlib/commit/2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
@@ -305,7 +305,7 @@ theorem HasFTaylorSeriesUpToOn.hasFDerivWithinAt (h : HasFTaylorSeriesUpToOn n f
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)
+ ext y v
change (p x 1) (snoc 0 y) = (p x 1) (cons y v)
unfold_coes
congr with i
@@ -404,7 +404,7 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
(p x m.succ.succ).curryRight.curryLeft s x
rw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff']
convert H.fderiv_within _ A x hx
- ext (y v)
+ 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)
@@ -431,7 +431,7 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
Htaylor.fderiv_within _ A x hx
rw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff'] at this
convert this
- ext (y v)
+ 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 _)))
@@ -689,10 +689,10 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
congr
decide
Β· convert (Hp'.mono (inter_subset_left v u)).congr fun x hx => Hp'.zero_eq x hx.1
- Β· ext (x y)
+ Β· 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)
+ Β· 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)) =
@@ -1968,7 +1968,7 @@ theorem iteratedFDerivWithin_univ {n : β} :
by
induction' n with n IH
Β· ext x; simp
- Β· ext (x m)
+ Β· ext x m
rw [iteratedFDeriv_succ_apply_left, iteratedFDerivWithin_succ_apply_left, IH, fderivWithin_univ]
#align iterated_fderiv_within_univ iteratedFDerivWithin_univ
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -168,7 +168,6 @@ noncomputable section
open scoped Classical BigOperators NNReal Topology Filter
--- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule'
@@ -199,10 +198,12 @@ structure HasFTaylorSeriesUpToOn (n : ββ) (f : E β F) (p : E β FormalMul
#align has_ftaylor_series_up_to_on HasFTaylorSeriesUpToOn
-/
+#print HasFTaylorSeriesUpToOn.zero_eq' /-
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'
+-/
#print HasFTaylorSeriesUpToOn.congr /-
/-- If two functions coincide on a set `s`, then a Taylor series for the first one is as well a
@@ -224,11 +225,13 @@ theorem HasFTaylorSeriesUpToOn.mono (h : HasFTaylorSeriesUpToOn n f p s) {t : Se
#align has_ftaylor_series_up_to_on.mono HasFTaylorSeriesUpToOn.mono
-/
+#print HasFTaylorSeriesUpToOn.of_le /-
theorem HasFTaylorSeriesUpToOn.of_le (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.of_le
+-/
#print HasFTaylorSeriesUpToOn.continuousOn /-
theorem HasFTaylorSeriesUpToOn.continuousOn (h : HasFTaylorSeriesUpToOn n f p s) :
@@ -287,6 +290,7 @@ theorem hasFTaylorSeriesUpToOn_top_iff' :
#align has_ftaylor_series_up_to_on_top_iff' hasFTaylorSeriesUpToOn_top_iff'
-/
+#print HasFTaylorSeriesUpToOn.hasFDerivWithinAt /-
/-- 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)
@@ -308,18 +312,24 @@ theorem HasFTaylorSeriesUpToOn.hasFDerivWithinAt (h : HasFTaylorSeriesUpToOn n f
rw [Unique.eq_default i]
rfl
#align has_ftaylor_series_up_to_on.has_fderiv_within_at HasFTaylorSeriesUpToOn.hasFDerivWithinAt
+-/
+#print HasFTaylorSeriesUpToOn.differentiableOn /-
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
+-/
+#print HasFTaylorSeriesUpToOn.hasFDerivAt /-
/-- 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
+-/
+#print HasFTaylorSeriesUpToOn.eventually_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)
@@ -327,14 +337,18 @@ theorem HasFTaylorSeriesUpToOn.eventually_hasFDerivAt (h : HasFTaylorSeriesUpToO
βαΆ 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
+-/
+#print HasFTaylorSeriesUpToOn.differentiableAt /-
/-- 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
+-/
+#print hasFTaylorSeriesUpToOn_succ_iff_left /-
/-- `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 : β} :
@@ -364,7 +378,9 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_left {n : β} :
rw [this]
exact h.2.2
#align has_ftaylor_series_up_to_on_succ_iff_left hasFTaylorSeriesUpToOn_succ_iff_left
+-/
+#print hasFTaylorSeriesUpToOn_succ_iff_right /-
/-- `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 : β} :
@@ -432,6 +448,7 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
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 -/
@@ -456,21 +473,27 @@ def ContDiffWithinAt (n : ββ) (f : E β F) (s : Set E) (x : E) : Prop :=
variable {π}
+#print contDiffWithinAt_nat /-
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
+-/
+#print ContDiffWithinAt.of_le /-
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
+-/
+#print contDiffWithinAt_iff_forall_nat_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
+-/
#print contDiffWithinAt_top /-
theorem contDiffWithinAt_top : ContDiffWithinAt π β f s x β β n : β, ContDiffWithinAt π n f s x :=
@@ -565,15 +588,19 @@ theorem contDiffWithinAt_congr_nhds {t : Set E} (hst : π[s] x = π[t] x) :
#align cont_diff_within_at_congr_nhds contDiffWithinAt_congr_nhds
-/
+#print contDiffWithinAt_inter' /-
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'
+-/
+#print 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
+-/
#print contDiffWithinAt_insert /-
theorem contDiffWithinAt_insert {y : E} :
@@ -597,6 +624,7 @@ theorem ContDiffWithinAt.insert (h : ContDiffWithinAt π n f s x) :
#align cont_diff_within_at.insert ContDiffWithinAt.insert
-/
+#print ContDiffWithinAt.differentiable_within_at' /-
/-- 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) :
@@ -608,12 +636,16 @@ theorem ContDiffWithinAt.differentiable_within_at' (h : ContDiffWithinAt π n
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'
+-/
+#print ContDiffWithinAt.differentiableWithinAt /-
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
+-/
+#print contDiffWithinAt_succ_iff_hasFDerivWithinAt /-
/-- 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 β
@@ -667,7 +699,9 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
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
+-/
+#print 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_hasFDerivWithinAt' {n : β} :
@@ -693,6 +727,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt' {n : β} :
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_hasFDerivWithinAt'
+-/
/-! ### Smooth functions within a set -/
@@ -731,6 +766,7 @@ theorem ContDiffOn.contDiffWithinAt (h : ContDiffOn π n f s) (hx : x β s) :
#align cont_diff_on.cont_diff_within_at ContDiffOn.contDiffWithinAt
-/
+#print ContDiffWithinAt.contDiffOn' /-
theorem ContDiffWithinAt.contDiffOn' {m : β} (hm : (m : ββ) β€ n) (h : ContDiffWithinAt π n f s x) :
β u, IsOpen u β§ x β u β§ ContDiffOn π m f (insert x s β© u) :=
by
@@ -739,12 +775,15 @@ theorem ContDiffWithinAt.contDiffOn' {m : β} (hm : (m : ββ) β€ n) (h : Co
rw [inter_comm] at hut
exact β¨u, huo, hxu, (hp.mono hut).ContDiffOnβ©
#align cont_diff_within_at.cont_diff_on' ContDiffWithinAt.contDiffOn'
+-/
+#print ContDiffWithinAt.contDiffOn /-
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 :=
let β¨u, uo, xu, hβ© := h.contDiffOn' hm
β¨_, inter_mem_nhdsWithin _ (uo.mem_nhds xu), inter_subset_left _ _, hβ©
#align cont_diff_within_at.cont_diff_on ContDiffWithinAt.contDiffOn
+-/
#print ContDiffWithinAt.eventually /-
protected theorem ContDiffWithinAt.eventually {n : β} (h : ContDiffWithinAt π n f s x) :
@@ -758,21 +797,29 @@ protected theorem ContDiffWithinAt.eventually {n : β} (h : ContDiffWithinAt
#align cont_diff_within_at.eventually ContDiffWithinAt.eventually
-/
+#print ContDiffOn.of_le /-
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
+-/
+#print ContDiffOn.of_succ /-
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
+-/
+#print ContDiffOn.one_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
+-/
+#print contDiffOn_iff_forall_nat_le /-
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
+-/
#print contDiffOn_top /-
theorem contDiffOn_top : ContDiffOn π β f s β β n : β, ContDiffOn π n f s :=
@@ -820,11 +867,14 @@ theorem ContDiffOn.congr_mono (hf : ContDiffOn π n f s) (hβ : β x β s
#align cont_diff_on.congr_mono ContDiffOn.congr_mono
-/
+#print ContDiffOn.differentiableOn /-
/-- 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
+-/
+#print contDiffOn_of_locally_contDiffOn /-
/-- 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 :=
@@ -834,7 +884,9 @@ theorem contDiffOn_of_locally_contDiffOn
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
+-/
+#print contDiffOn_succ_iff_hasFDerivWithinAt /-
/-- 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 β
@@ -859,6 +911,7 @@ theorem contDiffOn_succ_iff_hasFDerivWithinAt {n : β} :
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 -/
@@ -893,10 +946,12 @@ theorem iteratedFDerivWithin_zero_apply (m : Fin 0 β E) :
#align iterated_fderiv_within_zero_apply iteratedFDerivWithin_zero_apply
-/
+#print iteratedFDerivWithin_zero_eq_comp /-
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
+-/
#print norm_iteratedFDerivWithin_zero /-
@[simp]
@@ -905,12 +960,15 @@ theorem norm_iteratedFDerivWithin_zero : βiteratedFDerivWithin π 0 f s xβ
#align norm_iterated_fderiv_within_zero norm_iteratedFDerivWithin_zero
-/
+#print iteratedFDerivWithin_succ_apply_left /-
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
+-/
+#print iteratedFDerivWithin_succ_eq_comp_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 : β} :
@@ -919,6 +977,7 @@ theorem iteratedFDerivWithin_succ_eq_comp_left {n : β} :
fderivWithin π (iteratedFDerivWithin π n f s) s :=
rfl
#align iterated_fderiv_within_succ_eq_comp_left iteratedFDerivWithin_succ_eq_comp_left
+-/
#print norm_fderivWithin_iteratedFDerivWithin /-
theorem norm_fderivWithin_iteratedFDerivWithin {n : β} :
@@ -927,6 +986,7 @@ theorem norm_fderivWithin_iteratedFDerivWithin {n : β} :
#align norm_fderiv_within_iterated_fderiv_within norm_fderivWithin_iteratedFDerivWithin
-/
+#print iteratedFDerivWithin_succ_apply_right /-
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 =
@@ -968,6 +1028,7 @@ theorem iteratedFDerivWithin_succ_apply_right {n : β} (hs : UniqueDiffOn π
(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
+-/
#print iteratedFDerivWithin_succ_eq_comp_right /-
/-- Writing explicitly the `n+1`-th derivative as the composition of a currying linear equiv,
@@ -988,6 +1049,7 @@ theorem norm_iteratedFDerivWithin_fderivWithin {n : β} (hs : UniqueDiffOn π
#align norm_iterated_fderiv_within_fderiv_within norm_iteratedFDerivWithin_fderivWithin
-/
+#print iteratedFDerivWithin_one_apply /-
@[simp]
theorem iteratedFDerivWithin_one_apply (h : UniqueDiffWithinAt π s x) (m : Fin 1 β E) :
(iteratedFDerivWithin π 1 f s x : (Fin 1 β E) β F) m = (fderivWithin π f s x : E β F) (m 0) :=
@@ -996,6 +1058,7 @@ theorem iteratedFDerivWithin_one_apply (h : UniqueDiffWithinAt π s x) (m : Fi
(continuousMultilinearCurryFin0 π E F).symm.comp_fderivWithin h]
rfl
#align iterated_fderiv_within_one_apply iteratedFDerivWithin_one_apply
+-/
#print Filter.EventuallyEq.iterated_fderiv_within' /-
theorem Filter.EventuallyEq.iterated_fderiv_within' (h : fβ =αΆ [π[s] x] f) (ht : t β s) (n : β) :
@@ -1047,6 +1110,7 @@ protected theorem Set.EqOn.iteratedFDerivWithin (hs : EqOn fβ f s) (n : β) :
#align set.eq_on.iterated_fderiv_within Set.EqOn.iteratedFDerivWithin
-/
+#print iteratedFDerivWithin_eventually_congr_set' /-
theorem iteratedFDerivWithin_eventually_congr_set' (y : E) (h : s =αΆ [π[{y}αΆ] x] t) (n : β) :
iteratedFDerivWithin π n f s =αΆ [π x] iteratedFDerivWithin π n f t :=
by
@@ -1056,6 +1120,7 @@ theorem iteratedFDerivWithin_eventually_congr_set' (y : E) (h : s =αΆ [π[{y}
simp only [iteratedFDerivWithin_succ_eq_comp_left, (Β· β Β·)]
rw [(ihn hy).fderivWithin_eq_nhds, fderivWithin_congr_set' _ hy]
#align iterated_fderiv_within_eventually_congr_set' iteratedFDerivWithin_eventually_congr_set'
+-/
#print iteratedFDerivWithin_eventually_congr_set /-
theorem iteratedFDerivWithin_eventually_congr_set (h : s =αΆ [π x] t) (n : β) :
@@ -1112,6 +1177,7 @@ theorem contDiffOn_zero : ContDiffOn π 0 f s β ContinuousOn f s :=
#align cont_diff_on_zero contDiffOn_zero
-/
+#print contDiffWithinAt_zero /-
theorem contDiffWithinAt_zero (hx : x β s) :
ContDiffWithinAt π 0 f s x β β u β π[s] x, ContinuousOn f (s β© u) :=
by
@@ -1127,7 +1193,9 @@ theorem contDiffWithinAt_zero (hx : x β s) :
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
+-/
+#print HasFTaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn /-
/-- 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
@@ -1145,6 +1213,7 @@ theorem HasFTaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn
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
+-/
#print ContDiffOn.ftaylorSeriesWithin /-
/-- When a function is `C^n` in a set `s` of unique differentiability, it admits
@@ -1196,6 +1265,7 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
#align cont_diff_on.ftaylor_series_within ContDiffOn.ftaylorSeriesWithin
-/
+#print contDiffOn_of_continuousOn_differentiableOn /-
theorem contDiffOn_of_continuousOn_differentiableOn
(Hcont : β m : β, (m : ββ) β€ n β ContinuousOn (fun x => iteratedFDerivWithin π m f s x) s)
(Hdiff :
@@ -1216,25 +1286,33 @@ theorem contDiffOn_of_continuousOn_differentiableOn
Β· intro k hk
exact Hcont k (le_trans hk hm)
#align cont_diff_on_of_continuous_on_differentiable_on contDiffOn_of_continuousOn_differentiableOn
+-/
+#print contDiffOn_of_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
+-/
+#print ContDiffOn.continuousOn_iteratedFDerivWithin /-
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
+-/
+#print ContDiffOn.differentiableOn_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
+-/
+#print ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin /-
theorem ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin {m : β}
(h : ContDiffWithinAt π n f s x) (hmn : (m : ββ) < n) (hs : UniqueDiffOn π (insert x s)) :
DifferentiableWithinAt π (iteratedFDerivWithin π m f s) s x :=
@@ -1255,7 +1333,9 @@ theorem ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin {m : β}
rw [differentiableWithinAt_congr_set' _ A] at C
exact C.congr_of_eventually_eq (B.filter_mono inf_le_left) B.self_of_nhds
#align cont_diff_within_at.differentiable_within_at_iterated_fderiv_within ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin
+-/
+#print contDiffOn_iff_continuousOn_differentiableOn /-
theorem contDiffOn_iff_continuousOn_differentiableOn (hs : UniqueDiffOn π s) :
ContDiffOn π n f s β
(β m : β, (m : ββ) β€ n β ContinuousOn (fun x => iteratedFDerivWithin π m f s x) s) β§
@@ -1265,6 +1345,7 @@ theorem contDiffOn_iff_continuousOn_differentiableOn (hs : UniqueDiffOn π s)
h.differentiableOn_iteratedFDerivWithin hm hsβ©,
fun h => contDiffOn_of_continuousOn_differentiableOn h.1 h.2β©
#align cont_diff_on_iff_continuous_on_differentiable_on contDiffOn_iff_continuousOn_differentiableOn
+-/
#print contDiffOn_succ_of_fderivWithin /-
theorem contDiffOn_succ_of_fderivWithin {n : β} (hf : DifferentiableOn π f s)
@@ -1367,6 +1448,7 @@ theorem contDiffOn_top_iff_fderiv_of_open (hs : IsOpen s) :
#align cont_diff_on_top_iff_fderiv_of_open contDiffOn_top_iff_fderiv_of_open
-/
+#print ContDiffOn.fderivWithin /-
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
@@ -1378,21 +1460,28 @@ theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : UniqueDiffOn
Β· 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
+-/
+#print ContDiffOn.fderiv_of_open /-
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
+-/
+#print ContDiffOn.continuousOn_fderivWithin /-
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
+-/
+#print ContDiffOn.continuousOn_fderiv_of_open /-
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 -/
@@ -1409,10 +1498,12 @@ structure HasFTaylorSeriesUpTo (n : ββ) (f : E β F) (p : E β FormalMulti
#align has_ftaylor_series_up_to HasFTaylorSeriesUpTo
-/
+#print HasFTaylorSeriesUpTo.zero_eq' /-
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'
+-/
#print hasFTaylorSeriesUpToOn_univ_iff /-
theorem hasFTaylorSeriesUpToOn_univ_iff :
@@ -1447,10 +1538,12 @@ theorem HasFTaylorSeriesUpTo.hasFTaylorSeriesUpToOn (h : HasFTaylorSeriesUpTo n
#align has_ftaylor_series_up_to.has_ftaylor_series_up_to_on HasFTaylorSeriesUpTo.hasFTaylorSeriesUpToOn
-/
+#print HasFTaylorSeriesUpTo.ofLe /-
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
+-/
#print HasFTaylorSeriesUpTo.continuous /-
theorem HasFTaylorSeriesUpTo.continuous (h : HasFTaylorSeriesUpTo n f p) : Continuous f :=
@@ -1489,6 +1582,7 @@ theorem hasFTaylorSeriesUpTo_top_iff' :
#align has_ftaylor_series_up_to_top_iff' hasFTaylorSeriesUpTo_top_iff'
-/
+#print HasFTaylorSeriesUpTo.hasFDerivAt /-
/-- 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) :
@@ -1497,11 +1591,15 @@ theorem HasFTaylorSeriesUpTo.hasFDerivAt (h : HasFTaylorSeriesUpTo n f p) (hn :
rw [β hasFDerivWithinAt_univ]
exact (hasFTaylorSeriesUpToOn_univ_iff.2 h).HasFDerivWithinAt hn (mem_univ _)
#align has_ftaylor_series_up_to.has_fderiv_at HasFTaylorSeriesUpTo.hasFDerivAt
+-/
+#print HasFTaylorSeriesUpTo.differentiable /-
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
+-/
+#print hasFTaylorSeriesUpTo_succ_iff_right /-
/-- `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 : β} :
@@ -1514,6 +1612,7 @@ theorem hasFTaylorSeriesUpTo_succ_iff_right {n : β} :
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 -/
@@ -1562,9 +1661,11 @@ theorem ContDiffAt.congr_of_eventuallyEq (h : ContDiffAt π n f x) (hg : fβ
#align cont_diff_at.congr_of_eventually_eq ContDiffAt.congr_of_eventuallyEq
-/
+#print ContDiffAt.of_le /-
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
+-/
#print ContDiffAt.continuousAt /-
theorem ContDiffAt.continuousAt (h : ContDiffAt π n f x) : ContinuousAt f x := by
@@ -1572,12 +1673,15 @@ theorem ContDiffAt.continuousAt (h : ContDiffAt π n f x) : ContinuousAt f x :
#align cont_diff_at.continuous_at ContDiffAt.continuousAt
-/
+#print ContDiffAt.differentiableAt /-
/-- 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
+-/
+#print contDiffAt_succ_iff_hasFDerivAt /-
/-- 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 β
@@ -1598,6 +1702,7 @@ theorem contDiffAt_succ_iff_hasFDerivAt {n : β} :
intro x hxu
exact (h_fderiv x hxu).HasFDerivWithinAt
#align cont_diff_at_succ_iff_has_fderiv_at contDiffAt_succ_iff_hasFDerivAt
+-/
#print ContDiffAt.eventually /-
protected theorem ContDiffAt.eventually {n : β} (h : ContDiffAt π n f x) :
@@ -1688,10 +1793,13 @@ theorem contDiff_zero : ContDiff π 0 f β Continuous f :=
#align cont_diff_zero contDiff_zero
-/
+#print contDiffAt_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
+-/
+#print contDiffAt_one_iff /-
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 :=
@@ -1700,18 +1808,25 @@ theorem contDiffAt_one_iff :
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
+-/
+#print ContDiff.of_le /-
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
+-/
+#print ContDiff.of_succ /-
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
+-/
+#print ContDiff.one_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
+-/
#print ContDiff.continuous /-
theorem ContDiff.continuous (h : ContDiff π n f) : Continuous f :=
@@ -1719,14 +1834,18 @@ theorem ContDiff.continuous (h : ContDiff π n f) : Continuous f :=
#align cont_diff.continuous ContDiff.continuous
-/
+#print ContDiff.differentiable /-
/-- 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
+-/
+#print contDiff_iff_forall_nat_le /-
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
+-/
#print contDiff_succ_iff_has_fderiv /-
/-- A function is `C^(n+1)` iff it has a `C^n` derivative. -/
@@ -1769,10 +1888,12 @@ theorem iteratedFDeriv_zero_apply (m : Fin 0 β E) :
#align iterated_fderiv_zero_apply iteratedFDeriv_zero_apply
-/
+#print iteratedFDeriv_zero_eq_comp /-
theorem iteratedFDeriv_zero_eq_comp :
iteratedFDeriv π 0 f = (continuousMultilinearCurryFin0 π E F).symm β f :=
rfl
#align iterated_fderiv_zero_eq_comp iteratedFDeriv_zero_eq_comp
+-/
#print norm_iteratedFDeriv_zero /-
@[simp]
@@ -1787,12 +1908,15 @@ theorem iteratedFDeriv_with_zero_eq : iteratedFDerivWithin π 0 f s = iterated
#align iterated_fderiv_with_zero_eq iteratedFDeriv_with_zero_eq
-/
+#print iteratedFDeriv_succ_apply_left /-
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
+-/
+#print iteratedFDeriv_succ_eq_comp_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 : β} :
@@ -1801,7 +1925,9 @@ theorem iteratedFDeriv_succ_eq_comp_left {n : β} :
fderiv π (iteratedFDeriv π n f) :=
rfl
#align iterated_fderiv_succ_eq_comp_left iteratedFDeriv_succ_eq_comp_left
+-/
+#print fderiv_iteratedFDeriv /-
/-- 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 : β} :
@@ -1813,7 +1939,9 @@ theorem fderiv_iteratedFDeriv {n : β} :
ext1 x
simp only [Function.comp_apply, LinearIsometryEquiv.symm_apply_apply]
#align fderiv_iterated_fderiv fderiv_iteratedFDeriv
+-/
+#print HasCompactSupport.iteratedFDeriv /-
theorem HasCompactSupport.iteratedFDeriv (hf : HasCompactSupport f) (n : β) :
HasCompactSupport (iteratedFDeriv π n f) :=
by
@@ -1825,6 +1953,7 @@ theorem HasCompactSupport.iteratedFDeriv (hf : HasCompactSupport f) (n : β) :
apply (IH.fderiv π).compLeft
exact LinearIsometryEquiv.map_zero _
#align has_compact_support.iterated_fderiv HasCompactSupport.iteratedFDeriv
+-/
#print norm_fderiv_iteratedFDeriv /-
theorem norm_fderiv_iteratedFDeriv {n : β} :
@@ -1874,6 +2003,7 @@ theorem ftaylorSeriesWithin_univ : ftaylorSeriesWithin π f univ = ftaylorSeri
#align ftaylor_series_within_univ ftaylorSeriesWithin_univ
-/
+#print iteratedFDeriv_succ_apply_right /-
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)) :=
@@ -1881,6 +2011,7 @@ theorem iteratedFDeriv_succ_apply_right {n : β} (m : Fin (n + 1) β E) :
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
+-/
#print iteratedFDeriv_succ_eq_comp_right /-
/-- Writing explicitly the `n+1`-th derivative as the composition of a currying linear equiv,
@@ -1900,11 +2031,13 @@ theorem norm_iteratedFDeriv_fderiv {n : β} :
#align norm_iterated_fderiv_fderiv norm_iteratedFDeriv_fderiv
-/
+#print iteratedFDeriv_one_apply /-
@[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
+-/
#print contDiff_iff_ftaylorSeries /-
/-- When a function is `C^n` in a set `s` of unique differentiability, it admits
@@ -1919,6 +2052,7 @@ theorem contDiff_iff_ftaylorSeries :
#align cont_diff_iff_ftaylor_series contDiff_iff_ftaylorSeries
-/
+#print contDiff_iff_continuous_differentiable /-
theorem contDiff_iff_continuous_differentiable :
ContDiff π n f β
(β m : β, (m : ββ) β€ n β Continuous fun x => iteratedFDeriv π m f x) β§
@@ -1927,24 +2061,31 @@ theorem contDiff_iff_continuous_differentiable :
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
+-/
+#print ContDiff.continuous_iteratedFDeriv /-
/-- 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
+-/
+#print ContDiff.differentiable_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
+-/
+#print contDiff_of_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
+-/
#print contDiff_succ_iff_fderiv /-
/-- A function is `C^(n + 1)` if and only if it is differentiable,
@@ -1973,11 +2114,14 @@ theorem contDiff_top_iff_fderiv :
#align cont_diff_top_iff_fderiv contDiff_top_iff_fderiv
-/
+#print ContDiff.continuous_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
+-/
+#print ContDiff.continuous_fderiv_apply /-
/-- 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) :
@@ -1987,4 +2131,5 @@ theorem ContDiff.continuous_fderiv_apply (h : ContDiff π n f) (hn : 1 β€ n)
((h.continuous_fderiv hn).comp continuous_fst).prod_mk continuous_snd
A.comp B
#align cont_diff.continuous_fderiv_apply ContDiff.continuous_fderiv_apply
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -967,7 +967,6 @@ theorem iteratedFDerivWithin_succ_apply_right {n : β} (hs : UniqueDiffOn π
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
#print iteratedFDerivWithin_succ_eq_comp_right /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -4,7 +4,7 @@ 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_def
-! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
+! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -17,6 +17,9 @@ import Mathbin.Analysis.Calculus.FormalMultilinearSeries
/-!
# Higher differentiability
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
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}`.
@@ -489,7 +492,7 @@ theorem ContDiffWithinAt.continuousWithinAt (h : ContDiffWithinAt π n f s x)
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,
+ β¨{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
-/
@@ -644,7 +647,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
@@ -653,7 +656,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
unfold_coes
congr
decide
- Β· 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]
@@ -1207,7 +1210,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 _
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -168,8 +168,8 @@ open scoped Classical BigOperators NNReal Topology Filter
-- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
-attribute [local instance 1001]
- NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid
+attribute [local instance 1001] NormedAddCommGroup.toAddCommGroup NormedSpace.toModule'
+ AddCommGroup.toAddCommMonoid
open Set Fin Filter Function
@@ -187,7 +187,7 @@ variable {π : Type _} [NontriviallyNormedField π] {E : Type _} [NormedAddC
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
+ (s : Set E) : Prop where
zero_eq : β x β s, (p x 0).uncurry0 = f x
fderivWithin :
β (m : β) (hm : (m : ββ) < n),
@@ -232,7 +232,7 @@ 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
+ rwa [LinearIsometryEquiv.comp_continuousOn_iff] at this
#align has_ftaylor_series_up_to_on.continuous_on HasFTaylorSeriesUpToOn.continuousOn
-/
@@ -376,8 +376,8 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
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β’;
+ Β· 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
@@ -390,8 +390,8 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
(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β’;
+ Β· 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
@@ -401,33 +401,33 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
Β· rintro β¨Hzero_eq, Hfderiv_zero, Htaylorβ©
constructor
Β· exact Hzero_eq
- Β· intro m(hm : (m : ββ) < n.succ)x(hx : x β s)
+ Β· 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 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
+ 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)
+ Β· 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 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
+ 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 -/
@@ -480,7 +480,7 @@ 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
+ 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
-/
@@ -601,7 +601,7 @@ theorem ContDiffWithinAt.differentiable_within_at' (h : ContDiffWithinAt π n
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
+ 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'
@@ -629,7 +629,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
Β· 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
+ Β· 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]
@@ -677,7 +677,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt' {n : β} :
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
+ rw [inter_comm] at hwu
refine'
β¨insert x s β© w, inter_mem_nhdsWithin _ (hw.mem_nhds hxw), inter_subset_left _ _, f',
fun y hy => _, _β©
@@ -733,7 +733,7 @@ theorem ContDiffWithinAt.contDiffOn' {m : β} (hm : (m : ββ) β€ n) (h : Co
by
rcases h m hm with β¨t, ht, p, hpβ©
rcases mem_nhdsWithin.1 ht with β¨u, huo, hxu, hutβ©
- rw [inter_comm] at hut
+ rw [inter_comm] at hut
exact β¨u, huo, hxu, (hp.mono hut).ContDiffOnβ©
#align cont_diff_within_at.cont_diff_on' ContDiffWithinAt.contDiffOn'
@@ -782,7 +782,7 @@ theorem contDiffOn_all_iff_nat : (β n, ContDiffOn π n f s) β β n : β,
by
refine' β¨fun H n => H n, _β©
rintro H (_ | n)
- exacts[contDiffOn_top.2 H, H n]
+ exacts [contDiffOn_top.2 H, H n]
#align cont_diff_on_all_iff_nat contDiffOn_all_iff_nat
-/
@@ -845,7 +845,7 @@ theorem contDiffOn_succ_iff_hasFDerivWithinAt {n : β} :
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
+ 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
@@ -1118,7 +1118,7 @@ theorem contDiffWithinAt_zero (hx : x β s) :
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
+ Β· 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]
@@ -1156,9 +1156,9 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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
+ rw [insert_eq_of_mem hx] at hu
rcases mem_nhdsWithin.1 hu with β¨o, o_open, xo, hoβ©
- rw [inter_comm] at 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
@@ -1181,8 +1181,8 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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
+ 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
@@ -1244,13 +1244,13 @@ theorem ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin {m : β}
simp only [set_eventually_eq_iff_inf_principal, β nhdsWithin_inter']
rw [β inter_assoc, nhdsWithin_inter_of_mem', β diff_eq_compl_inter, insert_diff_of_mem,
diff_eq_compl_inter]
- exacts[rfl, mem_nhdsWithin_of_mem_nhds (uo.mem_nhds xu)]
+ exacts [rfl, mem_nhdsWithin_of_mem_nhds (uo.mem_nhds xu)]
have B : iteratedFDerivWithin π m f s =αΆ [π x] iteratedFDerivWithin π m f t :=
iteratedFDerivWithin_eventually_congr_set' _ A.symm _
have C : DifferentiableWithinAt π (iteratedFDerivWithin π m f t) t x :=
hu.differentiable_on_iterated_fderiv_within (Nat.cast_lt.2 m.lt_succ_self) (hs.inter uo) x
β¨mem_insert _ _, xuβ©
- rw [differentiableWithinAt_congr_set' _ A] at C
+ rw [differentiableWithinAt_congr_set' _ A] at C
exact C.congr_of_eventually_eq (B.filter_mono inf_le_left) B.self_of_nhds
#align cont_diff_within_at.differentiable_within_at_iterated_fderiv_within ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin
@@ -1286,16 +1286,16 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
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
+ 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
+ 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
+ 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 (o_open.mem_nhds hy.2)] at A
+ rwa [fderivWithin_inter (o_open.mem_nhds hy.2)] at A
#align cont_diff_on_succ_iff_fderiv_within contDiffOn_succ_iff_fderivWithin
-/
@@ -1369,11 +1369,11 @@ theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : UniqueDiffOn
(hmn : m + 1 β€ n) : ContDiffOn π m (fun y => fderivWithin π f s y) 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_fderivWithin hs).1 hf).2
- Β· change (m.succ : ββ) β€ n at hmn
+ Β· 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
@@ -1400,7 +1400,7 @@ theorem ContDiffOn.continuousOn_fderiv_of_open (h : ContDiffOn π n f s) (hs :
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
+ 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
@@ -1446,13 +1446,14 @@ theorem HasFTaylorSeriesUpTo.hasFTaylorSeriesUpToOn (h : HasFTaylorSeriesUpTo n
-/
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
+ 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
#print HasFTaylorSeriesUpTo.continuous /-
theorem HasFTaylorSeriesUpTo.continuous (h : HasFTaylorSeriesUpTo n f p) : Continuous f :=
by
- rw [β hasFTaylorSeriesUpToOn_univ_iff] at h
+ rw [β hasFTaylorSeriesUpToOn_univ_iff] at h
rw [continuous_iff_continuousOn_univ]
exact h.continuous_on
#align has_ftaylor_series_up_to.continuous HasFTaylorSeriesUpTo.continuous
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -182,54 +182,63 @@ variable {π : Type _} [NontriviallyNormedField π] {E : Type _} [NormedAddC
/-! ### Functions with a Taylor series on a domain -/
+#print HasFTaylorSeriesUpToOn /-
/-- `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)
+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
+#align has_ftaylor_series_up_to_on HasFTaylorSeriesUpToOn
+-/
-theorem HasFtaylorSeriesUpToOn.zero_eq' (h : HasFtaylorSeriesUpToOn n f p s) {x : E} (hx : x β s) :
+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'
+#align has_ftaylor_series_up_to_on.zero_eq' HasFTaylorSeriesUpToOn.zero_eq'
+#print HasFTaylorSeriesUpToOn.congr /-
/-- 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 :=
+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
+#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 :=
+#print HasFTaylorSeriesUpToOn.mono /-
+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
+#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 :=
+theorem HasFTaylorSeriesUpToOn.of_le (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
+#align has_ftaylor_series_up_to_on.of_le HasFTaylorSeriesUpToOn.of_le
-theorem HasFtaylorSeriesUpToOn.continuousOn (h : HasFtaylorSeriesUpToOn n f p s) :
+#print HasFTaylorSeriesUpToOn.continuousOn /-
+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
+#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 :=
+#print hasFTaylorSeriesUpToOn_zero_iff /-
+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 =>
@@ -240,10 +249,12 @@ theorem hasFtaylorSeriesUpToOn_zero_iff :
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
+#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 :=
+#print hasFTaylorSeriesUpToOn_top_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
@@ -254,12 +265,14 @@ theorem hasFtaylorSeriesUpToOn_top_iff :
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
+#align has_ftaylor_series_up_to_on_top_iff hasFTaylorSeriesUpToOn_top_iff
+-/
+#print hasFTaylorSeriesUpToOn_top_iff' /-
/-- In the case that `n = β` we don't need the continuity assumption in
`has_ftaylor_series_up_to_on`. -/
-theorem hasFtaylorSeriesUpToOn_top_iff' :
- HasFtaylorSeriesUpToOn β f p s β
+theorem hasFTaylorSeriesUpToOn_top_iff' :
+ HasFTaylorSeriesUpToOn β f p s β
(β x β s, (p x 0).uncurry0 = f x) β§
β m : β, β x β s, HasFDerivWithinAt (fun y => p y m) (p x m.succ).curryLeft s x :=
β¨-- Everything except for the continuity is trivial:
@@ -268,11 +281,12 @@ theorem hasFtaylorSeriesUpToOn_top_iff' :
(-- The continuity follows from the existence of a derivative:
h.2
m x hx).ContinuousWithinAtβ©β©
-#align has_ftaylor_series_up_to_on_top_iff' hasFtaylorSeriesUpToOn_top_iff'
+#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)
+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;
@@ -290,39 +304,39 @@ theorem HasFtaylorSeriesUpToOn.hasFDerivWithinAt (h : HasFtaylorSeriesUpToOn n f
congr with i
rw [Unique.eq_default i]
rfl
-#align has_ftaylor_series_up_to_on.has_fderiv_within_at HasFtaylorSeriesUpToOn.hasFDerivWithinAt
+#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) :
+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
+#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)
+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
+#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)
+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
+#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)
+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
+#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 β§
+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
@@ -346,15 +360,15 @@ theorem hasFtaylorSeriesUpToOn_succ_iff_left {n : β} :
Β· 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
+#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 β
+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))
+ HasFTaylorSeriesUpToOn n (fun x => continuousMultilinearCurryFin1 π E F (p x 1))
(fun x => (p x).shift) s :=
by
constructor
@@ -414,13 +428,14 @@ theorem hasFtaylorSeriesUpToOn_succ_iff_right {n : β} :
((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
+#align has_ftaylor_series_up_to_on_succ_iff_right hasFTaylorSeriesUpToOn_succ_iff_right
/-! ### Smooth functions within a set around a point -/
variable (π)
+#print ContDiffWithinAt /-
/-- 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
@@ -432,15 +447,16 @@ 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
+ β 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 :=
+ β 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
@@ -453,10 +469,13 @@ theorem contDiffWithinAt_iff_forall_nat_le :
β¨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
+#print contDiffWithinAt_top /-
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
+-/
+#print ContDiffWithinAt.continuousWithinAt /-
theorem ContDiffWithinAt.continuousWithinAt (h : ContDiffWithinAt π n f s x) :
ContinuousWithinAt f s x :=
by
@@ -464,41 +483,55 @@ theorem ContDiffWithinAt.continuousWithinAt (h : ContDiffWithinAt π n f s x)
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
+-/
+#print ContDiffWithinAt.congr_of_eventuallyEq /-
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
+-/
+#print ContDiffWithinAt.congr_of_eventuallyEq_insert /-
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
+-/
+#print ContDiffWithinAt.congr_of_eventually_eq' /-
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'
+-/
+#print Filter.EventuallyEq.contDiffWithinAt_iff /-
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
+-/
+#print ContDiffWithinAt.congr /-
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
+-/
+#print 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'
+-/
+#print ContDiffWithinAt.mono_of_mem /-
theorem ContDiffWithinAt.mono_of_mem (h : ContDiffWithinAt π n f s x) {t : Set E}
(hst : s β π[t] x) : ContDiffWithinAt π n f t x :=
by
@@ -506,21 +539,28 @@ theorem ContDiffWithinAt.mono_of_mem (h : ContDiffWithinAt π n f s x) {t : Se
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
+-/
+#print ContDiffWithinAt.mono /-
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
+-/
+#print ContDiffWithinAt.congr_nhds /-
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
+-/
+#print 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 :=
@@ -532,6 +572,7 @@ theorem contDiffWithinAt_inter (h : t β π x) :
contDiffWithinAt_inter' (mem_nhdsWithin_of_mem_nhds h)
#align cont_diff_within_at_inter contDiffWithinAt_inter
+#print contDiffWithinAt_insert /-
theorem contDiffWithinAt_insert {y : E} :
ContDiffWithinAt π n f (insert y s) x β ContDiffWithinAt π n f s x :=
by
@@ -540,15 +581,18 @@ theorem contDiffWithinAt_insert {y : E} :
Β· 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'
+#print 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. -/
@@ -585,7 +629,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
Β· 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
+ Β· 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]
@@ -594,7 +638,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
Β· apply Filter.inter_mem _ hu
apply nhdsWithin_le_of_mem hu
exact nhdsWithin_mono _ (subset_insert x u) hv
- Β· rw [hasFtaylorSeriesUpToOn_succ_iff_right]
+ Β· rw [hasFTaylorSeriesUpToOn_succ_iff_right]
refine' β¨fun y hy => rfl, fun y hy => _, _β©
Β· change
HasFDerivWithinAt (fun z => (continuousMultilinearCurryFin0 π E F).symm (f z))
@@ -623,7 +667,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
/-- 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 : β} :
+theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt' {n : β} :
ContDiffWithinAt π (n + 1 : β) f s x β
β u β π[insert x s] x,
u β insert x s β§
@@ -645,13 +689,14 @@ theorem contDiffWithinAt_succ_iff_has_fderiv_within_at' {n : β} :
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'
+#align cont_diff_within_at_succ_iff_has_fderiv_within_at' contDiffWithinAt_succ_iff_hasFDerivWithinAt'
/-! ### Smooth functions within a set -/
variable (π)
+#print ContDiffOn /-
/-- 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`.
@@ -661,38 +706,44 @@ 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 HasFtaylorSeriesUpToOn.contDiffOn {f' : E β FormalMultilinearSeries π E F}
- (hf : HasFtaylorSeriesUpToOn n f f' s) : ContDiffOn π n f s :=
+#print HasFTaylorSeriesUpToOn.contDiffOn /-
+theorem HasFTaylorSeriesUpToOn.contDiffOn {f' : E β FormalMultilinearSeries π E F}
+ (hf : HasFTaylorSeriesUpToOn n f f' s) : ContDiffOn π n f s :=
by
intro x hx m hm
use s
simp only [Set.insert_eq_of_mem hx, self_mem_nhdsWithin, true_and_iff]
exact β¨f', hf.of_le hmβ©
-#align has_ftaylor_series_up_to_on.cont_diff_on HasFtaylorSeriesUpToOn.contDiffOn
+#align has_ftaylor_series_up_to_on.cont_diff_on HasFTaylorSeriesUpToOn.contDiffOn
+-/
+#print ContDiffOn.contDiffWithinAt /-
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.cont_diff_on' {m : β} (hm : (m : ββ) β€ n)
- (h : ContDiffWithinAt π n f s x) : β u, IsOpen u β§ x β u β§ ContDiffOn π m f (insert x s β© u) :=
+theorem ContDiffWithinAt.contDiffOn' {m : β} (hm : (m : ββ) β€ n) (h : ContDiffWithinAt π n f s x) :
+ β u, IsOpen u β§ x β u β§ ContDiffOn π m f (insert x s β© u) :=
by
rcases h m hm with β¨t, ht, p, hpβ©
rcases mem_nhdsWithin.1 ht with β¨u, huo, hxu, hutβ©
rw [inter_comm] at hut
exact β¨u, huo, hxu, (hp.mono hut).ContDiffOnβ©
-#align cont_diff_within_at.cont_diff_on' ContDiffWithinAt.cont_diff_on'
+#align cont_diff_within_at.cont_diff_on' ContDiffWithinAt.contDiffOn'
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 :=
- let β¨u, uo, xu, hβ© := h.cont_diff_on' hm
+ let β¨u, uo, xu, hβ© := h.contDiffOn' hm
β¨_, inter_mem_nhdsWithin _ (uo.mem_nhds xu), inter_subset_left _ _, hβ©
#align cont_diff_within_at.cont_diff_on ContDiffWithinAt.contDiffOn
+#print ContDiffWithinAt.eventually /-
protected theorem ContDiffWithinAt.eventually {n : β} (h : ContDiffWithinAt π n f s x) :
βαΆ y in π[insert x s] x, ContDiffWithinAt π n f s y :=
by
@@ -702,6 +753,7 @@ protected theorem ContDiffWithinAt.eventually {n : β} (h : ContDiffWithinAt
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
@@ -719,37 +771,51 @@ theorem contDiffOn_iff_forall_nat_le : ContDiffOn π n f s β β m : β,
β¨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
+#print contDiffOn_top /-
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
+-/
+#print contDiffOn_all_iff_nat /-
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
+-/
+#print ContDiffOn.continuousOn /-
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
+-/
+#print ContDiffOn.congr /-
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
+-/
+#print 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
+-/
+#print ContDiffOn.mono /-
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
+-/
+#print ContDiffOn.congr_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) :
@@ -779,7 +845,7 @@ theorem contDiffOn_succ_iff_hasFDerivWithinAt {n : β} :
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
+ 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
@@ -796,206 +862,241 @@ theorem contDiffOn_succ_iff_hasFDerivWithinAt {n : β} :
variable (π)
+#print iteratedFDerivWithin /-
/-- 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 :=
+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
+#align iterated_fderiv_within iteratedFDerivWithin
+-/
+#print ftaylorSeriesWithin /-
/-- 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
+ iteratedFDerivWithin π n f s x
#align ftaylor_series_within ftaylorSeriesWithin
+-/
variable {π}
+#print iteratedFDerivWithin_zero_apply /-
@[simp]
-theorem iteratedFderivWithin_zero_apply (m : Fin 0 β E) :
- (iteratedFderivWithin π 0 f s x : (Fin 0 β E) β F) m = f x :=
+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
+#align iterated_fderiv_within_zero_apply iteratedFDerivWithin_zero_apply
+-/
-theorem iteratedFderivWithin_zero_eq_comp :
- iteratedFderivWithin π 0 f s = (continuousMultilinearCurryFin0 π E F).symm β f :=
+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
+#align iterated_fderiv_within_zero_eq_comp iteratedFDerivWithin_zero_eq_comp
+#print norm_iteratedFDerivWithin_zero /-
@[simp]
-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 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) :=
+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
+#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 =
+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 :=
+ fderivWithin π (iteratedFDerivWithin π n f s) s :=
rfl
-#align iterated_fderiv_within_succ_eq_comp_left iteratedFderivWithin_succ_eq_comp_left
+#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
+#print norm_fderivWithin_iteratedFDerivWithin /-
+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)
+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)) :=
+ (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,
+ Β· 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 :=
+ 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)
+ (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 :
+ (fderivWithin π (I β iteratedFDerivWithin π n (fderivWithin π f s) s) s x :
E β E[Γn + 1]βL[π] F)
(m 0) (tail m) :=
by rw [fderivWithin_congr A (A x hx)]
_ =
- (I β fderivWithin π (iteratedFderivWithin π n (fderivWithin π f s) s) s x :
+ (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 :
+ (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)
+ 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
+ by rw [iteratedFDerivWithin_succ_apply_left, tail_init_eq_init_tail]; rfl
-#align iterated_fderiv_within_succ_apply_right iteratedFderivWithin_succ_apply_right
+#align iterated_fderiv_within_succ_apply_right iteratedFDerivWithin_succ_apply_right
+#print iteratedFDerivWithin_succ_eq_comp_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 =
+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)
+ 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
+ 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
+#print norm_iteratedFDerivWithin_fderivWithin /-
+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 (h : UniqueDiffWithinAt π s x) (m : Fin 1 β E) :
- (iteratedFderivWithin π 1 f s x : (Fin 1 β E) β F) m = (fderivWithin π f s x : E β F) (m 0) :=
+theorem iteratedFDerivWithin_one_apply (h : UniqueDiffWithinAt π s x) (m : Fin 1 β E) :
+ (iteratedFDerivWithin π 1 f s x : (Fin 1 β E) β F) m = (fderivWithin π f s x : E β F) (m 0) :=
by
- simp only [iteratedFderivWithin_succ_apply_left, iteratedFderivWithin_zero_eq_comp,
+ simp only [iteratedFDerivWithin_succ_apply_left, iteratedFDerivWithin_zero_eq_comp,
(continuousMultilinearCurryFin0 π E F).symm.comp_fderivWithin h]
rfl
-#align iterated_fderiv_within_one_apply iteratedFderivWithin_one_apply
+#align iterated_fderiv_within_one_apply iteratedFDerivWithin_one_apply
+#print Filter.EventuallyEq.iterated_fderiv_within' /-
theorem Filter.EventuallyEq.iterated_fderiv_within' (h : fβ =αΆ [π[s] x] f) (ht : t β s) (n : β) :
- iteratedFderivWithin π n fβ t =αΆ [π[s] x] iteratedFderivWithin π n f t :=
+ iteratedFDerivWithin π n fβ t =αΆ [π[s] x] iteratedFDerivWithin π n f t :=
by
induction' n with n ihn
Β· exact h.mono fun y hy => FunLike.ext _ _ fun _ => hy
Β· have : fderivWithin π _ t =αΆ [π[s] x] fderivWithin π _ t := ihn.fderiv_within' ht
apply this.mono
intro y hy
- simp only [iteratedFderivWithin_succ_eq_comp_left, hy, (Β· β Β·)]
+ simp only [iteratedFDerivWithin_succ_eq_comp_left, hy, (Β· β Β·)]
#align filter.eventually_eq.iterated_fderiv_within' Filter.EventuallyEq.iterated_fderiv_within'
+-/
-protected theorem Filter.EventuallyEq.iteratedFderivWithin (h : fβ =αΆ [π[s] x] f) (n : β) :
- iteratedFderivWithin π n fβ s =αΆ [π[s] x] iteratedFderivWithin π n f s :=
+#print Filter.EventuallyEq.iteratedFDerivWithin /-
+protected theorem Filter.EventuallyEq.iteratedFDerivWithin (h : fβ =αΆ [π[s] x] f) (n : β) :
+ iteratedFDerivWithin π n fβ s =αΆ [π[s] x] iteratedFDerivWithin π n f s :=
h.iterated_fderiv_within' Subset.rfl n
-#align filter.eventually_eq.iterated_fderiv_within Filter.EventuallyEq.iteratedFderivWithin
+#align filter.eventually_eq.iterated_fderiv_within Filter.EventuallyEq.iteratedFDerivWithin
+-/
+#print Filter.EventuallyEq.iteratedFDerivWithin_eq /-
/-- If two functions coincide in a neighborhood of `x` within a set `s` and at `x`, then their
iterated differentials within this set at `x` coincide. -/
-theorem Filter.EventuallyEq.iteratedFderivWithin_eq (h : fβ =αΆ [π[s] x] f) (hx : fβ x = f x)
- (n : β) : iteratedFderivWithin π n fβ s x = iteratedFderivWithin π n f s x :=
+theorem Filter.EventuallyEq.iteratedFDerivWithin_eq (h : fβ =αΆ [π[s] x] f) (hx : fβ x = f x)
+ (n : β) : iteratedFDerivWithin π n fβ s x = iteratedFDerivWithin π n f s x :=
have : fβ =αΆ [π[insert x s] x] f := by simpa [eventually_eq, hx]
(this.iterated_fderiv_within' (subset_insert _ _) n).self_of_nhdsWithin (mem_insert _ _)
-#align filter.eventually_eq.iterated_fderiv_within_eq Filter.EventuallyEq.iteratedFderivWithin_eq
+#align filter.eventually_eq.iterated_fderiv_within_eq Filter.EventuallyEq.iteratedFDerivWithin_eq
+-/
+#print iteratedFDerivWithin_congr /-
/-- If two functions coincide on a set `s`, then their iterated differentials within this set
coincide. See also `filter.eventually_eq.iterated_fderiv_within_eq` and
`filter.eventually_eq.iterated_fderiv_within`. -/
-theorem iteratedFderivWithin_congr (hs : EqOn fβ f s) (hx : x β s) (n : β) :
- iteratedFderivWithin π n fβ s x = iteratedFderivWithin π n f s x :=
- (hs.EventuallyEq.filter_mono inf_le_right).iteratedFderivWithin_eq (hs hx) _
-#align iterated_fderiv_within_congr iteratedFderivWithin_congr
+theorem iteratedFDerivWithin_congr (hs : EqOn fβ f s) (hx : x β s) (n : β) :
+ iteratedFDerivWithin π n fβ s x = iteratedFDerivWithin π n f s x :=
+ (hs.EventuallyEq.filter_mono inf_le_right).iteratedFDerivWithin_eq (hs hx) _
+#align iterated_fderiv_within_congr iteratedFDerivWithin_congr
+-/
+#print Set.EqOn.iteratedFDerivWithin /-
/-- If two functions coincide on a set `s`, then their iterated differentials within this set
coincide. See also `filter.eventually_eq.iterated_fderiv_within_eq` and
`filter.eventually_eq.iterated_fderiv_within`. -/
-protected theorem Set.EqOn.iteratedFderivWithin (hs : EqOn fβ f s) (n : β) :
- EqOn (iteratedFderivWithin π n fβ s) (iteratedFderivWithin π n f s) s := fun x hx =>
- iteratedFderivWithin_congr hs hx n
-#align set.eq_on.iterated_fderiv_within Set.EqOn.iteratedFderivWithin
+protected theorem Set.EqOn.iteratedFDerivWithin (hs : EqOn fβ f s) (n : β) :
+ EqOn (iteratedFDerivWithin π n fβ s) (iteratedFDerivWithin π n f s) s := fun x hx =>
+ iteratedFDerivWithin_congr hs hx n
+#align set.eq_on.iterated_fderiv_within Set.EqOn.iteratedFDerivWithin
+-/
-theorem iteratedFderivWithin_eventually_congr_set' (y : E) (h : s =αΆ [π[{y}αΆ] x] t) (n : β) :
- iteratedFderivWithin π n f s =αΆ [π x] iteratedFderivWithin π n f t :=
+theorem iteratedFDerivWithin_eventually_congr_set' (y : E) (h : s =αΆ [π[{y}αΆ] x] t) (n : β) :
+ iteratedFDerivWithin π n f s =αΆ [π x] iteratedFDerivWithin π n f t :=
by
induction' n with n ihn generalizing x
Β· rfl
Β· refine' (eventually_nhds_nhdsWithin.2 h).mono fun y hy => _
- simp only [iteratedFderivWithin_succ_eq_comp_left, (Β· β Β·)]
+ simp only [iteratedFDerivWithin_succ_eq_comp_left, (Β· β Β·)]
rw [(ihn hy).fderivWithin_eq_nhds, fderivWithin_congr_set' _ hy]
-#align iterated_fderiv_within_eventually_congr_set' iteratedFderivWithin_eventually_congr_set'
+#align iterated_fderiv_within_eventually_congr_set' iteratedFDerivWithin_eventually_congr_set'
-theorem iteratedFderivWithin_eventually_congr_set (h : s =αΆ [π x] t) (n : β) :
- iteratedFderivWithin π n f s =αΆ [π x] iteratedFderivWithin π n f t :=
- iteratedFderivWithin_eventually_congr_set' x (h.filter_mono inf_le_left) n
-#align iterated_fderiv_within_eventually_congr_set iteratedFderivWithin_eventually_congr_set
+#print iteratedFDerivWithin_eventually_congr_set /-
+theorem iteratedFDerivWithin_eventually_congr_set (h : s =αΆ [π x] t) (n : β) :
+ iteratedFDerivWithin π n f s =αΆ [π x] iteratedFDerivWithin π n f t :=
+ iteratedFDerivWithin_eventually_congr_set' x (h.filter_mono inf_le_left) n
+#align iterated_fderiv_within_eventually_congr_set iteratedFDerivWithin_eventually_congr_set
+-/
-theorem iteratedFderivWithin_congr_set (h : s =αΆ [π x] t) (n : β) :
- iteratedFderivWithin π n f s x = iteratedFderivWithin π n f t x :=
- (iteratedFderivWithin_eventually_congr_set h n).self_of_nhds
-#align iterated_fderiv_within_congr_set iteratedFderivWithin_congr_set
+#print iteratedFDerivWithin_congr_set /-
+theorem iteratedFDerivWithin_congr_set (h : s =αΆ [π x] t) (n : β) :
+ iteratedFDerivWithin π n f s x = iteratedFDerivWithin π n f t x :=
+ (iteratedFDerivWithin_eventually_congr_set h n).self_of_nhds
+#align iterated_fderiv_within_congr_set iteratedFDerivWithin_congr_set
+-/
+#print 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` within `s`. -/
-theorem iteratedFderivWithin_inter' {n : β} (hu : u β π[s] x) :
- iteratedFderivWithin π n f (s β© u) x = iteratedFderivWithin π n f s x :=
- iteratedFderivWithin_congr_set (nhdsWithin_eq_iff_eventuallyEq.1 <| nhdsWithin_inter_of_mem' hu) _
-#align iterated_fderiv_within_inter' iteratedFderivWithin_inter'
+theorem iteratedFDerivWithin_inter' {n : β} (hu : u β π[s] x) :
+ iteratedFDerivWithin π n f (s β© u) x = iteratedFDerivWithin π n f s x :=
+ iteratedFDerivWithin_congr_set (nhdsWithin_eq_iff_eventuallyEq.1 <| nhdsWithin_inter_of_mem' hu) _
+#align iterated_fderiv_within_inter' iteratedFDerivWithin_inter'
+-/
+#print 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) :
- iteratedFderivWithin π n f (s β© u) x = iteratedFderivWithin π n f s x :=
- iteratedFderivWithin_inter' (mem_nhdsWithin_of_mem_nhds hu)
-#align iterated_fderiv_within_inter iteratedFderivWithin_inter
+theorem iteratedFDerivWithin_inter {n : β} (hu : u β π x) :
+ iteratedFDerivWithin π n f (s β© u) x = iteratedFDerivWithin π n f s x :=
+ iteratedFDerivWithin_inter' (mem_nhdsWithin_of_mem_nhds hu)
+#align iterated_fderiv_within_inter iteratedFDerivWithin_inter
+-/
+#print iteratedFDerivWithin_inter_open /-
/-- 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) (hx : x β u) :
- iteratedFderivWithin π n f (s β© u) x = iteratedFderivWithin π n f s x :=
- iteratedFderivWithin_inter (hu.mem_nhds hx)
-#align iterated_fderiv_within_inter_open iteratedFderivWithin_inter_open
+theorem iteratedFDerivWithin_inter_open {n : β} (hu : IsOpen u) (hx : x β u) :
+ iteratedFDerivWithin π n f (s β© u) x = iteratedFDerivWithin π n f s x :=
+ iteratedFDerivWithin_inter (hu.mem_nhds hx)
+#align iterated_fderiv_within_inter_open iteratedFDerivWithin_inter_open
+-/
+#print contDiffOn_zero /-
@[simp]
theorem contDiffOn_zero : ContDiffOn π 0 f s β ContinuousOn f s :=
by
@@ -1004,9 +1105,10 @@ theorem contDiffOn_zero : ContDiffOn π 0 f s β ContinuousOn f s :=
have : (m : ββ) = 0 := le_antisymm hm bot_le
rw [this]
refine' β¨insert x s, self_mem_nhdsWithin, ftaylorSeriesWithin π f s, _β©
- rw [hasFtaylorSeriesUpToOn_zero_iff]
+ 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) :=
@@ -1016,7 +1118,7 @@ theorem contDiffWithinAt_zero (hx : x β s) :
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
+ Β· 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]
@@ -1026,31 +1128,32 @@ theorem contDiffWithinAt_zero (hx : x β s) :
/-- 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 :=
+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]
+ Β· 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)
+ 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)]
+ 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
+#align has_ftaylor_series_up_to_on.eq_ftaylor_series_of_unique_diff_on HasFTaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn
+#print ContDiffOn.ftaylorSeriesWithin /-
/-- 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 :=
+ HasFTaylorSeriesUpToOn n f (ftaylorSeriesWithin π f s) s :=
by
constructor
Β· intro x hx
simp only [ftaylorSeriesWithin, ContinuousMultilinearMap.uncurry0_apply,
- iteratedFderivWithin_zero_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
@@ -1058,15 +1161,15 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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_open o_open xo]
+ change p x m.succ = iteratedFDerivWithin π m.succ f s x
+ rw [β iteratedFDerivWithin_inter_open o_open xo]
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_open o_open yo]
+ change p y m = iteratedFDerivWithin π m f s y
+ rw [β iteratedFDerivWithin_inter_open o_open yo]
exact
(Hp.mono ho).eq_ftaylor_series_of_uniqueDiffOn (WithTop.coe_le_coe.2 (Nat.le_succ m))
(hs.inter o_open) β¨hy, yoβ©
@@ -1084,16 +1187,17 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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_open o_open yo]
+ change p y m = iteratedFDerivWithin π m f s y
+ rw [β iteratedFDerivWithin_inter_open o_open yo]
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)
+ (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) :
+ β 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]
@@ -1101,10 +1205,10 @@ theorem contDiffOn_of_continuousOn_differentiableOn
constructor
Β· intro y hy
simp only [ftaylorSeriesWithin, ContinuousMultilinearMap.uncurry0_apply,
- iteratedFderivWithin_zero_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,
+ simp only [ftaylorSeriesWithin, iteratedFDerivWithin_succ_eq_comp_left,
ContinuousLinearEquiv.coe_apply, Function.comp_apply, coeFn_coeBase]
exact ContinuousLinearMap.curry_uncurryLeft _
Β· intro k hk
@@ -1112,26 +1216,26 @@ theorem contDiffOn_of_continuousOn_differentiableOn
#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) :
+ (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 :=
+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
+#align cont_diff_on.continuous_on_iterated_fderiv_within ContDiffOn.continuousOn_iteratedFDerivWithin
-theorem ContDiffOn.differentiableOn_iteratedFderivWithin {m : β} (h : ContDiffOn π n f s)
+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 =>
+ 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
+#align cont_diff_on.differentiable_on_iterated_fderiv_within ContDiffOn.differentiableOn_iteratedFDerivWithin
-theorem ContDiffWithinAt.differentiableWithinAt_iteratedFderivWithin {m : β}
+theorem ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin {m : β}
(h : ContDiffWithinAt π n f s x) (hmn : (m : ββ) < n) (hs : UniqueDiffOn π (insert x s)) :
- DifferentiableWithinAt π (iteratedFderivWithin π m f s) s x :=
+ DifferentiableWithinAt π (iteratedFDerivWithin π m f s) s x :=
by
rcases h.cont_diff_on' (ENat.add_one_le_of_lt hmn) with β¨u, uo, xu, huβ©
set t := insert x s β© u
@@ -1141,25 +1245,26 @@ theorem ContDiffWithinAt.differentiableWithinAt_iteratedFderivWithin {m : β}
rw [β inter_assoc, nhdsWithin_inter_of_mem', β diff_eq_compl_inter, insert_diff_of_mem,
diff_eq_compl_inter]
exacts[rfl, mem_nhdsWithin_of_mem_nhds (uo.mem_nhds xu)]
- have B : iteratedFderivWithin π m f s =αΆ [π x] iteratedFderivWithin π m f t :=
- iteratedFderivWithin_eventually_congr_set' _ A.symm _
- have C : DifferentiableWithinAt π (iteratedFderivWithin π m f t) t x :=
+ have B : iteratedFDerivWithin π m f s =αΆ [π x] iteratedFDerivWithin π m f t :=
+ iteratedFDerivWithin_eventually_congr_set' _ A.symm _
+ have C : DifferentiableWithinAt π (iteratedFDerivWithin π m f t) t x :=
hu.differentiable_on_iterated_fderiv_within (Nat.cast_lt.2 m.lt_succ_self) (hs.inter uo) x
β¨mem_insert _ _, xuβ©
rw [differentiableWithinAt_congr_set' _ A] at C
exact C.congr_of_eventually_eq (B.filter_mono inf_le_left) B.self_of_nhds
-#align cont_diff_within_at.differentiable_within_at_iterated_fderiv_within ContDiffWithinAt.differentiableWithinAt_iteratedFderivWithin
+#align cont_diff_within_at.differentiable_within_at_iterated_fderiv_within ContDiffWithinAt.differentiableWithinAt_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 :=
+ (β m : β, (m : ββ) β€ n β ContinuousOn (fun x => iteratedFDerivWithin π m f s x) s) β§
+ β m : β, (m : ββ) < n β DifferentiableOn π (fun x => iteratedFDerivWithin π m f s x) s :=
β¨fun h =>
- β¨fun m hm => h.continuousOn_iteratedFderivWithin hm hs, fun m hm =>
- h.differentiableOn_iteratedFderivWithin hm hsβ©,
+ β¨fun m hm => h.continuousOn_iteratedFDerivWithin hm hs, fun m hm =>
+ h.differentiableOn_iteratedFDerivWithin hm hsβ©,
fun h => contDiffOn_of_continuousOn_differentiableOn h.1 h.2β©
#align cont_diff_on_iff_continuous_on_differentiable_on contDiffOn_iff_continuousOn_differentiableOn
+#print contDiffOn_succ_of_fderivWithin /-
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
@@ -1168,7 +1273,9 @@ theorem contDiffOn_succ_of_fderivWithin {n : β} (hf : DifferentiableOn π f
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
+-/
+#print contDiffOn_succ_iff_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) :
@@ -1190,7 +1297,9 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
((hff' y (ho hy)).mono ho).fderivWithin (hs.inter o_open y hy)
rwa [fderivWithin_inter (o_open.mem_nhds hy.2)] at A
#align cont_diff_on_succ_iff_fderiv_within contDiffOn_succ_iff_fderivWithin
+-/
+#print contDiffOn_succ_iff_has_fderiv_within /-
theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π s) :
ContDiffOn π (n + 1 : β) f s β
β f' : E β E βL[π] F, ContDiffOn π n f' s β§ β x, x β s β HasFDerivWithinAt f (f' x) s x :=
@@ -1201,8 +1310,10 @@ theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π
refine' β¨fun x hx => (h2 x hx).DifferentiableWithinAt, fun x hx => _β©
exact (h1 x hx).congr' (fun y hy => (h2 y hy).fderivWithin (hs y hy)) hx
#align cont_diff_on_succ_iff_has_fderiv_within contDiffOn_succ_iff_has_fderiv_within
+-/
/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:73:14: unsupported tactic `congrm #[[expr Β«expr β§ Β»(_, _)]] -/
+#print contDiffOn_succ_iff_fderiv_of_open /-
/-- 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) :
@@ -1216,7 +1327,9 @@ theorem contDiffOn_succ_iff_fderiv_of_open {n : β} (hs : IsOpen s) :
intro x hx
exact fderivWithin_of_open hs hx
#align cont_diff_on_succ_iff_fderiv_of_open contDiffOn_succ_iff_fderiv_of_open
+-/
+#print contDiffOn_top_iff_fderivWithin /-
/-- 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) :
@@ -1234,8 +1347,10 @@ theorem contDiffOn_top_iff_fderivWithin (hs : UniqueDiffOn π s) :
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 β§ Β»(_, _)]] -/
+#print contDiffOn_top_iff_fderiv_of_open /-
/-- 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) :
@@ -1248,6 +1363,7 @@ theorem contDiffOn_top_iff_fderiv_of_open (hs : IsOpen s) :
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 :=
@@ -1279,23 +1395,26 @@ theorem ContDiffOn.continuousOn_fderiv_of_open (h : ContDiffOn π n f s) (hs :
/-! ### Functions with a Taylor series on the whole space -/
+#print HasFTaylorSeriesUpTo /-
/-- `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) :
+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
+#align has_ftaylor_series_up_to HasFTaylorSeriesUpTo
+-/
-theorem HasFtaylorSeriesUpTo.zero_eq' (h : HasFtaylorSeriesUpTo n f p) (x : E) :
+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'
+#align has_ftaylor_series_up_to.zero_eq' HasFTaylorSeriesUpTo.zero_eq'
-theorem hasFtaylorSeriesUpToOn_univ_iff :
- HasFtaylorSeriesUpToOn n f p univ β HasFtaylorSeriesUpTo n f p :=
+#print hasFTaylorSeriesUpToOn_univ_iff /-
+theorem hasFTaylorSeriesUpToOn_univ_iff :
+ HasFTaylorSeriesUpToOn n f p univ β HasFTaylorSeriesUpTo n f p :=
by
constructor
Β· intro H
@@ -1316,114 +1435,139 @@ theorem hasFtaylorSeriesUpToOn_univ_iff :
Β· 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
+#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
+#print HasFTaylorSeriesUpTo.hasFTaylorSeriesUpToOn /-
+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.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 :=
+#print HasFTaylorSeriesUpTo.continuous /-
+theorem HasFTaylorSeriesUpTo.continuous (h : HasFTaylorSeriesUpTo n f p) : Continuous f :=
by
- rw [β hasFtaylorSeriesUpToOn_univ_iff] at h
+ rw [β hasFTaylorSeriesUpToOn_univ_iff] at h
rw [continuous_iff_continuousOn_univ]
exact h.continuous_on
-#align has_ftaylor_series_up_to.continuous HasFtaylorSeriesUpTo.continuous
+#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
+#print hasFTaylorSeriesUpTo_zero_iff /-
+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
+ hasFTaylorSeriesUpToOn_zero_iff]
+#align has_ftaylor_series_up_to_zero_iff hasFTaylorSeriesUpTo_zero_iff
+-/
-theorem hasFtaylorSeriesUpTo_top_iff :
- HasFtaylorSeriesUpTo β f p β β n : β, HasFtaylorSeriesUpTo n f p := by
- simp only [β hasFtaylorSeriesUpToOn_univ_iff, hasFtaylorSeriesUpToOn_top_iff]
-#align has_ftaylor_series_up_to_top_iff hasFtaylorSeriesUpTo_top_iff
+#print hasFTaylorSeriesUpTo_top_iff /-
+theorem hasFTaylorSeriesUpTo_top_iff :
+ HasFTaylorSeriesUpTo β f p β β n : β, HasFTaylorSeriesUpTo n f p := by
+ simp only [β hasFTaylorSeriesUpToOn_univ_iff, hasFTaylorSeriesUpToOn_top_iff]
+#align has_ftaylor_series_up_to_top_iff hasFTaylorSeriesUpTo_top_iff
+-/
+#print hasFTaylorSeriesUpTo_top_iff' /-
/-- In the case that `n = β` we don't need the continuity assumption in
`has_ftaylor_series_up_to`. -/
-theorem hasFtaylorSeriesUpTo_top_iff' :
- HasFtaylorSeriesUpTo β f p β
+theorem hasFTaylorSeriesUpTo_top_iff' :
+ HasFTaylorSeriesUpTo β f p β
(β x, (p x 0).uncurry0 = f x) β§
β (m : β) (x), HasFDerivAt (fun y => p y m) (p x m.succ).curryLeft x :=
by
- simp only [β hasFtaylorSeriesUpToOn_univ_iff, hasFtaylorSeriesUpToOn_top_iff', mem_univ,
+ simp only [β hasFTaylorSeriesUpToOn_univ_iff, hasFTaylorSeriesUpToOn_top_iff', mem_univ,
forall_true_left, hasFDerivWithinAt_univ]
-#align has_ftaylor_series_up_to_top_iff' hasFtaylorSeriesUpTo_top_iff'
+#align has_ftaylor_series_up_to_top_iff' hasFTaylorSeriesUpTo_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 HasFtaylorSeriesUpTo.hasFDerivAt (h : HasFtaylorSeriesUpTo n f p) (hn : 1 β€ n) (x : E) :
+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
+ 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) :
+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
+#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 β
+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 =>
+ 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,
+ 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
+#align has_ftaylor_series_up_to_succ_iff_right hasFTaylorSeriesUpTo_succ_iff_right
/-! ### Smooth functions at a point -/
variable (π)
+#print ContDiffAt /-
/-- 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 {π}
+#print contDiffWithinAt_univ /-
theorem contDiffWithinAt_univ : ContDiffWithinAt π n f univ x β ContDiffAt π n f x :=
Iff.rfl
#align cont_diff_within_at_univ contDiffWithinAt_univ
+-/
+#print contDiffAt_top /-
theorem contDiffAt_top : ContDiffAt π β f x β β n : β, ContDiffAt π n f x := by
simp [β contDiffWithinAt_univ, contDiffWithinAt_top]
#align cont_diff_at_top contDiffAt_top
+-/
+#print ContDiffAt.contDiffWithinAt /-
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
+-/
+#print ContDiffWithinAt.contDiffAt /-
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
+-/
+#print ContDiffAt.congr_of_eventuallyEq /-
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
+#print ContDiffAt.continuousAt /-
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) :
@@ -1452,72 +1596,94 @@ theorem contDiffAt_succ_iff_hasFDerivAt {n : β} :
exact (h_fderiv x hxu).HasFDerivWithinAt
#align cont_diff_at_succ_iff_has_fderiv_at contDiffAt_succ_iff_hasFDerivAt
+#print ContDiffAt.eventually /-
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 (π)
+#print ContDiff /-
/-- 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
+ β p : E β FormalMultilinearSeries π E F, HasFTaylorSeriesUpTo n f p
#align cont_diff ContDiff
+-/
variable {π}
+#print HasFTaylorSeriesUpTo.contDiff /-
/-- If `f` has a Taylor series up to `n`, then it is `C^n`. -/
-theorem HasFtaylorSeriesUpTo.contDiff {f' : E β FormalMultilinearSeries π E F}
- (hf : HasFtaylorSeriesUpTo n f f') : ContDiff π n f :=
+theorem HasFTaylorSeriesUpTo.contDiff {f' : E β FormalMultilinearSeries π E F}
+ (hf : HasFTaylorSeriesUpTo n f f') : ContDiff π n f :=
β¨f', hfβ©
-#align has_ftaylor_series_up_to.cont_diff HasFtaylorSeriesUpTo.contDiff
+#align has_ftaylor_series_up_to.cont_diff HasFTaylorSeriesUpTo.contDiff
+-/
+#print contDiffOn_univ /-
theorem contDiffOn_univ : ContDiffOn π n f univ β ContDiff π n f :=
by
constructor
Β· intro H
use ftaylorSeriesWithin π f univ
- rw [β hasFtaylorSeriesUpToOn_univ_iff]
+ 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
+-/
+#print contDiff_iff_contDiffAt /-
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
+-/
+#print ContDiff.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
+-/
+#print ContDiff.contDiffWithinAt /-
theorem ContDiff.contDiffWithinAt (h : ContDiff π n f) : ContDiffWithinAt π n f s x :=
h.ContDiffAt.ContDiffWithinAt
#align cont_diff.cont_diff_within_at ContDiff.contDiffWithinAt
+-/
+#print contDiff_top /-
theorem contDiff_top : ContDiff π β f β β n : β, ContDiff π n f := by
simp [cont_diff_on_univ.symm, contDiffOn_top]
#align cont_diff_top contDiff_top
+-/
+#print contDiff_all_iff_nat /-
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
+-/
+#print ContDiff.contDiffOn /-
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
+-/
+#print contDiff_zero /-
@[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]
@@ -1544,9 +1710,11 @@ theorem ContDiff.one_of_succ {n : β} (h : ContDiff π (n + 1) f) : ContDiff
h.of_le <| WithTop.coe_le_coe.mpr le_add_self
#align cont_diff.one_of_succ ContDiff.one_of_succ
+#print ContDiff.continuous /-
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 :=
@@ -1557,6 +1725,7 @@ theorem contDiff_iff_forall_nat_le : ContDiff π n f β β m : β, βm β€
simp_rw [β contDiffOn_univ]; exact contDiffOn_iff_forall_nat_le
#align cont_diff_iff_forall_nat_le contDiff_iff_forall_nat_le
+#print contDiff_succ_iff_has_fderiv /-
/-- A function is `C^(n+1)` iff it has a `C^n` derivative. -/
theorem contDiff_succ_iff_has_fderiv {n : β} :
ContDiff π (n + 1 : β) f β
@@ -1565,190 +1734,216 @@ theorem contDiff_succ_iff_has_fderiv {n : β} :
simp only [β contDiffOn_univ, β hasFDerivWithinAt_univ,
contDiffOn_succ_iff_has_fderiv_within uniqueDiffOn_univ, Set.mem_univ, forall_true_left]
#align cont_diff_succ_iff_has_fderiv contDiff_succ_iff_has_fderiv
+-/
/-! ### Iterated derivative -/
variable (π)
+#print iteratedFDeriv /-
/-- 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 :=
+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
+#align iterated_fderiv iteratedFDeriv
+-/
+#print ftaylorSeries /-
/-- 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
+ iteratedFDeriv π n f x
#align ftaylor_series ftaylorSeries
+-/
variable {π}
+#print iteratedFDeriv_zero_apply /-
@[simp]
-theorem iteratedFderiv_zero_apply (m : Fin 0 β E) :
- (iteratedFderiv π 0 f x : (Fin 0 β E) β F) m = f x :=
+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
+#align iterated_fderiv_zero_apply iteratedFDeriv_zero_apply
+-/
-theorem iteratedFderiv_zero_eq_comp :
- iteratedFderiv π 0 f = (continuousMultilinearCurryFin0 π E F).symm β f :=
+theorem iteratedFDeriv_zero_eq_comp :
+ iteratedFDeriv π 0 f = (continuousMultilinearCurryFin0 π E F).symm β f :=
rfl
-#align iterated_fderiv_zero_eq_comp iteratedFderiv_zero_eq_comp
+#align iterated_fderiv_zero_eq_comp iteratedFDeriv_zero_eq_comp
+#print norm_iteratedFDeriv_zero /-
@[simp]
-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 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;
+#print iteratedFDeriv_with_zero_eq /-
+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
+#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) :=
+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
+#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 =
+theorem iteratedFDeriv_succ_eq_comp_left {n : β} :
+ iteratedFDeriv π (n + 1) f =
continuousMultilinearCurryLeftEquiv π (fun i : Fin (n + 1) => E) F β
- fderiv π (iteratedFderiv π n f) :=
+ fderiv π (iteratedFDeriv π n f) :=
rfl
-#align iterated_fderiv_succ_eq_comp_left iteratedFderiv_succ_eq_comp_left
+#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) =
+theorem fderiv_iteratedFDeriv {n : β} :
+ fderiv π (iteratedFDeriv π n f) =
(continuousMultilinearCurryLeftEquiv π (fun i : Fin (n + 1) => E) F).symm β
- iteratedFderiv π (n + 1) f :=
+ iteratedFDeriv π (n + 1) f :=
by
- rw [iteratedFderiv_succ_eq_comp_left]
+ rw [iteratedFDeriv_succ_eq_comp_left]
ext1 x
simp only [Function.comp_apply, LinearIsometryEquiv.symm_apply_apply]
-#align fderiv_iterated_fderiv fderiv_iteratedFderiv
+#align fderiv_iterated_fderiv fderiv_iteratedFDeriv
-theorem HasCompactSupport.iteratedFderiv (hf : HasCompactSupport f) (n : β) :
- HasCompactSupport (iteratedFderiv π n f) :=
+theorem HasCompactSupport.iteratedFDeriv (hf : HasCompactSupport f) (n : β) :
+ HasCompactSupport (iteratedFDeriv π n f) :=
by
induction' n with n IH
- Β· rw [iteratedFderiv_zero_eq_comp]
+ Β· rw [iteratedFDeriv_zero_eq_comp]
apply hf.comp_left
exact LinearIsometryEquiv.map_zero _
- Β· rw [iteratedFderiv_succ_eq_comp_left]
+ Β· rw [iteratedFDeriv_succ_eq_comp_left]
apply (IH.fderiv π).compLeft
exact LinearIsometryEquiv.map_zero _
-#align has_compact_support.iterated_fderiv HasCompactSupport.iteratedFderiv
+#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
+#print norm_fderiv_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 :=
+#print iteratedFDerivWithin_univ /-
+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
+ rw [iteratedFDeriv_succ_apply_left, iteratedFDerivWithin_succ_apply_left, IH, fderivWithin_univ]
+#align iterated_fderiv_within_univ iteratedFDerivWithin_univ
+-/
+#print iteratedFDerivWithin_of_isOpen /-
/-- 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 :=
+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]
+ simp only [iteratedFDerivWithin_zero_apply, iteratedFDeriv_zero_apply]
Β· intro x hx
- rw [iteratedFderiv_succ_eq_comp_left, iteratedFderivWithin_succ_eq_comp_left]
+ 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
+#align iterated_fderiv_within_of_is_open iteratedFDerivWithin_of_isOpen
+-/
+#print ftaylorSeriesWithin_univ /-
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]
+ 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)) :=
+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
+ 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
+#print iteratedFDeriv_succ_eq_comp_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)
+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
+ 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
+#print norm_iteratedFDeriv_fderiv /-
+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
+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
+#print contDiff_iff_ftaylorSeries /-
/-- 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_iff_ftaylorSeries :
- ContDiff π n f β HasFtaylorSeriesUpTo n f (ftaylorSeries π f) :=
+ ContDiff π n f β HasFTaylorSeriesUpTo n f (ftaylorSeries π f) :=
by
constructor
- Β· rw [β contDiffOn_univ, β hasFtaylorSeriesUpToOn_univ_iff, β ftaylorSeriesWithin_univ]
+ Β· 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_iff_ftaylor_series contDiff_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 :=
+ (β 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]
+ 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 :=
+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
+#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 :=
+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
+#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 :=
+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
+#align cont_diff_of_differentiable_iterated_fderiv contDiff_of_differentiable_iteratedFDeriv
+#print contDiff_succ_iff_fderiv /-
/-- 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 : β} :
@@ -1756,11 +1951,15 @@ theorem contDiff_succ_iff_fderiv {n : β} :
simp only [β contDiffOn_univ, β differentiableOn_univ, β fderivWithin_univ,
contDiffOn_succ_iff_fderivWithin uniqueDiffOn_univ]
#align cont_diff_succ_iff_fderiv contDiff_succ_iff_fderiv
+-/
+#print contDiff_one_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
+-/
+#print contDiff_top_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 :
@@ -1769,6 +1968,7 @@ theorem contDiff_top_iff_fderiv :
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 :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -163,7 +163,7 @@ derivative, differentiability, higher derivative, `C^n`, multilinear, Taylor ser
noncomputable section
-open Classical BigOperators NNReal Topology Filter
+open scoped Classical BigOperators NNReal Topology Filter
-- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -195,10 +195,7 @@ structure HasFtaylorSeriesUpToOn (n : ββ) (f : E β F) (p : E β FormalMul
#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
+ 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'
@@ -239,12 +236,8 @@ theorem hasFtaylorSeriesUpToOn_zero_iff :
β¨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 _
+ 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
@@ -253,8 +246,7 @@ 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 n; exact H.of_le le_top
Β· intro H
constructor
Β· exact (H 0).zero_eq
@@ -283,11 +275,8 @@ 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
+ 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
@@ -372,12 +361,9 @@ theorem hasFtaylorSeriesUpToOn_succ_iff_right {n : β} :
Β· 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 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β’
+ have A : (m.succ : ββ) < n.succ := by rw [WithTop.coe_lt_coe] at hmβ’;
exact nat.lt_succ_iff.mpr hm
change
HasFDerivWithinAt
@@ -391,9 +377,7 @@ theorem hasFtaylorSeriesUpToOn_succ_iff_right {n : β} :
(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β’
+ have A : (m.succ : ββ) β€ n.succ := by rw [WithTop.coe_le_coe] at hmβ’;
exact nat.pred_le_iff.mp hm
change
ContinuousOn
@@ -406,9 +390,7 @@ theorem hasFtaylorSeriesUpToOn_succ_iff_right {n : β} :
Β· 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 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)
@@ -426,9 +408,7 @@ theorem hasFtaylorSeriesUpToOn_succ_iff_right {n : β} :
Β· 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 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 :=
@@ -883,11 +863,7 @@ theorem iteratedFderivWithin_succ_apply_right {n : β} (hs : UniqueDiffOn π
β 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
+ 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)
@@ -902,9 +878,7 @@ theorem iteratedFderivWithin_succ_apply_right {n : β} (hs : UniqueDiffOn π
(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
+ 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)
@@ -913,9 +887,7 @@ theorem iteratedFderivWithin_succ_apply_right {n : β} (hs : UniqueDiffOn π
_ =
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
+ by rw [iteratedFderivWithin_succ_apply_left, tail_init_eq_init_tail]; rfl
#align iterated_fderiv_within_succ_apply_right iteratedFderivWithin_succ_apply_right
@@ -926,10 +898,7 @@ theorem iteratedFderivWithin_succ_eq_comp_right {n : β} (hs : UniqueDiffOn
(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
+ 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) :
@@ -1321,10 +1290,7 @@ structure HasFtaylorSeriesUpTo (n : ββ) (f : E β F) (p : E β FormalMulti
#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
+ 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'
@@ -1358,10 +1324,7 @@ theorem HasFtaylorSeriesUpTo.hasFtaylorSeriesUpToOn (h : HasFtaylorSeriesUpTo n
#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
+ 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 :=
@@ -1556,10 +1519,8 @@ theorem contDiff_zero : ContDiff π 0 f β Continuous f :=
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]
+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 :
@@ -1592,10 +1553,8 @@ theorem ContDiff.differentiable (h : ContDiff π n f) (hn : 1 β€ n) : Differe
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
+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
/-- A function is `C^(n+1)` iff it has a `C^n` derivative. -/
@@ -1641,9 +1600,7 @@ theorem norm_iteratedFderiv_zero : βiteratedFderiv π 0 f xβ = βf xβ :
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
+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
@@ -1695,8 +1652,7 @@ theorem iteratedFderivWithin_univ {n : β} :
iteratedFderivWithin π n f univ = iteratedFderiv π n f :=
by
induction' n with n IH
- Β· ext x
- simp
+ Β· 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
@@ -1741,10 +1697,7 @@ 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
+ 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 : β} :
@@ -1754,10 +1707,8 @@ theorem norm_iteratedFderiv_fderiv {n : β} :
@[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
+ (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
@@ -1768,8 +1719,7 @@ theorem contDiff_iff_ftaylorSeries :
constructor
Β· rw [β contDiffOn_univ, β hasFtaylorSeriesUpToOn_univ_iff, β ftaylorSeriesWithin_univ]
exact fun h => ContDiffOn.ftaylorSeriesWithin h uniqueDiffOn_univ
- Β· intro h
- exact β¨ftaylorSeries π f, hβ©
+ Β· intro h; exact β¨ftaylorSeries π f, hβ©
#align cont_diff_iff_ftaylor_series contDiff_iff_ftaylorSeries
theorem contDiff_iff_continuous_differentiable :
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
! This file was ported from Lean 3 source module analysis.calculus.cont_diff_def
-! leanprover-community/mathlib commit e3fb84046afd187b710170887195d50bada934ee
+! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -163,7 +163,7 @@ derivative, differentiability, higher derivative, `C^n`, multilinear, Taylor ser
noncomputable section
-open Classical BigOperators NNReal Topology
+open Classical BigOperators NNReal Topology Filter
-- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
@@ -698,15 +698,19 @@ theorem ContDiffOn.contDiffWithinAt (h : ContDiffOn π n f s) (hx : x β s) :
h x hx
#align cont_diff_on.cont_diff_within_at ContDiffOn.contDiffWithinAt
+theorem ContDiffWithinAt.cont_diff_on' {m : β} (hm : (m : ββ) β€ n)
+ (h : ContDiffWithinAt π n f s x) : β u, IsOpen u β§ x β u β§ ContDiffOn π m f (insert x s β© u) :=
+ by
+ rcases h m hm with β¨t, ht, p, hpβ©
+ rcases mem_nhdsWithin.1 ht with β¨u, huo, hxu, hutβ©
+ rw [inter_comm] at hut
+ exact β¨u, huo, hxu, (hp.mono hut).ContDiffOnβ©
+#align cont_diff_within_at.cont_diff_on' ContDiffWithinAt.cont_diff_on'
+
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
+ let β¨u, uo, xu, hβ© := h.cont_diff_on' hm
+ β¨_, inter_mem_nhdsWithin _ (uo.mem_nhds xu), inter_subset_left _ _, hβ©
#align cont_diff_within_at.cont_diff_on ContDiffWithinAt.contDiffOn
protected theorem ContDiffWithinAt.eventually {n : β} (h : ContDiffWithinAt π n f s x) :
@@ -893,7 +897,7 @@ theorem iteratedFderivWithin_succ_apply_right {n : β} (hs : UniqueDiffOn π
(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)]
+ by rw [fderivWithin_congr A (A x hx)]
_ =
(I β fderivWithin π (iteratedFderivWithin π n (fderivWithin π f s) s) s x :
E β E[Γn + 1]βL[π] F)
@@ -934,79 +938,95 @@ theorem norm_iteratedFderivWithin_fderivWithin {n : β} (hs : UniqueDiffOn π
#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) :
+theorem iteratedFderivWithin_one_apply (h : UniqueDiffWithinAt π s x) (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]
+ simp only [iteratedFderivWithin_succ_apply_left, iteratedFderivWithin_zero_eq_comp,
+ (continuousMultilinearCurryFin0 π E F).symm.comp_fderivWithin h]
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 :=
+theorem Filter.EventuallyEq.iterated_fderiv_within' (h : fβ =αΆ [π[s] x] f) (ht : t β s) (n : β) :
+ iteratedFderivWithin π n fβ t =αΆ [π[s] x] iteratedFderivWithin π n f t :=
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]
+ induction' n with n ihn
+ Β· exact h.mono fun y hy => FunLike.ext _ _ fun _ => hy
+ Β· have : fderivWithin π _ t =αΆ [π[s] x] fderivWithin π _ t := ihn.fderiv_within' ht
+ apply this.mono
+ intro y hy
+ simp only [iteratedFderivWithin_succ_eq_comp_left, hy, (Β· β Β·)]
+#align filter.eventually_eq.iterated_fderiv_within' Filter.EventuallyEq.iterated_fderiv_within'
+
+protected theorem Filter.EventuallyEq.iteratedFderivWithin (h : fβ =αΆ [π[s] x] f) (n : β) :
+ iteratedFderivWithin π n fβ s =αΆ [π[s] x] iteratedFderivWithin π n f s :=
+ h.iterated_fderiv_within' Subset.rfl n
+#align filter.eventually_eq.iterated_fderiv_within Filter.EventuallyEq.iteratedFderivWithin
+
+/-- If two functions coincide in a neighborhood of `x` within a set `s` and at `x`, then their
+iterated differentials within this set at `x` coincide. -/
+theorem Filter.EventuallyEq.iteratedFderivWithin_eq (h : fβ =αΆ [π[s] x] f) (hx : fβ x = f x)
+ (n : β) : iteratedFderivWithin π n fβ s x = iteratedFderivWithin π n f s x :=
+ have : fβ =αΆ [π[insert x s] x] f := by simpa [eventually_eq, hx]
+ (this.iterated_fderiv_within' (subset_insert _ _) n).self_of_nhdsWithin (mem_insert _ _)
+#align filter.eventually_eq.iterated_fderiv_within_eq Filter.EventuallyEq.iteratedFderivWithin_eq
+
+/-- If two functions coincide on a set `s`, then their iterated differentials within this set
+coincide. See also `filter.eventually_eq.iterated_fderiv_within_eq` and
+`filter.eventually_eq.iterated_fderiv_within`. -/
+theorem iteratedFderivWithin_congr (hs : EqOn fβ f s) (hx : x β s) (n : β) :
+ iteratedFderivWithin π n fβ s x = iteratedFderivWithin π n f s x :=
+ (hs.EventuallyEq.filter_mono inf_le_right).iteratedFderivWithin_eq (hs hx) _
#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
+/-- If two functions coincide on a set `s`, then their iterated differentials within this set
+coincide. See also `filter.eventually_eq.iterated_fderiv_within_eq` and
+`filter.eventually_eq.iterated_fderiv_within`. -/
+protected theorem Set.EqOn.iteratedFderivWithin (hs : EqOn fβ f s) (n : β) :
+ EqOn (iteratedFderivWithin π n fβ s) (iteratedFderivWithin π n f s) s := fun x hx =>
+ iteratedFderivWithin_congr hs hx n
+#align set.eq_on.iterated_fderiv_within Set.EqOn.iteratedFderivWithin
+
+theorem iteratedFderivWithin_eventually_congr_set' (y : E) (h : s =αΆ [π[{y}αΆ] x] t) (n : β) :
+ iteratedFderivWithin π n f s =αΆ [π x] iteratedFderivWithin π n f t :=
+ by
+ induction' n with n ihn generalizing x
+ Β· rfl
+ Β· refine' (eventually_nhds_nhdsWithin.2 h).mono fun y hy => _
+ simp only [iteratedFderivWithin_succ_eq_comp_left, (Β· β Β·)]
+ rw [(ihn hy).fderivWithin_eq_nhds, fderivWithin_congr_set' _ hy]
+#align iterated_fderiv_within_eventually_congr_set' iteratedFderivWithin_eventually_congr_set'
+
+theorem iteratedFderivWithin_eventually_congr_set (h : s =αΆ [π x] t) (n : β) :
+ iteratedFderivWithin π n f s =αΆ [π x] iteratedFderivWithin π n f t :=
+ iteratedFderivWithin_eventually_congr_set' x (h.filter_mono inf_le_left) n
+#align iterated_fderiv_within_eventually_congr_set iteratedFderivWithin_eventually_congr_set
+
+theorem iteratedFderivWithin_congr_set (h : s =αΆ [π x] t) (n : β) :
+ iteratedFderivWithin π n f s x = iteratedFderivWithin π n f t x :=
+ (iteratedFderivWithin_eventually_congr_set h n).self_of_nhds
+#align iterated_fderiv_within_congr_set iteratedFderivWithin_congr_set
/-- 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) :
+theorem iteratedFderivWithin_inter' {n : β} (hu : u β π[s] x) :
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]
+ iteratedFderivWithin_congr_set (nhdsWithin_eq_iff_eventuallyEq.1 <| nhdsWithin_inter_of_mem' hu) _
#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) :
+theorem iteratedFderivWithin_inter {n : β} (hu : u β π x) :
iteratedFderivWithin π n f (s β© u) x = iteratedFderivWithin π n f s x :=
- iteratedFderivWithin_inter' (mem_nhdsWithin_of_mem_nhds hu) hs xs
+ iteratedFderivWithin_inter' (mem_nhdsWithin_of_mem_nhds hu)
#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 an open set containing `x`. -/
+theorem iteratedFderivWithin_inter_open {n : β} (hu : IsOpen u) (hx : x β u) :
+ iteratedFderivWithin π n f (s β© u) x = iteratedFderivWithin π n f s x :=
+ iteratedFderivWithin_inter (hu.mem_nhds hx)
+#align iterated_fderiv_within_inter_open iteratedFderivWithin_inter_open
+
@[simp]
theorem contDiffOn_zero : ContDiffOn π 0 f s β ContinuousOn f s :=
by
@@ -1070,14 +1090,14 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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]
+ rw [β iteratedFderivWithin_inter_open o_open xo]
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]
+ rw [β iteratedFderivWithin_inter_open o_open yo]
exact
(Hp.mono ho).eq_ftaylor_series_of_uniqueDiffOn (WithTop.coe_le_coe.2 (Nat.le_succ m))
(hs.inter o_open) β¨hy, yoβ©
@@ -1096,7 +1116,7 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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]
+ rw [β iteratedFderivWithin_inter_open o_open yo]
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
@@ -1140,20 +1160,35 @@ theorem ContDiffOn.differentiableOn_iteratedFderivWithin {m : β} (h : ContDiff
((h.ftaylorSeriesWithin hs).fderivWithin m hmn x hx).DifferentiableWithinAt
#align cont_diff_on.differentiable_on_iterated_fderiv_within ContDiffOn.differentiableOn_iteratedFderivWithin
+theorem ContDiffWithinAt.differentiableWithinAt_iteratedFderivWithin {m : β}
+ (h : ContDiffWithinAt π n f s x) (hmn : (m : ββ) < n) (hs : UniqueDiffOn π (insert x s)) :
+ DifferentiableWithinAt π (iteratedFderivWithin π m f s) s x :=
+ by
+ rcases h.cont_diff_on' (ENat.add_one_le_of_lt hmn) with β¨u, uo, xu, huβ©
+ set t := insert x s β© u
+ have A : t =αΆ [π[β ] x] s :=
+ by
+ simp only [set_eventually_eq_iff_inf_principal, β nhdsWithin_inter']
+ rw [β inter_assoc, nhdsWithin_inter_of_mem', β diff_eq_compl_inter, insert_diff_of_mem,
+ diff_eq_compl_inter]
+ exacts[rfl, mem_nhdsWithin_of_mem_nhds (uo.mem_nhds xu)]
+ have B : iteratedFderivWithin π m f s =αΆ [π x] iteratedFderivWithin π m f t :=
+ iteratedFderivWithin_eventually_congr_set' _ A.symm _
+ have C : DifferentiableWithinAt π (iteratedFderivWithin π m f t) t x :=
+ hu.differentiable_on_iterated_fderiv_within (Nat.cast_lt.2 m.lt_succ_self) (hs.inter uo) x
+ β¨mem_insert _ _, xuβ©
+ rw [differentiableWithinAt_congr_set' _ A] at C
+ exact C.congr_of_eventually_eq (B.filter_mono inf_le_left) B.self_of_nhds
+#align cont_diff_within_at.differentiable_within_at_iterated_fderiv_within ContDiffWithinAt.differentiableWithinAt_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
+ β¨fun h =>
+ β¨fun m hm => h.continuousOn_iteratedFderivWithin hm hs, fun m hm =>
+ h.differentiableOn_iteratedFderivWithin hm hsβ©,
+ fun h => 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)
@@ -1184,7 +1219,7 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
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
+ rwa [fderivWithin_inter (o_open.mem_nhds hy.2)] at A
#align cont_diff_on_succ_iff_fderiv_within contDiffOn_succ_iff_fderivWithin
theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π s) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/33c67ae661dd8988516ff7f247b0be3018cdd952
@@ -190,7 +190,7 @@ structure HasFtaylorSeriesUpToOn (n : ββ) (f : E β F) (p : E β FormalMul
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
+ β 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
@@ -269,7 +269,7 @@ theorem hasFtaylorSeriesUpToOn_top_iff :
theorem hasFtaylorSeriesUpToOn_top_iff' :
HasFtaylorSeriesUpToOn β f p s β
(β x β s, (p x 0).uncurry0 = f x) β§
- β m : β, β x β s, HasFderivWithinAt (fun y => p y m) (p x m.succ).curryLeft s x :=
+ β m : β, β x β s, HasFDerivWithinAt (fun y => p y m) (p x m.succ).curryLeft s x :=
β¨-- Everything except for the continuity is trivial:
fun h => β¨h.1, fun m => h.2 m (WithTop.coe_lt_top m)β©, fun h =>
β¨h.1, fun m _ => h.2 m, fun m _ x hx =>
@@ -280,8 +280,8 @@ theorem 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 :=
+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
@@ -289,10 +289,10 @@ theorem HasFtaylorSeriesUpToOn.hasFderivWithinAt (h : HasFtaylorSeriesUpToOn n f
rw [β h.zero_eq y hy]
rfl
suffices H :
- HasFderivWithinAt (fun y => continuousMultilinearCurryFin0 π E F (p y 0))
+ 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']
+ 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)
@@ -301,32 +301,32 @@ theorem HasFtaylorSeriesUpToOn.hasFderivWithinAt (h : HasFtaylorSeriesUpToOn n f
congr with i
rw [Unique.eq_default i]
rfl
-#align has_ftaylor_series_up_to_on.has_fderiv_within_at HasFtaylorSeriesUpToOn.hasFderivWithinAt
+#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
+ 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
+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)
+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
+ βαΆ 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
+ (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
@@ -334,7 +334,7 @@ theorem HasFtaylorSeriesUpToOn.differentiableAt (h : HasFtaylorSeriesUpToOn n f
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) β§
+ (β 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
@@ -364,7 +364,7 @@ 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) β§
+ (β 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
@@ -380,10 +380,10 @@ theorem hasFtaylorSeriesUpToOn_succ_iff_right {n : β} :
rw [WithTop.coe_lt_coe] at hmβ’
exact nat.lt_succ_iff.mpr hm
change
- HasFderivWithinAt
+ 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']
+ rw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff']
convert H.fderiv_within _ A x hx
ext (y v)
change
@@ -410,11 +410,11 @@ theorem hasFtaylorSeriesUpToOn_succ_iff_right {n : β} :
rw [WithTop.coe_lt_coe] at hmβ’
exact Nat.lt_of_succ_lt_succ hm
have :
- HasFderivWithinAt
+ 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
+ rw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff'] at this
convert this
ext (y v)
change
@@ -588,11 +588,11 @@ theorem ContDiffWithinAt.differentiableWithinAt (h : ContDiffWithinAt π n f 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 : β} :
+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 :=
+ (β x β u, HasFDerivWithinAt f (f' x) u x) β§ ContDiffWithinAt π n f' u x :=
by
constructor
Β· intro h
@@ -617,9 +617,9 @@ theorem contDiffWithinAt_succ_iff_hasFderivWithinAt {n : β} :
Β· rw [hasFtaylorSeriesUpToOn_succ_iff_right]
refine' β¨fun y hy => rfl, fun y hy => _, _β©
Β· change
- HasFderivWithinAt (fun z => (continuousMultilinearCurryFin0 π E F).symm (f z))
+ 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']
+ 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
@@ -639,7 +639,7 @@ theorem contDiffWithinAt_succ_iff_hasFderivWithinAt {n : β} :
(@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
+#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. -/
@@ -648,7 +648,7 @@ theorem contDiffWithinAt_succ_iff_has_fderiv_within_at' {n : β} :
β 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 :=
+ (β 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
@@ -661,7 +661,7 @@ theorem contDiffWithinAt_succ_iff_has_fderiv_within_at' {n : β} :
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,
+ Β· 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β©
@@ -783,11 +783,11 @@ theorem contDiffOn_of_locally_contDiffOn
#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 : β} :
+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 :=
+ β f' : E β E βL[π] F, (β x β u, HasFDerivWithinAt f (f' x) u x) β§ ContDiffOn π n f' u :=
by
constructor
Β· intro h x hx
@@ -801,11 +801,11 @@ theorem contDiffOn_succ_iff_hasFderivWithinAt {n : β} :
convert self_mem_nhdsWithin
exact insert_eq_of_mem hz
Β· intro h x hx
- rw [contDiffWithinAt_succ_iff_hasFderivWithinAt]
+ 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
+#align cont_diff_on_succ_iff_has_fderiv_within_at contDiffOn_succ_iff_hasFDerivWithinAt
/-! ### Iterated derivative within a set -/
@@ -1045,7 +1045,7 @@ theorem HasFtaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn
Β· 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)
+ 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
@@ -1072,7 +1072,7 @@ theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs : UniqueD
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)]
+ 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β©
@@ -1114,7 +1114,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 _
@@ -1160,9 +1160,9 @@ theorem contDiffOn_succ_of_fderivWithin {n : β} (hf : DifferentiableOn π f
(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]
+ 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β©
+ β¨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
@@ -1173,7 +1173,7 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π 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 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
@@ -1189,10 +1189,10 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π s) :
ContDiffOn π (n + 1 : β) f s β
- β f' : E β E βL[π] F, ContDiffOn π n f' s β§ β x, x β s β HasFderivWithinAt f (f' x) s x :=
+ β f' : E β E βL[π] F, ContDiffOn π n f' s β§ β x, x β s β HasFDerivWithinAt f (f' x) s x :=
by
rw [contDiffOn_succ_iff_fderivWithin hs]
- refine' β¨fun h => β¨fderivWithin π f s, h.2, fun x hx => (h.1 x hx).HasFderivWithinAtβ©, fun h => _β©
+ refine' β¨fun h => β¨fderivWithin π f s, h.2, fun x hx => (h.1 x hx).HasFDerivWithinAtβ©, fun h => _β©
rcases h with β¨f', h1, h2β©
refine' β¨fun x hx => (h2 x hx).DifferentiableWithinAt, fun x hx => _β©
exact (h1 x hx).congr' (fun y hy => (h2 y hy).fderivWithin (hs y hy)) hx
@@ -1281,7 +1281,7 @@ derivative of `p m` for `m < n`, and is continuous for `m β€ n`. This is a pred
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
+ 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
@@ -1301,7 +1301,7 @@ theorem hasFtaylorSeriesUpToOn_univ_iff :
constructor
Β· exact fun x => H.zero_eq x (mem_univ x)
Β· intro m hm x
- rw [β hasFderivWithinAt_univ]
+ rw [β hasFDerivWithinAt_univ]
exact H.fderiv_within m hm x (mem_univ x)
Β· intro m hm
rw [continuous_iff_continuousOn_univ]
@@ -1310,7 +1310,7 @@ theorem hasFtaylorSeriesUpToOn_univ_iff :
constructor
Β· exact fun x hx => H.zero_eq x
Β· intro m hm x hx
- rw [hasFderivWithinAt_univ]
+ rw [hasFDerivWithinAt_univ]
exact H.fderiv m hm x
Β· intro m hm
rw [β continuous_iff_continuousOn_univ]
@@ -1352,23 +1352,23 @@ theorem hasFtaylorSeriesUpTo_top_iff :
theorem hasFtaylorSeriesUpTo_top_iff' :
HasFtaylorSeriesUpTo β f p β
(β x, (p x 0).uncurry0 = f x) β§
- β (m : β) (x), HasFderivAt (fun y => p y m) (p x m.succ).curryLeft x :=
+ β (m : β) (x), HasFDerivAt (fun y => p y m) (p x m.succ).curryLeft x :=
by
simp only [β hasFtaylorSeriesUpToOn_univ_iff, hasFtaylorSeriesUpToOn_top_iff', mem_univ,
- forall_true_left, hasFderivWithinAt_univ]
+ forall_true_left, hasFDerivWithinAt_univ]
#align has_ftaylor_series_up_to_top_iff' hasFtaylorSeriesUpTo_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 HasFtaylorSeriesUpTo.hasFderivAt (h : HasFtaylorSeriesUpTo n f p) (hn : 1 β€ n) (x : E) :
- HasFderivAt f (continuousMultilinearCurryFin1 π E F (p x 1)) x :=
+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
+ 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
+ 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`
@@ -1376,12 +1376,12 @@ 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) β§
+ (β 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]
+ forall_true_left, hasFDerivWithinAt_univ]
#align has_ftaylor_series_up_to_succ_iff_right hasFtaylorSeriesUpTo_succ_iff_right
/-! ### Smooth functions at a point -/
@@ -1434,11 +1434,11 @@ theorem ContDiffAt.differentiableAt (h : ContDiffAt π n f x) (hn : 1 β€ n) :
#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 : β} :
+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 :=
+ β 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]
+ 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β©
@@ -1446,13 +1446,13 @@ theorem contDiffAt_succ_iff_hasFderivAt {n : β} :
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 _
+ 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
+ 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
@@ -1529,9 +1529,9 @@ theorem contDiffAt_zero : ContDiffAt π 0 f x β β u β π x, Continuous
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 :=
+ β 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,
+ 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
@@ -1566,9 +1566,9 @@ theorem contDiff_iff_forall_nat_le : ContDiff π n f β β m : β, βm β€
/-- A function is `C^(n+1)` iff it has a `C^n` derivative. -/
theorem contDiff_succ_iff_has_fderiv {n : β} :
ContDiff π (n + 1 : β) f β
- β f' : E β E βL[π] F, ContDiff π n f' β§ β x, HasFderivAt f (f' x) x :=
+ β f' : E β E βL[π] F, ContDiff π n f' β§ β x, HasFDerivAt f (f' x) x :=
by
- simp only [β contDiffOn_univ, β hasFderivWithinAt_univ,
+ simp only [β contDiffOn_univ, β hasFDerivWithinAt_univ,
contDiffOn_succ_iff_has_fderiv_within uniqueDiffOn_univ, Set.mem_univ, forall_true_left]
#align cont_diff_succ_iff_has_fderiv contDiff_succ_iff_has_fderiv
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -4,11 +4,14 @@ 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_def
-! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
+! leanprover-community/mathlib commit e3fb84046afd187b710170887195d50bada934ee
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.Analysis.Calculus.Fderiv
+import Mathbin.Analysis.Calculus.Fderiv.Add
+import Mathbin.Analysis.Calculus.Fderiv.Mul
+import Mathbin.Analysis.Calculus.Fderiv.Equiv
+import Mathbin.Analysis.Calculus.Fderiv.RestrictScalars
import Mathbin.Analysis.Calculus.FormalMultilinearSeries
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -4,14 +4,12 @@ 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_def
-! leanprover-community/mathlib commit 2cf3ee29d9361ee308a14a46d820a49b8856d041
+! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.Fderiv
-import Mathbin.Analysis.NormedSpace.Multilinear
import Mathbin.Analysis.Calculus.FormalMultilinearSeries
-import Mathbin.Data.Enat.Basic
/-!
# Higher differentiability
mathlib commit https://github.com/leanprover-community/mathlib/commit/09079525fd01b3dda35e96adaa08d2f943e1648c
@@ -167,7 +167,7 @@ open Classical BigOperators NNReal Topology
-- mathport name: Β«exprβΒ»
local notation "β" => (β€ : ββ)
-attribute [local instance]
+attribute [local instance 1001]
NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid
open Set Fin Filter Function
mathlib commit https://github.com/leanprover-community/mathlib/commit/0e2aab2b0d521f060f62a14d2cf2e2c54e8491d6
@@ -4,7 +4,7 @@ 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_def
-! leanprover-community/mathlib commit a493616c740a3252e4cd0e4d0851984946b7b268
+! leanprover-community/mathlib commit 2cf3ee29d9361ee308a14a46d820a49b8856d041
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -263,6 +263,20 @@ theorem hasFtaylorSeriesUpToOn_top_iff :
apply (H m).cont m le_rfl
#align has_ftaylor_series_up_to_on_top_iff hasFtaylorSeriesUpToOn_top_iff
+/-- In the case that `n = β` we don't need the continuity assumption in
+`has_ftaylor_series_up_to_on`. -/
+theorem hasFtaylorSeriesUpToOn_top_iff' :
+ HasFtaylorSeriesUpToOn β f p s β
+ (β x β s, (p x 0).uncurry0 = f x) β§
+ β m : β, β x β s, HasFderivWithinAt (fun y => p y m) (p x m.succ).curryLeft s x :=
+ β¨-- Everything except for the continuity is trivial:
+ fun h => β¨h.1, fun m => h.2 m (WithTop.coe_lt_top m)β©, fun h =>
+ β¨h.1, fun m _ => h.2 m, fun m _ x hx =>
+ (-- The continuity follows from the existence of a derivative:
+ h.2
+ m x hx).ContinuousWithinAtβ©β©
+#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)
@@ -1327,6 +1341,22 @@ theorem hasFtaylorSeriesUpTo_zero_iff :
hasFtaylorSeriesUpToOn_zero_iff]
#align has_ftaylor_series_up_to_zero_iff hasFtaylorSeriesUpTo_zero_iff
+theorem hasFtaylorSeriesUpTo_top_iff :
+ HasFtaylorSeriesUpTo β f p β β n : β, HasFtaylorSeriesUpTo n f p := by
+ simp only [β hasFtaylorSeriesUpToOn_univ_iff, hasFtaylorSeriesUpToOn_top_iff]
+#align has_ftaylor_series_up_to_top_iff hasFtaylorSeriesUpTo_top_iff
+
+/-- In the case that `n = β` we don't need the continuity assumption in
+`has_ftaylor_series_up_to`. -/
+theorem hasFtaylorSeriesUpTo_top_iff' :
+ HasFtaylorSeriesUpTo β f p β
+ (β x, (p x 0).uncurry0 = f x) β§
+ β (m : β) (x), HasFderivAt (fun y => p y m) (p x m.succ).curryLeft x :=
+ by
+ simp only [β hasFtaylorSeriesUpToOn_univ_iff, hasFtaylorSeriesUpToOn_top_iff', mem_univ,
+ forall_true_left, hasFderivWithinAt_univ]
+#align has_ftaylor_series_up_to_top_iff' hasFtaylorSeriesUpTo_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 HasFtaylorSeriesUpTo.hasFderivAt (h : HasFtaylorSeriesUpTo n f p) (hn : 1 β€ n) (x : E) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/039ef89bef6e58b32b62898dd48e9d1a4312bb65
@@ -4,7 +4,7 @@ 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_def
-! leanprover-community/mathlib commit 0a0b3b4148b35efb8b8a38118517c5a1d30d0e69
+! leanprover-community/mathlib commit a493616c740a3252e4cd0e4d0851984946b7b268
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -1172,6 +1172,17 @@ 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
+theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π s) :
+ ContDiffOn π (n + 1 : β) f s β
+ β f' : E β E βL[π] F, ContDiffOn π n f' s β§ β x, x β s β HasFderivWithinAt f (f' x) s x :=
+ by
+ rw [contDiffOn_succ_iff_fderivWithin hs]
+ refine' β¨fun h => β¨fderivWithin π f s, h.2, fun x hx => (h.1 x hx).HasFderivWithinAtβ©, fun h => _β©
+ rcases h with β¨f', h1, h2β©
+ refine' β¨fun x hx => (h2 x hx).DifferentiableWithinAt, fun x hx => _β©
+ exact (h1 x hx).congr' (fun y hy => (h2 y hy).fderivWithin (hs y hy)) hx
+#align cont_diff_on_succ_iff_has_fderiv_within contDiffOn_succ_iff_has_fderiv_within
+
/- ./././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`. -/
@@ -1521,6 +1532,15 @@ theorem contDiff_iff_forall_nat_le : ContDiff π n f β β m : β, βm β€
exact contDiffOn_iff_forall_nat_le
#align cont_diff_iff_forall_nat_le contDiff_iff_forall_nat_le
+/-- A function is `C^(n+1)` iff it has a `C^n` derivative. -/
+theorem contDiff_succ_iff_has_fderiv {n : β} :
+ ContDiff π (n + 1 : β) f β
+ β f' : E β E βL[π] F, ContDiff π n f' β§ β x, HasFderivAt f (f' x) x :=
+ by
+ simp only [β contDiffOn_univ, β hasFderivWithinAt_univ,
+ contDiffOn_succ_iff_has_fderiv_within uniqueDiffOn_univ, Set.mem_univ, forall_true_left]
+#align cont_diff_succ_iff_has_fderiv contDiff_succ_iff_has_fderiv
+
/-! ### Iterated derivative -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/c9236f47f5b9df573443aa499c0d3968769628b7
@@ -4,7 +4,7 @@ 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_def
-! leanprover-community/mathlib commit 284fdd2962e67d2932fa3a79ce19fcf92d38e228
+! leanprover-community/mathlib commit 0a0b3b4148b35efb8b8a38118517c5a1d30d0e69
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -669,6 +669,15 @@ def ContDiffOn (n : ββ) (f : E β F) (s : Set E) : Prop :=
variable {π}
+theorem HasFtaylorSeriesUpToOn.contDiffOn {f' : E β FormalMultilinearSeries π E F}
+ (hf : HasFtaylorSeriesUpToOn n f f' s) : ContDiffOn π n f s :=
+ by
+ intro x hx m hm
+ use s
+ simp only [Set.insert_eq_of_mem hx, self_mem_nhdsWithin, true_and_iff]
+ exact β¨f', hf.of_le hmβ©
+#align has_ftaylor_series_up_to_on.cont_diff_on HasFtaylorSeriesUpToOn.contDiffOn
+
theorem ContDiffOn.contDiffWithinAt (h : ContDiffOn π n f s) (hx : x β s) :
ContDiffWithinAt π n f s x :=
h x hx
@@ -1422,6 +1431,12 @@ def ContDiff (n : ββ) (f : E β F) : Prop :=
variable {π}
+/-- If `f` has a Taylor series up to `n`, then it is `C^n`. -/
+theorem HasFtaylorSeriesUpTo.contDiff {f' : E β FormalMultilinearSeries π E F}
+ (hf : HasFtaylorSeriesUpTo n f f') : ContDiff π n f :=
+ β¨f', hfβ©
+#align has_ftaylor_series_up_to.cont_diff HasFtaylorSeriesUpTo.contDiff
+
theorem contDiffOn_univ : ContDiffOn π n f univ β ContDiff π n f :=
by
constructor
mathlib commit https://github.com/leanprover-community/mathlib/commit/284fdd2962e67d2932fa3a79ce19fcf92d38e228
@@ -4,7 +4,7 @@ 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_def
-! leanprover-community/mathlib commit dd6388c44e6f6b4547070b887c5905d5cfe6c9f8
+! leanprover-community/mathlib commit 284fdd2962e67d2932fa3a79ce19fcf92d38e228
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -613,6 +613,7 @@ theorem contDiffWithinAt_succ_iff_hasFderivWithinAt {n : β} :
((p' y 0) 0) z
unfold_coes
congr
+ decide
Β· 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
mathlib commit https://github.com/leanprover-community/mathlib/commit/dd6388c44e6f6b4547070b887c5905d5cfe6c9f8
@@ -157,7 +157,7 @@ derivative, differentiability, higher derivative, `C^n`, multilinear, Taylor ser
noncomputable section
open scoped Classical
-open BigOperators NNReal Topology Filter
+open NNReal Topology Filter
local notation "β" => (β€ : ββ)
We already have the localized version to a set, but not the global version.
Also rename the localized version to a better name.
@@ -995,7 +995,7 @@ theorem contDiffWithinAt_zero (hx : x β s) :
/-- On a set with unique differentiability, any choice of iterated differential has to coincide
with the one we have chosen in `iteratedFDerivWithin π m f s`. -/
-theorem HasFTaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn
+theorem HasFTaylorSeriesUpToOn.eq_iteratedFDerivWithin_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
@@ -1008,7 +1008,10 @@ theorem HasFTaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn
(IH (le_of_lt A) hx).symm
rw [iteratedFDerivWithin_succ_eq_comp_left, Function.comp_apply, this.fderivWithin (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
+#align has_ftaylor_series_up_to_on.eq_ftaylor_series_of_unique_diff_on HasFTaylorSeriesUpToOn.eq_iteratedFDerivWithin_of_uniqueDiffOn
+
+@[deprecated] alias HasFTaylorSeriesUpToOn.eq_ftaylor_series_of_uniqueDiffOn :=
+ HasFTaylorSeriesUpToOn.eq_iteratedFDerivWithin_of_uniqueDiffOn -- 2024-03-28
/-- When a function is `C^n` in a set `s` of unique differentiability, it admits
`ftaylorSeriesWithin π f s` as a Taylor series up to order `n` in `s`. -/
@@ -1604,6 +1607,13 @@ theorem iteratedFDerivWithin_univ {n : β} :
rw [iteratedFDeriv_succ_apply_left, iteratedFDerivWithin_succ_apply_left, IH, fderivWithin_univ]
#align iterated_fderiv_within_univ iteratedFDerivWithin_univ
+theorem HasFTaylorSeriesUpTo.eq_iteratedFDeriv
+ (h : HasFTaylorSeriesUpTo n f p) {m : β} (hmn : (m : ββ) β€ n) (x : E) :
+ p x m = iteratedFDeriv π m f x := by
+ rw [β iteratedFDerivWithin_univ]
+ rw [β hasFTaylorSeriesUpToOn_univ_iff] at h
+ exact h.eq_iteratedFDerivWithin_of_uniqueDiffOn hmn uniqueDiffOn_univ (mem_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) :
@@ -1351,7 +1351,7 @@ theorem ContDiffWithinAt.contDiffAt (h : ContDiffWithinAt π n f s x) (hx : s
ContDiffAt π n f x := by rwa [ContDiffAt, β contDiffWithinAt_inter hx, univ_inter]
#align cont_diff_within_at.cont_diff_at ContDiffWithinAt.contDiffAt
--- Porting note: new lemma
+-- Porting note (#10756): new lemma
theorem ContDiffOn.contDiffAt (h : ContDiffOn π n f s) (hx : s β π x) :
ContDiffAt π n f x :=
(h _ (mem_of_mem_nhds hx)).contDiffAt hx
open Classical
(#11199)
We remove all but one open Classical
s, instead preferring to use open scoped Classical
. The only real side-effect this led to is moving a couple declarations to use Exists.choose
instead of Classical.choose
.
The first few commits are explicitly labelled regex replaces for ease of review.
@@ -156,7 +156,8 @@ derivative, differentiability, higher derivative, `C^n`, multilinear, Taylor ser
noncomputable section
-open Classical BigOperators NNReal Topology Filter
+open scoped Classical
+open BigOperators NNReal Topology Filter
local notation "β" => (β€ : ββ)
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -1350,7 +1350,7 @@ theorem ContDiffWithinAt.contDiffAt (h : ContDiffWithinAt π n f s x) (hx : s
ContDiffAt π n f x := by rwa [ContDiffAt, β contDiffWithinAt_inter hx, univ_inter]
#align cont_diff_within_at.cont_diff_at ContDiffWithinAt.contDiffAt
--- porting note: new lemma
+-- Porting note: new lemma
theorem ContDiffOn.contDiffAt (h : ContDiffOn π n f s) (hx : s β π x) :
ContDiffAt π n f x :=
(h _ (mem_of_mem_nhds hx)).contDiffAt hx
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.
@@ -612,12 +612,12 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt' {n : β} :
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 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β©
+ exact β¨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_hasFDerivWithinAt'
/-! ### Smooth functions within a set -/
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>
@@ -269,8 +269,7 @@ theorem HasFTaylorSeriesUpToOn.hasFDerivWithinAt (h : HasFTaylorSeriesUpToOn n f
have A : β y β s, f y = (continuousMultilinearCurryFin0 π E F) (p y 0) := fun y hy β¦
(h.zero_eq y hy).symm
suffices H : HasFDerivWithinAt (continuousMultilinearCurryFin0 π E F β (p Β· 0))
- (continuousMultilinearCurryFin1 π E F (p x 1)) s x
- Β· exact H.congr A (A x hx)
+ (continuousMultilinearCurryFin1 π E F (p x 1)) s x from H.congr A (A x hx)
rw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff']
have : ((0 : β) : ββ) < n := zero_lt_one.trans_le hn
convert h.fderivWithin _ this x hx
@@ -343,8 +342,8 @@ theorem HasFTaylorSeriesUpToOn.shift_of_succ
Β· intro x _
rfl
Β· intro m (hm : (m : ββ) < n) x (hx : x β s)
- have A : (m.succ : ββ) < n.succ
- Β· rw [Nat.cast_lt] at hm β’
+ have A : (m.succ : ββ) < n.succ := by
+ rw [Nat.cast_lt] at hm β’
exact Nat.succ_lt_succ hm
change HasFDerivWithinAt ((continuousMultilinearCurryRightEquiv' π m E F).symm β (p Β· m.succ))
(p x m.succ.succ).curryRight.curryLeft s x
@@ -354,8 +353,8 @@ theorem HasFTaylorSeriesUpToOn.shift_of_succ
change p x (m + 2) (snoc (cons y (init v)) (v (last _))) = p x (m + 2) (cons y v)
rw [β cons_snoc_eq_snoc_cons, snoc_init_self]
Β· intro m (hm : (m : ββ) β€ n)
- suffices A : ContinuousOn (p Β· (m + 1)) s
- Β· exact ((continuousMultilinearCurryRightEquiv' π m E F).symm).continuous.comp_continuousOn A
+ suffices A : ContinuousOn (p Β· (m + 1)) s from
+ ((continuousMultilinearCurryRightEquiv' π m E F).symm).continuous.comp_continuousOn A
refine H.cont _ ?_
rw [Nat.cast_le] at hm β’
exact Nat.succ_le_succ hm
See here on Zulip.
This adds some general lemmas due to Junyan Xu, culminating in
theorem HasFPowerSeriesOnBall.hasSum_iteratedFDeriv {π : Type*} [NontriviallyNormedField π] {E : Type*}
[ NormedAddCommGroup E] [NormedSpace π E] {F : Type*} [NormedAddCommGroup F]
[NormedSpace π F] {p : FormalMultilinearSeries π E F} {f : E β F} {x : E} {r : ββ₯0β}
(h : HasFPowerSeriesOnBall f p x r) [CompleteSpace F] [CharZero π] {y : E} (hy : y β EMetric.ball 0 r) :+1:
HasSum (fun n β¦ (n ! : π)β»ΒΉβ’ (iteratedFDeriv π n f x) fun x β¦ y) (f (x + y))
and uses this to show that the Taylor series of a function that is complex differentiable on an open ball in β converges there to the function; similarly for functions that are holomorphic on all of β:
lemma Complex.hasSum_taylorSeries_on_ball {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
[CompleteSpace E] β¦f : β β Eβ¦ β¦c : ββ¦ β¦r : NNRealβ¦ (hf : DifferentiableOn β f (Metric.ball c βr)) β¦z : ββ¦
(hz : z β Metric.ball c βr) :
HasSum (fun n β¦ (n ! : β)β»ΒΉ β’ (z - c) ^ n β’ iteratedDeriv n f c) (f z)
lemma Complex.taylorSeries_eq_on_ball {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
[CompleteSpace E] β¦f : β β Eβ¦ β¦c : ββ¦ β¦r : NNRealβ¦ (hf : DifferentiableOn β f (Metric.ball c βr)) β¦z : ββ¦
(hz : z β Metric.ball c βr) :
β' (n : β), (n ! : β)β»ΒΉ β’ (z - c) ^ n β’ iteratedDeriv n f c = f z
lemma Complex.taylorSeries_eq_on_ball' β¦c : ββ¦ β¦r : NNRealβ¦ β¦z : ββ¦ (hz : z β Metric.ball c βr) {f : β β β}
(hf : DifferentiableOn β f (Metric.ball c βr)) :
β' (n : β), (n ! : β)β»ΒΉ * iteratedDeriv n f c * (z - c) ^ n = f z
and similar lemmas for EMetric.ball
s and entire functions.
@@ -1520,7 +1520,7 @@ noncomputable def iteratedFDeriv (n : β) (f : E β F) : E β E[Γn]βL[π
ContinuousLinearMap.uncurryLeft (fderiv π rec x)
#align iterated_fderiv iteratedFDeriv
-/-- Formal Taylor series associated to a function within a set. -/
+/-- Formal Taylor series associated to a function. -/
def ftaylorSeries (f : E β F) (x : E) : FormalMultilinearSeries π E F := fun n =>
iteratedFDeriv π n f x
#align ftaylor_series ftaylorSeries
FunLike
to DFunLike
(#9785)
This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.
This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:
sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -891,7 +891,7 @@ theorem iteratedFDerivWithin_one_apply (h : UniqueDiffWithinAt π s x) (m : Fi
theorem Filter.EventuallyEq.iteratedFDerivWithin' (h : fβ =αΆ [π[s] x] f) (ht : t β s) (n : β) :
iteratedFDerivWithin π n fβ t =αΆ [π[s] x] iteratedFDerivWithin π n f t := by
induction' n with n ihn
- Β· exact h.mono fun y hy => FunLike.ext _ _ fun _ => hy
+ Β· exact h.mono fun y hy => DFunLike.ext _ _ fun _ => hy
Β· have : fderivWithin π _ t =αΆ [π[s] x] fderivWithin π _ t := ihn.fderivWithin' ht
apply this.mono
intro y hy
@@ -892,7 +892,7 @@ theorem Filter.EventuallyEq.iteratedFDerivWithin' (h : fβ =αΆ [π[s] x] f) (
iteratedFDerivWithin π n fβ t =αΆ [π[s] x] iteratedFDerivWithin π n f t := by
induction' n with n ihn
Β· exact h.mono fun y hy => FunLike.ext _ _ fun _ => hy
- Β· have : fderivWithin π _ t =αΆ [π[s] x] fderivWithin π _ t := ihn.fderiv_within' ht
+ Β· have : fderivWithin π _ t =αΆ [π[s] x] fderivWithin π _ t := ihn.fderivWithin' ht
apply this.mono
intro y hy
simp only [iteratedFDerivWithin_succ_eq_comp_left, hy, (Β· β Β·)]
Rename
Filter.EventuallyEq.iterated_fderiv_within'
β Filter.EventuallyEq.iteratedFDerivWithin'
contDiffOn_succ_iff_has_fderiv_within
β contDiffOn_succ_iff_hasFDerivWithin
contDiff_succ_iff_has_fderiv
β contDiff_succ_iff_hasFDerivAt
@@ -888,7 +888,7 @@ theorem iteratedFDerivWithin_one_apply (h : UniqueDiffWithinAt π s x) (m : Fi
rfl
#align iterated_fderiv_within_one_apply iteratedFDerivWithin_one_apply
-theorem Filter.EventuallyEq.iterated_fderiv_within' (h : fβ =αΆ [π[s] x] f) (ht : t β s) (n : β) :
+theorem Filter.EventuallyEq.iteratedFDerivWithin' (h : fβ =αΆ [π[s] x] f) (ht : t β s) (n : β) :
iteratedFDerivWithin π n fβ t =αΆ [π[s] x] iteratedFDerivWithin π n f t := by
induction' n with n ihn
Β· exact h.mono fun y hy => FunLike.ext _ _ fun _ => hy
@@ -896,11 +896,11 @@ theorem Filter.EventuallyEq.iterated_fderiv_within' (h : fβ =αΆ [π[s] x] f)
apply this.mono
intro y hy
simp only [iteratedFDerivWithin_succ_eq_comp_left, hy, (Β· β Β·)]
-#align filter.eventually_eq.iterated_fderiv_within' Filter.EventuallyEq.iterated_fderiv_within'
+#align filter.eventually_eq.iterated_fderiv_within' Filter.EventuallyEq.iteratedFDerivWithin'
protected theorem Filter.EventuallyEq.iteratedFDerivWithin (h : fβ =αΆ [π[s] x] f) (n : β) :
iteratedFDerivWithin π n fβ s =αΆ [π[s] x] iteratedFDerivWithin π n f s :=
- h.iterated_fderiv_within' Subset.rfl n
+ h.iteratedFDerivWithin' Subset.rfl n
#align filter.eventually_eq.iterated_fderiv_within Filter.EventuallyEq.iteratedFDerivWithin
/-- If two functions coincide in a neighborhood of `x` within a set `s` and at `x`, then their
@@ -908,7 +908,7 @@ iterated differentials within this set at `x` coincide. -/
theorem Filter.EventuallyEq.iteratedFDerivWithin_eq (h : fβ =αΆ [π[s] x] f) (hx : fβ x = f x)
(n : β) : iteratedFDerivWithin π n fβ s x = iteratedFDerivWithin π n f s x :=
have : fβ =αΆ [π[insert x s] x] f := by simpa [EventuallyEq, hx]
- (this.iterated_fderiv_within' (subset_insert _ _) n).self_of_nhdsWithin (mem_insert _ _)
+ (this.iteratedFDerivWithin' (subset_insert _ _) n).self_of_nhdsWithin (mem_insert _ _)
#align filter.eventually_eq.iterated_fderiv_within_eq Filter.EventuallyEq.iteratedFDerivWithin_eq
/-- If two functions coincide on a set `s`, then their iterated differentials within this set
@@ -1147,7 +1147,7 @@ theorem contDiffOn_succ_iff_fderivWithin {n : β} (hs : UniqueDiffOn π s) :
rwa [fderivWithin_inter (o_open.mem_nhds hy.2)] at A
#align cont_diff_on_succ_iff_fderiv_within contDiffOn_succ_iff_fderivWithin
-theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π s) :
+theorem contDiffOn_succ_iff_hasFDerivWithin {n : β} (hs : UniqueDiffOn π s) :
ContDiffOn π (n + 1 : β) f s β
β f' : E β E βL[π] F, ContDiffOn π n f' s β§ β x, x β s β HasFDerivWithinAt f (f' x) s x := by
rw [contDiffOn_succ_iff_fderivWithin hs]
@@ -1155,7 +1155,7 @@ theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π
rcases h with β¨f', h1, h2β©
refine' β¨fun x hx => (h2 x hx).differentiableWithinAt, fun x hx => _β©
exact (h1 x hx).congr' (fun y hy => (h2 y hy).fderivWithin (hs y hy)) hx
-#align cont_diff_on_succ_iff_has_fderiv_within contDiffOn_succ_iff_has_fderiv_within
+#align cont_diff_on_succ_iff_has_fderiv_within contDiffOn_succ_iff_hasFDerivWithin
/-- 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`. -/
@@ -1502,12 +1502,12 @@ theorem contDiff_iff_forall_nat_le : ContDiff π n f β β m : β, βm β€
#align cont_diff_iff_forall_nat_le contDiff_iff_forall_nat_le
/-- A function is `C^(n+1)` iff it has a `C^n` derivative. -/
-theorem contDiff_succ_iff_has_fderiv {n : β} :
+theorem contDiff_succ_iff_hasFDerivAt {n : β} :
ContDiff π (n + 1 : β) f β
β f' : E β E βL[π] F, ContDiff π n f' β§ β x, HasFDerivAt f (f' x) x := by
simp only [β contDiffOn_univ, β hasFDerivWithinAt_univ,
- contDiffOn_succ_iff_has_fderiv_within uniqueDiffOn_univ, Set.mem_univ, forall_true_left]
-#align cont_diff_succ_iff_has_fderiv contDiff_succ_iff_has_fderiv
+ contDiffOn_succ_iff_hasFDerivWithin uniqueDiffOn_univ, Set.mem_univ, forall_true_left]
+#align cont_diff_succ_iff_has_fderiv contDiff_succ_iff_hasFDerivAt
/-! ### Iterated derivative -/
@@ -180,7 +180,10 @@ variable {π : Type u} [NontriviallyNormedField π] {E : Type uE} [NormedAdd
/-- `HasFTaylorSeriesUpToOn 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
-`HasFDerivWithinAt` but for higher order derivatives. -/
+`HasFDerivWithinAt` but for higher order derivatives.
+
+Notice that `p` does not sum up to `f` on the diagonal (`FormalMultilinearSeries.sum`), even if
+`f` is analytic and `n = β`: an additional `1/m!` factor on the `m`th term is necessary for that. -/
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
@@ -1218,7 +1221,10 @@ theorem ContDiffOn.continuousOn_fderiv_of_isOpen (h : ContDiffOn π n f s) (hs
/-- `HasFTaylorSeriesUpTo 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
-`HasFDerivAt` but for higher order derivatives. -/
+`HasFDerivAt` but for higher order derivatives.
+
+Notice that `p` does not sum up to `f` on the diagonal (`FormalMultilinearSeries.sum`), even if
+`f` is analytic and `n = β`: an addition `1/m!` factor on the `m`th term is necessary for that. -/
structure HasFTaylorSeriesUpTo (n : ββ) (f : E β F) (p : E β FormalMultilinearSeries π E F) :
Prop where
zero_eq : β x, (p x 0).uncurry0 = f x
@@ -1222,8 +1222,8 @@ derivative of `p m` for `m < n`, and is continuous for `m β€ n`. This is a pred
structure HasFTaylorSeriesUpTo (n : ββ) (f : E β F) (p : E β FormalMultilinearSeries π E F) :
Prop where
zero_eq : β x, (p x 0).uncurry0 = f x
- fderiv : β (m : β) (_ : (m : ββ) < n), β x, HasFDerivAt (fun y => p y m) (p x m.succ).curryLeft x
- cont : β (m : β) (_ : (m : ββ) β€ n), Continuous fun x => p x m
+ fderiv : β m : β, (m : ββ) < n β β x, HasFDerivAt (fun y => p y m) (p x m.succ).curryLeft x
+ cont : β m : β, (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) :
Mostly, this means replacing "of_open" by "of_isOpen". A few lemmas names were misleading and are corrected differently. Zulip discussion.
@@ -1156,12 +1156,12 @@ theorem contDiffOn_succ_iff_has_fderiv_within {n : β} (hs : UniqueDiffOn π
/-- 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) :
+theorem contDiffOn_succ_iff_fderiv_of_isOpen {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.uniqueDiffOn]
exact Iff.rfl.and (contDiffOn_congr fun x hx β¦ fderivWithin_of_isOpen hs hx)
-#align cont_diff_on_succ_iff_fderiv_of_open contDiffOn_succ_iff_fderiv_of_open
+#align cont_diff_on_succ_iff_fderiv_of_open contDiffOn_succ_iff_fderiv_of_isOpen
/-- A function is `C^β` on a domain with unique derivatives if and only if it is differentiable
there, and its derivative (expressed with `fderivWithin`) is `C^β`. -/
@@ -1182,11 +1182,11 @@ theorem contDiffOn_top_iff_fderivWithin (hs : UniqueDiffOn π s) :
/-- 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) :
+theorem contDiffOn_top_iff_fderiv_of_isOpen (hs : IsOpen s) :
ContDiffOn π β f s β DifferentiableOn π f s β§ ContDiffOn π β (fun y => fderiv π f y) s := by
rw [contDiffOn_top_iff_fderivWithin hs.uniqueDiffOn]
exact Iff.rfl.and <| contDiffOn_congr fun x hx β¦ fderivWithin_of_isOpen hs hx
-#align cont_diff_on_top_iff_fderiv_of_open contDiffOn_top_iff_fderiv_of_open
+#align cont_diff_on_top_iff_fderiv_of_open contDiffOn_top_iff_fderiv_of_isOpen
protected 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
@@ -1199,20 +1199,20 @@ protected theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : Uni
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) :
+theorem ContDiffOn.fderiv_of_isOpen (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 _ hx => (fderivWithin_of_isOpen hs hx).symm
-#align cont_diff_on.fderiv_of_open ContDiffOn.fderiv_of_open
+#align cont_diff_on.fderiv_of_open ContDiffOn.fderiv_of_isOpen
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)
+theorem ContDiffOn.continuousOn_fderiv_of_isOpen (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
+ ((contDiffOn_succ_iff_fderiv_of_isOpen hs).1 (h.of_le hn)).2.continuousOn
+#align cont_diff_on.continuous_on_fderiv_of_open ContDiffOn.continuousOn_fderiv_of_isOpen
/-! ### Functions with a Taylor series on the whole space -/
@@ -1369,6 +1369,10 @@ theorem ContDiffAt.differentiableAt (h : ContDiffAt π n f x) (hn : 1 β€ n) :
simpa [hn, differentiableWithinAt_univ] using h.differentiableWithinAt
#align cont_diff_at.differentiable_at ContDiffAt.differentiableAt
+nonrec lemma ContDiffAt.contDiffOn {m : β} (h : ContDiffAt π n f x) (hm : m β€ n) :
+ β u β π x, ContDiffOn π m f u := by
+ simpa [nhdsWithin_univ] using h.contDiffOn hm
+
/-- 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 β
exact_mod_cast
tactic with mod_cast
elaborator where possible (#8404)
We still have the exact_mod_cast
tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast
are the ones that don't work using the term elaborator by itself.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -226,7 +226,7 @@ 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), fun m hm β¦ ?_β©β©
- obtain rfl : m = 0 := by exact_mod_cast hm.antisymm (zero_le _)
+ obtain rfl : m = 0 := mod_cast hm.antisymm (zero_le _)
have : EqOn (p Β· 0) ((continuousMultilinearCurryFin0 π E F).symm β f) s := fun x hx β¦
(continuousMultilinearCurryFin0 π E F).eq_symm_apply.2 (H.2 x hx)
rw [continuousOn_congr this, LinearIsometryEquiv.comp_continuousOn_iff]
@@ -3,8 +3,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
-/
-import Mathlib.Analysis.Calculus.FDeriv.Add
-import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
attribute [simp] ... in
-> attribute [local simp] ... in
(#7678)
Mathlib.Logic.Unique contains the line attribute [simp] eq_iff_true_of_subsingleton in ...
:
Despite what the in
part may imply, this adds the lemma to the simp set "globally", including for downstream files; it is likely that attribute [local simp] eq_iff_true_of_subsingleton in ...
was meant instead (or maybe scoped simp
, but I think "scoped" refers to the current namespace). Indeed, the relevant lemma is not marked with @[simp]
for possible slowness: https://github.com/leanprover/std4/blob/846e9e1d6bb534774d1acd2dc430e70987da3c18/Std/Logic.lean#L749. Adding it to the simp set causes the example at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Regression.20in.20simp to slow down.
This PR changes this and fixes the relevant downstream simp
s. There was also one ocurrence of attribute [simp] FullSubcategory.comp_def FullSubcategory.id_def in
in Mathlib.CategoryTheory.Monoidal.Subcategory but that was much easier to fix.
@@ -587,7 +587,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt {n : β} :
change ((p' y 0) (init (@cons 0 (fun _ => E) z 0))) (@cons 0 (fun _ => E) z 0 (last 0)) =
((p' y 0) 0) z
congr
- norm_num
+ norm_num [eq_iff_true_of_subsingleton]
Β· convert (Hp'.mono (inter_subset_left v u)).congr fun x hx => Hp'.zero_eq x hx.1 using 1
Β· ext x y
change p' x 0 (init (@snoc 0 (fun _ : Fin 1 => E) 0 y)) y = p' x 0 0 y
@@ -6,7 +6,6 @@ Authors: SΓ©bastien GouΓ«zel
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.FDeriv.Equiv
-import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
#align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14"
@@ -1163,7 +1163,7 @@ 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.uniqueDiffOn]
- exact Iff.rfl.and (contDiffOn_congr fun x hx β¦ fderivWithin_of_open hs hx)
+ exact Iff.rfl.and (contDiffOn_congr fun x hx β¦ fderivWithin_of_isOpen 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
@@ -1188,7 +1188,7 @@ 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.uniqueDiffOn]
- exact Iff.rfl.and <| contDiffOn_congr fun x hx β¦ fderivWithin_of_open hs hx
+ exact Iff.rfl.and <| contDiffOn_congr fun x hx β¦ fderivWithin_of_isOpen hs hx
#align cont_diff_on_top_iff_fderiv_of_open contDiffOn_top_iff_fderiv_of_open
protected theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : UniqueDiffOn π s)
@@ -1204,7 +1204,7 @@ protected theorem ContDiffOn.fderivWithin (hf : ContDiffOn π n f s) (hs : Uni
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 _ hx => (fderivWithin_of_open hs hx).symm
+ (hf.fderivWithin hs.uniqueDiffOn hmn).congr fun _ hx => (fderivWithin_of_isOpen 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)
@@ -1609,7 +1609,7 @@ theorem iteratedFDerivWithin_of_isOpen (n : β) (hs : IsOpen s) :
rw [iteratedFDeriv_succ_eq_comp_left, iteratedFDerivWithin_succ_eq_comp_left]
dsimp
congr 1
- rw [fderivWithin_of_open hs hx]
+ rw [fderivWithin_of_isOpen hs hx]
apply Filter.EventuallyEq.fderiv_eq
filter_upwards [hs.mem_nhds hx]
exact IH
rcases
, convert
and congrm
(#7725)
Replace rcases(
with rcases (
. Same thing for convert(
and congrm(
. No other change.
@@ -742,7 +742,7 @@ theorem contDiffOn_succ_iff_hasFDerivWithinAt {n : β} :
(β 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β©
+ 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.hasFDerivWithinAt (WithTop.coe_le_coe.2 (Nat.le_add_left 1 n)) hy, _β©
@@ -1019,7 +1019,7 @@ protected theorem ContDiffOn.ftaylorSeriesWithin (h : ContDiffOn π n f s) (hs
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β©
+ 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
@@ -1580,7 +1580,7 @@ theorem support_iteratedFDeriv_subset (n : β) : support (iteratedFDeriv π n
theorem HasCompactSupport.iteratedFDeriv (hf : HasCompactSupport f) (n : β) :
HasCompactSupport (iteratedFDeriv π n f) :=
- isCompact_of_isClosed_subset hf isClosed_closure (tsupport_iteratedFDeriv_subset n)
+ hf.of_isClosed_subset isClosed_closure (tsupport_iteratedFDeriv_subset n)
#align has_compact_support.iterated_fderiv HasCompactSupport.iteratedFDeriv
theorem norm_fderiv_iteratedFDeriv {n : β} :
@@ -1714,7 +1714,7 @@ theorem ContDiff.continuous_fderiv (h : ContDiff π n f) (hn : 1 β€ n) :
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 A : Continuous fun q : (E βL[π] F) Γ E => q.1 q.2 := isBoundedBilinearMap_apply.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
@@ -524,7 +524,7 @@ theorem contDiffWithinAt_insert {y : E} :
simp_rw [ContDiffWithinAt, 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'
+alias β¨ContDiffWithinAt.of_insert, ContDiffWithinAt.insert'β© := contDiffWithinAt_insert
#align cont_diff_within_at.of_insert ContDiffWithinAt.of_insert
#align cont_diff_within_at.insert' ContDiffWithinAt.insert'
@@ -813,6 +813,14 @@ theorem iteratedFDerivWithin_succ_eq_comp_left {n : β} :
rfl
#align iterated_fderiv_within_succ_eq_comp_left iteratedFDerivWithin_succ_eq_comp_left
+theorem fderivWithin_iteratedFDerivWithin {s : Set E} {n : β} :
+ fderivWithin π (iteratedFDerivWithin π n f s) s =
+ (continuousMultilinearCurryLeftEquiv π (fun _ : Fin (n + 1) => E) F).symm β
+ iteratedFDerivWithin π (n + 1) f s := by
+ rw [iteratedFDerivWithin_succ_eq_comp_left]
+ ext1 x
+ simp only [Function.comp_apply, LinearIsometryEquiv.symm_apply_apply]
+
theorem norm_fderivWithin_iteratedFDerivWithin {n : β} :
βfderivWithin π (iteratedFDerivWithin π n f s) s xβ =
βiteratedFDerivWithin π (n + 1) f s xβ := by
@@ -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
-
-! This file was ported from Lean 3 source module analysis.calculus.cont_diff_def
-! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Mul
@@ -14,6 +9,8 @@ import Mathlib.Analysis.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
+#align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14"
+
/-!
# Higher differentiability
We already had that the iterated derivative of a compactly supported function is compactly supported, this just makes it a bit more precise by iterating support_fderiv_subset
.
@@ -1561,15 +1561,21 @@ theorem fderiv_iteratedFDeriv {n : β} :
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
+theorem tsupport_iteratedFDeriv_subset (n : β) : tsupport (iteratedFDeriv π n f) β tsupport f := by
induction' n with n IH
Β· rw [iteratedFDeriv_zero_eq_comp]
- apply hf.comp_left
- exact LinearIsometryEquiv.map_zero _
+ exact closure_minimal ((support_comp_subset (LinearIsometryEquiv.map_zero _) _).trans
+ subset_closure) isClosed_closure
Β· rw [iteratedFDeriv_succ_eq_comp_left]
- apply (IH.fderiv π).comp_left
- exact LinearIsometryEquiv.map_zero _
+ exact closure_minimal ((support_comp_subset (LinearIsometryEquiv.map_zero _) _).trans
+ ((support_fderiv_subset π).trans IH)) isClosed_closure
+
+theorem support_iteratedFDeriv_subset (n : β) : support (iteratedFDeriv π n f) β tsupport f :=
+ subset_closure.trans (tsupport_iteratedFDeriv_subset n)
+
+theorem HasCompactSupport.iteratedFDeriv (hf : HasCompactSupport f) (n : β) :
+ HasCompactSupport (iteratedFDeriv π n f) :=
+ isCompact_of_isClosed_subset hf isClosed_closure (tsupport_iteratedFDeriv_subset n)
#align has_compact_support.iterated_fderiv HasCompactSupport.iteratedFDeriv
theorem norm_fderiv_iteratedFDeriv {n : β} :
Co-authored-by: Komyyy <pol_tta@outlook.jp> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@@ -166,8 +166,11 @@ open Classical BigOperators NNReal Topology Filter
local notation "β" => (β€ : ββ)
+/-
+Porting note: These lines are not required in Mathlib4.
attribute [local instance 1001]
NormedAddCommGroup.toAddCommGroup NormedSpace.toModule' AddCommGroup.toAddCommMonoid
+-/
open Set Fin Filter Function
ContMDiff
(#5428)
Instead of fixing a proof "as is", I'm golfing it and moving parts of it to lemmas.
@@ -513,12 +513,15 @@ theorem contDiffWithinAt_inter (h : t β π x) :
contDiffWithinAt_inter' (mem_nhdsWithin_of_mem_nhds h)
#align cont_diff_within_at_inter contDiffWithinAt_inter
+theorem contDiffWithinAt_insert_self :
+ ContDiffWithinAt π n f (insert x s) x β ContDiffWithinAt π n f s x := by
+ simp_rw [ContDiffWithinAt, insert_idem]
+
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]
+ Β· exact contDiffWithinAt_insert_self
+ simp_rw [ContDiffWithinAt, 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'
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
@@ -1253,7 +1253,8 @@ theorem HasFTaylorSeriesUpTo.hasFTaylorSeriesUpToOn (h : HasFTaylorSeriesUpTo n
#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
+ 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
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>
@@ -386,7 +386,7 @@ theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : β} :
((p x).shift m.succ).curryLeft s x := Htaylor.fderivWithin _ A x hx
rw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff'] at this
convert this
- ext (y v)
+ 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 _)))
@@ -1575,7 +1575,7 @@ theorem iteratedFDerivWithin_univ {n : β} :
iteratedFDerivWithin π n f univ = iteratedFDeriv π n f := by
induction' n with n IH
Β· ext x; simp
- Β· ext (x m)
+ Β· ext x m
rw [iteratedFDeriv_succ_apply_left, iteratedFDerivWithin_succ_apply_left, IH, fderivWithin_univ]
#align iterated_fderiv_within_univ iteratedFDerivWithin_univ
@@ -577,6 +577,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
-- Porting note: needed `erw` here.
+ -- https://github.com/leanprover-community/mathlib4/issues/5164
erw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff']
convert (f'_eq_deriv y hy.2).mono (inter_subset_right v u)
rw [β Hp'.zero_eq y hy.1]
@@ -693,7 +693,7 @@ theorem contDiffOn_top : ContDiffOn π β f s β β n : β, ContDiffOn
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]
+ 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 =>
@@ -1087,7 +1087,7 @@ theorem ContDiffWithinAt.differentiableWithinAt_iteratedFDerivWithin {m : β}
simp only [set_eventuallyEq_iff_inf_principal, β nhdsWithin_inter']
rw [β inter_assoc, nhdsWithin_inter_of_mem', β diff_eq_compl_inter, insert_diff_of_mem,
diff_eq_compl_inter]
- exacts[rfl, mem_nhdsWithin_of_mem_nhds (uo.mem_nhds xu)]
+ exacts [rfl, mem_nhdsWithin_of_mem_nhds (uo.mem_nhds xu)]
have B : iteratedFDerivWithin π m f s =αΆ [π x] iteratedFDerivWithin π m f t :=
iteratedFDerivWithin_eventually_congr_set' _ A.symm _
have C : DifferentiableWithinAt π (iteratedFDerivWithin π m f t) t x :=
@@ -1335,6 +1335,11 @@ theorem ContDiffWithinAt.contDiffAt (h : ContDiffWithinAt π n f s x) (hx : s
ContDiffAt π n f x := by rwa [ContDiffAt, β contDiffWithinAt_inter hx, univ_inter]
#align cont_diff_within_at.cont_diff_at ContDiffWithinAt.contDiffAt
+-- porting note: new lemma
+theorem ContDiffOn.contDiffAt (h : ContDiffOn π n f s) (hx : s β π x) :
+ ContDiffAt π n f x :=
+ (h _ (mem_of_mem_nhds hx)).contDiffAt hx
+
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)
Protect HasFTaylorSeriesUpToOn.fderivWithin
,
IsBoundedBilinearMap.fderiv
, and
IsBoundedBilinearMap.fderivWithin
.
Rename
isBoundedBilinearMapSmul
-> isBoundedBilinearMap_smul
;isBoundedBilinearMapMul
-> isBoundedBilinearMap_mul
;isBoundedBilinearMapComp
-> isBoundedBilinearMap_comp
;isBoundedBilinearMapSmulRight
-> isBoundedBilinearMap_smulRight
;isBoundedBilinearMapCompMultilinear
-> isBoundedBilinearMap_compMultilinear
;ContinuousLinearMap.mulLeftRightIsBoundedBilinear
-> ContinuousLinearMap.mulLeftRight_isBoundedBilinear
;nhdsWithin_eq_nhds_within'
-> nhdsWithin_eq_nhdsWithin'
;ContinuousWithinAt.preimage_mem_nhds_within'
-> ContinuousWithinAt.preimage_mem_nhdsWithin'
.Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -187,7 +187,7 @@ derivative of `p m` for `m < n`, and is continuous for `m β€ n`. This is a pred
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 : β, (m : ββ) < n β β x β s,
+ protected fderivWithin : β m : β, (m : ββ) < n β β x β s,
HasFDerivWithinAt (p Β· m) (p x m.succ).curryLeft s x
cont : β m : β, (m : ββ) β€ n β ContinuousOn (p Β· m) s
#align has_ftaylor_series_up_to_on HasFTaylorSeriesUpToOn
Co-authored-by: @semorrison
The unported dependencies are
algebra.order.module
init.core
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
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