|
|
|
|
Quelle RCLike.lean
Sprache: Lean
|
|
/-
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.Defs
public import Mathlib.Analysis.Calculus.MeanValue
/-!
# Higher differentiability over `ℝ` or `ℂ`
-/
public section
open Set Fin Filter
open scoped NNReal Topology
section Real
/-!
### Results over `ℝ` or `ℂ`
The results in this section rely on the Mean Value Theorem, and therefore hold only over `ℝ` (and
its extension fields such as `ℂ`).
-/
variable {n : WithTop ℕ∞} { : Type*} [RCLike ] {E' : Type*} [NormedAddCommGroup E']
[NormedSpace E'] {F' : Type*} [NormedAddCommGroup F'] [NormedSpace F']
/-- If a function has a Taylor series at order at least 1, then at points in the interior of the
domain of definition, the term of order 1 of this series is a strict derivative of `f`. -/
theorem HasFTaylorSeriesUpToOn.hasStrictFDerivAt {n : WithTop ℕ∞}
{s : Set E'} {f : E' → F'} {x : E'}
{p : E' → FormalMultilinearSeries E' F'} (hf : HasFTaylorSeriesUpToOn n f p s) (hn : n ≠ 0)
(hs : s ∈ x) : HasStrictFDerivAt f ((continuousMultilinearCurryFin1 E' F') (p x 1)) x :=
hasStrictFDerivAt_of_hasFDerivAt_of_continuousAt (hf.eventually_hasFDerivAt hn hs) <|
(continuousMultilinearCurryFin1 E' F').continuousAt.comp <|
(hf.cont 1 <| ENat.one_le_iff_ne_zero_withTop.mpr hn).continuousAt hs
/-- If a function is `C^n` with `n ≠ 0` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
theorem ContDiffAt.hasStrictFDerivAt {f : E' → F'} {f' : E' →L[] F'} {x : E'}
(hf : ContDiffAt n f x) (hf' : HasFDerivAt f f' x) (hn : n ≠ 0) :
HasStrictFDerivAt f f' x := by
rcases hf.of_le (ENat.one_le_iff_ne_zero_withTop.mpr hn) 1 le_rfl with ⟨u, H, p, hp⟩
simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
have := hp.hasStrictFDerivAt one_ne_zero H
rwa [hf'.unique this.hasFDerivAt]
/-- If a function is `C^n` with `1 ≤ n` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
theorem ContDiffAt.hasStrictDerivAt {f : → F'} {f' : F'} {x : } (hf : ContDiffAt n f x)
(hf' : HasDerivAt f f' x) (hn : n ≠ 0) : HasStrictDerivAt f f' x :=
hf.hasStrictFDerivAt hf' hn
/-- If a function is `C^n` with `1 ≤ n` around a point, then the derivative of `f` at this point
is also a strict derivative. -/
theorem ContDiffAt.hasStrictFDerivAt_fderiv
{f : E' → F'} {x : E'} (hf : ContDiffAt n f x) (hn : n ≠ 0) :
HasStrictFDerivAt f (fderiv f x) x :=
hf.hasStrictFDerivAt (hf.differentiableAt hn).hasFDerivAt hn
/-- If a function is `C^n` with `1 ≤ n` around a point, then the derivative of `f` at this point
is also a strict derivative. -/
theorem ContDiffAt.hasStrictDerivAt_deriv
{f : → F'} {x : } (hf : ContDiffAt n f x) (hn : n ≠ 0) :
HasStrictDerivAt f (deriv f x) x :=
(hf.hasStrictFDerivAt_fderiv hn).hasStrictDerivAt
@[deprecated (since := "2026-10-13")] alias
ContDiffAt.hasStrictFDerivAt' := ContDiffAt.hasStrictFDerivAt
@[deprecated (since := "2026-10-13")] alias
ContDiffAt.hasStrictDerivAt' := ContDiffAt.hasStrictDerivAt
/-- If a function is `C^n` with `1 ≤ n`, then the derivative of `f` is also a strict derivative. -/
theorem ContDiff.hasStrictFDerivAt {f : E' → F'} {x : E'} (hf : ContDiff n f) (hn : n ≠ 0) :
HasStrictFDerivAt f (fderiv f x) x :=
hf.contDiffAt.hasStrictFDerivAt_fderiv hn
/-- If a function is `C^n` with `1 ≤ n`, then the derivative of `f` is also a strict derivative. -/
theorem ContDiff.hasStrictDerivAt {f : → F'} {x : } (hf : ContDiff n f) (hn : n ≠ 0) :
HasStrictDerivAt f (deriv f x) x :=
hf.contDiffAt.hasStrictDerivAt_deriv hn
variable {E F : Type*}
[NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F}
{p : E → FormalMultilinearSeries ℝ E F} {s : Set E} {x : E}
/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} ∪ s`, where `s` is a convex set,
and `‖p x 1‖₊ < K`, then `f` is `K`-Lipschitz in a neighborhood of `x` within `s`. -/
theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnNorm_lt
(hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex ℝ s) (K : ℝ≥0)
(hK : ‖p x 1‖₊ < K) : ∃ t ∈ [s] x, LipschitzOnWith K f t := by
set f' := fun y => continuousMultilinearCurryFin1 ℝ E F (p y 1)
have hder : ∀ y ∈ s, HasFDerivWithinAt f (f' y) s y := fun y hy =>
(hf.hasFDerivWithinAt one_ne_zero (subset_insert x s hy)).mono (subset_insert x s)
have hcont : ContinuousWithinAt f' s x :=
(continuousMultilinearCurryFin1 ℝ E F).continuousAt.comp_continuousWithinAt
((hf.cont _ le_rfl _ (mem_insert _ _)).mono (subset_insert x s))
replace hK : ‖f' x‖₊ < K := by simpa only [f', LinearIsometryEquiv.nnNorm_map]
exact
hs.exists_nhdsWithin_lipschitzOnWith_of_hasFDerivWithinAt_of_nnNorm_lt
(eventually_nhdsWithin_iff.2 <| Eventually.of_forall hder) hcont K hK
@[deprecated (since := "2026-10-31")]
alias HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt :=
HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnNorm_lt
/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} ∪ s`, where `s` is a convex set,
then `f` is Lipschitz in a neighborhood of `x` within `s`. -/
theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith
(hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex ℝ s) :
∃ K, ∃ t ∈ [s] x, LipschitzOnWith K f t :=
(exists_gt _).imp <| hf.exists_lipschitzOnWith_of_nnNorm_lt hs
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith
(hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
∃ K : ℝ≥0, ∃ t ∈ [s] x, LipschitzOnWith K f t := by
rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
rcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩
replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s) := hp.mono hε
clear hst hε t
rw [← insert_eq_of_mem (Metric.mem_ball_self ε0), ← insert_inter_distrib] at hp
rcases hp.exists_lipschitzOnWith ((convex_ball _ _).inter hs) with ⟨K, t, hst, hft⟩
rw [inter_comm, ← nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ ε0)] at hst
exact ⟨K, t, hst, hft⟩
/-- If `f` is `C^1` at `x` and `K > ‖fderiv f x‖`, then `f` is `K`-Lipschitz in a neighborhood of
`x`. -/
theorem ContDiffAt.exists_lipschitzOnWith_of_nnNorm_lt {f : E' → F'} {x : E'}
(hf : ContDiffAt 1 f x) (K : ℝ≥0) (hK : ‖fderiv f x‖₊ < K) :
∃ t ∈ x, LipschitzOnWith K f t :=
(hf.hasStrictFDerivAt_fderiv one_ne_zero).exists_lipschitzOnWith_of_nnNorm_lt K hK
@[deprecated (since := "2026-10-31")]
alias ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt :=
ContDiffAt.exists_lipschitzOnWith_of_nnNorm_lt
/-- If `f` is `C^1` at `x`, then `f` is Lipschitz in a neighborhood of `x`. -/
theorem ContDiffAt.exists_lipschitzOnWith {f : E' → F'} {x : E'} (hf : ContDiffAt 1 f x) :
∃ K, ∃ t ∈ x, LipschitzOnWith K f t :=
(hf.hasStrictFDerivAt_fderiv one_ne_zero).exists_lipschitzOnWith
/-- If `f` is `C¹` on a convex set `s`, it is locally Lipschitz on `s`. -/
lemma ContDiffOn.locallyLipschitzOn {f : E → F} {s : Set E} (hs : Convex ℝ s)
(hf : ContDiffOn ℝ 1 f s) : LocallyLipschitzOn s f := by
intro x hx
obtain ⟨K, t, ht, hf⟩ := ContDiffWithinAt.exists_lipschitzOnWith (hf x hx) hs
use K, t
/-- If `f` is `C¹`, it is locally Lipschitz. -/
lemma ContDiff.locallyLipschitz {f : E' → F'} (hf : ContDiff 1 f) : LocallyLipschitz f := by
intro x
rcases hf.contDiffAt.exists_lipschitzOnWith with ⟨K, t, ht, hf⟩
use K, t
/-- If `f` is `C¹` on a convex compact set `s`, it is Lipschitz on `s`. -/
theorem ContDiffOn.exists_lipschitzOnWith {s : Set E} {f : E → F} {n} (hf : ContDiffOn ℝ n f s)
(hn : n ≠ 0) (hs : Convex ℝ s) (hs' : IsCompact s) :
∃ K, LipschitzOnWith K f s := by
apply LocallyLipschitzOn.exists_lipschitzOnWith_of_compact hs'
exact (hf.of_le <| ENat.one_le_iff_ne_zero_withTop.2 hn).locallyLipschitzOn hs
/-- A `C^n` function with compact support is Lipschitz. -/
theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' → F'}
(hf : HasCompactSupport f) (h'f : ContDiff n f) (hn : n ≠ 0) :
∃ C, LipschitzWith C f := by
obtain ⟨C, hC⟩ := (hf.fderiv ).exists_bound_of_continuous (h'f.continuous_fderiv hn)
refine ⟨.mk (max C 0) (le_max_right _ _), ?_⟩
apply lipschitzWith_of_nnNorm_fderiv_le (h'f.differentiable hn) (fun x ↦ ?_)
simp [← NNReal.coe_le_coe, hC x]
end Real
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|
|
|
|
|