analysis.calculus.iterated_deriv โŸท Mathlib.Analysis.Calculus.IteratedDeriv.Defs

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sรฉbastien Gouรซzel
 -/
 import Analysis.Calculus.Deriv.Comp
-import Analysis.Calculus.ContDiffDef
+import Analysis.Calculus.ContDiff.Defs
 
 #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
 
Diff
@@ -230,7 +230,7 @@ theorem iteratedDerivWithin_succ {x : ๐•œ} (hxs : UniqueDiffWithinAt ๐•œ s x)
   rw [iteratedDerivWithin_eq_iteratedFDerivWithin, iteratedFDerivWithin_succ_apply_left,
     iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_fderivWithin _ hxs, derivWithin]
   change
-    ((ContinuousMultilinearMap.mkPiField ๐•œ (Fin n)
+    ((ContinuousMultilinearMap.mkPiRing ๐•œ (Fin n)
             ((fderivWithin ๐•œ (iteratedDerivWithin n f s) s x : ๐•œ โ†’ F) 1) :
           (Fin n โ†’ ๐•œ) โ†’ F)
         fun i : Fin n => 1) =
Diff
@@ -110,7 +110,7 @@ theorem iteratedFDerivWithin_eq_equiv_comp :
       ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F โˆ˜ iteratedDerivWithin n f s :=
   by
   rw [iteratedDerivWithin_eq_equiv_comp, โ† Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
-    Function.left_id]
+    Function.id_comp]
 #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp
 -/
 
@@ -288,7 +288,7 @@ theorem iteratedFDeriv_eq_equiv_comp :
     iteratedFDeriv ๐•œ n f = ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F โˆ˜ iteratedDeriv n f :=
   by
   rw [iteratedDeriv_eq_equiv_comp, โ† Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
-    Function.left_id]
+    Function.id_comp]
 #align iterated_fderiv_eq_equiv_comp iteratedFDeriv_eq_equiv_comp
 -/
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 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.Deriv.Comp
-import Mathbin.Analysis.Calculus.ContDiffDef
+import Analysis.Calculus.Deriv.Comp
+import Analysis.Calculus.ContDiffDef
 
 #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 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.iterated_deriv
-! 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.Deriv.Comp
 import Mathbin.Analysis.Calculus.ContDiffDef
 
+#align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
+
 /-!
 # One-dimensional iterated derivatives
 
Diff
@@ -78,19 +78,24 @@ def iteratedDerivWithin (n : โ„•) (f : ๐•œ โ†’ F) (s : Set ๐•œ) (x : ๐•œ) : F
 
 variable {n : โ„•} {f : ๐•œ โ†’ F} {s : Set ๐•œ} {x : ๐•œ}
 
+#print iteratedDerivWithin_univ /-
 theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x;
   rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ]
 #align iterated_deriv_within_univ iteratedDerivWithin_univ
+-/
 
 /-! ### Properties of the iterated derivative within a set -/
 
 
+#print iteratedDerivWithin_eq_iteratedFDerivWithin /-
 theorem iteratedDerivWithin_eq_iteratedFDerivWithin :
     iteratedDerivWithin n f s x =
       (iteratedFDerivWithin ๐•œ n f s x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1 :=
   rfl
 #align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin
+-/
 
+#print iteratedDerivWithin_eq_equiv_comp /-
 /-- Write the iterated derivative as the composition of a continuous linear equiv and the iterated
 Frรฉchet derivative -/
 theorem iteratedDerivWithin_eq_equiv_comp :
@@ -98,7 +103,9 @@ theorem iteratedDerivWithin_eq_equiv_comp :
       (ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F).symm โˆ˜ iteratedFDerivWithin ๐•œ n f s :=
   by ext x; rfl
 #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp
+-/
 
+#print iteratedFDerivWithin_eq_equiv_comp /-
 /-- Write the iterated Frรฉchet derivative as the composition of a continuous linear equiv and the
 iterated derivative. -/
 theorem iteratedFDerivWithin_eq_equiv_comp :
@@ -108,6 +115,7 @@ theorem iteratedFDerivWithin_eq_equiv_comp :
   rw [iteratedDerivWithin_eq_equiv_comp, โ† Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
     Function.left_id]
 #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp
+-/
 
 #print iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod /-
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
@@ -128,17 +136,22 @@ theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin :
 #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin
 -/
 
+#print iteratedDerivWithin_zero /-
 @[simp]
 theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x;
   simp [iteratedDerivWithin]
 #align iterated_deriv_within_zero iteratedDerivWithin_zero
+-/
 
+#print iteratedDerivWithin_one /-
 @[simp]
 theorem iteratedDerivWithin_one {x : ๐•œ} (h : UniqueDiffWithinAt ๐•œ s x) :
     iteratedDerivWithin 1 f s x = derivWithin f s x := by
   simp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]; rfl
 #align iterated_deriv_within_one iteratedDerivWithin_one
+-/
 
+#print contDiffOn_of_continuousOn_differentiableOn_deriv /-
 /-- If the first `n` derivatives within a set of a function are continuous, and its first `n-1`
 derivatives are differentiable, then the function is `C^n`. This is not an equivalence in general,
 but this is an equivalence when the set has unique derivatives, see
@@ -152,7 +165,9 @@ theorem contDiffOn_of_continuousOn_differentiableOn_deriv {n : โ„•โˆž}
   ยท simpa [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff]
   ยท simpa [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
 #align cont_diff_on_of_continuous_on_differentiable_on_deriv contDiffOn_of_continuousOn_differentiableOn_deriv
+-/
 
+#print contDiffOn_of_differentiableOn_deriv /-
 /-- To check that a function is `n` times continuously differentiable, it suffices to check that its
 first `n` derivatives are differentiable. This is slightly too strong as the condition we
 require on the `n`-th derivative is differentiability instead of continuity, but it has the
@@ -164,7 +179,9 @@ theorem contDiffOn_of_differentiableOn_deriv {n : โ„•โˆž}
   apply contDiffOn_of_differentiableOn
   simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
 #align cont_diff_on_of_differentiable_on_deriv contDiffOn_of_differentiableOn_deriv
+-/
 
+#print ContDiffOn.continuousOn_iteratedDerivWithin /-
 /-- On a set with unique derivatives, a `C^n` function has derivatives up to `n` which are
 continuous. -/
 theorem ContDiffOn.continuousOn_iteratedDerivWithin {n : โ„•โˆž} {m : โ„•} (h : ContDiffOn ๐•œ n f s)
@@ -172,7 +189,9 @@ theorem ContDiffOn.continuousOn_iteratedDerivWithin {n : โ„•โˆž} {m : โ„•} (h :
   simpa only [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff] using
     h.continuous_on_iterated_fderiv_within hmn hs
 #align cont_diff_on.continuous_on_iterated_deriv_within ContDiffOn.continuousOn_iteratedDerivWithin
+-/
 
+#print ContDiffWithinAt.differentiableWithinAt_iteratedDerivWithin /-
 theorem ContDiffWithinAt.differentiableWithinAt_iteratedDerivWithin {n : โ„•โˆž} {m : โ„•}
     (h : ContDiffWithinAt ๐•œ n f s x) (hmn : (m : โ„•โˆž) < n) (hs : UniqueDiffOn ๐•œ (insert x s)) :
     DifferentiableWithinAt ๐•œ (iteratedDerivWithin m f s) s x := by
@@ -180,7 +199,9 @@ theorem ContDiffWithinAt.differentiableWithinAt_iteratedDerivWithin {n : โ„•โˆž}
     LinearIsometryEquiv.comp_differentiableWithinAt_iff] using
     h.differentiable_within_at_iterated_fderiv_within hmn hs
 #align cont_diff_within_at.differentiable_within_at_iterated_deriv_within ContDiffWithinAt.differentiableWithinAt_iteratedDerivWithin
+-/
 
+#print ContDiffOn.differentiableOn_iteratedDerivWithin /-
 /-- On a set with unique derivatives, a `C^n` function has derivatives less than `n` which are
 differentiable. -/
 theorem ContDiffOn.differentiableOn_iteratedDerivWithin {n : โ„•โˆž} {m : โ„•} (h : ContDiffOn ๐•œ n f s)
@@ -188,7 +209,9 @@ theorem ContDiffOn.differentiableOn_iteratedDerivWithin {n : โ„•โˆž} {m : โ„•} (
     DifferentiableOn ๐•œ (iteratedDerivWithin m f s) s := fun x hx =>
   (h x hx).differentiableWithinAt_iteratedDerivWithin hmn <| by rwa [insert_eq_of_mem hx]
 #align cont_diff_on.differentiable_on_iterated_deriv_within ContDiffOn.differentiableOn_iteratedDerivWithin
+-/
 
+#print contDiffOn_iff_continuousOn_differentiableOn_deriv /-
 /-- The property of being `C^n`, initially defined in terms of the Frรฉchet derivative, can be
 reformulated in terms of the one-dimensional derivative on sets with unique derivatives. -/
 theorem contDiffOn_iff_continuousOn_differentiableOn_deriv {n : โ„•โˆž} (hs : UniqueDiffOn ๐•œ s) :
@@ -199,7 +222,9 @@ theorem contDiffOn_iff_continuousOn_differentiableOn_deriv {n : โ„•โˆž} (hs : Un
   simp only [contDiffOn_iff_continuousOn_differentiableOn hs, iteratedFDerivWithin_eq_equiv_comp,
     LinearIsometryEquiv.comp_continuousOn_iff, LinearIsometryEquiv.comp_differentiableOn_iff]
 #align cont_diff_on_iff_continuous_on_differentiable_on_deriv contDiffOn_iff_continuousOn_differentiableOn_deriv
+-/
 
+#print iteratedDerivWithin_succ /-
 /-- The `n+1`-th iterated derivative within a set with unique derivatives can be obtained by
 differentiating the `n`-th iterated derivative. -/
 theorem iteratedDerivWithin_succ {x : ๐•œ} (hxs : UniqueDiffWithinAt ๐•œ s x) :
@@ -215,7 +240,9 @@ theorem iteratedDerivWithin_succ {x : ๐•œ} (hxs : UniqueDiffWithinAt ๐•œ s x)
       (fderivWithin ๐•œ (iteratedDerivWithin n f s) s x : ๐•œ โ†’ F) 1
   simp
 #align iterated_deriv_within_succ iteratedDerivWithin_succ
+-/
 
+#print iteratedDerivWithin_eq_iterate /-
 /-- The `n`-th iterated derivative within a set with unique derivatives can be obtained by
 iterating `n` times the differentiation operation. -/
 theorem iteratedDerivWithin_eq_iterate {x : ๐•œ} (hs : UniqueDiffOn ๐•œ s) (hx : x โˆˆ s) :
@@ -226,22 +253,28 @@ theorem iteratedDerivWithin_eq_iterate {x : ๐•œ} (hs : UniqueDiffOn ๐•œ s) (hx
   ยท rw [iteratedDerivWithin_succ (hs x hx), Function.iterate_succ']
     exact derivWithin_congr (fun y hy => IH hy) (IH hx)
 #align iterated_deriv_within_eq_iterate iteratedDerivWithin_eq_iterate
+-/
 
+#print iteratedDerivWithin_succ' /-
 /-- The `n+1`-th iterated derivative within a set with unique derivatives can be obtained by
 taking the `n`-th derivative of the derivative. -/
 theorem iteratedDerivWithin_succ' {x : ๐•œ} (hxs : UniqueDiffOn ๐•œ s) (hx : x โˆˆ s) :
     iteratedDerivWithin (n + 1) f s x = (iteratedDerivWithin n (derivWithin f s) s) x := by
   rw [iteratedDerivWithin_eq_iterate hxs hx, iteratedDerivWithin_eq_iterate hxs hx]; rfl
 #align iterated_deriv_within_succ' iteratedDerivWithin_succ'
+-/
 
 /-! ### Properties of the iterated derivative on the whole space -/
 
 
+#print iteratedDeriv_eq_iteratedFDeriv /-
 theorem iteratedDeriv_eq_iteratedFDeriv :
     iteratedDeriv n f x = (iteratedFDeriv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1 :=
   rfl
 #align iterated_deriv_eq_iterated_fderiv iteratedDeriv_eq_iteratedFDeriv
+-/
 
+#print iteratedDeriv_eq_equiv_comp /-
 /-- Write the iterated derivative as the composition of a continuous linear equiv and the iterated
 Frรฉchet derivative -/
 theorem iteratedDeriv_eq_equiv_comp :
@@ -249,7 +282,9 @@ theorem iteratedDeriv_eq_equiv_comp :
       (ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F).symm โˆ˜ iteratedFDeriv ๐•œ n f :=
   by ext x; rfl
 #align iterated_deriv_eq_equiv_comp iteratedDeriv_eq_equiv_comp
+-/
 
+#print iteratedFDeriv_eq_equiv_comp /-
 /-- Write the iterated Frรฉchet derivative as the composition of a continuous linear equiv and the
 iterated derivative. -/
 theorem iteratedFDeriv_eq_equiv_comp :
@@ -258,6 +293,7 @@ theorem iteratedFDeriv_eq_equiv_comp :
   rw [iteratedDeriv_eq_equiv_comp, โ† Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
     Function.left_id]
 #align iterated_fderiv_eq_equiv_comp iteratedFDeriv_eq_equiv_comp
+-/
 
 #print iteratedFDeriv_apply_eq_iteratedDeriv_mul_prod /-
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
@@ -275,14 +311,19 @@ theorem norm_iteratedFDeriv_eq_norm_iteratedDeriv :
 #align norm_iterated_fderiv_eq_norm_iterated_deriv norm_iteratedFDeriv_eq_norm_iteratedDeriv
 -/
 
+#print iteratedDeriv_zero /-
 @[simp]
 theorem iteratedDeriv_zero : iteratedDeriv 0 f = f := by ext x; simp [iteratedDeriv]
 #align iterated_deriv_zero iteratedDeriv_zero
+-/
 
+#print iteratedDeriv_one /-
 @[simp]
 theorem iteratedDeriv_one : iteratedDeriv 1 f = deriv f := by ext x; simp [iteratedDeriv]; rfl
 #align iterated_deriv_one iteratedDeriv_one
+-/
 
+#print contDiff_iff_iteratedDeriv /-
 /-- The property of being `C^n`, initially defined in terms of the Frรฉchet derivative, can be
 reformulated in terms of the one-dimensional derivative. -/
 theorem contDiff_iff_iteratedDeriv {n : โ„•โˆž} :
@@ -293,7 +334,9 @@ theorem contDiff_iff_iteratedDeriv {n : โ„•โˆž} :
   simp only [contDiff_iff_continuous_differentiable, iteratedFDeriv_eq_equiv_comp,
     LinearIsometryEquiv.comp_continuous_iff, LinearIsometryEquiv.comp_differentiable_iff]
 #align cont_diff_iff_iterated_deriv contDiff_iff_iteratedDeriv
+-/
 
+#print contDiff_of_differentiable_iteratedDeriv /-
 /-- To check that a function is `n` times continuously differentiable, it suffices to check that its
 first `n` derivatives are differentiable. This is slightly too strong as the condition we
 require on the `n`-th derivative is differentiability instead of continuity, but it has the
@@ -303,17 +346,23 @@ theorem contDiff_of_differentiable_iteratedDeriv {n : โ„•โˆž}
     (h : โˆ€ m : โ„•, (m : โ„•โˆž) โ‰ค n โ†’ Differentiable ๐•œ (iteratedDeriv m f)) : ContDiff ๐•œ n f :=
   contDiff_iff_iteratedDeriv.2 โŸจfun m hm => (h m hm).Continuous, fun m hm => h m (le_of_lt hm)โŸฉ
 #align cont_diff_of_differentiable_iterated_deriv contDiff_of_differentiable_iteratedDeriv
+-/
 
+#print ContDiff.continuous_iteratedDeriv /-
 theorem ContDiff.continuous_iteratedDeriv {n : โ„•โˆž} (m : โ„•) (h : ContDiff ๐•œ n f)
     (hmn : (m : โ„•โˆž) โ‰ค n) : Continuous (iteratedDeriv m f) :=
   (contDiff_iff_iteratedDeriv.1 h).1 m hmn
 #align cont_diff.continuous_iterated_deriv ContDiff.continuous_iteratedDeriv
+-/
 
+#print ContDiff.differentiable_iteratedDeriv /-
 theorem ContDiff.differentiable_iteratedDeriv {n : โ„•โˆž} (m : โ„•) (h : ContDiff ๐•œ n f)
     (hmn : (m : โ„•โˆž) < n) : Differentiable ๐•œ (iteratedDeriv m f) :=
   (contDiff_iff_iteratedDeriv.1 h).2 m hmn
 #align cont_diff.differentiable_iterated_deriv ContDiff.differentiable_iteratedDeriv
+-/
 
+#print iteratedDeriv_succ /-
 /-- The `n+1`-th iterated derivative can be obtained by differentiating the `n`-th
 iterated derivative. -/
 theorem iteratedDeriv_succ : iteratedDeriv (n + 1) f = deriv (iteratedDeriv n f) :=
@@ -322,7 +371,9 @@ theorem iteratedDeriv_succ : iteratedDeriv (n + 1) f = deriv (iteratedDeriv n f)
   rw [โ† iteratedDerivWithin_univ, โ† iteratedDerivWithin_univ, โ† derivWithin_univ]
   exact iteratedDerivWithin_succ uniqueDiffWithinAt_univ
 #align iterated_deriv_succ iteratedDeriv_succ
+-/
 
+#print iteratedDeriv_eq_iterate /-
 /-- The `n`-th iterated derivative can be obtained by iterating `n` times the
 differentiation operation. -/
 theorem iteratedDeriv_eq_iterate : iteratedDeriv n f = (deriv^[n]) f :=
@@ -332,10 +383,13 @@ theorem iteratedDeriv_eq_iterate : iteratedDeriv n f = (deriv^[n]) f :=
   convert iteratedDerivWithin_eq_iterate uniqueDiffOn_univ (mem_univ x)
   simp [derivWithin_univ]
 #align iterated_deriv_eq_iterate iteratedDeriv_eq_iterate
+-/
 
+#print iteratedDeriv_succ' /-
 /-- The `n+1`-th iterated derivative can be obtained by taking the `n`-th derivative of the
 derivative. -/
 theorem iteratedDeriv_succ' : iteratedDeriv (n + 1) f = iteratedDeriv n (deriv f) := by
   rw [iteratedDeriv_eq_iterate, iteratedDeriv_eq_iterate]; rfl
 #align iterated_deriv_succ' iteratedDeriv_succ'
+-/
 
Diff
@@ -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.iterated_deriv
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
+! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Analysis.Calculus.ContDiffDef
 /-!
 # One-dimensional iterated derivatives
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define the `n`-th derivative of a function `f : ๐•œ โ†’ F` as a function
 `iterated_deriv n f : ๐•œ โ†’ F`, as well as a version on domains `iterated_deriv_within n f s : ๐•œ โ†’ F`,
 and prove their basic properties.
Diff
@@ -58,16 +58,20 @@ variable {F : Type _} [NormedAddCommGroup F] [NormedSpace ๐•œ F]
 
 variable {E : Type _} [NormedAddCommGroup E] [NormedSpace ๐•œ E]
 
+#print iteratedDeriv /-
 /-- The `n`-th iterated derivative of a function from `๐•œ` to `F`, as a function from `๐•œ` to `F`. -/
 def iteratedDeriv (n : โ„•) (f : ๐•œ โ†’ F) (x : ๐•œ) : F :=
   (iteratedFDeriv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1
 #align iterated_deriv iteratedDeriv
+-/
 
+#print iteratedDerivWithin /-
 /-- The `n`-th iterated derivative of a function from `๐•œ` to `F` within a set `s`, as a function
 from `๐•œ` to `F`. -/
 def iteratedDerivWithin (n : โ„•) (f : ๐•œ โ†’ F) (s : Set ๐•œ) (x : ๐•œ) : F :=
   (iteratedFDerivWithin ๐•œ n f s x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1
 #align iterated_deriv_within iteratedDerivWithin
+-/
 
 variable {n : โ„•} {f : ๐•œ โ†’ F} {s : Set ๐•œ} {x : ๐•œ}
 
@@ -102,6 +106,7 @@ theorem iteratedFDerivWithin_eq_equiv_comp :
     Function.left_id]
 #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp
 
+#print iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod /-
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
 multiplied by the product of the `m i`s. -/
 theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n โ†’ ๐•œ} :
@@ -111,11 +116,14 @@ theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n 
   rw [iteratedDerivWithin_eq_iteratedFDerivWithin, โ† ContinuousMultilinearMap.map_smul_univ]
   simp
 #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod
+-/
 
+#print norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin /-
 theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin :
     โ€–iteratedFDerivWithin ๐•œ n f s xโ€– = โ€–iteratedDerivWithin n f s xโ€– := by
   rw [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.norm_map]
 #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin
+-/
 
 @[simp]
 theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x;
@@ -248,17 +256,21 @@ theorem iteratedFDeriv_eq_equiv_comp :
     Function.left_id]
 #align iterated_fderiv_eq_equiv_comp iteratedFDeriv_eq_equiv_comp
 
+#print iteratedFDeriv_apply_eq_iteratedDeriv_mul_prod /-
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
 multiplied by the product of the `m i`s. -/
 theorem iteratedFDeriv_apply_eq_iteratedDeriv_mul_prod {m : Fin n โ†’ ๐•œ} :
     (iteratedFDeriv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) m = (โˆ i, m i) โ€ข iteratedDeriv n f x := by
   rw [iteratedDeriv_eq_iteratedFDeriv, โ† ContinuousMultilinearMap.map_smul_univ]; simp
 #align iterated_fderiv_apply_eq_iterated_deriv_mul_prod iteratedFDeriv_apply_eq_iteratedDeriv_mul_prod
+-/
 
+#print norm_iteratedFDeriv_eq_norm_iteratedDeriv /-
 theorem norm_iteratedFDeriv_eq_norm_iteratedDeriv :
     โ€–iteratedFDeriv ๐•œ n f xโ€– = โ€–iteratedDeriv n f xโ€– := by
   rw [iteratedDeriv_eq_equiv_comp, LinearIsometryEquiv.norm_map]
 #align norm_iterated_fderiv_eq_norm_iterated_deriv norm_iteratedFDeriv_eq_norm_iteratedDeriv
+-/
 
 @[simp]
 theorem iteratedDeriv_zero : iteratedDeriv 0 f = f := by ext x; simp [iteratedDeriv]
Diff
@@ -60,62 +60,62 @@ variable {E : Type _} [NormedAddCommGroup E] [NormedSpace ๐•œ E]
 
 /-- The `n`-th iterated derivative of a function from `๐•œ` to `F`, as a function from `๐•œ` to `F`. -/
 def iteratedDeriv (n : โ„•) (f : ๐•œ โ†’ F) (x : ๐•œ) : F :=
-  (iteratedFderiv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1
+  (iteratedFDeriv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1
 #align iterated_deriv iteratedDeriv
 
 /-- The `n`-th iterated derivative of a function from `๐•œ` to `F` within a set `s`, as a function
 from `๐•œ` to `F`. -/
 def iteratedDerivWithin (n : โ„•) (f : ๐•œ โ†’ F) (s : Set ๐•œ) (x : ๐•œ) : F :=
-  (iteratedFderivWithin ๐•œ n f s x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1
+  (iteratedFDerivWithin ๐•œ n f s x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1
 #align iterated_deriv_within iteratedDerivWithin
 
 variable {n : โ„•} {f : ๐•œ โ†’ F} {s : Set ๐•œ} {x : ๐•œ}
 
 theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x;
-  rw [iteratedDerivWithin, iteratedDeriv, iteratedFderivWithin_univ]
+  rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ]
 #align iterated_deriv_within_univ iteratedDerivWithin_univ
 
 /-! ### Properties of the iterated derivative within a set -/
 
 
-theorem iteratedDerivWithin_eq_iteratedFderivWithin :
+theorem iteratedDerivWithin_eq_iteratedFDerivWithin :
     iteratedDerivWithin n f s x =
-      (iteratedFderivWithin ๐•œ n f s x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1 :=
+      (iteratedFDerivWithin ๐•œ n f s x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1 :=
   rfl
-#align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFderivWithin
+#align iterated_deriv_within_eq_iterated_fderiv_within iteratedDerivWithin_eq_iteratedFDerivWithin
 
 /-- Write the iterated derivative as the composition of a continuous linear equiv and the iterated
 Frรฉchet derivative -/
 theorem iteratedDerivWithin_eq_equiv_comp :
     iteratedDerivWithin n f s =
-      (ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F).symm โˆ˜ iteratedFderivWithin ๐•œ n f s :=
+      (ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F).symm โˆ˜ iteratedFDerivWithin ๐•œ n f s :=
   by ext x; rfl
 #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp
 
 /-- Write the iterated Frรฉchet derivative as the composition of a continuous linear equiv and the
 iterated derivative. -/
-theorem iteratedFderivWithin_eq_equiv_comp :
-    iteratedFderivWithin ๐•œ n f s =
+theorem iteratedFDerivWithin_eq_equiv_comp :
+    iteratedFDerivWithin ๐•œ n f s =
       ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F โˆ˜ iteratedDerivWithin n f s :=
   by
   rw [iteratedDerivWithin_eq_equiv_comp, โ† Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
     Function.left_id]
-#align iterated_fderiv_within_eq_equiv_comp iteratedFderivWithin_eq_equiv_comp
+#align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp
 
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
 multiplied by the product of the `m i`s. -/
-theorem iteratedFderivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n โ†’ ๐•œ} :
-    (iteratedFderivWithin ๐•œ n f s x : (Fin n โ†’ ๐•œ) โ†’ F) m =
+theorem iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n โ†’ ๐•œ} :
+    (iteratedFDerivWithin ๐•œ n f s x : (Fin n โ†’ ๐•œ) โ†’ F) m =
       (โˆ i, m i) โ€ข iteratedDerivWithin n f s x :=
   by
-  rw [iteratedDerivWithin_eq_iteratedFderivWithin, โ† ContinuousMultilinearMap.map_smul_univ]
+  rw [iteratedDerivWithin_eq_iteratedFDerivWithin, โ† ContinuousMultilinearMap.map_smul_univ]
   simp
-#align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFderivWithin_apply_eq_iteratedDerivWithin_mul_prod
+#align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFDerivWithin_apply_eq_iteratedDerivWithin_mul_prod
 
-theorem norm_iteratedFderivWithin_eq_norm_iteratedDerivWithin :
-    โ€–iteratedFderivWithin ๐•œ n f s xโ€– = โ€–iteratedDerivWithin n f s xโ€– := by
+theorem norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin :
+    โ€–iteratedFDerivWithin ๐•œ n f s xโ€– = โ€–iteratedDerivWithin n f s xโ€– := by
   rw [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.norm_map]
-#align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFderivWithin_eq_norm_iteratedDerivWithin
+#align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin
 
 @[simp]
 theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x;
@@ -125,7 +125,7 @@ theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x;
 @[simp]
 theorem iteratedDerivWithin_one {x : ๐•œ} (h : UniqueDiffWithinAt ๐•œ s x) :
     iteratedDerivWithin 1 f s x = derivWithin f s x := by
-  simp only [iteratedDerivWithin, iteratedFderivWithin_one_apply h]; rfl
+  simp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]; rfl
 #align iterated_deriv_within_one iteratedDerivWithin_one
 
 /-- If the first `n` derivatives within a set of a function are continuous, and its first `n-1`
@@ -138,8 +138,8 @@ theorem contDiffOn_of_continuousOn_differentiableOn_deriv {n : โ„•โˆž}
     ContDiffOn ๐•œ n f s :=
   by
   apply contDiffOn_of_continuousOn_differentiableOn
-  ยท simpa [iteratedFderivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff]
-  ยท simpa [iteratedFderivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
+  ยท simpa [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff]
+  ยท simpa [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
 #align cont_diff_on_of_continuous_on_differentiable_on_deriv contDiffOn_of_continuousOn_differentiableOn_deriv
 
 /-- To check that a function is `n` times continuously differentiable, it suffices to check that its
@@ -151,7 +151,7 @@ theorem contDiffOn_of_differentiableOn_deriv {n : โ„•โˆž}
     (h : โˆ€ m : โ„•, (m : โ„•โˆž) โ‰ค n โ†’ DifferentiableOn ๐•œ (iteratedDerivWithin m f s) s) :
     ContDiffOn ๐•œ n f s := by
   apply contDiffOn_of_differentiableOn
-  simpa only [iteratedFderivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
+  simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
 #align cont_diff_on_of_differentiable_on_deriv contDiffOn_of_differentiableOn_deriv
 
 /-- On a set with unique derivatives, a `C^n` function has derivatives up to `n` which are
@@ -185,7 +185,7 @@ theorem contDiffOn_iff_continuousOn_differentiableOn_deriv {n : โ„•โˆž} (hs : Un
       (โˆ€ m : โ„•, (m : โ„•โˆž) โ‰ค n โ†’ ContinuousOn (iteratedDerivWithin m f s) s) โˆง
         โˆ€ m : โ„•, (m : โ„•โˆž) < n โ†’ DifferentiableOn ๐•œ (iteratedDerivWithin m f s) s :=
   by
-  simp only [contDiffOn_iff_continuousOn_differentiableOn hs, iteratedFderivWithin_eq_equiv_comp,
+  simp only [contDiffOn_iff_continuousOn_differentiableOn hs, iteratedFDerivWithin_eq_equiv_comp,
     LinearIsometryEquiv.comp_continuousOn_iff, LinearIsometryEquiv.comp_differentiableOn_iff]
 #align cont_diff_on_iff_continuous_on_differentiable_on_deriv contDiffOn_iff_continuousOn_differentiableOn_deriv
 
@@ -194,8 +194,8 @@ differentiating the `n`-th iterated derivative. -/
 theorem iteratedDerivWithin_succ {x : ๐•œ} (hxs : UniqueDiffWithinAt ๐•œ s x) :
     iteratedDerivWithin (n + 1) f s x = derivWithin (iteratedDerivWithin n f s) s x :=
   by
-  rw [iteratedDerivWithin_eq_iteratedFderivWithin, iteratedFderivWithin_succ_apply_left,
-    iteratedFderivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_fderivWithin _ hxs, derivWithin]
+  rw [iteratedDerivWithin_eq_iteratedFDerivWithin, iteratedFDerivWithin_succ_apply_left,
+    iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_fderivWithin _ hxs, derivWithin]
   change
     ((ContinuousMultilinearMap.mkPiField ๐•œ (Fin n)
             ((fderivWithin ๐•œ (iteratedDerivWithin n f s) s x : ๐•œ โ†’ F) 1) :
@@ -226,39 +226,39 @@ theorem iteratedDerivWithin_succ' {x : ๐•œ} (hxs : UniqueDiffOn ๐•œ s) (hx : x
 /-! ### Properties of the iterated derivative on the whole space -/
 
 
-theorem iteratedDeriv_eq_iteratedFderiv :
-    iteratedDeriv n f x = (iteratedFderiv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1 :=
+theorem iteratedDeriv_eq_iteratedFDeriv :
+    iteratedDeriv n f x = (iteratedFDeriv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1 :=
   rfl
-#align iterated_deriv_eq_iterated_fderiv iteratedDeriv_eq_iteratedFderiv
+#align iterated_deriv_eq_iterated_fderiv iteratedDeriv_eq_iteratedFDeriv
 
 /-- Write the iterated derivative as the composition of a continuous linear equiv and the iterated
 Frรฉchet derivative -/
 theorem iteratedDeriv_eq_equiv_comp :
     iteratedDeriv n f =
-      (ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F).symm โˆ˜ iteratedFderiv ๐•œ n f :=
+      (ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F).symm โˆ˜ iteratedFDeriv ๐•œ n f :=
   by ext x; rfl
 #align iterated_deriv_eq_equiv_comp iteratedDeriv_eq_equiv_comp
 
 /-- Write the iterated Frรฉchet derivative as the composition of a continuous linear equiv and the
 iterated derivative. -/
-theorem iteratedFderiv_eq_equiv_comp :
-    iteratedFderiv ๐•œ n f = ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F โˆ˜ iteratedDeriv n f :=
+theorem iteratedFDeriv_eq_equiv_comp :
+    iteratedFDeriv ๐•œ n f = ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F โˆ˜ iteratedDeriv n f :=
   by
   rw [iteratedDeriv_eq_equiv_comp, โ† Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
     Function.left_id]
-#align iterated_fderiv_eq_equiv_comp iteratedFderiv_eq_equiv_comp
+#align iterated_fderiv_eq_equiv_comp iteratedFDeriv_eq_equiv_comp
 
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
 multiplied by the product of the `m i`s. -/
-theorem iteratedFderiv_apply_eq_iteratedDeriv_mul_prod {m : Fin n โ†’ ๐•œ} :
-    (iteratedFderiv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) m = (โˆ i, m i) โ€ข iteratedDeriv n f x := by
-  rw [iteratedDeriv_eq_iteratedFderiv, โ† ContinuousMultilinearMap.map_smul_univ]; simp
-#align iterated_fderiv_apply_eq_iterated_deriv_mul_prod iteratedFderiv_apply_eq_iteratedDeriv_mul_prod
+theorem iteratedFDeriv_apply_eq_iteratedDeriv_mul_prod {m : Fin n โ†’ ๐•œ} :
+    (iteratedFDeriv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) m = (โˆ i, m i) โ€ข iteratedDeriv n f x := by
+  rw [iteratedDeriv_eq_iteratedFDeriv, โ† ContinuousMultilinearMap.map_smul_univ]; simp
+#align iterated_fderiv_apply_eq_iterated_deriv_mul_prod iteratedFDeriv_apply_eq_iteratedDeriv_mul_prod
 
-theorem norm_iteratedFderiv_eq_norm_iteratedDeriv :
-    โ€–iteratedFderiv ๐•œ n f xโ€– = โ€–iteratedDeriv n f xโ€– := by
+theorem norm_iteratedFDeriv_eq_norm_iteratedDeriv :
+    โ€–iteratedFDeriv ๐•œ n f xโ€– = โ€–iteratedDeriv n f xโ€– := by
   rw [iteratedDeriv_eq_equiv_comp, LinearIsometryEquiv.norm_map]
-#align norm_iterated_fderiv_eq_norm_iterated_deriv norm_iteratedFderiv_eq_norm_iteratedDeriv
+#align norm_iterated_fderiv_eq_norm_iterated_deriv norm_iteratedFDeriv_eq_norm_iteratedDeriv
 
 @[simp]
 theorem iteratedDeriv_zero : iteratedDeriv 0 f = f := by ext x; simp [iteratedDeriv]
@@ -275,7 +275,7 @@ theorem contDiff_iff_iteratedDeriv {n : โ„•โˆž} :
       (โˆ€ m : โ„•, (m : โ„•โˆž) โ‰ค n โ†’ Continuous (iteratedDeriv m f)) โˆง
         โˆ€ m : โ„•, (m : โ„•โˆž) < n โ†’ Differentiable ๐•œ (iteratedDeriv m f) :=
   by
-  simp only [contDiff_iff_continuous_differentiable, iteratedFderiv_eq_equiv_comp,
+  simp only [contDiff_iff_continuous_differentiable, iteratedFDeriv_eq_equiv_comp,
     LinearIsometryEquiv.comp_continuous_iff, LinearIsometryEquiv.comp_differentiable_iff]
 #align cont_diff_iff_iterated_deriv contDiff_iff_iteratedDeriv
 
Diff
@@ -48,7 +48,7 @@ iterated Frรฉchet derivative.
 
 noncomputable section
 
-open Classical Topology BigOperators
+open scoped Classical Topology BigOperators
 
 open Filter Asymptotics Set
 
Diff
@@ -71,9 +71,7 @@ def iteratedDerivWithin (n : โ„•) (f : ๐•œ โ†’ F) (s : Set ๐•œ) (x : ๐•œ) : F
 
 variable {n : โ„•} {f : ๐•œ โ†’ F} {s : Set ๐•œ} {x : ๐•œ}
 
-theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f :=
-  by
-  ext x
+theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by ext x;
   rw [iteratedDerivWithin, iteratedDeriv, iteratedFderivWithin_univ]
 #align iterated_deriv_within_univ iteratedDerivWithin_univ
 
@@ -91,9 +89,7 @@ Frรฉchet derivative -/
 theorem iteratedDerivWithin_eq_equiv_comp :
     iteratedDerivWithin n f s =
       (ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F).symm โˆ˜ iteratedFderivWithin ๐•œ n f s :=
-  by
-  ext x
-  rfl
+  by ext x; rfl
 #align iterated_deriv_within_eq_equiv_comp iteratedDerivWithin_eq_equiv_comp
 
 /-- Write the iterated Frรฉchet derivative as the composition of a continuous linear equiv and the
@@ -122,18 +118,14 @@ theorem norm_iteratedFderivWithin_eq_norm_iteratedDerivWithin :
 #align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFderivWithin_eq_norm_iteratedDerivWithin
 
 @[simp]
-theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f :=
-  by
-  ext x
+theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f := by ext x;
   simp [iteratedDerivWithin]
 #align iterated_deriv_within_zero iteratedDerivWithin_zero
 
 @[simp]
 theorem iteratedDerivWithin_one {x : ๐•œ} (h : UniqueDiffWithinAt ๐•œ s x) :
-    iteratedDerivWithin 1 f s x = derivWithin f s x :=
-  by
-  simp only [iteratedDerivWithin, iteratedFderivWithin_one_apply h]
-  rfl
+    iteratedDerivWithin 1 f s x = derivWithin f s x := by
+  simp only [iteratedDerivWithin, iteratedFderivWithin_one_apply h]; rfl
 #align iterated_deriv_within_one iteratedDerivWithin_one
 
 /-- If the first `n` derivatives within a set of a function are continuous, and its first `n-1`
@@ -227,10 +219,8 @@ theorem iteratedDerivWithin_eq_iterate {x : ๐•œ} (hs : UniqueDiffOn ๐•œ s) (hx
 /-- The `n+1`-th iterated derivative within a set with unique derivatives can be obtained by
 taking the `n`-th derivative of the derivative. -/
 theorem iteratedDerivWithin_succ' {x : ๐•œ} (hxs : UniqueDiffOn ๐•œ s) (hx : x โˆˆ s) :
-    iteratedDerivWithin (n + 1) f s x = (iteratedDerivWithin n (derivWithin f s) s) x :=
-  by
-  rw [iteratedDerivWithin_eq_iterate hxs hx, iteratedDerivWithin_eq_iterate hxs hx]
-  rfl
+    iteratedDerivWithin (n + 1) f s x = (iteratedDerivWithin n (derivWithin f s) s) x := by
+  rw [iteratedDerivWithin_eq_iterate hxs hx, iteratedDerivWithin_eq_iterate hxs hx]; rfl
 #align iterated_deriv_within_succ' iteratedDerivWithin_succ'
 
 /-! ### Properties of the iterated derivative on the whole space -/
@@ -246,9 +236,7 @@ Frรฉchet derivative -/
 theorem iteratedDeriv_eq_equiv_comp :
     iteratedDeriv n f =
       (ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F).symm โˆ˜ iteratedFderiv ๐•œ n f :=
-  by
-  ext x
-  rfl
+  by ext x; rfl
 #align iterated_deriv_eq_equiv_comp iteratedDeriv_eq_equiv_comp
 
 /-- Write the iterated Frรฉchet derivative as the composition of a continuous linear equiv and the
@@ -263,10 +251,8 @@ theorem iteratedFderiv_eq_equiv_comp :
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
 multiplied by the product of the `m i`s. -/
 theorem iteratedFderiv_apply_eq_iteratedDeriv_mul_prod {m : Fin n โ†’ ๐•œ} :
-    (iteratedFderiv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) m = (โˆ i, m i) โ€ข iteratedDeriv n f x :=
-  by
-  rw [iteratedDeriv_eq_iteratedFderiv, โ† ContinuousMultilinearMap.map_smul_univ]
-  simp
+    (iteratedFderiv ๐•œ n f x : (Fin n โ†’ ๐•œ) โ†’ F) m = (โˆ i, m i) โ€ข iteratedDeriv n f x := by
+  rw [iteratedDeriv_eq_iteratedFderiv, โ† ContinuousMultilinearMap.map_smul_univ]; simp
 #align iterated_fderiv_apply_eq_iterated_deriv_mul_prod iteratedFderiv_apply_eq_iteratedDeriv_mul_prod
 
 theorem norm_iteratedFderiv_eq_norm_iteratedDeriv :
@@ -275,18 +261,11 @@ theorem norm_iteratedFderiv_eq_norm_iteratedDeriv :
 #align norm_iterated_fderiv_eq_norm_iterated_deriv norm_iteratedFderiv_eq_norm_iteratedDeriv
 
 @[simp]
-theorem iteratedDeriv_zero : iteratedDeriv 0 f = f :=
-  by
-  ext x
-  simp [iteratedDeriv]
+theorem iteratedDeriv_zero : iteratedDeriv 0 f = f := by ext x; simp [iteratedDeriv]
 #align iterated_deriv_zero iteratedDeriv_zero
 
 @[simp]
-theorem iteratedDeriv_one : iteratedDeriv 1 f = deriv f :=
-  by
-  ext x
-  simp [iteratedDeriv]
-  rfl
+theorem iteratedDeriv_one : iteratedDeriv 1 f = deriv f := by ext x; simp [iteratedDeriv]; rfl
 #align iterated_deriv_one iteratedDeriv_one
 
 /-- The property of being `C^n`, initially defined in terms of the Frรฉchet derivative, can be
@@ -341,9 +320,7 @@ theorem iteratedDeriv_eq_iterate : iteratedDeriv n f = (deriv^[n]) f :=
 
 /-- The `n+1`-th iterated derivative can be obtained by taking the `n`-th derivative of the
 derivative. -/
-theorem iteratedDeriv_succ' : iteratedDeriv (n + 1) f = iteratedDeriv n (deriv f) :=
-  by
-  rw [iteratedDeriv_eq_iterate, iteratedDeriv_eq_iterate]
-  rfl
+theorem iteratedDeriv_succ' : iteratedDeriv (n + 1) f = iteratedDeriv n (deriv f) := by
+  rw [iteratedDeriv_eq_iterate, iteratedDeriv_eq_iterate]; rfl
 #align iterated_deriv_succ' iteratedDeriv_succ'
 
Diff
@@ -4,11 +4,11 @@ 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.iterated_deriv
-! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
+! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.Analysis.Calculus.Deriv
+import Mathbin.Analysis.Calculus.Deriv.Comp
 import Mathbin.Analysis.Calculus.ContDiffDef
 
 /-!
Diff
@@ -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.iterated_deriv
-! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
+! leanprover-community/mathlib commit 3a69562db5a458db8322b190ec8d9a8bbd8a5b14
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -129,10 +129,10 @@ theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f :=
 #align iterated_deriv_within_zero iteratedDerivWithin_zero
 
 @[simp]
-theorem iteratedDerivWithin_one (hs : UniqueDiffOn ๐•œ s) {x : ๐•œ} (hx : x โˆˆ s) :
+theorem iteratedDerivWithin_one {x : ๐•œ} (h : UniqueDiffWithinAt ๐•œ s x) :
     iteratedDerivWithin 1 f s x = derivWithin f s x :=
   by
-  simp [iteratedDerivWithin, iteratedFderivWithin_one_apply hs hx]
+  simp only [iteratedDerivWithin, iteratedFderivWithin_one_apply h]
   rfl
 #align iterated_deriv_within_one iteratedDerivWithin_one
 
@@ -170,14 +170,20 @@ theorem ContDiffOn.continuousOn_iteratedDerivWithin {n : โ„•โˆž} {m : โ„•} (h :
     h.continuous_on_iterated_fderiv_within hmn hs
 #align cont_diff_on.continuous_on_iterated_deriv_within ContDiffOn.continuousOn_iteratedDerivWithin
 
+theorem ContDiffWithinAt.differentiableWithinAt_iteratedDerivWithin {n : โ„•โˆž} {m : โ„•}
+    (h : ContDiffWithinAt ๐•œ n f s x) (hmn : (m : โ„•โˆž) < n) (hs : UniqueDiffOn ๐•œ (insert x s)) :
+    DifferentiableWithinAt ๐•œ (iteratedDerivWithin m f s) s x := by
+  simpa only [iteratedDerivWithin_eq_equiv_comp,
+    LinearIsometryEquiv.comp_differentiableWithinAt_iff] using
+    h.differentiable_within_at_iterated_fderiv_within hmn hs
+#align cont_diff_within_at.differentiable_within_at_iterated_deriv_within ContDiffWithinAt.differentiableWithinAt_iteratedDerivWithin
+
 /-- On a set with unique derivatives, a `C^n` function has derivatives less than `n` which are
 differentiable. -/
 theorem ContDiffOn.differentiableOn_iteratedDerivWithin {n : โ„•โˆž} {m : โ„•} (h : ContDiffOn ๐•œ n f s)
     (hmn : (m : โ„•โˆž) < n) (hs : UniqueDiffOn ๐•œ s) :
-    DifferentiableOn ๐•œ (iteratedDerivWithin m f s) s := by
-  simpa only [iteratedDerivWithin_eq_equiv_comp,
-    LinearIsometryEquiv.comp_differentiableOn_iff] using
-    h.differentiable_on_iterated_fderiv_within hmn hs
+    DifferentiableOn ๐•œ (iteratedDerivWithin m f s) s := fun x hx =>
+  (h x hx).differentiableWithinAt_iteratedDerivWithin hmn <| by rwa [insert_eq_of_mem hx]
 #align cont_diff_on.differentiable_on_iterated_deriv_within ContDiffOn.differentiableOn_iteratedDerivWithin
 
 /-- The property of being `C^n`, initially defined in terms of the Frรฉchet derivative, can be
@@ -215,7 +221,7 @@ theorem iteratedDerivWithin_eq_iterate {x : ๐•œ} (hs : UniqueDiffOn ๐•œ s) (hx
   induction' n with n IH generalizing x
   ยท simp
   ยท rw [iteratedDerivWithin_succ (hs x hx), Function.iterate_succ']
-    exact derivWithin_congr (hs x hx) (fun y hy => IH hy) (IH hx)
+    exact derivWithin_congr (fun y hy => IH hy) (IH hx)
 #align iterated_deriv_within_eq_iterate iteratedDerivWithin_eq_iterate
 
 /-- The `n+1`-th iterated derivative within a set with unique derivatives can be obtained by
Diff
@@ -4,12 +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.iterated_deriv
-! leanprover-community/mathlib commit d524d0a578db1146460c1aca35bb5db68466347a
+! 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.Deriv
-import Mathbin.Analysis.Calculus.ContDiff
+import Mathbin.Analysis.Calculus.ContDiffDef
 
 /-!
 # One-dimensional iterated derivatives
Diff
@@ -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.iterated_deriv
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit d524d0a578db1146460c1aca35bb5db68466347a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -116,6 +116,11 @@ theorem iteratedFderivWithin_apply_eq_iteratedDerivWithin_mul_prod {m : Fin n 
   simp
 #align iterated_fderiv_within_apply_eq_iterated_deriv_within_mul_prod iteratedFderivWithin_apply_eq_iteratedDerivWithin_mul_prod
 
+theorem norm_iteratedFderivWithin_eq_norm_iteratedDerivWithin :
+    โ€–iteratedFderivWithin ๐•œ n f s xโ€– = โ€–iteratedDerivWithin n f s xโ€– := by
+  rw [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.norm_map]
+#align norm_iterated_fderiv_within_eq_norm_iterated_deriv_within norm_iteratedFderivWithin_eq_norm_iteratedDerivWithin
+
 @[simp]
 theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f :=
   by
@@ -258,6 +263,11 @@ theorem iteratedFderiv_apply_eq_iteratedDeriv_mul_prod {m : Fin n โ†’ ๐•œ} :
   simp
 #align iterated_fderiv_apply_eq_iterated_deriv_mul_prod iteratedFderiv_apply_eq_iteratedDeriv_mul_prod
 
+theorem norm_iteratedFderiv_eq_norm_iteratedDeriv :
+    โ€–iteratedFderiv ๐•œ n f xโ€– = โ€–iteratedDeriv n f xโ€– := by
+  rw [iteratedDeriv_eq_equiv_comp, LinearIsometryEquiv.norm_map]
+#align norm_iterated_fderiv_eq_norm_iterated_deriv norm_iteratedFderiv_eq_norm_iteratedDeriv
+
 @[simp]
 theorem iteratedDeriv_zero : iteratedDeriv 0 f = f :=
   by

Changes in mathlib4

mathlib3
mathlib4
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -50,9 +50,7 @@ open scoped Classical Topology BigOperators
 open Filter Asymptotics Set
 
 variable {๐•œ : Type*} [NontriviallyNormedField ๐•œ]
-
 variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ๐•œ F]
-
 variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ๐•œ E]
 
 /-- The `n`-th iterated derivative of a function from `๐•œ` to `F`, as a function from `๐•œ` to `F`. -/
feat: generalize ContinuousMultilinearLinearMap.mkPiField to mkPiRing (#9910)

This matches the generality of the non-continuous versions.

The norm_smulRight lemma is the only new result.

Diff
@@ -187,7 +187,7 @@ theorem iteratedDerivWithin_succ {x : ๐•œ} (hxs : UniqueDiffWithinAt ๐•œ s x)
     iteratedDerivWithin (n + 1) f s x = derivWithin (iteratedDerivWithin n f s) s x := by
   rw [iteratedDerivWithin_eq_iteratedFDerivWithin, iteratedFDerivWithin_succ_apply_left,
     iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_fderivWithin _ hxs, derivWithin]
-  change ((ContinuousMultilinearMap.mkPiField ๐•œ (Fin n) ((fderivWithin ๐•œ
+  change ((ContinuousMultilinearMap.mkPiRing ๐•œ (Fin n) ((fderivWithin ๐•œ
     (iteratedDerivWithin n f s) s x : ๐•œ โ†’ F) 1) : (Fin n โ†’ ๐•œ) โ†’ F) fun i : Fin n => 1) =
     (fderivWithin ๐•œ (iteratedDerivWithin n f s) s x : ๐•œ โ†’ F) 1
   simp
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2020 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.Deriv.Comp
+import Mathlib.Analysis.Calculus.Deriv.Basic
 import Mathlib.Analysis.Calculus.ContDiff.Defs
 
 #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
chore(Function): rename some lemmas (#9738)
  • Merge Function.left_id and Function.comp.left_id into Function.id_comp.
  • Merge Function.right_id and Function.comp.right_id into Function.comp_id.
  • Merge Function.comp_const_right and Function.comp_const into Function.comp_const, use explicit arguments.
  • Move Function.const_comp to Mathlib.Init.Function, use explicit arguments.
Diff
@@ -94,7 +94,7 @@ theorem iteratedFDerivWithin_eq_equiv_comp :
     iteratedFDerivWithin ๐•œ n f s =
       ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F โˆ˜ iteratedDerivWithin n f s := by
   rw [iteratedDerivWithin_eq_equiv_comp, โ† Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
-    Function.left_id]
+    Function.id_comp]
 #align iterated_fderiv_within_eq_equiv_comp iteratedFDerivWithin_eq_equiv_comp
 
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
@@ -230,7 +230,7 @@ iterated derivative. -/
 theorem iteratedFDeriv_eq_equiv_comp : iteratedFDeriv ๐•œ n f =
     ContinuousMultilinearMap.piFieldEquiv ๐•œ (Fin n) F โˆ˜ iteratedDeriv n f := by
   rw [iteratedDeriv_eq_equiv_comp, โ† Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
-    Function.left_id]
+    Function.id_comp]
 #align iterated_fderiv_eq_equiv_comp iteratedFDeriv_eq_equiv_comp
 
 /-- The `n`-th Frรฉchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
chore: move Analysis/ContDiff to Analysis/ContDiff/Basic to make room for splitting (#8337)

No changes to content, or splitting, just a rename so there is room for more files.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sรฉbastien Gouรซzel
 -/
 import Mathlib.Analysis.Calculus.Deriv.Comp
-import Mathlib.Analysis.Calculus.ContDiffDef
+import Mathlib.Analysis.Calculus.ContDiff.Defs
 
 #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -49,11 +49,11 @@ open scoped Classical Topology BigOperators
 
 open Filter Asymptotics Set
 
-variable {๐•œ : Type _} [NontriviallyNormedField ๐•œ]
+variable {๐•œ : Type*} [NontriviallyNormedField ๐•œ]
 
-variable {F : Type _} [NormedAddCommGroup F] [NormedSpace ๐•œ F]
+variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ๐•œ F]
 
-variable {E : Type _} [NormedAddCommGroup E] [NormedSpace ๐•œ E]
+variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ๐•œ E]
 
 /-- The `n`-th iterated derivative of a function from `๐•œ` to `F`, as a function from `๐•œ` to `F`. -/
 def iteratedDeriv (n : โ„•) (f : ๐•œ โ†’ F) (x : ๐•œ) : F :=
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 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.iterated_deriv
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.Calculus.Deriv.Comp
 import Mathlib.Analysis.Calculus.ContDiffDef
 
+#align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
+
 /-!
 # One-dimensional iterated derivatives
 
fix precedence of Nat.iterate (#5589)
Diff
@@ -199,7 +199,7 @@ theorem iteratedDerivWithin_succ {x : ๐•œ} (hxs : UniqueDiffWithinAt ๐•œ s x)
 /-- The `n`-th iterated derivative within a set with unique derivatives can be obtained by
 iterating `n` times the differentiation operation. -/
 theorem iteratedDerivWithin_eq_iterate {x : ๐•œ} (hs : UniqueDiffOn ๐•œ s) (hx : x โˆˆ s) :
-    iteratedDerivWithin n f s x = ((fun g : ๐•œ โ†’ F => derivWithin g s)^[n]) f x := by
+    iteratedDerivWithin n f s x = (fun g : ๐•œ โ†’ F => derivWithin g s)^[n] f x := by
   induction' n with n IH generalizing x
   ยท simp
   ยท rw [iteratedDerivWithin_succ (hs x hx), Function.iterate_succ']
@@ -295,7 +295,7 @@ theorem iteratedDeriv_succ : iteratedDeriv (n + 1) f = deriv (iteratedDeriv n f)
 
 /-- The `n`-th iterated derivative can be obtained by iterating `n` times the
 differentiation operation. -/
-theorem iteratedDeriv_eq_iterate : iteratedDeriv n f = (deriv^[n]) f := by
+theorem iteratedDeriv_eq_iterate : iteratedDeriv n f = deriv^[n] f := by
   ext x
   rw [โ† iteratedDerivWithin_univ]
   convert iteratedDerivWithin_eq_iterate uniqueDiffOn_univ (F := F) (mem_univ x)
feat: port Analysis.Calculus.IteratedDeriv (#4545)

Dependencies 10 + 685

686 files ported (98.6%)
305723 lines ported (98.3%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file