/-
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Floris van Doorn
-/
module
public import Mathlib.Analysis.Calculus.ContDiff.Comp
/-!
# Higher differentiability in one dimension
The general theory of higher derivatives in Mathlib is developed using the Fréchet derivative
`fderiv`; but for maps defined on the field, the one-dimensional derivative `deriv` is often easier
to use. In this file, we reformulate some higher smoothness results in terms of `deriv`.
## Tags
derivative, differentiability, higher derivative, `C^n`, multilinear, Taylor series, formal series
-/
public section
open scoped ContDiff
open Set
variable { F : Type*} [NontriviallyNormedField ] [NormedAddCommGroup F] [NormedSpace F]
{m n : ℕ∞ω} {f : → F} {s : Set }
/-- A function is `C^(n + 1)` on a domain with unique derivatives if and only if it is
differentiable there, and its derivative (formulated with `derivWithin`) is `C^n`. -/
theorem contDiffOn_succ_iff_derivWithin (hs : UniqueDiffOn s) :
ContDiffOn (n + 1) f s ↔
DifferentiableOn f s ∧ (n = ω → AnalyticOn f s) ∧ ContDiffOn n (derivWithin f s) s := by
have : derivWithin f s =
ContinuousLinearMap.toSpanSingletonCLE.symm ∘ fderivWithin f s := by
ext; simp [← fderivWithin_derivWithin]
simp [contDiffOn_succ_iff_fderivWithin hs, this, ContinuousLinearEquiv.comp_contDiffOn_iff]
theorem contDiffOn_one_iff_derivWithin (hs : UniqueDiffOn s) :
ContDiffOn 1 f s ↔ DifferentiableOn f s ∧ ContinuousOn (derivWithin f s) s := by
rw [show (1 : ℕ∞ω) = 0 + 1 from rfl, contDiffOn_succ_iff_derivWithin hs]
simp
theorem contDiffOn_infty_iff_derivWithin (hs : UniqueDiffOn s) :
ContDiffOn ∞ f s ↔ DifferentiableOn f s ∧ ContDiffOn ∞ (derivWithin f s) s := by
rw [show ∞ = ∞ + 1 by rfl, contDiffOn_succ_iff_derivWithin hs]
simp
/-- A function is `C^(n + 1)` on an open domain if and only if it is
differentiable there, and its derivative (formulated with `deriv`) is `C^n`. -/
theorem contDiffOn_succ_iff_deriv_of_isOpen (hs : IsOpen s) :
ContDiffOn (n + 1) f s ↔
DifferentiableOn f s ∧ (n = ω → AnalyticOn f s) ∧ ContDiffOn n (deriv f) s := by
rw [contDiffOn_succ_iff_derivWithin hs.uniqueDiffOn]
exact Iff.rfl.and (Iff.rfl.and (contDiffOn_congr fun _ => derivWithin_of_isOpen hs))
theorem contDiffOn_infty_iff_deriv_of_isOpen (hs : IsOpen s) :
ContDiffOn ∞ f s ↔ DifferentiableOn f s ∧ ContDiffOn ∞ (deriv f) s := by
rw [show ∞ = ∞ + 1 by rfl, contDiffOn_succ_iff_deriv_of_isOpen hs]
simp
protected theorem ContDiffOn.derivWithin (hf : ContDiffOn n f s) (hs : UniqueDiffOn s)
(hmn : m + 1 ≤ n) : ContDiffOn m (derivWithin f s) s :=
((contDiffOn_succ_iff_derivWithin hs).1 (hf.of_le hmn)).2.2
theorem ContDiffOn.deriv_of_isOpen (hf : ContDiffOn n f s) (hs : IsOpen s) (hmn : m + 1 ≤ n) :
ContDiffOn m (deriv f) s :=
(hf.derivWithin hs.uniqueDiffOn hmn).congr fun _ hx => (derivWithin_of_isOpen hs hx).symm
theorem ContDiffOn.continuousOn_derivWithin (h : ContDiffOn n f s) (hs : UniqueDiffOn s)
(hn : 1 ≤ n) : ContinuousOn (derivWithin f s) s := by
rw [show (1 : ℕ∞ω) = 0 + 1 from rfl] at hn
exact ((contDiffOn_succ_iff_derivWithin hs).1 (h.of_le hn)).2.2.continuousOn
theorem ContDiffOn.continuousOn_deriv_of_isOpen (h : ContDiffOn n f s) (hs : IsOpen s)
(hn : 1 ≤ n) : ContinuousOn (deriv f) s := by
rw [show (1 : ℕ∞ω) = 0 + 1 from rfl] at hn
exact ((contDiffOn_succ_iff_deriv_of_isOpen hs).1 (h.of_le hn)).2.2.continuousOn
@[fun_prop]
protected lemma ContDiffWithinAt.derivWithin {x : }
(H : ContDiffWithinAt n f s x) (hs : UniqueDiffOn s)
(hmn : m + 1 ≤ n) (hx : x ∈ s) :
ContDiffWithinAt m (derivWithin f s) s x := by
exact ContDiffWithinAt.comp _ (by fun_prop) (g := fun f ↦ f 1) (t := .univ)
(H.fderivWithin_right hs hmn hx) (fun _ _ ↦ trivial)
/-- A function is `C^(n + 1)` if and only if it is differentiable,
and its derivative (formulated in terms of `deriv`) is `C^n`. -/
theorem contDiff_succ_iff_deriv :
ContDiff (n + 1) f ↔ Differentiable f ∧ (n = ω → AnalyticOn f univ) ∧
ContDiff n (deriv f) := by
simp only [← contDiffOn_univ, contDiffOn_succ_iff_deriv_of_isOpen, isOpen_univ,
differentiableOn_univ]
theorem contDiff_one_iff_deriv :
ContDiff 1 f ↔ Differentiable f ∧ Continuous (deriv f) := by
rw [show (1 : ℕ∞ω) = 0 + 1 from rfl, contDiff_succ_iff_deriv]
simp
theorem contDiff_infty_iff_deriv :
ContDiff ∞ f ↔ Differentiable f ∧ ContDiff ∞ (deriv f) := by
rw [show (∞ : ℕ∞ω) = ∞ + 1 from rfl, contDiff_succ_iff_deriv]
simp
theorem ContDiff.continuous_deriv (h : ContDiff n f) (hn : 1 ≤ n) : Continuous (deriv f) := by
rw [show (1 : ℕ∞ω) = 0 + 1 from rfl] at hn
exact (contDiff_succ_iff_deriv.mp (h.of_le hn)).2.2.continuous
@[fun_prop]
theorem ContDiff.continuous_deriv_one (h : ContDiff 1 f) : Continuous (deriv f) :=
ContDiff.continuous_deriv h (le_refl 1)
@[fun_prop]
theorem ContDiff.differentiable_deriv_two (h : ContDiff 2 f) : Differentiable (deriv f) := by
unfold deriv; fun_prop
@[fun_prop]
protected lemma ContDiffAt.derivWithin {x : } (H : ContDiffAt n f x) (hmn : m + 1 ≤ n) :
ContDiffAt m (deriv f) x := by
simpa using! ContDiffWithinAt.derivWithin (s := .univ) H.contDiffWithinAt (by simp) hmn
@[fun_prop]
theorem ContDiff.deriv' (h : ContDiff (n + 1) f) : ContDiff n (deriv f) := by
unfold deriv; fun_prop
@[fun_prop]
theorem ContDiff.iterate_deriv :
∀ (n : ℕ) {f : → F}, ContDiff ∞ f → ContDiff ∞ (deriv^[n] f)
| 0, _, hf => hf
| n + 1, _, hf => ContDiff.iterate_deriv n (contDiff_infty_iff_deriv.mp hf).2
@[fun_prop]
theorem ContDiff.iterate_deriv' (n : ℕ) :
∀ (k : ℕ) {f : → F}, ContDiff (n + k : ℕ) f → ContDiff n (deriv^[k] f)
| 0, _, hf => hf
| k + 1, _, hf => ContDiff.iterate_deriv' _ k (contDiff_succ_iff_deriv.mp hf).2.2
end
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland