analysis.calculus.deriv.basic
โท
Mathlib.Analysis.Calculus.Deriv.Basic
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
@@ -3,7 +3,7 @@ Copyright (c) 2019 Gabriel Ebner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner, Sรฉbastien Gouรซzel
-/
-import Analysis.Calculus.Fderiv.Basic
+import Analysis.Calculus.FDeriv.Basic
#align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
@@ -355,7 +355,7 @@ theorem HasDerivAtFilter.isBigO_sub_rev (hf : HasDerivAtFilter f f' x L) (hf' :
(fun x' => x' - x) =O[L] fun x' => f x' - f x :=
suffices AntilipschitzWith โf'โโโปยน (smulRight (1 : ๐ โL[๐] ๐) f') from hf.isBigO_sub_rev this
AddMonoidHomClass.antilipschitz_of_bound (smulRight (1 : ๐ โL[๐] ๐) f') fun x => by
- simp [norm_smul, โ div_eq_inv_mul, mul_div_cancel _ (mt norm_eq_zero.1 hf')]
+ simp [norm_smul, โ div_eq_inv_mul, mul_div_cancel_rightโ _ (mt norm_eq_zero.1 hf')]
#align has_deriv_at_filter.is_O_sub_rev HasDerivAtFilter.isBigO_sub_rev
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -703,7 +703,7 @@ theorem derivWithin_Ioi_eq_Ici {E : Type _} [NormedAddCommGroup E] [NormedSpace
simpa using (uniqueDiffOn_Ici x).Eq le_rfl A B
ยท rw [derivWithin_zero_of_not_differentiableWithinAt H,
derivWithin_zero_of_not_differentiableWithinAt]
- rwa [differentiableWithinAt_Ioi_iff_Ici] at H
+ rwa [differentiableWithinAt_Ioi_iff_Ici] at H
#align deriv_within_Ioi_eq_Ici derivWithin_Ioi_eq_Ici
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -659,10 +659,10 @@ theorem derivWithin_inter (ht : t โ ๐ x) : derivWithin f (s โฉ t) x = deri
#align deriv_within_inter derivWithin_inter
-/
-#print derivWithin_of_open /-
-theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x := by
+#print derivWithin_of_isOpen /-
+theorem derivWithin_of_isOpen (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x := by
unfold derivWithin; rw [fderivWithin_of_isOpen hs hx]; rfl
-#align deriv_within_of_open derivWithin_of_open
+#align deriv_within_of_open derivWithin_of_isOpen
-/
#print deriv_mem_iff /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -661,7 +661,7 @@ theorem derivWithin_inter (ht : t โ ๐ x) : derivWithin f (s โฉ t) x = deri
#print derivWithin_of_open /-
theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x := by
- unfold derivWithin; rw [fderivWithin_of_open hs hx]; rfl
+ unfold derivWithin; rw [fderivWithin_of_isOpen hs hx]; rfl
#align deriv_within_of_open derivWithin_of_open
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2019 Gabriel Ebner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner, Sรฉbastien Gouรซzel
-/
-import Mathbin.Analysis.Calculus.Fderiv.Basic
+import Analysis.Calculus.Fderiv.Basic
#align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -513,11 +513,13 @@ theorem HasDerivWithinAt.union (hs : HasDerivWithinAt f f' s x) (ht : HasDerivWi
#align has_deriv_within_at.union HasDerivWithinAt.union
-/
-#print HasDerivWithinAt.nhdsWithin /-
-theorem HasDerivWithinAt.nhdsWithin (h : HasDerivWithinAt f f' s x) (ht : s โ ๐[t] x) :
+/- warning: has_deriv_within_at.nhds_within clashes with has_deriv_within_at.mono_of_mem -> HasDerivWithinAt.mono_of_mem
+Case conversion may be inaccurate. Consider using '#align has_deriv_within_at.nhds_within HasDerivWithinAt.mono_of_memโ'. -/
+#print HasDerivWithinAt.mono_of_mem /-
+theorem HasDerivWithinAt.mono_of_mem (h : HasDerivWithinAt f f' s x) (ht : s โ ๐[t] x) :
HasDerivWithinAt f f' t x :=
(hasDerivWithinAt_inter' ht).1 (h.mono (inter_subset_right _ _))
-#align has_deriv_within_at.nhds_within HasDerivWithinAt.nhdsWithin
+#align has_deriv_within_at.nhds_within HasDerivWithinAt.mono_of_mem
-/
#print HasDerivWithinAt.hasDerivAt /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -251,7 +251,7 @@ theorem hasStrictDerivAt_iff_hasStrictFDerivAt :
#align has_strict_deriv_at_iff_has_strict_fderiv_at hasStrictDerivAt_iff_hasStrictFDerivAt
-/
-alias hasStrictDerivAt_iff_hasStrictFDerivAt โ HasStrictDerivAt.hasStrictFDerivAt _
+alias โจHasStrictDerivAt.hasStrictFDerivAt, _โฉ := hasStrictDerivAt_iff_hasStrictFDerivAt
#align has_strict_deriv_at.has_strict_fderiv_at HasStrictDerivAt.hasStrictFDerivAt
#print hasDerivAt_iff_hasFDerivAt /-
@@ -262,7 +262,7 @@ theorem hasDerivAt_iff_hasFDerivAt {f' : F} :
#align has_deriv_at_iff_has_fderiv_at hasDerivAt_iff_hasFDerivAt
-/
-alias hasDerivAt_iff_hasFDerivAt โ HasDerivAt.hasFDerivAt _
+alias โจHasDerivAt.hasFDerivAt, _โฉ := hasDerivAt_iff_hasFDerivAt
#align has_deriv_at.has_fderiv_at HasDerivAt.hasFDerivAt
#print derivWithin_zero_of_not_differentiableWithinAt /-
@@ -379,7 +379,7 @@ theorem hasDerivWithinAt_congr_set {s t : Set ๐} (h : s =แถ [๐ x] t) :
#align has_deriv_within_at_congr_set hasDerivWithinAt_congr_set
-/
-alias hasDerivWithinAt_congr_set โ HasDerivWithinAt.congr_set _
+alias โจHasDerivWithinAt.congr_set, _โฉ := hasDerivWithinAt_congr_set
#align has_deriv_within_at.congr_set HasDerivWithinAt.congr_set
#print hasDerivWithinAt_diff_singleton /-
@@ -398,7 +398,7 @@ theorem hasDerivWithinAt_Ioi_iff_Ici [PartialOrder ๐] :
#align has_deriv_within_at_Ioi_iff_Ici hasDerivWithinAt_Ioi_iff_Ici
-/
-alias hasDerivWithinAt_Ioi_iff_Ici โ HasDerivWithinAt.Ici_of_Ioi HasDerivWithinAt.Ioi_of_Ici
+alias โจHasDerivWithinAt.Ici_of_Ioi, HasDerivWithinAt.Ioi_of_Iciโฉ := hasDerivWithinAt_Ioi_iff_Ici
#align has_deriv_within_at.Ici_of_Ioi HasDerivWithinAt.Ici_of_Ioi
#align has_deriv_within_at.Ioi_of_Ici HasDerivWithinAt.Ioi_of_Ici
@@ -410,7 +410,7 @@ theorem hasDerivWithinAt_Iio_iff_Iic [PartialOrder ๐] :
#align has_deriv_within_at_Iio_iff_Iic hasDerivWithinAt_Iio_iff_Iic
-/
-alias hasDerivWithinAt_Iio_iff_Iic โ HasDerivWithinAt.Iic_of_Iio HasDerivWithinAt.Iio_of_Iic
+alias โจHasDerivWithinAt.Iic_of_Iio, HasDerivWithinAt.Iio_of_Iicโฉ := hasDerivWithinAt_Iio_iff_Iic
#align has_deriv_within_at.Iic_of_Iio HasDerivWithinAt.Iic_of_Iio
#align has_deriv_within_at.Iio_of_Iic HasDerivWithinAt.Iio_of_Iic
@@ -421,7 +421,7 @@ theorem HasDerivWithinAt.Ioi_iff_Ioo [LinearOrder ๐] [OrderClosedTopology
#align has_deriv_within_at.Ioi_iff_Ioo HasDerivWithinAt.Ioi_iff_Ioo
-/
-alias HasDerivWithinAt.Ioi_iff_Ioo โ HasDerivWithinAt.Ioi_of_Ioo HasDerivWithinAt.Ioo_of_Ioi
+alias โจHasDerivWithinAt.Ioi_of_Ioo, HasDerivWithinAt.Ioo_of_Ioiโฉ := HasDerivWithinAt.Ioi_iff_Ioo
#align has_deriv_within_at.Ioi_of_Ioo HasDerivWithinAt.Ioi_of_Ioo
#align has_deriv_within_at.Ioo_of_Ioi HasDerivWithinAt.Ioo_of_Ioi
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2019 Gabriel Ebner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner, Sรฉbastien Gouรซzel
-
-! This file was ported from Lean 3 source module analysis.calculus.deriv.basic
-! 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.Fderiv.Basic
+#align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
+
/-!
# One-dimensional derivatives
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -176,21 +176,27 @@ variable {s t : Set ๐}
variable {L Lโ Lโ : Filter ๐}
+#print hasFDerivAtFilter_iff_hasDerivAtFilter /-
/-- Expressing `has_fderiv_at_filter f f' x L` in terms of `has_deriv_at_filter` -/
theorem hasFDerivAtFilter_iff_hasDerivAtFilter {f' : ๐ โL[๐] F} :
HasFDerivAtFilter f f' x L โ HasDerivAtFilter f (f' 1) x L := by simp [HasDerivAtFilter]
#align has_fderiv_at_filter_iff_has_deriv_at_filter hasFDerivAtFilter_iff_hasDerivAtFilter
+-/
+#print HasFDerivAtFilter.hasDerivAtFilter /-
theorem HasFDerivAtFilter.hasDerivAtFilter {f' : ๐ โL[๐] F} :
HasFDerivAtFilter f f' x L โ HasDerivAtFilter f (f' 1) x L :=
hasFDerivAtFilter_iff_hasDerivAtFilter.mp
#align has_fderiv_at_filter.has_deriv_at_filter HasFDerivAtFilter.hasDerivAtFilter
+-/
+#print hasFDerivWithinAt_iff_hasDerivWithinAt /-
/-- Expressing `has_fderiv_within_at f f' s x` in terms of `has_deriv_within_at` -/
theorem hasFDerivWithinAt_iff_hasDerivWithinAt {f' : ๐ โL[๐] F} :
HasFDerivWithinAt f f' s x โ HasDerivWithinAt f (f' 1) s x :=
hasFDerivAtFilter_iff_hasDerivAtFilter
#align has_fderiv_within_at_iff_has_deriv_within_at hasFDerivWithinAt_iff_hasDerivWithinAt
+-/
#print hasDerivWithinAt_iff_hasFDerivWithinAt /-
/-- Expressing `has_deriv_within_at f f' s x` in terms of `has_fderiv_within_at` -/
@@ -200,10 +206,12 @@ theorem hasDerivWithinAt_iff_hasFDerivWithinAt {f' : F} :
#align has_deriv_within_at_iff_has_fderiv_within_at hasDerivWithinAt_iff_hasFDerivWithinAt
-/
+#print HasFDerivWithinAt.hasDerivWithinAt /-
theorem HasFDerivWithinAt.hasDerivWithinAt {f' : ๐ โL[๐] F} :
HasFDerivWithinAt f f' s x โ HasDerivWithinAt f (f' 1) s x :=
hasFDerivWithinAt_iff_hasDerivWithinAt.mp
#align has_fderiv_within_at.has_deriv_within_at HasFDerivWithinAt.hasDerivWithinAt
+-/
#print HasDerivWithinAt.hasFDerivWithinAt /-
theorem HasDerivWithinAt.hasFDerivWithinAt {f' : F} :
@@ -212,24 +220,32 @@ theorem HasDerivWithinAt.hasFDerivWithinAt {f' : F} :
#align has_deriv_within_at.has_fderiv_within_at HasDerivWithinAt.hasFDerivWithinAt
-/
+#print hasFDerivAt_iff_hasDerivAt /-
/-- Expressing `has_fderiv_at f f' x` in terms of `has_deriv_at` -/
theorem hasFDerivAt_iff_hasDerivAt {f' : ๐ โL[๐] F} : HasFDerivAt f f' x โ HasDerivAt f (f' 1) x :=
hasFDerivAtFilter_iff_hasDerivAtFilter
#align has_fderiv_at_iff_has_deriv_at hasFDerivAt_iff_hasDerivAt
+-/
+#print HasFDerivAt.hasDerivAt /-
theorem HasFDerivAt.hasDerivAt {f' : ๐ โL[๐] F} : HasFDerivAt f f' x โ HasDerivAt f (f' 1) x :=
hasFDerivAt_iff_hasDerivAt.mp
#align has_fderiv_at.has_deriv_at HasFDerivAt.hasDerivAt
+-/
+#print hasStrictFDerivAt_iff_hasStrictDerivAt /-
theorem hasStrictFDerivAt_iff_hasStrictDerivAt {f' : ๐ โL[๐] F} :
HasStrictFDerivAt f f' x โ HasStrictDerivAt f (f' 1) x := by
simp [HasStrictDerivAt, HasStrictFDerivAt]
#align has_strict_fderiv_at_iff_has_strict_deriv_at hasStrictFDerivAt_iff_hasStrictDerivAt
+-/
+#print HasStrictFDerivAt.hasStrictDerivAt /-
protected theorem HasStrictFDerivAt.hasStrictDerivAt {f' : ๐ โL[๐] F} :
HasStrictFDerivAt f f' x โ HasStrictDerivAt f (f' 1) x :=
hasStrictFDerivAt_iff_hasStrictDerivAt.mp
#align has_strict_fderiv_at.has_strict_deriv_at HasStrictFDerivAt.hasStrictDerivAt
+-/
#print hasStrictDerivAt_iff_hasStrictFDerivAt /-
theorem hasStrictDerivAt_iff_hasStrictFDerivAt :
@@ -252,23 +268,31 @@ theorem hasDerivAt_iff_hasFDerivAt {f' : F} :
alias hasDerivAt_iff_hasFDerivAt โ HasDerivAt.hasFDerivAt _
#align has_deriv_at.has_fderiv_at HasDerivAt.hasFDerivAt
+#print derivWithin_zero_of_not_differentiableWithinAt /-
theorem derivWithin_zero_of_not_differentiableWithinAt (h : ยฌDifferentiableWithinAt ๐ f s x) :
derivWithin f s x = 0 := by unfold derivWithin;
rw [fderivWithin_zero_of_not_differentiableWithinAt]; simp; assumption
#align deriv_within_zero_of_not_differentiable_within_at derivWithin_zero_of_not_differentiableWithinAt
+-/
+#print differentiableWithinAt_of_derivWithin_ne_zero /-
theorem differentiableWithinAt_of_derivWithin_ne_zero (h : derivWithin f s x โ 0) :
DifferentiableWithinAt ๐ f s x :=
not_imp_comm.1 derivWithin_zero_of_not_differentiableWithinAt h
#align differentiable_within_at_of_deriv_within_ne_zero differentiableWithinAt_of_derivWithin_ne_zero
+-/
+#print deriv_zero_of_not_differentiableAt /-
theorem deriv_zero_of_not_differentiableAt (h : ยฌDifferentiableAt ๐ f x) : deriv f x = 0 := by
unfold deriv; rw [fderiv_zero_of_not_differentiableAt]; simp; assumption
#align deriv_zero_of_not_differentiable_at deriv_zero_of_not_differentiableAt
+-/
+#print differentiableAt_of_deriv_ne_zero /-
theorem differentiableAt_of_deriv_ne_zero (h : deriv f x โ 0) : DifferentiableAt ๐ f x :=
not_imp_comm.1 deriv_zero_of_not_differentiableAt h
#align differentiable_at_of_deriv_ne_zero differentiableAt_of_deriv_ne_zero
+-/
#print UniqueDiffWithinAt.eq_deriv /-
theorem UniqueDiffWithinAt.eq_deriv (s : Set ๐) (H : UniqueDiffWithinAt ๐ s x)
@@ -277,50 +301,66 @@ theorem UniqueDiffWithinAt.eq_deriv (s : Set ๐) (H : UniqueDiffWithinAt ๐
#align unique_diff_within_at.eq_deriv UniqueDiffWithinAt.eq_deriv
-/
+#print hasDerivAtFilter_iff_isLittleO /-
theorem hasDerivAtFilter_iff_isLittleO :
HasDerivAtFilter f f' x L โ (fun x' : ๐ => f x' - f x - (x' - x) โข f') =o[L] fun x' => x' - x :=
Iff.rfl
#align has_deriv_at_filter_iff_is_o hasDerivAtFilter_iff_isLittleO
+-/
+#print hasDerivAtFilter_iff_tendsto /-
theorem hasDerivAtFilter_iff_tendsto :
HasDerivAtFilter f f' x L โ
Tendsto (fun x' : ๐ => โx' - xโโปยน * โf x' - f x - (x' - x) โข f'โ) L (๐ 0) :=
hasFDerivAtFilter_iff_tendsto
#align has_deriv_at_filter_iff_tendsto hasDerivAtFilter_iff_tendsto
+-/
+#print hasDerivWithinAt_iff_isLittleO /-
theorem hasDerivWithinAt_iff_isLittleO :
HasDerivWithinAt f f' s x โ
(fun x' : ๐ => f x' - f x - (x' - x) โข f') =o[๐[s] x] fun x' => x' - x :=
Iff.rfl
#align has_deriv_within_at_iff_is_o hasDerivWithinAt_iff_isLittleO
+-/
+#print hasDerivWithinAt_iff_tendsto /-
theorem hasDerivWithinAt_iff_tendsto :
HasDerivWithinAt f f' s x โ
Tendsto (fun x' => โx' - xโโปยน * โf x' - f x - (x' - x) โข f'โ) (๐[s] x) (๐ 0) :=
hasFDerivAtFilter_iff_tendsto
#align has_deriv_within_at_iff_tendsto hasDerivWithinAt_iff_tendsto
+-/
+#print hasDerivAt_iff_isLittleO /-
theorem hasDerivAt_iff_isLittleO :
HasDerivAt f f' x โ (fun x' : ๐ => f x' - f x - (x' - x) โข f') =o[๐ x] fun x' => x' - x :=
Iff.rfl
#align has_deriv_at_iff_is_o hasDerivAt_iff_isLittleO
+-/
+#print hasDerivAt_iff_tendsto /-
theorem hasDerivAt_iff_tendsto :
HasDerivAt f f' x โ Tendsto (fun x' => โx' - xโโปยน * โf x' - f x - (x' - x) โข f'โ) (๐ x) (๐ 0) :=
hasFDerivAtFilter_iff_tendsto
#align has_deriv_at_iff_tendsto hasDerivAt_iff_tendsto
+-/
+#print HasDerivAtFilter.isBigO_sub /-
theorem HasDerivAtFilter.isBigO_sub (h : HasDerivAtFilter f f' x L) :
(fun x' => f x' - f x) =O[L] fun x' => x' - x :=
HasFDerivAtFilter.isBigO_sub h
#align has_deriv_at_filter.is_O_sub HasDerivAtFilter.isBigO_sub
+-/
+#print HasDerivAtFilter.isBigO_sub_rev /-
theorem HasDerivAtFilter.isBigO_sub_rev (hf : HasDerivAtFilter f f' x L) (hf' : f' โ 0) :
(fun x' => x' - x) =O[L] fun x' => f x' - f x :=
suffices AntilipschitzWith โf'โโโปยน (smulRight (1 : ๐ โL[๐] ๐) f') from hf.isBigO_sub_rev this
AddMonoidHomClass.antilipschitz_of_bound (smulRight (1 : ๐ โL[๐] ๐) f') fun x => by
simp [norm_smul, โ div_eq_inv_mul, mul_div_cancel _ (mt norm_eq_zero.1 hf')]
#align has_deriv_at_filter.is_O_sub_rev HasDerivAtFilter.isBigO_sub_rev
+-/
#print HasStrictDerivAt.hasDerivAt /-
theorem HasStrictDerivAt.hasDerivAt (h : HasStrictDerivAt f f' x) : HasDerivAt f f' x :=
@@ -328,10 +368,12 @@ theorem HasStrictDerivAt.hasDerivAt (h : HasStrictDerivAt f f' x) : HasDerivAt f
#align has_strict_deriv_at.has_deriv_at HasStrictDerivAt.hasDerivAt
-/
+#print hasDerivWithinAt_congr_set' /-
theorem hasDerivWithinAt_congr_set' {s t : Set ๐} (y : ๐) (h : s =แถ [๐[{y}แถ] x] t) :
HasDerivWithinAt f f' s x โ HasDerivWithinAt f f' t x :=
hasFDerivWithinAt_congr_set' y h
#align has_deriv_within_at_congr_set' hasDerivWithinAt_congr_set'
+-/
#print hasDerivWithinAt_congr_set /-
theorem hasDerivWithinAt_congr_set {s t : Set ๐} (h : s =แถ [๐ x] t) :
@@ -343,11 +385,13 @@ theorem hasDerivWithinAt_congr_set {s t : Set ๐} (h : s =แถ [๐ x] t) :
alias hasDerivWithinAt_congr_set โ HasDerivWithinAt.congr_set _
#align has_deriv_within_at.congr_set HasDerivWithinAt.congr_set
+#print hasDerivWithinAt_diff_singleton /-
@[simp]
theorem hasDerivWithinAt_diff_singleton :
HasDerivWithinAt f f' (s \ {x}) x โ HasDerivWithinAt f f' s x :=
hasFDerivWithinAt_diff_singleton _
#align has_deriv_within_at_diff_singleton hasDerivWithinAt_diff_singleton
+-/
#print hasDerivWithinAt_Ioi_iff_Ici /-
@[simp]
@@ -384,15 +428,19 @@ alias HasDerivWithinAt.Ioi_iff_Ioo โ HasDerivWithinAt.Ioi_of_Ioo HasDerivWithi
#align has_deriv_within_at.Ioi_of_Ioo HasDerivWithinAt.Ioi_of_Ioo
#align has_deriv_within_at.Ioo_of_Ioi HasDerivWithinAt.Ioo_of_Ioi
+#print hasDerivAt_iff_isLittleO_nhds_zero /-
theorem hasDerivAt_iff_isLittleO_nhds_zero :
HasDerivAt f f' x โ (fun h => f (x + h) - f x - h โข f') =o[๐ 0] fun h => h :=
hasFDerivAt_iff_isLittleO_nhds_zero
#align has_deriv_at_iff_is_o_nhds_zero hasDerivAt_iff_isLittleO_nhds_zero
+-/
+#print HasDerivAtFilter.mono /-
theorem HasDerivAtFilter.mono (h : HasDerivAtFilter f f' x Lโ) (hst : Lโ โค Lโ) :
HasDerivAtFilter f f' x Lโ :=
HasFDerivAtFilter.mono h hst
#align has_deriv_at_filter.mono HasDerivAtFilter.mono
+-/
#print HasDerivWithinAt.mono /-
theorem HasDerivWithinAt.mono (h : HasDerivWithinAt f f' t x) (hst : s โ t) :
@@ -408,10 +456,12 @@ theorem HasDerivWithinAt.mono_of_mem (h : HasDerivWithinAt f f' t x) (hst : t
#align has_deriv_within_at.mono_of_mem HasDerivWithinAt.mono_of_mem
-/
+#print HasDerivAt.hasDerivAtFilter /-
theorem HasDerivAt.hasDerivAtFilter (h : HasDerivAt f f' x) (hL : L โค ๐ x) :
HasDerivAtFilter f f' x L :=
HasFDerivAt.hasFDerivAtFilter h hL
#align has_deriv_at.has_deriv_at_filter HasDerivAt.hasDerivAtFilter
+-/
#print HasDerivAt.hasDerivWithinAt /-
theorem HasDerivAt.hasDerivWithinAt (h : HasDerivAt f f' x) : HasDerivWithinAt f f' s x :=
@@ -445,20 +495,26 @@ theorem HasDerivAt.unique (hโ : HasDerivAt f fโ' x) (hโ : HasDerivAt f f
#align has_deriv_at.unique HasDerivAt.unique
-/
+#print hasDerivWithinAt_inter' /-
theorem hasDerivWithinAt_inter' (h : t โ ๐[s] x) :
HasDerivWithinAt f f' (s โฉ t) x โ HasDerivWithinAt f f' s x :=
hasFDerivWithinAt_inter' h
#align has_deriv_within_at_inter' hasDerivWithinAt_inter'
+-/
+#print hasDerivWithinAt_inter /-
theorem hasDerivWithinAt_inter (h : t โ ๐ x) :
HasDerivWithinAt f f' (s โฉ t) x โ HasDerivWithinAt f f' s x :=
hasFDerivWithinAt_inter h
#align has_deriv_within_at_inter hasDerivWithinAt_inter
+-/
+#print HasDerivWithinAt.union /-
theorem HasDerivWithinAt.union (hs : HasDerivWithinAt f f' s x) (ht : HasDerivWithinAt f f' t x) :
HasDerivWithinAt f f' (s โช t) x :=
hs.HasFDerivWithinAt.union ht.HasFDerivWithinAt
#align has_deriv_within_at.union HasDerivWithinAt.union
+-/
#print HasDerivWithinAt.nhdsWithin /-
theorem HasDerivWithinAt.nhdsWithin (h : HasDerivWithinAt f f' s x) (ht : s โ ๐[t] x) :
@@ -528,9 +584,11 @@ theorem HasDerivWithinAt.derivWithin (h : HasDerivWithinAt f f' s x)
#align has_deriv_within_at.deriv_within HasDerivWithinAt.derivWithin
-/
+#print fderivWithin_derivWithin /-
theorem fderivWithin_derivWithin : (fderivWithin ๐ f s x : ๐ โ F) 1 = derivWithin f s x :=
rfl
#align fderiv_within_deriv_within fderivWithin_derivWithin
+-/
#print derivWithin_fderivWithin /-
theorem derivWithin_fderivWithin :
@@ -538,9 +596,11 @@ theorem derivWithin_fderivWithin :
#align deriv_within_fderiv_within derivWithin_fderivWithin
-/
+#print fderiv_deriv /-
theorem fderiv_deriv : (fderiv ๐ f x : ๐ โ F) 1 = deriv f x :=
rfl
#align fderiv_deriv fderiv_deriv
+-/
#print deriv_fderiv /-
theorem deriv_fderiv : smulRight (1 : ๐ โL[๐] ๐) (deriv f x) = fderiv ๐ f x := by simp [deriv]
@@ -553,11 +613,13 @@ theorem DifferentiableAt.derivWithin (h : DifferentiableAt ๐ f x) (hxs : Uniq
#align differentiable_at.deriv_within DifferentiableAt.derivWithin
-/
+#print HasDerivWithinAt.deriv_eq_zero /-
theorem HasDerivWithinAt.deriv_eq_zero (hd : HasDerivWithinAt f 0 s x)
(H : UniqueDiffWithinAt ๐ s x) : deriv f x = 0 :=
(em' (DifferentiableAt ๐ f x)).elim deriv_zero_of_not_differentiableAt fun h =>
H.eq_deriv _ h.HasDerivAt.HasDerivWithinAt hd
#align has_deriv_within_at.deriv_eq_zero HasDerivWithinAt.deriv_eq_zero
+-/
#print derivWithin_of_mem /-
theorem derivWithin_of_mem (st : t โ ๐[s] x) (ht : UniqueDiffWithinAt ๐ s x)
@@ -573,9 +635,11 @@ theorem derivWithin_subset (st : s โ t) (ht : UniqueDiffWithinAt ๐ s x)
#align deriv_within_subset derivWithin_subset
-/
+#print derivWithin_congr_set' /-
theorem derivWithin_congr_set' (y : ๐) (h : s =แถ [๐[{y}แถ] x] t) :
derivWithin f s x = derivWithin f t x := by simp only [derivWithin, fderivWithin_congr_set' y h]
#align deriv_within_congr_set' derivWithin_congr_set'
+-/
#print derivWithin_congr_set /-
theorem derivWithin_congr_set (h : s =แถ [๐ x] t) : derivWithin f s x = derivWithin f t x := by
@@ -590,9 +654,11 @@ theorem derivWithin_univ : derivWithin f univ = deriv f := by ext; unfold derivW
#align deriv_within_univ derivWithin_univ
-/
+#print derivWithin_inter /-
theorem derivWithin_inter (ht : t โ ๐ x) : derivWithin f (s โฉ t) x = derivWithin f s x := by
unfold derivWithin; rw [fderivWithin_inter ht]
#align deriv_within_inter derivWithin_inter
+-/
#print derivWithin_of_open /-
theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x := by
@@ -600,12 +666,15 @@ theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x =
#align deriv_within_of_open derivWithin_of_open
-/
+#print deriv_mem_iff /-
theorem deriv_mem_iff {f : ๐ โ F} {s : Set F} {x : ๐} :
deriv f x โ s โ
DifferentiableAt ๐ f x โง deriv f x โ s โจ ยฌDifferentiableAt ๐ f x โง (0 : F) โ s :=
by by_cases hx : DifferentiableAt ๐ f x <;> simp [deriv_zero_of_not_differentiableAt, *]
#align deriv_mem_iff deriv_mem_iff
+-/
+#print derivWithin_mem_iff /-
theorem derivWithin_mem_iff {f : ๐ โ F} {t : Set ๐} {s : Set F} {x : ๐} :
derivWithin f t x โ s โ
DifferentiableWithinAt ๐ f t x โง derivWithin f t x โ s โจ
@@ -614,6 +683,7 @@ theorem derivWithin_mem_iff {f : ๐ โ F} {t : Set ๐} {s : Set F} {x :
by_cases hx : DifferentiableWithinAt ๐ f t x <;>
simp [derivWithin_zero_of_not_differentiableWithinAt, *]
#align deriv_within_mem_iff derivWithin_mem_iff
+-/
#print differentiableWithinAt_Ioi_iff_Ici /-
theorem differentiableWithinAt_Ioi_iff_Ici [PartialOrder ๐] :
@@ -731,43 +801,61 @@ section id
variable (s x L)
+#print hasDerivAtFilter_id /-
theorem hasDerivAtFilter_id : HasDerivAtFilter id 1 x L :=
(hasFDerivAtFilter_id x L).HasDerivAtFilter
#align has_deriv_at_filter_id hasDerivAtFilter_id
+-/
+#print hasDerivWithinAt_id /-
theorem hasDerivWithinAt_id : HasDerivWithinAt id 1 s x :=
hasDerivAtFilter_id _ _
#align has_deriv_within_at_id hasDerivWithinAt_id
+-/
+#print hasDerivAt_id /-
theorem hasDerivAt_id : HasDerivAt id 1 x :=
hasDerivAtFilter_id _ _
#align has_deriv_at_id hasDerivAt_id
+-/
+#print hasDerivAt_id' /-
theorem hasDerivAt_id' : HasDerivAt (fun x : ๐ => x) 1 x :=
hasDerivAtFilter_id _ _
#align has_deriv_at_id' hasDerivAt_id'
+-/
+#print hasStrictDerivAt_id /-
theorem hasStrictDerivAt_id : HasStrictDerivAt id 1 x :=
(hasStrictFDerivAt_id x).HasStrictDerivAt
#align has_strict_deriv_at_id hasStrictDerivAt_id
+-/
+#print deriv_id /-
theorem deriv_id : deriv id x = 1 :=
HasDerivAt.deriv (hasDerivAt_id x)
#align deriv_id deriv_id
+-/
+#print deriv_id' /-
@[simp]
theorem deriv_id' : deriv (@id ๐) = fun _ => 1 :=
funext deriv_id
#align deriv_id' deriv_id'
+-/
+#print deriv_id'' /-
@[simp]
theorem deriv_id'' : (deriv fun x : ๐ => x) = fun _ => 1 :=
deriv_id'
#align deriv_id'' deriv_id''
+-/
+#print derivWithin_id /-
theorem derivWithin_id (hxs : UniqueDiffWithinAt ๐ s x) : derivWithin id s x = 1 :=
(hasDerivWithinAt_id x s).derivWithin hxs
#align deriv_within_id derivWithin_id
+-/
end id
@@ -778,34 +866,48 @@ section Const
variable (c : F) (s x L)
+#print hasDerivAtFilter_const /-
theorem hasDerivAtFilter_const : HasDerivAtFilter (fun x => c) 0 x L :=
(hasFDerivAtFilter_const c x L).HasDerivAtFilter
#align has_deriv_at_filter_const hasDerivAtFilter_const
+-/
+#print hasStrictDerivAt_const /-
theorem hasStrictDerivAt_const : HasStrictDerivAt (fun x => c) 0 x :=
(hasStrictFDerivAt_const c x).HasStrictDerivAt
#align has_strict_deriv_at_const hasStrictDerivAt_const
+-/
+#print hasDerivWithinAt_const /-
theorem hasDerivWithinAt_const : HasDerivWithinAt (fun x => c) 0 s x :=
hasDerivAtFilter_const _ _ _
#align has_deriv_within_at_const hasDerivWithinAt_const
+-/
+#print hasDerivAt_const /-
theorem hasDerivAt_const : HasDerivAt (fun x => c) 0 x :=
hasDerivAtFilter_const _ _ _
#align has_deriv_at_const hasDerivAt_const
+-/
+#print deriv_const /-
theorem deriv_const : deriv (fun x => c) x = 0 :=
HasDerivAt.deriv (hasDerivAt_const x c)
#align deriv_const deriv_const
+-/
+#print deriv_const' /-
@[simp]
theorem deriv_const' : (deriv fun x : ๐ => c) = fun x => 0 :=
funext fun x => deriv_const x c
#align deriv_const' deriv_const'
+-/
+#print derivWithin_const /-
theorem derivWithin_const (hxs : UniqueDiffWithinAt ๐ s x) : derivWithin (fun x => c) s x = 0 :=
(hasDerivWithinAt_const _ _ _).derivWithin hxs
#align deriv_within_const derivWithin_const
+-/
end Const
@@ -814,10 +916,12 @@ section Continuous
/-! ### Continuity of a function admitting a derivative -/
+#print HasDerivAtFilter.tendsto_nhds /-
theorem HasDerivAtFilter.tendsto_nhds (hL : L โค ๐ x) (h : HasDerivAtFilter f f' x L) :
Tendsto f L (๐ (f x)) :=
h.tendsto_nhds hL
#align has_deriv_at_filter.tendsto_nhds HasDerivAtFilter.tendsto_nhds
+-/
#print HasDerivWithinAt.continuousWithinAt /-
theorem HasDerivWithinAt.continuousWithinAt (h : HasDerivWithinAt f f' s x) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -634,7 +634,7 @@ theorem derivWithin_Ioi_eq_Ici {E : Type _} [NormedAddCommGroup E] [NormedSpace
simpa using (uniqueDiffOn_Ici x).Eq le_rfl A B
ยท rw [derivWithin_zero_of_not_differentiableWithinAt H,
derivWithin_zero_of_not_differentiableWithinAt]
- rwa [differentiableWithinAt_Ioi_iff_Ici] at H
+ rwa [differentiableWithinAt_Ioi_iff_Ici] at H
#align deriv_within_Ioi_eq_Ici derivWithin_Ioi_eq_Ici
-/
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: Gabriel Ebner, Sรฉbastien Gouรซzel
! This file was ported from Lean 3 source module analysis.calculus.deriv.basic
-! 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.Analysis.Calculus.Fderiv.Basic
# One-dimensional derivatives
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file defines the derivative of a function `f : ๐ โ F` where `๐` is a
normed field and `F` is a normed space over this field. The derivative of
such a function `f` at a point `x` is given by an element `f' : F`.
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -90,7 +90,7 @@ universe u v w
noncomputable section
-open Classical Topology BigOperators Filter ENNReal
+open scoped Classical Topology BigOperators Filter ENNReal
open Filter Asymptotics Set
@@ -370,10 +370,12 @@ alias hasDerivWithinAt_Iio_iff_Iic โ HasDerivWithinAt.Iic_of_Iio HasDerivWithi
#align has_deriv_within_at.Iic_of_Iio HasDerivWithinAt.Iic_of_Iio
#align has_deriv_within_at.Iio_of_Iic HasDerivWithinAt.Iio_of_Iic
+#print HasDerivWithinAt.Ioi_iff_Ioo /-
theorem HasDerivWithinAt.Ioi_iff_Ioo [LinearOrder ๐] [OrderClosedTopology ๐] {x y : ๐} (h : x < y) :
HasDerivWithinAt f f' (Ioo x y) x โ HasDerivWithinAt f f' (Ioi x) x :=
hasFDerivWithinAt_inter <| Iio_mem_nhds h
#align has_deriv_within_at.Ioi_iff_Ioo HasDerivWithinAt.Ioi_iff_Ioo
+-/
alias HasDerivWithinAt.Ioi_iff_Ioo โ HasDerivWithinAt.Ioi_of_Ioo HasDerivWithinAt.Ioo_of_Ioi
#align has_deriv_within_at.Ioi_of_Ioo HasDerivWithinAt.Ioi_of_Ioo
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -102,6 +102,7 @@ variable {F : Type v} [NormedAddCommGroup F] [NormedSpace ๐ F]
variable {E : Type w} [NormedAddCommGroup E] [NormedSpace ๐ E]
+#print HasDerivAtFilter /-
/-- `f` has the derivative `f'` at the point `x` as `x` goes along the filter `L`.
That is, `f x' = f x + (x' - x) โข f' + o(x' - x)` where `x'` converges along the filter `L`.
@@ -109,7 +110,9 @@ That is, `f x' = f x + (x' - x) โข f' + o(x' - x)` where `x'` converges along t
def HasDerivAtFilter (f : ๐ โ F) (f' : F) (x : ๐) (L : Filter ๐) :=
HasFDerivAtFilter f (smulRight (1 : ๐ โL[๐] ๐) f') x L
#align has_deriv_at_filter HasDerivAtFilter
+-/
+#print HasDerivWithinAt /-
/-- `f` has the derivative `f'` at the point `x` within the subset `s`.
That is, `f x' = f x + (x' - x) โข f' + o(x' - x)` where `x'` converges to `x` inside `s`.
@@ -117,7 +120,9 @@ That is, `f x' = f x + (x' - x) โข f' + o(x' - x)` where `x'` converges to `x`
def HasDerivWithinAt (f : ๐ โ F) (f' : F) (s : Set ๐) (x : ๐) :=
HasDerivAtFilter f f' x (๐[s] x)
#align has_deriv_within_at HasDerivWithinAt
+-/
+#print HasDerivAt /-
/-- `f` has the derivative `f'` at the point `x`.
That is, `f x' = f x + (x' - x) โข f' + o(x' - x)` where `x'` converges to `x`.
@@ -125,14 +130,18 @@ That is, `f x' = f x + (x' - x) โข f' + o(x' - x)` where `x'` converges to `x`.
def HasDerivAt (f : ๐ โ F) (f' : F) (x : ๐) :=
HasDerivAtFilter f f' x (๐ x)
#align has_deriv_at HasDerivAt
+-/
+#print HasStrictDerivAt /-
/-- `f` has the derivative `f'` at the point `x` in the sense of strict differentiability.
That is, `f y - f z = (y - z) โข f' + o(y - z)` as `y, z โ x`. -/
def HasStrictDerivAt (f : ๐ โ F) (f' : F) (x : ๐) :=
HasStrictFDerivAt f (smulRight (1 : ๐ โL[๐] ๐) f') x
#align has_strict_deriv_at HasStrictDerivAt
+-/
+#print derivWithin /-
/-- Derivative of `f` at the point `x` within the set `s`, if it exists. Zero otherwise.
If the derivative exists (i.e., `โ f', has_deriv_within_at f f' s x`), then
@@ -141,7 +150,9 @@ If the derivative exists (i.e., `โ f', has_deriv_within_at f f' s x`), then
def derivWithin (f : ๐ โ F) (s : Set ๐) (x : ๐) :=
fderivWithin ๐ f s x 1
#align deriv_within derivWithin
+-/
+#print deriv /-
/-- Derivative of `f` at the point `x`, if it exists. Zero otherwise.
If the derivative exists (i.e., `โ f', has_deriv_at f f' x`), then
@@ -150,6 +161,7 @@ If the derivative exists (i.e., `โ f', has_deriv_at f f' x`), then
def deriv (f : ๐ โ F) (x : ๐) :=
fderiv ๐ f x 1
#align deriv deriv
+-/
variable {f fโ fโ g : ๐ โ F}
@@ -177,21 +189,25 @@ theorem hasFDerivWithinAt_iff_hasDerivWithinAt {f' : ๐ โL[๐] F} :
hasFDerivAtFilter_iff_hasDerivAtFilter
#align has_fderiv_within_at_iff_has_deriv_within_at hasFDerivWithinAt_iff_hasDerivWithinAt
+#print hasDerivWithinAt_iff_hasFDerivWithinAt /-
/-- Expressing `has_deriv_within_at f f' s x` in terms of `has_fderiv_within_at` -/
theorem hasDerivWithinAt_iff_hasFDerivWithinAt {f' : F} :
HasDerivWithinAt f f' s x โ HasFDerivWithinAt f (smulRight (1 : ๐ โL[๐] ๐) f') s x :=
Iff.rfl
#align has_deriv_within_at_iff_has_fderiv_within_at hasDerivWithinAt_iff_hasFDerivWithinAt
+-/
theorem HasFDerivWithinAt.hasDerivWithinAt {f' : ๐ โL[๐] F} :
HasFDerivWithinAt f f' s x โ HasDerivWithinAt f (f' 1) s x :=
hasFDerivWithinAt_iff_hasDerivWithinAt.mp
#align has_fderiv_within_at.has_deriv_within_at HasFDerivWithinAt.hasDerivWithinAt
+#print HasDerivWithinAt.hasFDerivWithinAt /-
theorem HasDerivWithinAt.hasFDerivWithinAt {f' : F} :
HasDerivWithinAt f f' s x โ HasFDerivWithinAt f (smulRight (1 : ๐ โL[๐] ๐) f') s x :=
hasDerivWithinAt_iff_hasFDerivWithinAt.mp
#align has_deriv_within_at.has_fderiv_within_at HasDerivWithinAt.hasFDerivWithinAt
+-/
/-- Expressing `has_fderiv_at f f' x` in terms of `has_deriv_at` -/
theorem hasFDerivAt_iff_hasDerivAt {f' : ๐ โL[๐] F} : HasFDerivAt f f' x โ HasDerivAt f (f' 1) x :=
@@ -212,19 +228,23 @@ protected theorem HasStrictFDerivAt.hasStrictDerivAt {f' : ๐ โL[๐] F} :
hasStrictFDerivAt_iff_hasStrictDerivAt.mp
#align has_strict_fderiv_at.has_strict_deriv_at HasStrictFDerivAt.hasStrictDerivAt
+#print hasStrictDerivAt_iff_hasStrictFDerivAt /-
theorem hasStrictDerivAt_iff_hasStrictFDerivAt :
HasStrictDerivAt f f' x โ HasStrictFDerivAt f (smulRight (1 : ๐ โL[๐] ๐) f') x :=
Iff.rfl
#align has_strict_deriv_at_iff_has_strict_fderiv_at hasStrictDerivAt_iff_hasStrictFDerivAt
+-/
alias hasStrictDerivAt_iff_hasStrictFDerivAt โ HasStrictDerivAt.hasStrictFDerivAt _
#align has_strict_deriv_at.has_strict_fderiv_at HasStrictDerivAt.hasStrictFDerivAt
+#print hasDerivAt_iff_hasFDerivAt /-
/-- Expressing `has_deriv_at f f' x` in terms of `has_fderiv_at` -/
theorem hasDerivAt_iff_hasFDerivAt {f' : F} :
HasDerivAt f f' x โ HasFDerivAt f (smulRight (1 : ๐ โL[๐] ๐) f') x :=
Iff.rfl
#align has_deriv_at_iff_has_fderiv_at hasDerivAt_iff_hasFDerivAt
+-/
alias hasDerivAt_iff_hasFDerivAt โ HasDerivAt.hasFDerivAt _
#align has_deriv_at.has_fderiv_at HasDerivAt.hasFDerivAt
@@ -247,10 +267,12 @@ theorem differentiableAt_of_deriv_ne_zero (h : deriv f x โ 0) : Differentiable
not_imp_comm.1 deriv_zero_of_not_differentiableAt h
#align differentiable_at_of_deriv_ne_zero differentiableAt_of_deriv_ne_zero
+#print UniqueDiffWithinAt.eq_deriv /-
theorem UniqueDiffWithinAt.eq_deriv (s : Set ๐) (H : UniqueDiffWithinAt ๐ s x)
(h : HasDerivWithinAt f f' s x) (hโ : HasDerivWithinAt f fโ' s x) : f' = fโ' :=
smulRight_one_eq_iff.mp <| UniqueDiffWithinAt.eq H h hโ
#align unique_diff_within_at.eq_deriv UniqueDiffWithinAt.eq_deriv
+-/
theorem hasDerivAtFilter_iff_isLittleO :
HasDerivAtFilter f f' x L โ (fun x' : ๐ => f x' - f x - (x' - x) โข f') =o[L] fun x' => x' - x :=
@@ -297,19 +319,23 @@ theorem HasDerivAtFilter.isBigO_sub_rev (hf : HasDerivAtFilter f f' x L) (hf' :
simp [norm_smul, โ div_eq_inv_mul, mul_div_cancel _ (mt norm_eq_zero.1 hf')]
#align has_deriv_at_filter.is_O_sub_rev HasDerivAtFilter.isBigO_sub_rev
+#print HasStrictDerivAt.hasDerivAt /-
theorem HasStrictDerivAt.hasDerivAt (h : HasStrictDerivAt f f' x) : HasDerivAt f f' x :=
h.HasFDerivAt
#align has_strict_deriv_at.has_deriv_at HasStrictDerivAt.hasDerivAt
+-/
theorem hasDerivWithinAt_congr_set' {s t : Set ๐} (y : ๐) (h : s =แถ [๐[{y}แถ] x] t) :
HasDerivWithinAt f f' s x โ HasDerivWithinAt f f' t x :=
hasFDerivWithinAt_congr_set' y h
#align has_deriv_within_at_congr_set' hasDerivWithinAt_congr_set'
+#print hasDerivWithinAt_congr_set /-
theorem hasDerivWithinAt_congr_set {s t : Set ๐} (h : s =แถ [๐ x] t) :
HasDerivWithinAt f f' s x โ HasDerivWithinAt f f' t x :=
hasFDerivWithinAt_congr_set h
#align has_deriv_within_at_congr_set hasDerivWithinAt_congr_set
+-/
alias hasDerivWithinAt_congr_set โ HasDerivWithinAt.congr_set _
#align has_deriv_within_at.congr_set HasDerivWithinAt.congr_set
@@ -320,21 +346,25 @@ theorem hasDerivWithinAt_diff_singleton :
hasFDerivWithinAt_diff_singleton _
#align has_deriv_within_at_diff_singleton hasDerivWithinAt_diff_singleton
+#print hasDerivWithinAt_Ioi_iff_Ici /-
@[simp]
theorem hasDerivWithinAt_Ioi_iff_Ici [PartialOrder ๐] :
HasDerivWithinAt f f' (Ioi x) x โ HasDerivWithinAt f f' (Ici x) x := by
rw [โ Ici_diff_left, hasDerivWithinAt_diff_singleton]
#align has_deriv_within_at_Ioi_iff_Ici hasDerivWithinAt_Ioi_iff_Ici
+-/
alias hasDerivWithinAt_Ioi_iff_Ici โ HasDerivWithinAt.Ici_of_Ioi HasDerivWithinAt.Ioi_of_Ici
#align has_deriv_within_at.Ici_of_Ioi HasDerivWithinAt.Ici_of_Ioi
#align has_deriv_within_at.Ioi_of_Ici HasDerivWithinAt.Ioi_of_Ici
+#print hasDerivWithinAt_Iio_iff_Iic /-
@[simp]
theorem hasDerivWithinAt_Iio_iff_Iic [PartialOrder ๐] :
HasDerivWithinAt f f' (Iio x) x โ HasDerivWithinAt f f' (Iic x) x := by
rw [โ Iic_diff_right, hasDerivWithinAt_diff_singleton]
#align has_deriv_within_at_Iio_iff_Iic hasDerivWithinAt_Iio_iff_Iic
+-/
alias hasDerivWithinAt_Iio_iff_Iic โ HasDerivWithinAt.Iic_of_Iio HasDerivWithinAt.Iio_of_Iic
#align has_deriv_within_at.Iic_of_Iio HasDerivWithinAt.Iic_of_Iio
@@ -359,42 +389,56 @@ theorem HasDerivAtFilter.mono (h : HasDerivAtFilter f f' x Lโ) (hst : Lโ โค
HasFDerivAtFilter.mono h hst
#align has_deriv_at_filter.mono HasDerivAtFilter.mono
+#print HasDerivWithinAt.mono /-
theorem HasDerivWithinAt.mono (h : HasDerivWithinAt f f' t x) (hst : s โ t) :
HasDerivWithinAt f f' s x :=
HasFDerivWithinAt.mono h hst
#align has_deriv_within_at.mono HasDerivWithinAt.mono
+-/
+#print HasDerivWithinAt.mono_of_mem /-
theorem HasDerivWithinAt.mono_of_mem (h : HasDerivWithinAt f f' t x) (hst : t โ ๐[s] x) :
HasDerivWithinAt f f' s x :=
HasFDerivWithinAt.mono_of_mem h hst
#align has_deriv_within_at.mono_of_mem HasDerivWithinAt.mono_of_mem
+-/
theorem HasDerivAt.hasDerivAtFilter (h : HasDerivAt f f' x) (hL : L โค ๐ x) :
HasDerivAtFilter f f' x L :=
HasFDerivAt.hasFDerivAtFilter h hL
#align has_deriv_at.has_deriv_at_filter HasDerivAt.hasDerivAtFilter
+#print HasDerivAt.hasDerivWithinAt /-
theorem HasDerivAt.hasDerivWithinAt (h : HasDerivAt f f' x) : HasDerivWithinAt f f' s x :=
HasFDerivAt.hasFDerivWithinAt h
#align has_deriv_at.has_deriv_within_at HasDerivAt.hasDerivWithinAt
+-/
+#print HasDerivWithinAt.differentiableWithinAt /-
theorem HasDerivWithinAt.differentiableWithinAt (h : HasDerivWithinAt f f' s x) :
DifferentiableWithinAt ๐ f s x :=
HasFDerivWithinAt.differentiableWithinAt h
#align has_deriv_within_at.differentiable_within_at HasDerivWithinAt.differentiableWithinAt
+-/
+#print HasDerivAt.differentiableAt /-
theorem HasDerivAt.differentiableAt (h : HasDerivAt f f' x) : DifferentiableAt ๐ f x :=
HasFDerivAt.differentiableAt h
#align has_deriv_at.differentiable_at HasDerivAt.differentiableAt
+-/
+#print hasDerivWithinAt_univ /-
@[simp]
theorem hasDerivWithinAt_univ : HasDerivWithinAt f f' univ x โ HasDerivAt f f' x :=
hasFDerivWithinAt_univ
#align has_deriv_within_at_univ hasDerivWithinAt_univ
+-/
+#print HasDerivAt.unique /-
theorem HasDerivAt.unique (hโ : HasDerivAt f fโ' x) (hโ : HasDerivAt f fโ' x) : fโ' = fโ' :=
smulRight_one_eq_iff.mp <| hโ.HasFDerivAt.unique hโ
#align has_deriv_at.unique HasDerivAt.unique
+-/
theorem hasDerivWithinAt_inter' (h : t โ ๐[s] x) :
HasDerivWithinAt f f' (s โฉ t) x โ HasDerivWithinAt f f' s x :=
@@ -411,72 +455,98 @@ theorem HasDerivWithinAt.union (hs : HasDerivWithinAt f f' s x) (ht : HasDerivWi
hs.HasFDerivWithinAt.union ht.HasFDerivWithinAt
#align has_deriv_within_at.union HasDerivWithinAt.union
+#print HasDerivWithinAt.nhdsWithin /-
theorem HasDerivWithinAt.nhdsWithin (h : HasDerivWithinAt f f' s x) (ht : s โ ๐[t] x) :
HasDerivWithinAt f f' t x :=
(hasDerivWithinAt_inter' ht).1 (h.mono (inter_subset_right _ _))
#align has_deriv_within_at.nhds_within HasDerivWithinAt.nhdsWithin
+-/
+#print HasDerivWithinAt.hasDerivAt /-
theorem HasDerivWithinAt.hasDerivAt (h : HasDerivWithinAt f f' s x) (hs : s โ ๐ x) :
HasDerivAt f f' x :=
HasFDerivWithinAt.hasFDerivAt h hs
#align has_deriv_within_at.has_deriv_at HasDerivWithinAt.hasDerivAt
+-/
+#print DifferentiableWithinAt.hasDerivWithinAt /-
theorem DifferentiableWithinAt.hasDerivWithinAt (h : DifferentiableWithinAt ๐ f s x) :
HasDerivWithinAt f (derivWithin f s x) s x :=
h.HasFDerivWithinAt.HasDerivWithinAt
#align differentiable_within_at.has_deriv_within_at DifferentiableWithinAt.hasDerivWithinAt
+-/
+#print DifferentiableAt.hasDerivAt /-
theorem DifferentiableAt.hasDerivAt (h : DifferentiableAt ๐ f x) : HasDerivAt f (deriv f x) x :=
h.HasFDerivAt.HasDerivAt
#align differentiable_at.has_deriv_at DifferentiableAt.hasDerivAt
+-/
+#print hasDerivAt_deriv_iff /-
@[simp]
theorem hasDerivAt_deriv_iff : HasDerivAt f (deriv f x) x โ DifferentiableAt ๐ f x :=
โจfun h => h.DifferentiableAt, fun h => h.HasDerivAtโฉ
#align has_deriv_at_deriv_iff hasDerivAt_deriv_iff
+-/
+#print hasDerivWithinAt_derivWithin_iff /-
@[simp]
theorem hasDerivWithinAt_derivWithin_iff :
HasDerivWithinAt f (derivWithin f s x) s x โ DifferentiableWithinAt ๐ f s x :=
โจfun h => h.DifferentiableWithinAt, fun h => h.HasDerivWithinAtโฉ
#align has_deriv_within_at_deriv_within_iff hasDerivWithinAt_derivWithin_iff
+-/
+#print DifferentiableOn.hasDerivAt /-
theorem DifferentiableOn.hasDerivAt (h : DifferentiableOn ๐ f s) (hs : s โ ๐ x) :
HasDerivAt f (deriv f x) x :=
(h.HasFDerivAt hs).HasDerivAt
#align differentiable_on.has_deriv_at DifferentiableOn.hasDerivAt
+-/
+#print HasDerivAt.deriv /-
theorem HasDerivAt.deriv (h : HasDerivAt f f' x) : deriv f x = f' :=
h.DifferentiableAt.HasDerivAt.unique h
#align has_deriv_at.deriv HasDerivAt.deriv
+-/
+#print deriv_eq /-
theorem deriv_eq {f' : ๐ โ F} (h : โ x, HasDerivAt f (f' x) x) : deriv f = f' :=
funext fun x => (h x).deriv
#align deriv_eq deriv_eq
+-/
+#print HasDerivWithinAt.derivWithin /-
theorem HasDerivWithinAt.derivWithin (h : HasDerivWithinAt f f' s x)
(hxs : UniqueDiffWithinAt ๐ s x) : derivWithin f s x = f' :=
hxs.eq_deriv _ h.DifferentiableWithinAt.HasDerivWithinAt h
#align has_deriv_within_at.deriv_within HasDerivWithinAt.derivWithin
+-/
theorem fderivWithin_derivWithin : (fderivWithin ๐ f s x : ๐ โ F) 1 = derivWithin f s x :=
rfl
#align fderiv_within_deriv_within fderivWithin_derivWithin
+#print derivWithin_fderivWithin /-
theorem derivWithin_fderivWithin :
smulRight (1 : ๐ โL[๐] ๐) (derivWithin f s x) = fderivWithin ๐ f s x := by simp [derivWithin]
#align deriv_within_fderiv_within derivWithin_fderivWithin
+-/
theorem fderiv_deriv : (fderiv ๐ f x : ๐ โ F) 1 = deriv f x :=
rfl
#align fderiv_deriv fderiv_deriv
+#print deriv_fderiv /-
theorem deriv_fderiv : smulRight (1 : ๐ โL[๐] ๐) (deriv f x) = fderiv ๐ f x := by simp [deriv]
#align deriv_fderiv deriv_fderiv
+-/
+#print DifferentiableAt.derivWithin /-
theorem DifferentiableAt.derivWithin (h : DifferentiableAt ๐ f x) (hxs : UniqueDiffWithinAt ๐ s x) :
derivWithin f s x = deriv f x := by unfold derivWithin deriv; rw [h.fderiv_within hxs]
#align differentiable_at.deriv_within DifferentiableAt.derivWithin
+-/
theorem HasDerivWithinAt.deriv_eq_zero (hd : HasDerivWithinAt f 0 s x)
(H : UniqueDiffWithinAt ๐ s x) : deriv f x = 0 :=
@@ -484,36 +554,46 @@ theorem HasDerivWithinAt.deriv_eq_zero (hd : HasDerivWithinAt f 0 s x)
H.eq_deriv _ h.HasDerivAt.HasDerivWithinAt hd
#align has_deriv_within_at.deriv_eq_zero HasDerivWithinAt.deriv_eq_zero
+#print derivWithin_of_mem /-
theorem derivWithin_of_mem (st : t โ ๐[s] x) (ht : UniqueDiffWithinAt ๐ s x)
(h : DifferentiableWithinAt ๐ f t x) : derivWithin f s x = derivWithin f t x :=
((DifferentiableWithinAt.hasDerivWithinAt h).mono_of_mem st).derivWithin ht
#align deriv_within_of_mem derivWithin_of_mem
+-/
+#print derivWithin_subset /-
theorem derivWithin_subset (st : s โ t) (ht : UniqueDiffWithinAt ๐ s x)
(h : DifferentiableWithinAt ๐ f t x) : derivWithin f s x = derivWithin f t x :=
((DifferentiableWithinAt.hasDerivWithinAt h).mono st).derivWithin ht
#align deriv_within_subset derivWithin_subset
+-/
theorem derivWithin_congr_set' (y : ๐) (h : s =แถ [๐[{y}แถ] x] t) :
derivWithin f s x = derivWithin f t x := by simp only [derivWithin, fderivWithin_congr_set' y h]
#align deriv_within_congr_set' derivWithin_congr_set'
+#print derivWithin_congr_set /-
theorem derivWithin_congr_set (h : s =แถ [๐ x] t) : derivWithin f s x = derivWithin f t x := by
simp only [derivWithin, fderivWithin_congr_set h]
#align deriv_within_congr_set derivWithin_congr_set
+-/
+#print derivWithin_univ /-
@[simp]
theorem derivWithin_univ : derivWithin f univ = deriv f := by ext; unfold derivWithin deriv;
rw [fderivWithin_univ]
#align deriv_within_univ derivWithin_univ
+-/
theorem derivWithin_inter (ht : t โ ๐ x) : derivWithin f (s โฉ t) x = derivWithin f s x := by
unfold derivWithin; rw [fderivWithin_inter ht]
#align deriv_within_inter derivWithin_inter
+#print derivWithin_of_open /-
theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x := by
unfold derivWithin; rw [fderivWithin_of_open hs hx]; rfl
#align deriv_within_of_open derivWithin_of_open
+-/
theorem deriv_mem_iff {f : ๐ โ F} {s : Set F} {x : ๐} :
deriv f x โ s โ
@@ -530,12 +610,15 @@ theorem derivWithin_mem_iff {f : ๐ โ F} {t : Set ๐} {s : Set F} {x :
simp [derivWithin_zero_of_not_differentiableWithinAt, *]
#align deriv_within_mem_iff derivWithin_mem_iff
+#print differentiableWithinAt_Ioi_iff_Ici /-
theorem differentiableWithinAt_Ioi_iff_Ici [PartialOrder ๐] :
DifferentiableWithinAt ๐ f (Ioi x) x โ DifferentiableWithinAt ๐ f (Ici x) x :=
โจfun h => h.HasDerivWithinAt.Ici_of_Ioi.DifferentiableWithinAt, fun h =>
h.HasDerivWithinAt.Ioi_of_Ici.DifferentiableWithinAtโฉ
#align differentiable_within_at_Ioi_iff_Ici differentiableWithinAt_Ioi_iff_Ici
+-/
+#print derivWithin_Ioi_eq_Ici /-
-- Golfed while splitting the file
theorem derivWithin_Ioi_eq_Ici {E : Type _} [NormedAddCommGroup E] [NormedSpace โ E] (f : โ โ E)
(x : โ) : derivWithin f (Ioi x) x = derivWithin f (Ici x) x :=
@@ -548,66 +631,91 @@ theorem derivWithin_Ioi_eq_Ici {E : Type _} [NormedAddCommGroup E] [NormedSpace
derivWithin_zero_of_not_differentiableWithinAt]
rwa [differentiableWithinAt_Ioi_iff_Ici] at H
#align deriv_within_Ioi_eq_Ici derivWithin_Ioi_eq_Ici
+-/
section congr
/-! ### Congruence properties of derivatives -/
+#print Filter.EventuallyEq.hasDerivAtFilter_iff /-
theorem Filter.EventuallyEq.hasDerivAtFilter_iff (hโ : fโ =แถ [L] fโ) (hx : fโ x = fโ x)
(hโ : fโ' = fโ') : HasDerivAtFilter fโ fโ' x L โ HasDerivAtFilter fโ fโ' x L :=
hโ.hasFDerivAtFilter_iff hx (by simp [hโ])
#align filter.eventually_eq.has_deriv_at_filter_iff Filter.EventuallyEq.hasDerivAtFilter_iff
+-/
+#print HasDerivAtFilter.congr_of_eventuallyEq /-
theorem HasDerivAtFilter.congr_of_eventuallyEq (h : HasDerivAtFilter f f' x L) (hL : fโ =แถ [L] f)
(hx : fโ x = f x) : HasDerivAtFilter fโ f' x L := by rwa [hL.has_deriv_at_filter_iff hx rfl]
#align has_deriv_at_filter.congr_of_eventually_eq HasDerivAtFilter.congr_of_eventuallyEq
+-/
+#print HasDerivWithinAt.congr_mono /-
theorem HasDerivWithinAt.congr_mono (h : HasDerivWithinAt f f' s x) (ht : โ x โ t, fโ x = f x)
(hx : fโ x = f x) (hโ : t โ s) : HasDerivWithinAt fโ f' t x :=
HasFDerivWithinAt.congr_mono h ht hx hโ
#align has_deriv_within_at.congr_mono HasDerivWithinAt.congr_mono
+-/
+#print HasDerivWithinAt.congr /-
theorem HasDerivWithinAt.congr (h : HasDerivWithinAt f f' s x) (hs : โ x โ s, fโ x = f x)
(hx : fโ x = f x) : HasDerivWithinAt fโ f' s x :=
h.congr_mono hs hx (Subset.refl _)
#align has_deriv_within_at.congr HasDerivWithinAt.congr
+-/
+#print HasDerivWithinAt.congr_of_mem /-
theorem HasDerivWithinAt.congr_of_mem (h : HasDerivWithinAt f f' s x) (hs : โ x โ s, fโ x = f x)
(hx : x โ s) : HasDerivWithinAt fโ f' s x :=
h.congr hs (hs _ hx)
#align has_deriv_within_at.congr_of_mem HasDerivWithinAt.congr_of_mem
+-/
+#print HasDerivWithinAt.congr_of_eventuallyEq /-
theorem HasDerivWithinAt.congr_of_eventuallyEq (h : HasDerivWithinAt f f' s x)
(hโ : fโ =แถ [๐[s] x] f) (hx : fโ x = f x) : HasDerivWithinAt fโ f' s x :=
HasDerivAtFilter.congr_of_eventuallyEq h hโ hx
#align has_deriv_within_at.congr_of_eventually_eq HasDerivWithinAt.congr_of_eventuallyEq
+-/
+#print HasDerivWithinAt.congr_of_eventuallyEq_of_mem /-
theorem HasDerivWithinAt.congr_of_eventuallyEq_of_mem (h : HasDerivWithinAt f f' s x)
(hโ : fโ =แถ [๐[s] x] f) (hx : x โ s) : HasDerivWithinAt fโ f' s x :=
h.congr_of_eventuallyEq hโ (hโ.eq_of_nhdsWithin hx)
#align has_deriv_within_at.congr_of_eventually_eq_of_mem HasDerivWithinAt.congr_of_eventuallyEq_of_mem
+-/
+#print HasDerivAt.congr_of_eventuallyEq /-
theorem HasDerivAt.congr_of_eventuallyEq (h : HasDerivAt f f' x) (hโ : fโ =แถ [๐ x] f) :
HasDerivAt fโ f' x :=
HasDerivAtFilter.congr_of_eventuallyEq h hโ (mem_of_mem_nhds hโ : _)
#align has_deriv_at.congr_of_eventually_eq HasDerivAt.congr_of_eventuallyEq
+-/
+#print Filter.EventuallyEq.derivWithin_eq /-
theorem Filter.EventuallyEq.derivWithin_eq (hL : fโ =แถ [๐[s] x] f) (hx : fโ x = f x) :
derivWithin fโ s x = derivWithin f s x := by unfold derivWithin; rw [hL.fderiv_within_eq hx]
#align filter.eventually_eq.deriv_within_eq Filter.EventuallyEq.derivWithin_eq
+-/
+#print derivWithin_congr /-
theorem derivWithin_congr (hs : EqOn fโ f s) (hx : fโ x = f x) :
derivWithin fโ s x = derivWithin f s x := by unfold derivWithin; rw [fderivWithin_congr hs hx]
#align deriv_within_congr derivWithin_congr
+-/
+#print Filter.EventuallyEq.deriv_eq /-
theorem Filter.EventuallyEq.deriv_eq (hL : fโ =แถ [๐ x] f) : deriv fโ x = deriv f x := by
unfold deriv; rwa [Filter.EventuallyEq.fderiv_eq]
#align filter.eventually_eq.deriv_eq Filter.EventuallyEq.deriv_eq
+-/
+#print Filter.EventuallyEq.deriv /-
protected theorem Filter.EventuallyEq.deriv (h : fโ =แถ [๐ x] f) : deriv fโ =แถ [๐ x] deriv f :=
h.eventuallyEq_nhds.mono fun x h => h.deriv_eq
#align filter.eventually_eq.deriv Filter.EventuallyEq.deriv
+-/
end congr
@@ -706,18 +814,24 @@ theorem HasDerivAtFilter.tendsto_nhds (hL : L โค ๐ x) (h : HasDerivAtFilter
h.tendsto_nhds hL
#align has_deriv_at_filter.tendsto_nhds HasDerivAtFilter.tendsto_nhds
+#print HasDerivWithinAt.continuousWithinAt /-
theorem HasDerivWithinAt.continuousWithinAt (h : HasDerivWithinAt f f' s x) :
ContinuousWithinAt f s x :=
HasDerivAtFilter.tendsto_nhds inf_le_left h
#align has_deriv_within_at.continuous_within_at HasDerivWithinAt.continuousWithinAt
+-/
+#print HasDerivAt.continuousAt /-
theorem HasDerivAt.continuousAt (h : HasDerivAt f f' x) : ContinuousAt f x :=
HasDerivAtFilter.tendsto_nhds le_rfl h
#align has_deriv_at.continuous_at HasDerivAt.continuousAt
+-/
+#print HasDerivAt.continuousOn /-
protected theorem HasDerivAt.continuousOn {f f' : ๐ โ F} (hderiv : โ x โ s, HasDerivAt f (f' x) x) :
ContinuousOn f s := fun x hx => (hderiv x hx).ContinuousAt.ContinuousWithinAt
#align has_deriv_at.continuous_on HasDerivAt.continuousOn
+-/
end Continuous
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -230,11 +230,8 @@ alias hasDerivAt_iff_hasFDerivAt โ HasDerivAt.hasFDerivAt _
#align has_deriv_at.has_fderiv_at HasDerivAt.hasFDerivAt
theorem derivWithin_zero_of_not_differentiableWithinAt (h : ยฌDifferentiableWithinAt ๐ f s x) :
- derivWithin f s x = 0 := by
- unfold derivWithin
- rw [fderivWithin_zero_of_not_differentiableWithinAt]
- simp
- assumption
+ derivWithin f s x = 0 := by unfold derivWithin;
+ rw [fderivWithin_zero_of_not_differentiableWithinAt]; simp; assumption
#align deriv_within_zero_of_not_differentiable_within_at derivWithin_zero_of_not_differentiableWithinAt
theorem differentiableWithinAt_of_derivWithin_ne_zero (h : derivWithin f s x โ 0) :
@@ -242,12 +239,8 @@ theorem differentiableWithinAt_of_derivWithin_ne_zero (h : derivWithin f s x โ
not_imp_comm.1 derivWithin_zero_of_not_differentiableWithinAt h
#align differentiable_within_at_of_deriv_within_ne_zero differentiableWithinAt_of_derivWithin_ne_zero
-theorem deriv_zero_of_not_differentiableAt (h : ยฌDifferentiableAt ๐ f x) : deriv f x = 0 :=
- by
- unfold deriv
- rw [fderiv_zero_of_not_differentiableAt]
- simp
- assumption
+theorem deriv_zero_of_not_differentiableAt (h : ยฌDifferentiableAt ๐ f x) : deriv f x = 0 := by
+ unfold deriv; rw [fderiv_zero_of_not_differentiableAt]; simp; assumption
#align deriv_zero_of_not_differentiable_at deriv_zero_of_not_differentiableAt
theorem differentiableAt_of_deriv_ne_zero (h : deriv f x โ 0) : DifferentiableAt ๐ f x :=
@@ -482,9 +475,7 @@ theorem deriv_fderiv : smulRight (1 : ๐ โL[๐] ๐) (deriv f x) = fderiv
#align deriv_fderiv deriv_fderiv
theorem DifferentiableAt.derivWithin (h : DifferentiableAt ๐ f x) (hxs : UniqueDiffWithinAt ๐ s x) :
- derivWithin f s x = deriv f x := by
- unfold derivWithin deriv
- rw [h.fderiv_within hxs]
+ derivWithin f s x = deriv f x := by unfold derivWithin deriv; rw [h.fderiv_within hxs]
#align differentiable_at.deriv_within DifferentiableAt.derivWithin
theorem HasDerivWithinAt.deriv_eq_zero (hd : HasDerivWithinAt f 0 s x)
@@ -512,24 +503,16 @@ theorem derivWithin_congr_set (h : s =แถ [๐ x] t) : derivWithin f s x = deriv
#align deriv_within_congr_set derivWithin_congr_set
@[simp]
-theorem derivWithin_univ : derivWithin f univ = deriv f :=
- by
- ext
- unfold derivWithin deriv
+theorem derivWithin_univ : derivWithin f univ = deriv f := by ext; unfold derivWithin deriv;
rw [fderivWithin_univ]
#align deriv_within_univ derivWithin_univ
-theorem derivWithin_inter (ht : t โ ๐ x) : derivWithin f (s โฉ t) x = derivWithin f s x :=
- by
- unfold derivWithin
- rw [fderivWithin_inter ht]
+theorem derivWithin_inter (ht : t โ ๐ x) : derivWithin f (s โฉ t) x = derivWithin f s x := by
+ unfold derivWithin; rw [fderivWithin_inter ht]
#align deriv_within_inter derivWithin_inter
-theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x :=
- by
- unfold derivWithin
- rw [fderivWithin_of_open hs hx]
- rfl
+theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x := by
+ unfold derivWithin; rw [fderivWithin_of_open hs hx]; rfl
#align deriv_within_of_open derivWithin_of_open
theorem deriv_mem_iff {f : ๐ โ F} {s : Set F} {x : ๐} :
@@ -611,23 +594,15 @@ theorem HasDerivAt.congr_of_eventuallyEq (h : HasDerivAt f f' x) (hโ : fโ =
#align has_deriv_at.congr_of_eventually_eq HasDerivAt.congr_of_eventuallyEq
theorem Filter.EventuallyEq.derivWithin_eq (hL : fโ =แถ [๐[s] x] f) (hx : fโ x = f x) :
- derivWithin fโ s x = derivWithin f s x :=
- by
- unfold derivWithin
- rw [hL.fderiv_within_eq hx]
+ derivWithin fโ s x = derivWithin f s x := by unfold derivWithin; rw [hL.fderiv_within_eq hx]
#align filter.eventually_eq.deriv_within_eq Filter.EventuallyEq.derivWithin_eq
theorem derivWithin_congr (hs : EqOn fโ f s) (hx : fโ x = f x) :
- derivWithin fโ s x = derivWithin f s x :=
- by
- unfold derivWithin
- rw [fderivWithin_congr hs hx]
+ derivWithin fโ s x = derivWithin f s x := by unfold derivWithin; rw [fderivWithin_congr hs hx]
#align deriv_within_congr derivWithin_congr
-theorem Filter.EventuallyEq.deriv_eq (hL : fโ =แถ [๐ x] f) : deriv fโ x = deriv f x :=
- by
- unfold deriv
- rwa [Filter.EventuallyEq.fderiv_eq]
+theorem Filter.EventuallyEq.deriv_eq (hL : fโ =แถ [๐ x] f) : deriv fโ x = deriv f x := by
+ unfold deriv; rwa [Filter.EventuallyEq.fderiv_eq]
#align filter.eventually_eq.deriv_eq Filter.EventuallyEq.deriv_eq
protected theorem Filter.EventuallyEq.deriv (h : fโ =แถ [๐ x] f) : deriv fโ =แถ [๐ x] deriv f :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
mul
-div
cancellation lemmas (#11530)
Lemma names around cancellation of multiplication and division are a mess.
This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero
lemma name, the Group
lemma, the AddGroup
lemma name).
| Statement | New name | Old name | |
@@ -300,7 +300,7 @@ nonrec theorem HasDerivAtFilter.isBigO_sub_rev (hf : HasDerivAtFilter f f' x L)
(fun x' => x' - x) =O[L] fun x' => f x' - f x :=
suffices AntilipschitzWith โf'โโโปยน (smulRight (1 : ๐ โL[๐] ๐) f') from hf.isBigO_sub_rev this
AddMonoidHomClass.antilipschitz_of_bound (smulRight (1 : ๐ โL[๐] ๐) f') fun x => by
- simp [norm_smul, โ div_eq_inv_mul, mul_div_cancel _ (mt norm_eq_zero.1 hf')]
+ simp [norm_smul, โ div_eq_inv_mul, mul_div_cancel_rightโ _ (mt norm_eq_zero.1 hf')]
set_option linter.uppercaseLean3 false in
#align has_deriv_at_filter.is_O_sub_rev HasDerivAtFilter.isBigO_sub_rev
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)
@@ -151,13 +151,9 @@ def deriv (f : ๐ โ F) (x : ๐) :=
#align deriv deriv
variable {f fโ fโ g : ๐ โ F}
-
variable {f' fโ' fโ' g' : F}
-
variable {x : ๐}
-
variable {s t : Set ๐}
-
variable {L Lโ Lโ : Filter ๐}
/-- Expressing `HasFDerivAtFilter f f' x L` in terms of `HasDerivAtFilter` -/
Split the 2300-line behemoth OperatorNorm.lean
into 8 smaller files, of which the largest is 600 lines.
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner, Sรฉbastien Gouรซzel
-/
import Mathlib.Analysis.Calculus.FDeriv.Basic
+import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
#align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
$
with <|
(#9319)
See Zulip thread for the discussion.
@@ -537,7 +537,7 @@ theorem derivWithin_of_isOpen (hs : IsOpen s) (hx : x โ s) : derivWithin f s x
lemma deriv_eqOn {f' : ๐ โ F} (hs : IsOpen s) (hf' : โ x โ s, HasDerivWithinAt f (f' x) s x) :
s.EqOn (deriv f) f' := fun x hx โฆ by
- rw [โ derivWithin_of_isOpen hs hx, (hf' _ hx).derivWithin $ hs.uniqueDiffWithinAt hx]
+ rw [โ derivWithin_of_isOpen hs hx, (hf' _ hx).derivWithin <| hs.uniqueDiffWithinAt hx]
theorem deriv_mem_iff {f : ๐ โ F} {s : Set F} {x : ๐} :
deriv f x โ s โ
@@ -535,6 +535,10 @@ theorem derivWithin_of_isOpen (hs : IsOpen s) (hx : x โ s) : derivWithin f s x
derivWithin_of_mem_nhds (hs.mem_nhds hx)
#align deriv_within_of_open derivWithin_of_isOpen
+lemma deriv_eqOn {f' : ๐ โ F} (hs : IsOpen s) (hf' : โ x โ s, HasDerivWithinAt f (f' x) s x) :
+ s.EqOn (deriv f) f' := fun x hx โฆ by
+ rw [โ derivWithin_of_isOpen hs hx, (hf' _ hx).derivWithin $ hs.uniqueDiffWithinAt hx]
+
theorem deriv_mem_iff {f : ๐ โ F} {s : Set F} {x : ๐} :
deriv f x โ s โ
DifferentiableAt ๐ f x โง deriv f x โ s โจ ยฌDifferentiableAt ๐ f x โง (0 : F) โ s :=
structure
(#8907)
This way we can easily change the definition so that it works for topological vector spaces without generalizing any of the theorems right away.
@@ -262,7 +262,7 @@ theorem UniqueDiffWithinAt.eq_deriv (s : Set ๐) (H : UniqueDiffWithinAt ๐
theorem hasDerivAtFilter_iff_isLittleO :
HasDerivAtFilter f f' x L โ (fun x' : ๐ => f x' - f x - (x' - x) โข f') =o[L] fun x' => x' - x :=
- Iff.rfl
+ hasFDerivAtFilter_iff_isLittleO ..
#align has_deriv_at_filter_iff_is_o hasDerivAtFilter_iff_isLittleO
theorem hasDerivAtFilter_iff_tendsto :
@@ -274,7 +274,7 @@ theorem hasDerivAtFilter_iff_tendsto :
theorem hasDerivWithinAt_iff_isLittleO :
HasDerivWithinAt f f' s x โ
(fun x' : ๐ => f x' - f x - (x' - x) โข f') =o[๐[s] x] fun x' => x' - x :=
- Iff.rfl
+ hasFDerivAtFilter_iff_isLittleO ..
#align has_deriv_within_at_iff_is_o hasDerivWithinAt_iff_isLittleO
theorem hasDerivWithinAt_iff_tendsto :
@@ -285,7 +285,7 @@ theorem hasDerivWithinAt_iff_tendsto :
theorem hasDerivAt_iff_isLittleO :
HasDerivAt f f' x โ (fun x' : ๐ => f x' - f x - (x' - x) โข f') =o[๐ x] fun x' => x' - x :=
- Iff.rfl
+ hasFDerivAtFilter_iff_isLittleO ..
#align has_deriv_at_iff_is_o hasDerivAt_iff_isLittleO
theorem hasDerivAt_iff_tendsto :
congr_deriv
lemmas mirroring congr_fderiv
(#9065)
Add convenience lemmas
HasStrictDerivAt.congr_deriv
HasDerivAt.congr_deriv
HasDerivWithinAt.congr_deriv
These mirror the already existing
HasStrictFDerivAt.congr_fderiv
HasFDerivAt.congr_fderiv
HasFDerivWithinAt.congr_fderiv
@@ -614,6 +614,17 @@ theorem Filter.EventuallyEq.hasDerivWithinAt_iff_of_mem (hโ : fโ =แถ [๐[s
โจfun h' โฆ h'.congr_of_eventuallyEq_of_mem hโ.symm hx,
fun h' โฆ h'.congr_of_eventuallyEq_of_mem hโ hxโฉ
+theorem HasStrictDerivAt.congr_deriv (h : HasStrictDerivAt f f' x) (h' : f' = g') :
+ HasStrictDerivAt f g' x :=
+ h.congr_fderiv <| congr_arg _ h'
+
+theorem HasDerivAt.congr_deriv (h : HasDerivAt f f' x) (h' : f' = g') : HasDerivAt f g' x :=
+ HasFDerivAt.congr_fderiv h <| congr_arg _ h'
+
+theorem HasDerivWithinAt.congr_deriv (h : HasDerivWithinAt f f' s x) (h' : f' = g') :
+ HasDerivWithinAt f g' s x :=
+ HasFDerivWithinAt.congr_fderiv h <| congr_arg _ h'
+
theorem HasDerivAt.congr_of_eventuallyEq (h : HasDerivAt f f' x) (hโ : fโ =แถ [๐ x] f) :
HasDerivAt fโ f' x :=
HasDerivAtFilter.congr_of_eventuallyEq h hโ (mem_of_mem_nhds hโ : _)
Mostly, this means replacing "of_open" by "of_isOpen". A few lemmas names were misleading and are corrected differently. Zulip discussion.
@@ -531,9 +531,9 @@ theorem derivWithin_inter (ht : t โ ๐ x) : derivWithin f (s โฉ t) x = deri
theorem derivWithin_of_mem_nhds (h : s โ ๐ x) : derivWithin f s x = deriv f x := by
simp only [derivWithin, deriv, fderivWithin_of_mem_nhds h]
-theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x :=
+theorem derivWithin_of_isOpen (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x :=
derivWithin_of_mem_nhds (hs.mem_nhds hx)
-#align deriv_within_of_open derivWithin_of_open
+#align deriv_within_of_open derivWithin_of_isOpen
theorem deriv_mem_iff {f : ๐ โ F} {s : Set F} {x : ๐} :
deriv f x โ s โ
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
.
@@ -234,6 +234,12 @@ theorem derivWithin_zero_of_not_differentiableWithinAt (h : ยฌDifferentiableWith
simp
#align deriv_within_zero_of_not_differentiable_within_at derivWithin_zero_of_not_differentiableWithinAt
+theorem derivWithin_zero_of_isolated (h : ๐[s \ {x}] x = โฅ) : derivWithin f s x = 0 := by
+ rw [derivWithin, fderivWithin_zero_of_isolated h, ContinuousLinearMap.zero_apply]
+
+theorem derivWithin_zero_of_nmem_closure (h : x โ closure s) : derivWithin f s x = 0 := by
+ rw [derivWithin, fderivWithin_zero_of_nmem_closure h, ContinuousLinearMap.zero_apply]
+
theorem differentiableWithinAt_of_derivWithin_ne_zero (h : derivWithin f s x โ 0) :
DifferentiableWithinAt ๐ f s x :=
not_imp_comm.1 derivWithin_zero_of_not_differentiableWithinAt h
@@ -74,7 +74,7 @@ by { simp, ring }
The relationship between the derivative of a function and its definition from a standard
undergraduate course as the limit of the slope `(f y - f x) / (y - x)` as `y` tends to `๐[โ ] x`
-is developped in the file `Slope.lean`.
+is developed in the file `Slope.lean`.
## Implementation notes
@@ -72,6 +72,10 @@ example (x : โ) : deriv (fun x โฆ cos (sin x) * exp x) x = (cos(sin(x))-sin(s
by { simp, ring }
```
+The relationship between the derivative of a function and its definition from a standard
+undergraduate course as the limit of the slope `(f y - f x) / (y - x)` as `y` tends to `๐[โ ] x`
+is developped in the file `Slope.lean`.
+
## Implementation notes
Most of the theorems are direct restatements of the corresponding theorems
@@ -86,7 +90,7 @@ universe u v w
noncomputable section
-open scoped Classical Topology BigOperators Filter ENNReal
+open scoped Classical Topology BigOperators Filter ENNReal NNReal
open Filter Asymptotics Set
@@ -463,6 +467,9 @@ theorem derivWithin_fderivWithin :
smulRight (1 : ๐ โL[๐] ๐) (derivWithin f s x) = fderivWithin ๐ f s x := by simp [derivWithin]
#align deriv_within_fderiv_within derivWithin_fderivWithin
+theorem norm_derivWithin_eq_norm_fderivWithin : โderivWithin f s xโ = โfderivWithin ๐ f s xโ := by
+ simp [โ derivWithin_fderivWithin]
+
theorem fderiv_deriv : (fderiv ๐ f x : ๐ โ F) 1 = deriv f x :=
rfl
#align fderiv_deriv fderiv_deriv
@@ -470,6 +477,9 @@ theorem fderiv_deriv : (fderiv ๐ f x : ๐ โ F) 1 = deriv f x :=
theorem deriv_fderiv : smulRight (1 : ๐ โL[๐] ๐) (deriv f x) = fderiv ๐ f x := by simp [deriv]
#align deriv_fderiv deriv_fderiv
+theorem norm_deriv_eq_norm_fderiv : โderiv f xโ = โfderiv ๐ f xโ := by
+ simp [โ deriv_fderiv]
+
theorem DifferentiableAt.derivWithin (h : DifferentiableAt ๐ f x) (hxs : UniqueDiffWithinAt ๐ s x) :
derivWithin f s x = deriv f x := by
unfold derivWithin deriv
@@ -512,10 +522,11 @@ theorem derivWithin_inter (ht : t โ ๐ x) : derivWithin f (s โฉ t) x = deri
rw [fderivWithin_inter ht]
#align deriv_within_inter derivWithin_inter
-theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x := by
- unfold derivWithin
- rw [fderivWithin_of_open hs hx]
- rfl
+theorem derivWithin_of_mem_nhds (h : s โ ๐ x) : derivWithin f s x = deriv f x := by
+ simp only [derivWithin, deriv, fderivWithin_of_mem_nhds h]
+
+theorem derivWithin_of_open (hs : IsOpen s) (hx : x โ s) : derivWithin f s x = deriv f x :=
+ derivWithin_of_mem_nhds (hs.mem_nhds hx)
#align deriv_within_of_open derivWithin_of_open
theorem deriv_mem_iff {f : ๐ โ F} {s : Set F} {x : ๐} :
@@ -583,16 +594,29 @@ theorem HasDerivWithinAt.congr_of_eventuallyEq (h : HasDerivWithinAt f f' s x)
HasDerivAtFilter.congr_of_eventuallyEq h hโ hx
#align has_deriv_within_at.congr_of_eventually_eq HasDerivWithinAt.congr_of_eventuallyEq
+theorem Filter.EventuallyEq.hasDerivWithinAt_iff (hโ : fโ =แถ [๐[s] x] f) (hx : fโ x = f x) :
+ HasDerivWithinAt fโ f' s x โ HasDerivWithinAt f f' s x :=
+ โจfun h' โฆ h'.congr_of_eventuallyEq hโ.symm hx.symm, fun h' โฆ h'.congr_of_eventuallyEq hโ hxโฉ
+
theorem HasDerivWithinAt.congr_of_eventuallyEq_of_mem (h : HasDerivWithinAt f f' s x)
(hโ : fโ =แถ [๐[s] x] f) (hx : x โ s) : HasDerivWithinAt fโ f' s x :=
h.congr_of_eventuallyEq hโ (hโ.eq_of_nhdsWithin hx)
#align has_deriv_within_at.congr_of_eventually_eq_of_mem HasDerivWithinAt.congr_of_eventuallyEq_of_mem
+theorem Filter.EventuallyEq.hasDerivWithinAt_iff_of_mem (hโ : fโ =แถ [๐[s] x] f) (hx : x โ s) :
+ HasDerivWithinAt fโ f' s x โ HasDerivWithinAt f f' s x :=
+ โจfun h' โฆ h'.congr_of_eventuallyEq_of_mem hโ.symm hx,
+ fun h' โฆ h'.congr_of_eventuallyEq_of_mem hโ hxโฉ
+
theorem HasDerivAt.congr_of_eventuallyEq (h : HasDerivAt f f' x) (hโ : fโ =แถ [๐ x] f) :
HasDerivAt fโ f' x :=
HasDerivAtFilter.congr_of_eventuallyEq h hโ (mem_of_mem_nhds hโ : _)
#align has_deriv_at.congr_of_eventually_eq HasDerivAt.congr_of_eventuallyEq
+theorem Filter.EventuallyEq.hasDerivAt_iff (h : fโ =แถ [๐ x] fโ) :
+ HasDerivAt fโ f' x โ HasDerivAt fโ f' x :=
+ โจfun h' โฆ h'.congr_of_eventuallyEq h.symm, fun h' โฆ h'.congr_of_eventuallyEq hโฉ
+
theorem Filter.EventuallyEq.derivWithin_eq (hs : fโ =แถ [๐[s] x] f) (hx : fโ x = f x) :
derivWithin fโ s x = derivWithin f s x := by
unfold derivWithin
@@ -722,3 +746,45 @@ protected theorem HasDerivAt.continuousOn {f f' : ๐ โ F} (hderiv : โ x
#align has_deriv_at.continuous_on HasDerivAt.continuousOn
end Continuous
+
+/-- Converse to the mean value inequality: if `f` is differentiable at `xโ` and `C`-lipschitz
+on a neighborhood of `xโ` then its derivative at `xโ` has norm bounded by `C`. This version
+only assumes that `โf x - f xโโ โค C * โx - xโโ` in a neighborhood of `x`. -/
+theorem HasDerivAt.le_of_lip' {f : ๐ โ F} {f' : F} {xโ : ๐} (hf : HasDerivAt f f' xโ)
+ {C : โ} (hCโ : 0 โค C) (hlip : โแถ x in ๐ xโ, โf x - f xโโ โค C * โx - xโโ) :
+ โf'โ โค C := by
+ simpa using HasFDerivAt.le_of_lip' hf.hasFDerivAt hCโ hlip
+
+/-- Converse to the mean value inequality: if `f` is differentiable at `xโ` and `C`-lipschitz
+on a neighborhood of `xโ` then its derivative at `xโ` has norm bounded by `C`. -/
+theorem HasDerivAt.le_of_lipschitzOn {f : ๐ โ F} {f' : F} {xโ : ๐} (hf : HasDerivAt f f' xโ)
+ {s : Set ๐} (hs : s โ ๐ xโ) {C : โโฅ0} (hlip : LipschitzOnWith C f s) : โf'โ โค C := by
+ simpa using HasFDerivAt.le_of_lipschitzOn hf.hasFDerivAt hs hlip
+
+/-- Converse to the mean value inequality: if `f` is differentiable at `xโ` and `C`-lipschitz
+then its derivative at `xโ` has norm bounded by `C`. -/
+theorem HasDerivAt.le_of_lipschitz {f : ๐ โ F} {f' : F} {xโ : ๐} (hf : HasDerivAt f f' xโ)
+ {C : โโฅ0} (hlip : LipschitzWith C f) : โf'โ โค C := by
+ simpa using HasFDerivAt.le_of_lipschitz hf.hasFDerivAt hlip
+
+/-- Converse to the mean value inequality: if `f` is `C`-lipschitz
+on a neighborhood of `xโ` then its derivative at `xโ` has norm bounded by `C`. This version
+only assumes that `โf x - f xโโ โค C * โx - xโโ` in a neighborhood of `x`. -/
+theorem norm_deriv_le_of_lip' {f : ๐ โ F} {xโ : ๐}
+ {C : โ} (hCโ : 0 โค C) (hlip : โแถ x in ๐ xโ, โf x - f xโโ โค C * โx - xโโ) :
+ โderiv f xโโ โค C := by
+ simpa [norm_deriv_eq_norm_fderiv] using norm_fderiv_le_of_lip' ๐ hCโ hlip
+
+/-- Converse to the mean value inequality: if `f` is `C`-lipschitz
+on a neighborhood of `xโ` then its derivative at `xโ` has norm bounded by `C`.
+Version using `deriv`. -/
+theorem norm_deriv_le_of_lipschitzOn {f : ๐ โ F} {xโ : ๐} {s : Set ๐} (hs : s โ ๐ xโ)
+ {C : โโฅ0} (hlip : LipschitzOnWith C f s) : โderiv f xโโ โค C := by
+ simpa [norm_deriv_eq_norm_fderiv] using norm_fderiv_le_of_lipschitzOn ๐ hs hlip
+
+/-- Converse to the mean value inequality: if `f` is `C`-lipschitz then
+its derivative at `xโ` has norm bounded by `C`.
+Version using `deriv`. -/
+theorem norm_deriv_le_of_lipschitz {f : ๐ โ F} {xโ : ๐}
+ {C : โโฅ0} (hlip : LipschitzWith C f) : โderiv f xโโ โค C := by
+ simpa [norm_deriv_eq_norm_fderiv] using norm_fderiv_le_of_lipschitz ๐ hlip
This is a perfect duplicate of HasFDerivWithinAt.mono_of_mem
.
Same thing with Deriv
instead of FDeriv
.
@@ -368,6 +368,7 @@ theorem HasDerivWithinAt.mono_of_mem (h : HasDerivWithinAt f f' t x) (hst : t
HasDerivWithinAt f f' s x :=
HasFDerivWithinAt.mono_of_mem h hst
#align has_deriv_within_at.mono_of_mem HasDerivWithinAt.mono_of_mem
+#align has_deriv_within_at.nhds_within HasDerivWithinAt.mono_of_mem
theorem HasDerivAt.hasDerivAtFilter (h : HasDerivAt f f' x) (hL : L โค ๐ x) :
HasDerivAtFilter f f' x L :=
@@ -411,11 +412,6 @@ theorem HasDerivWithinAt.union (hs : HasDerivWithinAt f f' s x) (ht : HasDerivWi
hs.hasFDerivWithinAt.union ht.hasFDerivWithinAt
#align has_deriv_within_at.union HasDerivWithinAt.union
-theorem HasDerivWithinAt.nhdsWithin (h : HasDerivWithinAt f f' s x) (ht : s โ ๐[t] x) :
- HasDerivWithinAt f f' t x :=
- (hasDerivWithinAt_inter' ht).1 (h.mono (inter_subset_right _ _))
-#align has_deriv_within_at.nhds_within HasDerivWithinAt.nhdsWithin
-
theorem HasDerivWithinAt.hasDerivAt (h : HasDerivWithinAt f f' s x) (hs : s โ ๐ x) :
HasDerivAt f f' x :=
HasFDerivWithinAt.hasFDerivAt h hs
@@ -211,7 +211,7 @@ theorem hasStrictDerivAt_iff_hasStrictFDerivAt :
Iff.rfl
#align has_strict_deriv_at_iff_has_strict_fderiv_at hasStrictDerivAt_iff_hasStrictFDerivAt
-alias hasStrictDerivAt_iff_hasStrictFDerivAt โ HasStrictDerivAt.hasStrictFDerivAt _
+alias โจHasStrictDerivAt.hasStrictFDerivAt, _โฉ := hasStrictDerivAt_iff_hasStrictFDerivAt
#align has_strict_deriv_at.has_strict_fderiv_at HasStrictDerivAt.hasStrictFDerivAt
/-- Expressing `HasDerivAt f f' x` in terms of `HasFDerivAt` -/
@@ -220,7 +220,7 @@ theorem hasDerivAt_iff_hasFDerivAt {f' : F} :
Iff.rfl
#align has_deriv_at_iff_has_fderiv_at hasDerivAt_iff_hasFDerivAt
-alias hasDerivAt_iff_hasFDerivAt โ HasDerivAt.hasFDerivAt _
+alias โจHasDerivAt.hasFDerivAt, _โฉ := hasDerivAt_iff_hasFDerivAt
#align has_deriv_at.has_fderiv_at HasDerivAt.hasFDerivAt
theorem derivWithin_zero_of_not_differentiableWithinAt (h : ยฌDifferentiableWithinAt ๐ f s x) :
@@ -311,7 +311,7 @@ theorem hasDerivWithinAt_congr_set {s t : Set ๐} (h : s =แถ [๐ x] t) :
hasFDerivWithinAt_congr_set h
#align has_deriv_within_at_congr_set hasDerivWithinAt_congr_set
-alias hasDerivWithinAt_congr_set โ HasDerivWithinAt.congr_set _
+alias โจHasDerivWithinAt.congr_set, _โฉ := hasDerivWithinAt_congr_set
#align has_deriv_within_at.congr_set HasDerivWithinAt.congr_set
@[simp]
@@ -326,7 +326,7 @@ theorem hasDerivWithinAt_Ioi_iff_Ici [PartialOrder ๐] :
rw [โ Ici_diff_left, hasDerivWithinAt_diff_singleton]
#align has_deriv_within_at_Ioi_iff_Ici hasDerivWithinAt_Ioi_iff_Ici
-alias hasDerivWithinAt_Ioi_iff_Ici โ HasDerivWithinAt.Ici_of_Ioi HasDerivWithinAt.Ioi_of_Ici
+alias โจHasDerivWithinAt.Ici_of_Ioi, HasDerivWithinAt.Ioi_of_Iciโฉ := hasDerivWithinAt_Ioi_iff_Ici
#align has_deriv_within_at.Ici_of_Ioi HasDerivWithinAt.Ici_of_Ioi
#align has_deriv_within_at.Ioi_of_Ici HasDerivWithinAt.Ioi_of_Ici
@@ -336,7 +336,7 @@ theorem hasDerivWithinAt_Iio_iff_Iic [PartialOrder ๐] :
rw [โ Iic_diff_right, hasDerivWithinAt_diff_singleton]
#align has_deriv_within_at_Iio_iff_Iic hasDerivWithinAt_Iio_iff_Iic
-alias hasDerivWithinAt_Iio_iff_Iic โ HasDerivWithinAt.Iic_of_Iio HasDerivWithinAt.Iio_of_Iic
+alias โจHasDerivWithinAt.Iic_of_Iio, HasDerivWithinAt.Iio_of_Iicโฉ := hasDerivWithinAt_Iio_iff_Iic
#align has_deriv_within_at.Iic_of_Iio HasDerivWithinAt.Iic_of_Iio
#align has_deriv_within_at.Iio_of_Iic HasDerivWithinAt.Iio_of_Iic
@@ -345,7 +345,7 @@ theorem HasDerivWithinAt.Ioi_iff_Ioo [LinearOrder ๐] [OrderClosedTopology
hasFDerivWithinAt_inter <| Iio_mem_nhds h
#align has_deriv_within_at.Ioi_iff_Ioo HasDerivWithinAt.Ioi_iff_Ioo
-alias HasDerivWithinAt.Ioi_iff_Ioo โ HasDerivWithinAt.Ioi_of_Ioo HasDerivWithinAt.Ioo_of_Ioi
+alias โจHasDerivWithinAt.Ioi_of_Ioo, HasDerivWithinAt.Ioo_of_Ioiโฉ := HasDerivWithinAt.Ioi_iff_Ioo
#align has_deriv_within_at.Ioi_of_Ioo HasDerivWithinAt.Ioi_of_Ioo
#align has_deriv_within_at.Ioo_of_Ioi HasDerivWithinAt.Ioo_of_Ioi
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -543,7 +543,7 @@ theorem differentiableWithinAt_Ioi_iff_Ici [PartialOrder ๐] :
#align differentiable_within_at_Ioi_iff_Ici differentiableWithinAt_Ioi_iff_Ici
-- Golfed while splitting the file
-theorem derivWithin_Ioi_eq_Ici {E : Type _} [NormedAddCommGroup E] [NormedSpace โ E] (f : โ โ E)
+theorem derivWithin_Ioi_eq_Ici {E : Type*} [NormedAddCommGroup E] [NormedSpace โ E] (f : โ โ E)
(x : โ) : derivWithin f (Ioi x) x = derivWithin f (Ici x) x := by
by_cases H : DifferentiableWithinAt โ f (Ioi x) x
ยท have A := H.hasDerivWithinAt.Ici_of_Ioi
@@ -2,14 +2,11 @@
Copyright (c) 2019 Gabriel Ebner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner, Sรฉbastien Gouรซzel
-
-! This file was ported from Lean 3 source module analysis.calculus.deriv.basic
-! 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.FDeriv.Basic
+#align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
+
/-!
# One-dimensional derivatives
@@ -54,7 +54,7 @@ We also show the existence and compute the derivatives of:
- sum of finitely many functions (in `Add.lean`)
- negation (in `Add.lean`)
- subtraction (in `Add.lean`)
- - star (in `Star.lean`)
+ - star (in `Star.lean`)
- multiplication of two functions in `๐ โ ๐` (in `Mul.lean`)
- multiplication of a function in `๐ โ ๐` and of a function in `๐ โ E` (in `Mul.lean`)
- powers of a function (in `Pow.lean` and `ZPow.lean`)
@@ -71,7 +71,7 @@ and they more frequently lead to the desired result.
We set up the simplifier so that it can compute the derivative of simple functions. For instance,
```lean
-example (x : โ) : deriv (ฮป x, cos (sin x) * exp x) x = (cos(sin(x))-sin(sin(x))*cos(x))*exp(x) :=
+example (x : โ) : deriv (fun x โฆ cos (sin x) * exp x) x = (cos(sin(x))-sin(sin(x))*cos(x))*exp(x) :=
by { simp, ring }
```
@@ -229,9 +229,8 @@ alias hasDerivAt_iff_hasFDerivAt โ HasDerivAt.hasFDerivAt _
theorem derivWithin_zero_of_not_differentiableWithinAt (h : ยฌDifferentiableWithinAt ๐ f s x) :
derivWithin f s x = 0 := by
unfold derivWithin
- rw [fderivWithin_zero_of_not_differentiableWithinAt]
+ rw [fderivWithin_zero_of_not_differentiableWithinAt h]
simp
- assumption
#align deriv_within_zero_of_not_differentiable_within_at derivWithin_zero_of_not_differentiableWithinAt
theorem differentiableWithinAt_of_derivWithin_ne_zero (h : derivWithin f s x โ 0) :
@@ -241,9 +240,8 @@ theorem differentiableWithinAt_of_derivWithin_ne_zero (h : derivWithin f s x โ
theorem deriv_zero_of_not_differentiableAt (h : ยฌDifferentiableAt ๐ f x) : deriv f x = 0 := by
unfold deriv
- rw [fderiv_zero_of_not_differentiableAt]
+ rw [fderiv_zero_of_not_differentiableAt h]
simp
- assumption
#align deriv_zero_of_not_differentiable_at deriv_zero_of_not_differentiableAt
theorem differentiableAt_of_deriv_ne_zero (h : deriv f x โ 0) : DifferentiableAt ๐ f x :=
@@ -731,4 +729,3 @@ protected theorem HasDerivAt.continuousOn {f f' : ๐ โ F} (hderiv : โ x
#align has_deriv_at.continuous_on HasDerivAt.continuousOn
end Continuous
-
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