The areas / V15. Real analysis in one variable
Mathlib.Analysis.Calculus.Deriv.Slope
30 declarations. Mathlib docs Β· Source
Derivative as the limit of the slope
In this file we relate the derivative of a function with its definition from a standard
undergraduate course as the limit of the slope (f y - f x) / (y - x) as y tends to π[β ] x.
Since we are talking about functions taking values in a normed space instead of the base field, we
use slope f x y = (y - x)β»ΒΉ β’ (f y - f x) instead of division.
We also prove some estimates on the upper/lower limits of the slope in terms of the derivative.
For a more detailed overview of one-dimensional derivatives in mathlib, see the module docstring of
Mathlib/Analysis/Calculus/Deriv/Basic.lean.
Tags
derivative, slope
Upper estimates on liminf and limsup
theorem hasDerivAtFilter_iff_tendsto_slope E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π} {L : Filter π},
HasDerivAtFilter f f' (L ΓΛ’ pure x) β Filter.Tendsto (slope f x) (L β Filter.principal {x}αΆ) (nhds f')
If the domain has dimension one, then FrΓ©chet derivative is equivalent to the classical
definition with a limit. In this version we have to take the limit along the subset {x}αΆ,
because for y=x the slope equals zero due to the convention 0β»ΒΉ=0.
theorem hasDerivWithinAt_iff_tendsto_slope E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π} {s : Set π},
HasDerivWithinAt f f' s x β Filter.Tendsto (slope f x) (nhdsWithin x (s \ {x})) (nhds f')
theorem hasDerivWithinAt_iff_tendsto_slope' E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π} {s : Set π},
x β s β (HasDerivWithinAt f f' s x β Filter.Tendsto (slope f x) (nhdsWithin x s) (nhds f'))
theorem hasDerivAt_iff_tendsto_slope E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π},
HasDerivAt f f' x β Filter.Tendsto (slope f x) (nhdsWithin x {x}αΆ) (nhds f')
theorem HasDerivAt.tendsto_slope E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π},
HasDerivAt f f' x β Filter.Tendsto (slope f x) (nhdsWithin x {x}αΆ) (nhds f')
Alias of the forward direction of hasDerivAt_iff_tendsto_slope.
theorem hasDerivAt_iff_tendsto_slope_left_right E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π} [inst_3 : LinearOrder π],
HasDerivAt f f' x β
Filter.Tendsto (slope f x) (nhdsWithin x (Set.Iio x)) (nhds f') β§
Filter.Tendsto (slope f x) (nhdsWithin x (Set.Ioi x)) (nhds f')
theorem hasDerivAt_iff_tendsto_slope_zero E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π},
HasDerivAt f f' x β Filter.Tendsto (fun t β¦ tβ»ΒΉ β’ (f (x + t) - f x)) (nhdsWithin 0 {0}αΆ) (nhds f')
theorem HasDerivAt.tendsto_slope_zero E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π},
HasDerivAt f f' x β Filter.Tendsto (fun t β¦ tβ»ΒΉ β’ (f (x + t) - f x)) (nhdsWithin 0 {0}αΆ) (nhds f')
Alias of the forward direction of hasDerivAt_iff_tendsto_slope_zero.
theorem HasDerivAt.tendsto_slope_zero_right E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π} [inst_3 : Preorder π],
HasDerivAt f f' x β Filter.Tendsto (fun t β¦ tβ»ΒΉ β’ (f (x + t) - f x)) (nhdsWithin 0 (Set.Ioi 0)) (nhds f')
theorem HasDerivAt.tendsto_slope_zero_left E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] {f : π β F} {f' : F} {x : π} [inst_3 : Preorder π],
HasDerivAt f f' x β Filter.Tendsto (fun t β¦ tβ»ΒΉ β’ (f (x + t) - f x)) (nhdsWithin 0 (Set.Iio 0)) (nhds f')
theorem range_derivWithin_subset_closure_span_image E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] (f : π β F) {s t : Set π},
s β closure (s β© t) β Set.range (derivWithin f s) β closure β(Submodule.span π (f '' t))
Given a set t such that s β© t is dense in s, then the range of derivWithin f s is
contained in the closure of the submodule spanned by the image of t.
theorem range_deriv_subset_closure_span_image E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] (f : π β F) {t : Set π},
Dense t β Set.range (deriv f) β closure β(Submodule.span π (f '' t))
Given a dense set t, then the range of deriv f is contained in the closure of the submodule
spanned by the image of t.
theorem isSeparable_range_derivWithin E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] [TopologicalSpace.SeparableSpace π] (f : π β F) (s : Set π),
TopologicalSpace.IsSeparable (Set.range (derivWithin f s))
theorem isSeparable_range_deriv E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {F : Type v} [inst_1 : NormedAddCommGroup F]
[inst_2 : NormedSpace π F] [TopologicalSpace.SeparableSpace π] (f : π β F),
TopologicalSpace.IsSeparable (Set.range (deriv f))
theorem HasDerivAt.continuousAt_div E1 #
β {π : Type u} [inst : NontriviallyNormedField π] [inst_1 : DecidableEq π] {f : π β π} {c a : π},
HasDerivAt f a c β ContinuousAt (Function.update (fun x β¦ (f x - f c) / (x - c)) c a) c
theorem HasDerivWithinAt.nonneg_of_monotoneOn E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {x : π} {s : Set π} [inst_1 : LinearOrder π] [IsStrictOrderedRing π]
[OrderTopology π] {g : π β π} {g' : π},
AccPt x (Filter.principal s) β HasDerivWithinAt g g' s x β MonotoneOn g s β 0 β€ g'
If a monotone function has a derivative within a set at a non-isolated point, then this derivative is nonnegative.
theorem MonotoneOn.derivWithin_nonneg E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {x : π} {s : Set π} [inst_1 : LinearOrder π] [IsStrictOrderedRing π]
[OrderTopology π] {g : π β π}, MonotoneOn g s β 0 β€ derivWithin g s x
The derivative within a set of a monotone function is nonnegative.
theorem HasDerivAt.nonneg_of_monotone E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {x : π} [inst_1 : LinearOrder π] [IsStrictOrderedRing π]
[OrderTopology π] {g : π β π} {g' : π}, HasDerivAt g g' x β Monotone g β 0 β€ g'
If a monotone function has a derivative, then this derivative is nonnegative.
theorem Monotone.deriv_nonneg E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {x : π} [inst_1 : LinearOrder π] [IsStrictOrderedRing π]
[OrderTopology π] {g : π β π}, Monotone g β 0 β€ deriv g x
The derivative of a monotone function is nonnegative.
theorem HasDerivWithinAt.nonpos_of_antitoneOn E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {x : π} {s : Set π} [inst_1 : LinearOrder π] [IsStrictOrderedRing π]
[OrderTopology π] {g : π β π} {g' : π},
AccPt x (Filter.principal s) β HasDerivWithinAt g g' s x β AntitoneOn g s β g' β€ 0
If an antitone function has a derivative within a set at a non-isolated point, then this derivative is nonpositive.
theorem AntitoneOn.derivWithin_nonpos E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {x : π} {s : Set π} [inst_1 : LinearOrder π] [IsStrictOrderedRing π]
[OrderTopology π] {g : π β π}, AntitoneOn g s β derivWithin g s x β€ 0
The derivative within a set of an antitone function is nonpositive.
theorem HasDerivAt.nonpos_of_antitone E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {x : π} [inst_1 : LinearOrder π] [IsStrictOrderedRing π]
[OrderTopology π] {g : π β π} {g' : π}, HasDerivAt g g' x β Antitone g β g' β€ 0
If an antitone function has a derivative, then this derivative is nonpositive.
theorem Antitone.deriv_nonpos E1 #
β {π : Type u} [inst : NontriviallyNormedField π] {x : π} [inst_1 : LinearOrder π] [IsStrictOrderedRing π]
[OrderTopology π] {g : π β π}, Antitone g β deriv g x β€ 0
The derivative of an antitone function is nonpositive.
theorem HasDerivWithinAt.limsup_slope_le E1 #
β {f : β β β} {f' : β} {s : Set β} {x r : β},
HasDerivWithinAt f f' s x β f' < r β βαΆ (z : β) in nhdsWithin x (s \ {x}), slope f x z < r
theorem HasDerivWithinAt.limsup_slope_le' E1 #
β {f : β β β} {f' : β} {s : Set β} {x r : β},
HasDerivWithinAt f f' s x β x β s β f' < r β βαΆ (z : β) in nhdsWithin x s, slope f x z < r
theorem HasDerivWithinAt.liminf_right_slope_le E1 #
β {f : β β β} {f' x r : β},
HasDerivWithinAt f f' (Set.Ici x) x β f' < r β βαΆ (z : β) in nhdsWithin x (Set.Ioi x), slope f x z < r
theorem HasDerivWithinAt.limsup_norm_slope_le E1 #
β {E : Type u} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace β E] {f : β β E} {f' : E} {s : Set β} {x r : β},
HasDerivWithinAt f f' s x β βf'β < r β βαΆ (z : β) in nhdsWithin x s, βz - xββ»ΒΉ * βf z - f xβ < r
If f has derivative f' within s at x, then for any r > βf'β the ratio
βf z - f xβ / βz - xβ is less than r in some neighborhood of x within s.
In other words, the limit superior of this ratio as z tends to x along s
is less than or equal to βf'β.
theorem HasDerivWithinAt.limsup_slope_norm_le E2 #
β {E : Type u} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace β E] {f : β β E} {f' : E} {s : Set β} {x r : β},
HasDerivWithinAt f f' s x β βf'β < r β βαΆ (z : β) in nhdsWithin x s, βz - xββ»ΒΉ * (βf zβ - βf xβ) < r
If f has derivative f' within s at x, then for any r > βf'β the ratio
(βf zβ - βf xβ) / βz - xβ is less than r in some neighborhood of x within s.
In other words, the limit superior of this ratio as z tends to x along s
is less than or equal to βf'β.
This lemma is a weaker version of HasDerivWithinAt.limsup_norm_slope_le
where βf zβ - βf xβ is replaced by βf z - f xβ.
theorem HasDerivWithinAt.liminf_right_norm_slope_le E1 #
β {E : Type u} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace β E] {f : β β E} {f' : E} {x r : β},
HasDerivWithinAt f f' (Set.Ici x) x β βf'β < r β βαΆ (z : β) in nhdsWithin x (Set.Ioi x), βz - xββ»ΒΉ * βf z - f xβ < r
If f has derivative f' within (x, +β) at x, then for any r > βf'β the ratio
βf z - f xβ / βz - xβ is frequently less than r as z β x+0.
In other words, the limit inferior of this ratio as z tends to x+0
is less than or equal to βf'β. See also HasDerivWithinAt.limsup_norm_slope_le
for a stronger version using limit superior and any set s.
theorem HasDerivWithinAt.liminf_right_slope_norm_le E1 #
β {E : Type u} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace β E] {f : β β E} {f' : E} {x r : β},
HasDerivWithinAt f f' (Set.Ici x) x β
βf'β < r β βαΆ (z : β) in nhdsWithin x (Set.Ioi x), (z - x)β»ΒΉ * (βf zβ - βf xβ) < r
If f has derivative f' within (x, +β) at x, then for any r > βf'β the ratio
(βf zβ - βf xβ) / (z - x) is frequently less than r as z β x+0.
In other words, the limit inferior of this ratio as z tends to x+0
is less than or equal to βf'β.
See also
HasDerivWithinAt.limsup_norm_slope_lefor a stronger version using limit superior and any sets;HasDerivWithinAt.liminf_right_norm_slope_lefor a stronger version usingβf z - f xpβinstead ofβf zβ - βf xβ.