analysis.calculus.deriv.slope
β·
Mathlib.Analysis.Calculus.Deriv.Slope
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -153,7 +153,7 @@ theorem HasDerivWithinAt.limsup_norm_slope_le (hf : HasDerivWithinAt f f' s x) (
have B : βαΆ z in π[{x}] x, β(z - x)β»ΒΉ β’ (f z - f x)β β Iio r :=
mem_of_superset self_mem_nhdsWithin (singleton_subset_iff.2 <| by simp [hrβ])
have C := mem_sup.2 β¨A, Bβ©
- rw [β nhdsWithin_union, diff_union_self, nhdsWithin_union, mem_sup] at C
+ rw [β nhdsWithin_union, diff_union_self, nhdsWithin_union, mem_sup] at C
filter_upwards [C.1]
simp only [norm_smul, mem_Iio, norm_inv]
exact fun _ => id
@@ -208,7 +208,7 @@ theorem HasDerivWithinAt.liminf_right_slope_norm_le (hf : HasDerivWithinAt f f'
have := (hf.Ioi_of_Ici.limsup_slope_norm_le hr).Frequently
refine' this.mp (eventually.mono self_mem_nhdsWithin _)
intro z hxz hz
- rwa [Real.norm_eq_abs, abs_of_pos (sub_pos_of_lt hxz)] at hz
+ rwa [Real.norm_eq_abs, abs_of_pos (sub_pos_of_lt hxz)] at hz
#align has_deriv_within_at.liminf_right_slope_norm_le HasDerivWithinAt.liminf_right_slope_norm_le
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2019 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
-import Mathbin.Analysis.Calculus.Deriv.Basic
-import Mathbin.LinearAlgebra.AffineSpace.Slope
+import Analysis.Calculus.Deriv.Basic
+import LinearAlgebra.AffineSpace.Slope
#align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2019 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module analysis.calculus.deriv.slope
-! leanprover-community/mathlib commit f60c6087a7275b72d5db3c5a1d0e19e35a429c0a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.Deriv.Basic
import Mathbin.LinearAlgebra.AffineSpace.Slope
+#align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
+
/-!
# Derivative as the limit of the slope
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -61,6 +61,7 @@ variable {s t : Set π}
variable {L Lβ Lβ : Filter π}
+#print hasDerivAtFilter_iff_tendsto_slope /-
/-- 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`. -/
@@ -76,13 +77,16 @@ theorem hasDerivAtFilter_iff_tendsto_slope {x : π} {L : Filter π} :
simp only [(Β· β Β·)]
rw [smul_sub, β mul_smul, inv_mul_cancel (sub_ne_zero.2 hz), one_smul, slope_def_module]
#align has_deriv_at_filter_iff_tendsto_slope hasDerivAtFilter_iff_tendsto_slope
+-/
+#print hasDerivWithinAt_iff_tendsto_slope /-
theorem hasDerivWithinAt_iff_tendsto_slope :
HasDerivWithinAt f f' s x β Tendsto (slope f x) (π[s \ {x}] x) (π f') :=
by
simp only [HasDerivWithinAt, nhdsWithin, diff_eq, inf_assoc.symm, inf_principal.symm]
exact hasDerivAtFilter_iff_tendsto_slope
#align has_deriv_within_at_iff_tendsto_slope hasDerivWithinAt_iff_tendsto_slope
+-/
#print hasDerivWithinAt_iff_tendsto_slope' /-
theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x β s) :
@@ -93,9 +97,11 @@ theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x β s) :
#align has_deriv_within_at_iff_tendsto_slope' hasDerivWithinAt_iff_tendsto_slope'
-/
+#print hasDerivAt_iff_tendsto_slope /-
theorem hasDerivAt_iff_tendsto_slope : HasDerivAt f f' x β Tendsto (slope f x) (π[β ] x) (π f') :=
hasDerivAtFilter_iff_tendsto_slope
#align has_deriv_at_iff_tendsto_slope hasDerivAt_iff_tendsto_slope
+-/
end NormedField
@@ -106,20 +112,26 @@ section Real
variable {f : β β β} {f' : β} {s : Set β} {x : β} {r : β}
+#print HasDerivWithinAt.limsup_slope_le /-
theorem HasDerivWithinAt.limsup_slope_le (hf : HasDerivWithinAt f f' s x) (hr : f' < r) :
βαΆ z in π[s \ {x}] x, slope f x z < r :=
hasDerivWithinAt_iff_tendsto_slope.1 hf (IsOpen.mem_nhds isOpen_Iio hr)
#align has_deriv_within_at.limsup_slope_le HasDerivWithinAt.limsup_slope_le
+-/
+#print HasDerivWithinAt.limsup_slope_le' /-
theorem HasDerivWithinAt.limsup_slope_le' (hf : HasDerivWithinAt f f' s x) (hs : x β s)
(hr : f' < r) : βαΆ z in π[s] x, slope f x z < r :=
(hasDerivWithinAt_iff_tendsto_slope' hs).1 hf (IsOpen.mem_nhds isOpen_Iio hr)
#align has_deriv_within_at.limsup_slope_le' HasDerivWithinAt.limsup_slope_le'
+-/
+#print HasDerivWithinAt.liminf_right_slope_le /-
theorem HasDerivWithinAt.liminf_right_slope_le (hf : HasDerivWithinAt f f' (Ici x) x)
(hr : f' < r) : βαΆ z in π[>] x, slope f x z < r :=
(hf.Ioi_of_Ici.limsup_slope_le' (lt_irrefl x) hr).Frequently
#align has_deriv_within_at.liminf_right_slope_le HasDerivWithinAt.liminf_right_slope_le
+-/
end Real
@@ -130,6 +142,7 @@ open Metric
variable {E : Type u} [NormedAddCommGroup E] [NormedSpace β E] {f : β β E} {f' : E} {s : Set β}
{x r : β}
+#print HasDerivWithinAt.limsup_norm_slope_le /-
/-- 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`
@@ -148,7 +161,9 @@ theorem HasDerivWithinAt.limsup_norm_slope_le (hf : HasDerivWithinAt f f' s x) (
simp only [norm_smul, mem_Iio, norm_inv]
exact fun _ => id
#align has_deriv_within_at.limsup_norm_slope_le HasDerivWithinAt.limsup_norm_slope_le
+-/
+#print HasDerivWithinAt.limsup_slope_norm_le /-
/-- 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`
@@ -164,7 +179,9 @@ theorem HasDerivWithinAt.limsup_slope_norm_le (hf : HasDerivWithinAt f f' s x) (
refine' lt_of_le_of_lt (mul_le_mul_of_nonneg_left (norm_sub_norm_le _ _) _) hz
exact inv_nonneg.2 (norm_nonneg _)
#align has_deriv_within_at.limsup_slope_norm_le HasDerivWithinAt.limsup_slope_norm_le
+-/
+#print HasDerivWithinAt.liminf_right_norm_slope_le /-
/-- 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`
@@ -174,7 +191,9 @@ theorem HasDerivWithinAt.liminf_right_norm_slope_le (hf : HasDerivWithinAt f f'
(hr : βf'β < r) : βαΆ z in π[>] x, βz - xββ»ΒΉ * βf z - f xβ < r :=
(hf.Ioi_of_Ici.limsup_norm_slope_le hr).Frequently
#align has_deriv_within_at.liminf_right_norm_slope_le HasDerivWithinAt.liminf_right_norm_slope_le
+-/
+#print HasDerivWithinAt.liminf_right_slope_norm_le /-
/-- 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`
@@ -194,6 +213,7 @@ theorem HasDerivWithinAt.liminf_right_slope_norm_le (hf : HasDerivWithinAt f f'
intro z hxz hz
rwa [Real.norm_eq_abs, abs_of_pos (sub_pos_of_lt hxz)] at hz
#align has_deriv_within_at.liminf_right_slope_norm_le HasDerivWithinAt.liminf_right_slope_norm_le
+-/
end RealSpace
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -88,7 +88,7 @@ theorem hasDerivWithinAt_iff_tendsto_slope :
theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x β s) :
HasDerivWithinAt f f' s x β Tendsto (slope f x) (π[s] x) (π f') :=
by
- convertβ hasDerivWithinAt_iff_tendsto_slope
+ convert β hasDerivWithinAt_iff_tendsto_slope
exact diff_singleton_eq_self hs
#align has_deriv_within_at_iff_tendsto_slope' hasDerivWithinAt_iff_tendsto_slope'
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -143,7 +143,7 @@ theorem HasDerivWithinAt.limsup_norm_slope_le (hf : HasDerivWithinAt f f' s x) (
have B : βαΆ z in π[{x}] x, β(z - x)β»ΒΉ β’ (f z - f x)β β Iio r :=
mem_of_superset self_mem_nhdsWithin (singleton_subset_iff.2 <| by simp [hrβ])
have C := mem_sup.2 β¨A, Bβ©
- rw [β nhdsWithin_union, diff_union_self, nhdsWithin_union, mem_sup] at C
+ rw [β nhdsWithin_union, diff_union_self, nhdsWithin_union, mem_sup] at C
filter_upwards [C.1]
simp only [norm_smul, mem_Iio, norm_inv]
exact fun _ => id
@@ -192,7 +192,7 @@ theorem HasDerivWithinAt.liminf_right_slope_norm_le (hf : HasDerivWithinAt f f'
have := (hf.Ioi_of_Ici.limsup_slope_norm_le hr).Frequently
refine' this.mp (eventually.mono self_mem_nhdsWithin _)
intro z hxz hz
- rwa [Real.norm_eq_abs, abs_of_pos (sub_pos_of_lt hxz)] at hz
+ rwa [Real.norm_eq_abs, abs_of_pos (sub_pos_of_lt hxz)] at hz
#align has_deriv_within_at.liminf_right_slope_norm_le HasDerivWithinAt.liminf_right_slope_norm_le
end RealSpace
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
! This file was ported from Lean 3 source module analysis.calculus.deriv.slope
-! leanprover-community/mathlib commit 3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe
+! leanprover-community/mathlib commit f60c6087a7275b72d5db3c5a1d0e19e35a429c0a
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.LinearAlgebra.AffineSpace.Slope
/-!
# Derivative as the limit of the slope
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
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
mathlib commit https://github.com/leanprover-community/mathlib/commit/88a563b158f59f2983cfad685664da95502e8cdd
@@ -81,12 +81,14 @@ theorem hasDerivWithinAt_iff_tendsto_slope :
exact hasDerivAtFilter_iff_tendsto_slope
#align has_deriv_within_at_iff_tendsto_slope hasDerivWithinAt_iff_tendsto_slope
+#print hasDerivWithinAt_iff_tendsto_slope' /-
theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x β s) :
HasDerivWithinAt f f' s x β Tendsto (slope f x) (π[s] x) (π f') :=
by
convertβ hasDerivWithinAt_iff_tendsto_slope
exact diff_singleton_eq_self hs
#align has_deriv_within_at_iff_tendsto_slope' hasDerivWithinAt_iff_tendsto_slope'
+-/
theorem hasDerivAt_iff_tendsto_slope : HasDerivAt f f' x β Tendsto (slope f x) (π[β ] x) (π f') :=
hasDerivAtFilter_iff_tendsto_slope
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -34,7 +34,7 @@ universe u v w
noncomputable section
-open Classical Topology BigOperators Filter ENNReal
+open scoped Classical Topology BigOperators Filter ENNReal
open Filter Asymptotics Set
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
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)
@@ -37,19 +37,12 @@ open Filter Set
section NormedField
variable {π : Type u} [NontriviallyNormedField π]
-
variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π F]
-
variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π E]
-
variable {f fβ fβ g : π β F}
-
variable {f' fβ' fβ' g' : F}
-
variable {x : π}
-
variable {s t : Set π}
-
variable {L Lβ Lβ : Filter π}
/-- If the domain has dimension one, then FrΓ©chet derivative is equivalent to the classical
Those lemmas have historically been very annoying to use in rw
since all their arguments were implicit. One too many people complained about it on Zulip, so I'm changing them.
Downstream code broken by this change can fix it by adding appropriately many _
s.
Also marks CauSeq.ext
@[ext]
.
Order.BoundedOrder
top_sup_eq
sup_top_eq
bot_sup_eq
sup_bot_eq
top_inf_eq
inf_top_eq
bot_inf_eq
inf_bot_eq
Order.Lattice
sup_idem
sup_comm
sup_assoc
sup_left_idem
sup_right_idem
inf_idem
inf_comm
inf_assoc
inf_left_idem
inf_right_idem
sup_inf_left
sup_inf_right
inf_sup_left
inf_sup_right
Order.MinMax
max_min_distrib_left
max_min_distrib_right
min_max_distrib_left
min_max_distrib_right
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -72,7 +72,7 @@ theorem hasDerivAtFilter_iff_tendsto_slope {x : π} {L : Filter π} :
theorem hasDerivWithinAt_iff_tendsto_slope :
HasDerivWithinAt f f' s x β Tendsto (slope f x) (π[s \ {x}] x) (π f') := by
- simp only [HasDerivWithinAt, nhdsWithin, diff_eq, inf_assoc.symm, inf_principal.symm]
+ simp only [HasDerivWithinAt, nhdsWithin, diff_eq, β inf_assoc, inf_principal.symm]
exact hasDerivAtFilter_iff_tendsto_slope
#align has_deriv_within_at_iff_tendsto_slope hasDerivWithinAt_iff_tendsto_slope
IsSeparable
API (#10286)
isSeparable_iUnion
to an Iff
lemma, restore the original version as IsSeparable.iUnion
;isSeparable_union
and isSeparable_closure
;isSeparable_pi
from [Finite ΞΉ]
to [Countable ΞΉ]
, add IsSeparable.univ_pi
version;Dense.isSeparable_iff
and isSeparable_range
;isSeparable_of_separableSpace_subtype
to IsSeparable.of_subtype
;isSeparable_of_separableSpace
to IsSeparable.of_separableSpace
.@@ -152,7 +152,7 @@ theorem range_deriv_subset_closure_span_image
theorem isSeparable_range_derivWithin [SeparableSpace π] (f : π β F) (s : Set π) :
IsSeparable (range (derivWithin f s)) := by
obtain β¨t, ts, t_count, htβ© : β t, t β s β§ Set.Countable t β§ s β closure t :=
- (isSeparable_of_separableSpace s).exists_countable_dense_subset
+ (IsSeparable.of_separableSpace s).exists_countable_dense_subset
have : s β closure (s β© t) := by rwa [inter_eq_self_of_subset_right ts]
apply IsSeparable.mono _ (range_derivWithin_subset_closure_span_image f this)
exact (Countable.image t_count f).isSeparable.span.closure
Currently, when x
is isolated in the set s
, then fderivWithin k f s x
can be anything. We modify the definition by ensuring that it is equal to 0
in this case. This ensures that the range of derivWithin
is always contained in the closure of the span of the range of f
.
@@ -31,7 +31,7 @@ universe u v w
noncomputable section
-open Topology Filter
+open Topology Filter TopologicalSpace
open Filter Set
section NormedField
@@ -101,6 +101,67 @@ theorem HasDerivAt.tendsto_slope_zero_left [PartialOrder π] (h : HasDerivAt f
Tendsto (fun t β¦ tβ»ΒΉ β’ (f (x + t) - f x)) (π[<] 0) (π f') :=
h.tendsto_slope_zero.mono_left (nhds_left'_le_nhds_ne 0)
+/-- 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_derivWithin_subset_closure_span_image
+ (f : π β F) {s t : Set π} (h : s β closure (s β© t)) :
+ range (derivWithin f s) β closure (Submodule.span π (f '' t)) := by
+ rintro - β¨x, rflβ©
+ rcases eq_or_neBot (π[s \ {x}] x) with H|H
+ Β· simp [derivWithin, fderivWithin, H]
+ exact subset_closure (zero_mem _)
+ by_cases H' : DifferentiableWithinAt π f s x; swap
+ Β· rw [derivWithin_zero_of_not_differentiableWithinAt H']
+ exact subset_closure (zero_mem _)
+ have I : (π[(s β© t) \ {x}] x).NeBot := by
+ rw [β mem_closure_iff_nhdsWithin_neBot] at H β’
+ have A : closure (s \ {x}) β closure (closure (s β© t) \ {x}) :=
+ closure_mono (diff_subset_diff_left h)
+ have B : closure (s β© t) \ {x} β closure ((s β© t) \ {x}) := by
+ convert closure_diff; exact closure_singleton.symm
+ simpa using A.trans (closure_mono B) H
+ have : Tendsto (slope f x) (π[(s β© t) \ {x}] x) (π (derivWithin f s x)) := by
+ apply Tendsto.mono_left (hasDerivWithinAt_iff_tendsto_slope.1 H'.hasDerivWithinAt)
+ rw [inter_comm, inter_diff_assoc]
+ exact nhdsWithin_mono _ (inter_subset_right _ _)
+ rw [β closure_closure, β Submodule.topologicalClosure_coe]
+ apply mem_closure_of_tendsto this
+ filter_upwards [self_mem_nhdsWithin] with y hy
+ simp only [slope, vsub_eq_sub, SetLike.mem_coe]
+ refine Submodule.smul_mem _ _ (Submodule.sub_mem _ ?_ ?_)
+ Β· apply Submodule.le_topologicalClosure
+ apply Submodule.subset_span
+ exact mem_image_of_mem _ hy.1.2
+ Β· apply Submodule.closure_subset_topologicalClosure_span
+ suffices A : f x β closure (f '' (s β© t)) from
+ closure_mono (image_subset _ (inter_subset_right _ _)) A
+ apply ContinuousWithinAt.mem_closure_image
+ apply H'.continuousWithinAt.mono (inter_subset_left _ _)
+ rw [mem_closure_iff_nhdsWithin_neBot]
+ exact I.mono (nhdsWithin_mono _ (diff_subset _ _))
+
+/-- 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 range_deriv_subset_closure_span_image
+ (f : π β F) {t : Set π} (h : Dense t) :
+ range (deriv f) β closure (Submodule.span π (f '' t)) := by
+ rw [β derivWithin_univ]
+ apply range_derivWithin_subset_closure_span_image
+ simp [dense_iff_closure_eq.1 h]
+
+theorem isSeparable_range_derivWithin [SeparableSpace π] (f : π β F) (s : Set π) :
+ IsSeparable (range (derivWithin f s)) := by
+ obtain β¨t, ts, t_count, htβ© : β t, t β s β§ Set.Countable t β§ s β closure t :=
+ (isSeparable_of_separableSpace s).exists_countable_dense_subset
+ have : s β closure (s β© t) := by rwa [inter_eq_self_of_subset_right ts]
+ apply IsSeparable.mono _ (range_derivWithin_subset_closure_span_image f this)
+ exact (Countable.image t_count f).isSeparable.span.closure
+
+theorem isSeparable_range_deriv [SeparableSpace π] (f : π β F) :
+ IsSeparable (range (deriv f)) := by
+ rw [β derivWithin_univ]
+ exact isSeparable_range_derivWithin _ _
+
end NormedField
/-! ### Upper estimates on liminf and limsup -/
@@ -85,6 +85,22 @@ theorem hasDerivAt_iff_tendsto_slope : HasDerivAt f f' x β Tendsto (slope f x)
hasDerivAtFilter_iff_tendsto_slope
#align has_deriv_at_iff_tendsto_slope hasDerivAt_iff_tendsto_slope
+theorem hasDerivAt_iff_tendsto_slope_zero :
+ HasDerivAt f f' x β Tendsto (fun t β¦ tβ»ΒΉ β’ (f (x + t) - f x)) (π[β ] 0) (π f') := by
+ have : π[β ] x = Filter.map (fun t β¦ x + t) (π[β ] 0) := by
+ simp [nhdsWithin, map_add_left_nhds_zero x, Filter.map_inf, add_right_injective x]
+ simp [hasDerivAt_iff_tendsto_slope, this, slope, Function.comp]
+
+alias β¨HasDerivAt.tendsto_slope_zero, _β© := hasDerivAt_iff_tendsto_slope_zero
+
+theorem HasDerivAt.tendsto_slope_zero_right [PartialOrder π] (h : HasDerivAt f f' x) :
+ Tendsto (fun t β¦ tβ»ΒΉ β’ (f (x + t) - f x)) (π[>] 0) (π f') :=
+ h.tendsto_slope_zero.mono_left (nhds_right'_le_nhds_ne 0)
+
+theorem HasDerivAt.tendsto_slope_zero_left [PartialOrder π] (h : HasDerivAt f f' x) :
+ Tendsto (fun t β¦ tβ»ΒΉ β’ (f (x + t) - f x)) (π[<] 0) (π f') :=
+ h.tendsto_slope_zero.mono_left (nhds_left'_le_nhds_ne 0)
+
end NormedField
/-! ### Upper estimates on liminf and limsup -/
@@ -2,15 +2,12 @@
Copyright (c) 2019 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module analysis.calculus.deriv.slope
-! 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.Basic
import Mathlib.LinearAlgebra.AffineSpace.Slope
+#align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
+
/-!
# Derivative as the limit of the slope
@@ -59,17 +59,17 @@ variable {L Lβ Lβ : Filter π}
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 hasDerivAtFilter_iff_tendsto_slope {x : π} {L : Filter π} :
- HasDerivAtFilter f f' x L β Tendsto (slope f x) (L β π ({x}αΆ)) (π f') :=
+ HasDerivAtFilter f f' x L β Tendsto (slope f x) (L β π {x}αΆ) (π f') :=
calc HasDerivAtFilter f f' x L
β Tendsto (fun y β¦ slope f x y - (y - x)β»ΒΉ β’ (y - x) β’ f') L (π 0) := by
simp only [hasDerivAtFilter_iff_tendsto, β norm_inv, β norm_smul,
β tendsto_zero_iff_norm_tendsto_zero, slope_def_module, smul_sub]
- _ β Tendsto (fun y β¦ slope f x y - (y - x)β»ΒΉ β’ (y - x) β’ f') (L β π ({x}αΆ)) (π 0) :=
+ _ β Tendsto (fun y β¦ slope f x y - (y - x)β»ΒΉ β’ (y - x) β’ f') (L β π {x}αΆ) (π 0) :=
.symm <| tendsto_inf_principal_nhds_iff_of_forall_eq <| by simp
- _ β Tendsto (fun y β¦ slope f x y - f') (L β π ({x}αΆ)) (π 0) := tendsto_congr' <| by
+ _ β Tendsto (fun y β¦ slope f x y - f') (L β π {x}αΆ) (π 0) := tendsto_congr' <| by
refine (EqOn.eventuallyEq fun y hy β¦ ?_).filter_mono inf_le_right
rw [inv_smul_smulβ (sub_ne_zero.2 hy) f']
- _ β Tendsto (slope f x) (L β π ({x}αΆ)) (π f') :=
+ _ β Tendsto (slope f x) (L β π {x}αΆ) (π f') :=
by rw [β nhds_translation_sub f', tendsto_comap_iff]; rfl
#align has_deriv_at_filter_iff_tendsto_slope hasDerivAtFilter_iff_tendsto_slope
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