analysis.calculus.uniform_limits_deriv
⟷
Mathlib.Analysis.Calculus.UniformLimitsDeriv
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin H. Wilson
-/
import Analysis.Calculus.MeanValue
-import Analysis.NormedSpace.IsROrC
+import Analysis.NormedSpace.RCLike
import Order.Filter.Curry
#align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
@@ -104,7 +104,7 @@ open scoped uniformity Filter Topology
section LimitsOfDerivatives
-variable {ι : Type _} {l : Filter ι} {E : Type _} [NormedAddCommGroup E] {𝕜 : Type _} [IsROrC 𝕜]
+variable {ι : Type _} {l : Filter ι} {E : Type _} [NormedAddCommGroup E] {𝕜 : Type _} [RCLike 𝕜]
[NormedSpace 𝕜 E] {G : Type _} [NormedAddCommGroup G] [NormedSpace 𝕜 G] {f : ι → E → G}
{g : E → G} {f' : ι → E → E →L[𝕜] G} {g' : E → E →L[𝕜] G} {x : E}
@@ -303,7 +303,7 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
⟨_, b, fun e : E => Metric.ball x r e,
eventually_mem_set.mpr (metric.nhds_basis_ball.mem_of_mem hr), fun n hn y hy => _⟩
simp only [Pi.zero_apply, dist_zero_left]
- rw [← smul_sub, norm_smul, norm_inv, IsROrC.norm_coe_norm]
+ rw [← smul_sub, norm_smul, norm_inv, RCLike.norm_coe_norm]
refine' lt_of_le_of_lt _ hqε
by_cases hyz' : x = y; · simp [hyz', hqpos.le]
have hyz : 0 < ‖y - x‖ := by rw [norm_pos_iff]; intro hy'; exact hyz' (eq_of_sub_eq_zero hy').symm
@@ -357,7 +357,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
conv =>
congr
ext
- rw [← abs_norm, ← abs_inv, ← @IsROrC.norm_ofReal 𝕜 _ _, IsROrC.ofReal_inv, ← norm_smul]
+ rw [← abs_norm, ← abs_inv, ← @RCLike.norm_ofReal 𝕜 _ _, RCLike.ofReal_inv, ← norm_smul]
rw [← tendsto_zero_iff_norm_tendsto_zero]
have :
(fun a : ι × E => (‖a.2 - x‖⁻¹ : 𝕜) • (g a.2 - g x - (g' x) (a.2 - x))) =
@@ -392,7 +392,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
refine' (this ε hε).mono fun y hy => _
rw [dist_eq_norm] at hy ⊢
simp only [sub_zero, map_sub, norm_mul, norm_inv, norm_norm] at hy ⊢
- rw [norm_smul, norm_inv, IsROrC.norm_coe_norm]
+ rw [norm_smul, norm_inv, RCLike.norm_coe_norm]
exact hy
· -- hfg' after specializing to `x` and applying the definition of the operator norm
refine' tendsto.mono_left _ curry_le_prod
@@ -407,7 +407,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
have := tendsto_fst.comp (h2.prod_map tendsto_id)
refine' squeeze_zero_norm _ (tendsto_zero_iff_norm_tendsto_zero.mp this)
intro n
- simp_rw [norm_smul, norm_inv, IsROrC.norm_coe_norm]
+ simp_rw [norm_smul, norm_inv, RCLike.norm_coe_norm]
by_cases hx : x = n.2; · simp [hx]
have hnx : 0 < ‖n.2 - x‖ := by rw [norm_pos_iff]; intro hx';
exact hx (eq_of_sub_eq_zero hx').symm
@@ -485,7 +485,7 @@ derivatives
-/
-variable {ι : Type _} {l : Filter ι} {𝕜 : Type _} [IsROrC 𝕜] {G : Type _} [NormedAddCommGroup G]
+variable {ι : Type _} {l : Filter ι} {𝕜 : Type _} [RCLike 𝕜] {G : Type _} [NormedAddCommGroup G]
[NormedSpace 𝕜 G] {f : ι → 𝕜 → G} {g : 𝕜 → G} {f' : ι → 𝕜 → G} {g' : 𝕜 → G} {x : 𝕜}
#print UniformCauchySeqOnFilter.one_smulRight /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -125,7 +125,7 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
TendstoUniformlyOnFilter (fun (n : ι × ι) (z : E) => f n.1 x - f n.2 x) 0 (l ×ᶠ l) (𝓝 x)
by
have := this.1.add this.2
- rw [add_zero] at this
+ rw [add_zero] at this
exact this.congr (by simp)
constructor
· -- This inequality follows from the mean value theorem. To apply it, we will need to shrink our
@@ -142,7 +142,7 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
have hxy : ∀ y : E, y ∈ Metric.ball x r → ‖y - x‖ < 1 :=
by
intro y hy
- rw [Metric.mem_ball, dist_eq_norm] at hy
+ rw [Metric.mem_ball, dist_eq_norm] at hy
exact lt_of_lt_of_le hy (min_le_left _ _)
have hxyε : ∀ y : E, y ∈ Metric.ball x r → ε * ‖y - x‖ < ε :=
by
@@ -198,7 +198,7 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
TendstoUniformlyOn (fun (n : ι × ι) (z : E) => f n.1 x - f n.2 x) 0 (l ×ᶠ l) (Metric.ball x r)
by
have := this.1.add this.2
- rw [add_zero] at this
+ rw [add_zero] at this
refine' this.congr _
apply eventually_of_forall
intro n z hz
@@ -290,8 +290,8 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero]
rw [Metric.tendstoUniformlyOnFilter_iff]
have hfg' := hf'.uniform_cauchy_seq_on_filter
- rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hfg'
- rw [Metric.tendstoUniformlyOnFilter_iff] at hfg'
+ rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hfg'
+ rw [Metric.tendstoUniformlyOnFilter_iff] at hfg'
intro ε hε
obtain ⟨q, hqpos, hqε⟩ := exists_pos_rat_lt hε
specialize hfg' (q : ℝ) (by simp [hqpos])
@@ -308,7 +308,7 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
by_cases hyz' : x = y; · simp [hyz', hqpos.le]
have hyz : 0 < ‖y - x‖ := by rw [norm_pos_iff]; intro hy'; exact hyz' (eq_of_sub_eq_zero hy').symm
rw [inv_mul_le_iff hyz, mul_comm, sub_sub_sub_comm]
- simp only [Pi.zero_apply, dist_zero_left] at e
+ simp only [Pi.zero_apply, dist_zero_left] at e
refine'
Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le
(fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFDerivWithinAt)
@@ -345,8 +345,8 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
rw [Metric.tendsto_nhds] at this ⊢
intro ε hε
specialize this ε hε
- rw [eventually_curry_iff] at this
- simp only at this
+ rw [eventually_curry_iff] at this
+ simp only at this
exact (eventually_const.mp this).mono (by simp only [imp_self, forall_const])
-- With the new quantifier in hand, we can perform the famous `ε/3` proof. Specifically,
-- we will break up the limit (the difference functions minus the derivative go to 0) into 3:
@@ -374,13 +374,13 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
refine' tendsto.add (tendsto.add _ _) _
simp only
· have := difference_quotients_converge_uniformly hf' hf hfg
- rw [Metric.tendstoUniformlyOnFilter_iff] at this
+ rw [Metric.tendstoUniformlyOnFilter_iff] at this
rw [Metric.tendsto_nhds]
intro ε hε
apply ((this ε hε).filter_mono curry_le_prod).mono
intro n hn
rw [dist_eq_norm] at hn ⊢
- rw [← smul_sub] at hn
+ rw [← smul_sub] at hn
rwa [sub_zero]
· -- (Almost) the definition of the derivatives
rw [Metric.tendsto_nhds]
@@ -388,7 +388,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
rw [eventually_curry_iff]
refine' hf.curry.mono fun n hn => _
have := hn.self_of_nhds
- rw [hasFDerivAt_iff_tendsto, Metric.tendsto_nhds] at this
+ rw [hasFDerivAt_iff_tendsto, Metric.tendsto_nhds] at this
refine' (this ε hε).mono fun y hy => _
rw [dist_eq_norm] at hy ⊢
simp only [sub_zero, map_sub, norm_mul, norm_inv, norm_norm] at hy ⊢
@@ -398,7 +398,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
refine' tendsto.mono_left _ curry_le_prod
have h1 : tendsto (fun n : ι × E => g' n.2 - f' n.1 n.2) (l ×ᶠ 𝓝 x) (𝓝 0) :=
by
- rw [Metric.tendstoUniformlyOnFilter_iff] at hf'
+ rw [Metric.tendstoUniformlyOnFilter_iff] at hf'
exact metric.tendsto_nhds.mpr fun ε hε => by simpa using hf' ε hε
have h2 : tendsto (fun n : ι => g' x - f' n x) l (𝓝 0) :=
by
@@ -519,7 +519,7 @@ theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (
(hf : ∀ᶠ n : ι × 𝕜 in l ×ᶠ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) :=
by
- simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
+ simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
exact uniformCauchySeqOnFilter_of_fderiv hf'.one_smul_right hf hfg
#align uniform_cauchy_seq_on_filter_of_deriv uniformCauchySeqOnFilter_of_deriv
-/
@@ -529,8 +529,8 @@ theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f'
(hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) :=
by
- simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
- rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
+ simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
+ rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
have hf' :
UniformCauchySeqOn (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smul_right (f' n z)) l
(Metric.ball x r) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -414,7 +414,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
rw [inv_mul_le_iff hnx, mul_comm]
simp only [Function.comp_apply, Prod_map]
rw [norm_sub_rev]
- exact (f' n.1 x - g' x).le_op_norm (n.2 - x)
+ exact (f' n.1 x - g' x).le_opNorm (n.2 - x)
#align has_fderiv_at_of_tendsto_uniformly_on_filter hasFDerivAt_of_tendstoUniformlyOnFilter
-/
@@ -505,7 +505,7 @@ theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
intro n hn
refine' lt_of_le_of_lt _ hq'
simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
- refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
+ refine' ContinuousLinearMap.opNorm_le_bound _ hq.le _
intro z
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
ContinuousLinearMap.one_apply]
@@ -564,7 +564,7 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
intro n hn
refine' lt_of_le_of_lt _ hq'
simp only [F', G', dist_eq_norm] at hn ⊢
- refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
+ refine' ContinuousLinearMap.opNorm_le_bound _ hq.le _
intro z
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
ContinuousLinearMap.one_apply]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2022 Kevin H. Wilson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin H. Wilson
-/
-import Mathbin.Analysis.Calculus.MeanValue
-import Mathbin.Analysis.NormedSpace.IsROrC
-import Mathbin.Order.Filter.Curry
+import Analysis.Calculus.MeanValue
+import Analysis.NormedSpace.IsROrC
+import Order.Filter.Curry
#align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2022 Kevin H. Wilson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin H. Wilson
-
-! This file was ported from Lean 3 source module analysis.calculus.uniform_limits_deriv
-! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.Calculus.MeanValue
import Mathbin.Analysis.NormedSpace.IsROrC
import Mathbin.Order.Filter.Curry
+#align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
+
/-!
# Swapping limits and derivatives via uniform convergence
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -111,6 +111,7 @@ variable {ι : Type _} {l : Filter ι} {E : Type _} [NormedAddCommGroup E] {𝕜
[NormedSpace 𝕜 E] {G : Type _} [NormedAddCommGroup G] [NormedSpace 𝕜 G] {f : ι → E → G}
{g : E → G} {f' : ι → E → E →L[𝕜] G} {g' : E → E →L[𝕜] G} {x : E}
+#print uniformCauchySeqOnFilter_of_fderiv /-
/-- If a sequence of functions real or complex functions are eventually differentiable on a
neighborhood of `x`, they are Cauchy _at_ `x`, and their derivatives
are a uniform Cauchy sequence in a neighborhood of `x`, then the functions form a uniform Cauchy
@@ -170,7 +171,9 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
eventually_prod_iff.mpr ⟨_, ht, _, ht, fun n hn n' hn' => ⟨hn, hn'⟩⟩, fun y => True, by
simp, fun n hn y hy => by simpa [norm_sub_rev, dist_eq_norm] using ht' _ hn.1 _ hn.2⟩
#align uniform_cauchy_seq_on_filter_of_fderiv uniformCauchySeqOnFilter_of_fderiv
+-/
+#print uniformCauchySeqOn_ball_of_fderiv /-
/-- A variant of the second fundamental theorem of calculus (FTC-2): If a sequence of functions
between real or complex normed spaces are differentiable on a ball centered at `x`, they
form a Cauchy sequence _at_ `x`, and their derivatives are Cauchy uniformly on the ball, then the
@@ -232,7 +235,9 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
rw [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg, ← dist_eq_norm]
exact ht' _ hn _ hn'
#align uniform_cauchy_seq_on_ball_of_fderiv uniformCauchySeqOn_ball_of_fderiv
+-/
+#print cauchy_map_of_uniformCauchySeqOn_fderiv /-
/-- If a sequence of functions between real or complex normed spaces are differentiable on a
preconnected open set, they form a Cauchy sequence _at_ `x`, and their derivatives are Cauchy
uniformly on the set, then the functions form a Cauchy sequence at any point in the set. -/
@@ -265,7 +270,9 @@ theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's
rw [dist_comm]; linarith
exact A y (ε / 2) yt (B.trans hε) (Metric.mem_ball.2 hxy)
#align cauchy_map_of_uniform_cauchy_seq_on_fderiv cauchy_map_of_uniformCauchySeqOn_fderiv
+-/
+#print difference_quotients_converge_uniformly /-
/-- If `f_n → g` pointwise and the derivatives `(f_n)' → h` _uniformly_ converge, then
in fact for a fixed `y`, the difference quotients `‖z - y‖⁻¹ • (f_n z - f_n y)` converge
_uniformly_ to `‖z - y‖⁻¹ • (g z - g y)` -/
@@ -310,7 +317,9 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
(fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFDerivWithinAt)
(fun y hy => (e hn (hr' hy)).1.le) (convex_ball x r) (Metric.mem_ball_self hr) hy
#align difference_quotients_converge_uniformly difference_quotients_converge_uniformly
+-/
+#print hasFDerivAt_of_tendstoUniformlyOnFilter /-
/-- `(d/dx) lim_{n → ∞} f n x = lim_{n → ∞} f' n x` when the `f' n` converge
_uniformly_ to their limit at `x`.
@@ -410,8 +419,10 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
rw [norm_sub_rev]
exact (f' n.1 x - g' x).le_op_norm (n.2 - x)
#align has_fderiv_at_of_tendsto_uniformly_on_filter hasFDerivAt_of_tendstoUniformlyOnFilter
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print hasFDerivAt_of_tendstoLocallyUniformlyOn /-
theorem hasFDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
(hf' : TendstoLocallyUniformlyOn f' g' l s) (hf : ∀ n, ∀ x ∈ s, HasFDerivAt (f n) (f' n x) x)
(hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasFDerivAt g (g' x) x :=
@@ -423,7 +434,9 @@ theorem hasFDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set E} (hs : IsO
refine' hasFDerivAt_of_tendstoUniformlyOnFilter _ h4 (eventually_of_mem h1 hfg)
simpa [IsOpen.nhdsWithin_eq hs hx] using tendsto_locally_uniformly_on_iff_filter.mp hf' x hx
#align has_fderiv_at_of_tendsto_locally_uniformly_on hasFDerivAt_of_tendstoLocallyUniformlyOn
+-/
+#print hasFDerivAt_of_tendsto_locally_uniformly_on' /-
/-- A slight variant of `has_fderiv_at_of_tendsto_locally_uniformly_on` with the assumption stated
in terms of `differentiable_on` rather than `has_fderiv_at`. This makes a few proofs nicer in
complex analysis where holomorphicity is assumed but the derivative is not known a priori. -/
@@ -434,7 +447,9 @@ theorem hasFDerivAt_of_tendsto_locally_uniformly_on' [NeBot l] {s : Set E} (hs :
refine' hasFDerivAt_of_tendstoLocallyUniformlyOn hs hf' (fun n z hz => _) hfg hx
exact ((hf n z hz).DifferentiableAt (hs.mem_nhds hz)).HasFDerivAt
#align has_fderiv_at_of_tendsto_locally_uniformly_on' hasFDerivAt_of_tendsto_locally_uniformly_on'
+-/
+#print hasFDerivAt_of_tendstoUniformlyOn /-
/-- `(d/dx) lim_{n → ∞} f n x = lim_{n → ∞} f' n x` when the `f' n` converge
_uniformly_ to their limit on an open set containing `x`. -/
theorem hasFDerivAt_of_tendstoUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
@@ -444,7 +459,9 @@ theorem hasFDerivAt_of_tendstoUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
∀ x : E, x ∈ s → HasFDerivAt g (g' x) x := fun x =>
hasFDerivAt_of_tendstoLocallyUniformlyOn hs hf'.TendstoLocallyUniformlyOn hf hfg
#align has_fderiv_at_of_tendsto_uniformly_on hasFDerivAt_of_tendstoUniformlyOn
+-/
+#print hasFDerivAt_of_tendstoUniformly /-
/-- `(d/dx) lim_{n → ∞} f n x = lim_{n → ∞} f' n x` when the `f' n` converge
_uniformly_ to their limit. -/
theorem hasFDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l)
@@ -457,6 +474,7 @@ theorem hasFDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g'
have hf' : TendstoUniformlyOn f' g' l Set.univ := by rwa [tendstoUniformlyOn_univ]
refine' hasFDerivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg x (Set.mem_univ x)
#align has_fderiv_at_of_tendsto_uniformly hasFDerivAt_of_tendstoUniformly
+-/
end LimitsOfDerivatives
@@ -473,6 +491,7 @@ derivatives
variable {ι : Type _} {l : Filter ι} {𝕜 : Type _} [IsROrC 𝕜] {G : Type _} [NormedAddCommGroup G]
[NormedSpace 𝕜 G] {f : ι → 𝕜 → G} {g : 𝕜 → G} {f' : ι → 𝕜 → G} {g' : 𝕜 → G} {x : 𝕜}
+#print UniformCauchySeqOnFilter.one_smulRight /-
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
(hf' : UniformCauchySeqOnFilter f' l l') :
@@ -496,7 +515,9 @@ theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
rw [← smul_sub, norm_smul, mul_comm]
exact mul_le_mul hn.le rfl.le (norm_nonneg _) hq.le
#align uniform_cauchy_seq_on_filter.one_smul_right UniformCauchySeqOnFilter.one_smulRight
+-/
+#print uniformCauchySeqOnFilter_of_deriv /-
theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (𝓝 x))
(hf : ∀ᶠ n : ι × 𝕜 in l ×ᶠ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) :=
@@ -504,7 +525,9 @@ theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (
simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
exact uniformCauchySeqOnFilter_of_fderiv hf'.one_smul_right hf hfg
#align uniform_cauchy_seq_on_filter_of_deriv uniformCauchySeqOnFilter_of_deriv
+-/
+#print uniformCauchySeqOn_ball_of_deriv /-
theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
(hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) :=
@@ -519,7 +542,9 @@ theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f'
exact hf'.one_smul_right
exact uniformCauchySeqOn_ball_of_fderiv hf' hf hfg
#align uniform_cauchy_seq_on_ball_of_deriv uniformCauchySeqOn_ball_of_deriv
+-/
+#print hasDerivAt_of_tendstoUniformlyOnFilter /-
theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
(hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x))
(hf : ∀ᶠ n : ι × 𝕜 in l ×ᶠ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
@@ -550,7 +575,9 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
exact mul_le_mul hn.le rfl.le (norm_nonneg _) hq.le
exact hasFDerivAt_of_tendstoUniformlyOnFilter hf' hf hfg
#align has_deriv_at_of_tendsto_uniformly_on_filter hasDerivAt_of_tendstoUniformlyOnFilter
+-/
+#print hasDerivAt_of_tendstoLocallyUniformlyOn /-
theorem hasDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set 𝕜} (hs : IsOpen s)
(hf' : TendstoLocallyUniformlyOn f' g' l s)
(hf : ∀ᶠ n in l, ∀ x ∈ s, HasDerivAt (f n) (f' n x) x)
@@ -562,7 +589,9 @@ theorem hasDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set 𝕜} (hs : I
refine' hasDerivAt_of_tendstoUniformlyOnFilter _ h2 (eventually_of_mem h1 hfg)
simpa [IsOpen.nhdsWithin_eq hs hx] using tendsto_locally_uniformly_on_iff_filter.mp hf' x hx
#align has_deriv_at_of_tendsto_locally_uniformly_on hasDerivAt_of_tendstoLocallyUniformlyOn
+-/
+#print hasDerivAt_of_tendsto_locally_uniformly_on' /-
/-- A slight variant of `has_deriv_at_of_tendsto_locally_uniformly_on` with the assumption stated in
terms of `differentiable_on` rather than `has_deriv_at`. This makes a few proofs nicer in complex
analysis where holomorphicity is assumed but the derivative is not known a priori. -/
@@ -574,7 +603,9 @@ theorem hasDerivAt_of_tendsto_locally_uniformly_on' [NeBot l] {s : Set 𝕜} (hs
refine' hasDerivAt_of_tendstoLocallyUniformlyOn hs hf' _ hfg hx
filter_upwards [hf] with n h z hz using ((h z hz).DifferentiableAt (hs.mem_nhds hz)).HasDerivAt
#align has_deriv_at_of_tendsto_locally_uniformly_on' hasDerivAt_of_tendsto_locally_uniformly_on'
+-/
+#print hasDerivAt_of_tendstoUniformlyOn /-
theorem hasDerivAt_of_tendstoUniformlyOn [NeBot l] {s : Set 𝕜} (hs : IsOpen s)
(hf' : TendstoUniformlyOn f' g' l s)
(hf : ∀ᶠ n in l, ∀ x : 𝕜, x ∈ s → HasDerivAt (f n) (f' n x) x)
@@ -582,7 +613,9 @@ theorem hasDerivAt_of_tendstoUniformlyOn [NeBot l] {s : Set 𝕜} (hs : IsOpen s
∀ x : 𝕜, x ∈ s → HasDerivAt g (g' x) x := fun x =>
hasDerivAt_of_tendstoLocallyUniformlyOn hs hf'.TendstoLocallyUniformlyOn hf hfg
#align has_deriv_at_of_tendsto_uniformly_on hasDerivAt_of_tendstoUniformlyOn
+-/
+#print hasDerivAt_of_tendstoUniformly /-
theorem hasDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l)
(hf : ∀ᶠ n in l, ∀ x : 𝕜, HasDerivAt (f n) (f' n x) x)
(hfg : ∀ x : 𝕜, Tendsto (fun n => f n x) l (𝓝 (g x))) : ∀ x : 𝕜, HasDerivAt g (g' x) x :=
@@ -594,6 +627,7 @@ theorem hasDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l
have hf' : TendstoUniformlyOn f' g' l Set.univ := by rwa [tendstoUniformlyOn_univ]
exact hasDerivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg x (Set.mem_univ x)
#align has_deriv_at_of_tendsto_uniformly hasDerivAt_of_tendstoUniformly
+-/
end deriv
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin H. Wilson
! This file was ported from Lean 3 source module analysis.calculus.uniform_limits_deriv
-! leanprover-community/mathlib commit 3f655f5297b030a87d641ad4e825af8d9679eb0b
+! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.Order.Filter.Curry
/-!
# Swapping limits and derivatives via uniform convergence
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
The purpose of this file is to prove that the derivative of the pointwise limit of a sequence of
functions is the pointwise limit of the functions' derivatives when the derivatives converge
_uniformly_. The formal statement appears as `has_fderiv_at_of_tendsto_locally_uniformly_at`.
@@ -239,7 +242,7 @@ theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's
Cauchy (map (fun n => f n x) l) :=
by
have : ne_bot l := (cauchy_map_iff.1 hfg).1
- let t := { y | y ∈ s ∧ Cauchy (map (fun n => f n y) l) }
+ let t := {y | y ∈ s ∧ Cauchy (map (fun n => f n y) l)}
suffices H : s ⊆ t; exact (H hx).2
have A : ∀ x ε, x ∈ t → Metric.ball x ε ⊆ s → Metric.ball x ε ⊆ t := fun x ε xt hx y hy =>
⟨hx hy,
@@ -569,7 +572,7 @@ theorem hasDerivAt_of_tendsto_locally_uniformly_on' [NeBot l] {s : Set 𝕜} (hs
(hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasDerivAt g (g' x) x :=
by
refine' hasDerivAt_of_tendstoLocallyUniformlyOn hs hf' _ hfg hx
- filter_upwards [hf]with n h z hz using((h z hz).DifferentiableAt (hs.mem_nhds hz)).HasDerivAt
+ filter_upwards [hf] with n h z hz using ((h z hz).DifferentiableAt (hs.mem_nhds hz)).HasDerivAt
#align has_deriv_at_of_tendsto_locally_uniformly_on' hasDerivAt_of_tendsto_locally_uniformly_on'
theorem hasDerivAt_of_tendstoUniformlyOn [NeBot l] {s : Set 𝕜} (hs : IsOpen s)
@@ -586,7 +589,7 @@ theorem hasDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l
by
intro x
have hf : ∀ᶠ n in l, ∀ x : 𝕜, x ∈ Set.univ → HasDerivAt (f n) (f' n x) x := by
- filter_upwards [hf]with n h x hx using h x
+ filter_upwards [hf] with n h x hx using h x
have hfg : ∀ x : 𝕜, x ∈ Set.univ → tendsto (fun n => f n x) l (𝓝 (g x)) := by simp [hfg]
have hf' : TendstoUniformlyOn f' g' l Set.univ := by rwa [tendstoUniformlyOn_univ]
exact hasDerivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg x (Set.mem_univ x)
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -155,7 +155,7 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
simp only [Pi.zero_apply, dist_zero_left] at e ⊢
refine' lt_of_le_of_lt _ (hxyε y hy)
exact
- Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
+ Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le
(fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFDerivWithinAt)
(fun y hy => (e hn (hr' hy)).1.le) (convex_ball x r) (Metric.mem_ball_self hr) hy
· -- This is just `hfg` run through `eventually_prod_iff`
@@ -212,7 +212,7 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
intro n hn y hy
simp_rw [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
have mvt :=
- Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
+ Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le
(fun z hz => ((hf n.1 z hz).sub (hf n.2 z hz)).HasFDerivWithinAt) (fun z hz => (hn z hz).le)
(convex_ball x r) (Metric.mem_ball_self hr) hy
refine' lt_of_le_of_lt mvt _
@@ -303,7 +303,7 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
rw [inv_mul_le_iff hyz, mul_comm, sub_sub_sub_comm]
simp only [Pi.zero_apply, dist_zero_left] at e
refine'
- Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
+ Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le
(fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFDerivWithinAt)
(fun y hy => (e hn (hr' hy)).1.le) (convex_ball x r) (Metric.mem_ball_self hr) hy
#align difference_quotients_converge_uniformly difference_quotients_converge_uniformly
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -117,19 +117,19 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) :=
by
let : NormedSpace ℝ E; exact NormedSpace.restrictScalars ℝ 𝕜 _
- rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hf'⊢
+ rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hf' ⊢
suffices
TendstoUniformlyOnFilter (fun (n : ι × ι) (z : E) => f n.1 z - f n.2 z - (f n.1 x - f n.2 x)) 0
(l ×ᶠ l) (𝓝 x) ∧
TendstoUniformlyOnFilter (fun (n : ι × ι) (z : E) => f n.1 x - f n.2 x) 0 (l ×ᶠ l) (𝓝 x)
by
have := this.1.add this.2
- rw [add_zero] at this
+ rw [add_zero] at this
exact this.congr (by simp)
constructor
· -- This inequality follows from the mean value theorem. To apply it, we will need to shrink our
-- neighborhood to small enough ball
- rw [Metric.tendstoUniformlyOnFilter_iff] at hf'⊢
+ rw [Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
intro ε hε
have := (tendsto_swap4_prod.eventually (hf.prod_mk hf)).diag_of_prod_right
obtain ⟨a, b, c, d, e⟩ := eventually_prod_iff.1 ((hf' ε hε).And this)
@@ -141,7 +141,7 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
have hxy : ∀ y : E, y ∈ Metric.ball x r → ‖y - x‖ < 1 :=
by
intro y hy
- rw [Metric.mem_ball, dist_eq_norm] at hy
+ rw [Metric.mem_ball, dist_eq_norm] at hy
exact lt_of_lt_of_le hy (min_le_left _ _)
have hxyε : ∀ y : E, y ∈ Metric.ball x r → ε * ‖y - x‖ < ε :=
by
@@ -152,7 +152,7 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
eventually_prod_iff.mpr
⟨_, b, fun e : E => Metric.ball x r e,
eventually_mem_set.mpr (metric.nhds_basis_ball.mem_of_mem hr), fun n hn y hy => _⟩
- simp only [Pi.zero_apply, dist_zero_left] at e⊢
+ simp only [Pi.zero_apply, dist_zero_left] at e ⊢
refine' lt_of_le_of_lt _ (hxyε y hy)
exact
Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
@@ -188,21 +188,21 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
·
simp only [Metric.ball_eq_empty.2 hr, UniformCauchySeqOn, Set.mem_empty_iff_false,
IsEmpty.forall_iff, eventually_const, imp_true_iff]
- rw [SeminormedAddGroup.uniformCauchySeqOn_iff_tendstoUniformlyOn_zero] at hf'⊢
+ rw [SeminormedAddGroup.uniformCauchySeqOn_iff_tendstoUniformlyOn_zero] at hf' ⊢
suffices
TendstoUniformlyOn (fun (n : ι × ι) (z : E) => f n.1 z - f n.2 z - (f n.1 x - f n.2 x)) 0
(l ×ᶠ l) (Metric.ball x r) ∧
TendstoUniformlyOn (fun (n : ι × ι) (z : E) => f n.1 x - f n.2 x) 0 (l ×ᶠ l) (Metric.ball x r)
by
have := this.1.add this.2
- rw [add_zero] at this
+ rw [add_zero] at this
refine' this.congr _
apply eventually_of_forall
intro n z hz
simp
constructor
· -- This inequality follows from the mean value theorem
- rw [Metric.tendstoUniformlyOn_iff] at hf'⊢
+ rw [Metric.tendstoUniformlyOn_iff] at hf' ⊢
intro ε hε
obtain ⟨q, hqpos, hq⟩ : ∃ q : ℝ, 0 < q ∧ q * r < ε :=
by
@@ -210,7 +210,7 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
exact exists_pos_mul_lt hε.lt r
apply (hf' q hqpos.gt).mono
intro n hn y hy
- simp_rw [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn⊢
+ simp_rw [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
have mvt :=
Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
(fun z hz => ((hf n.1 z hz).sub (hf n.2 z hz)).HasFDerivWithinAt) (fun z hz => (hn z hz).le)
@@ -254,9 +254,9 @@ theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's
have st_nonempty : (s ∩ t).Nonempty := ⟨x₀, hx₀, ⟨hx₀, hfg⟩⟩
suffices H : closure t ∩ s ⊆ t; exact h's.subset_of_closure_inter_subset open_t st_nonempty H
rintro x ⟨xt, xs⟩
- obtain ⟨ε, εpos, hε⟩ : ∃ (ε : ℝ)(H : ε > 0), Metric.ball x ε ⊆ s
+ obtain ⟨ε, εpos, hε⟩ : ∃ (ε : ℝ) (H : ε > 0), Metric.ball x ε ⊆ s
exact Metric.isOpen_iff.1 hs x xs
- obtain ⟨y, yt, hxy⟩ : ∃ (y : E)(yt : y ∈ t), dist x y < ε / 2
+ obtain ⟨y, yt, hxy⟩ : ∃ (y : E) (yt : y ∈ t), dist x y < ε / 2
exact Metric.mem_closure_iff.1 xt _ (half_pos εpos)
have B : Metric.ball y (ε / 2) ⊆ Metric.ball x ε := by apply Metric.ball_subset_ball';
rw [dist_comm]; linarith
@@ -283,8 +283,8 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero]
rw [Metric.tendstoUniformlyOnFilter_iff]
have hfg' := hf'.uniform_cauchy_seq_on_filter
- rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hfg'
- rw [Metric.tendstoUniformlyOnFilter_iff] at hfg'
+ rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hfg'
+ rw [Metric.tendstoUniformlyOnFilter_iff] at hfg'
intro ε hε
obtain ⟨q, hqpos, hqε⟩ := exists_pos_rat_lt hε
specialize hfg' (q : ℝ) (by simp [hqpos])
@@ -301,7 +301,7 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
by_cases hyz' : x = y; · simp [hyz', hqpos.le]
have hyz : 0 < ‖y - x‖ := by rw [norm_pos_iff]; intro hy'; exact hyz' (eq_of_sub_eq_zero hy').symm
rw [inv_mul_le_iff hyz, mul_comm, sub_sub_sub_comm]
- simp only [Pi.zero_apply, dist_zero_left] at e
+ simp only [Pi.zero_apply, dist_zero_left] at e
refine'
Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
(fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFDerivWithinAt)
@@ -333,11 +333,11 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
suffices
tendsto (fun y : ι × E => ‖y.2 - x‖⁻¹ * ‖g y.2 - g x - (g' x) (y.2 - x)‖) (l.curry (𝓝 x)) (𝓝 0)
by
- rw [Metric.tendsto_nhds] at this⊢
+ rw [Metric.tendsto_nhds] at this ⊢
intro ε hε
specialize this ε hε
- rw [eventually_curry_iff] at this
- simp only at this
+ rw [eventually_curry_iff] at this
+ simp only at this
exact (eventually_const.mp this).mono (by simp only [imp_self, forall_const])
-- With the new quantifier in hand, we can perform the famous `ε/3` proof. Specifically,
-- we will break up the limit (the difference functions minus the derivative go to 0) into 3:
@@ -365,13 +365,13 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
refine' tendsto.add (tendsto.add _ _) _
simp only
· have := difference_quotients_converge_uniformly hf' hf hfg
- rw [Metric.tendstoUniformlyOnFilter_iff] at this
+ rw [Metric.tendstoUniformlyOnFilter_iff] at this
rw [Metric.tendsto_nhds]
intro ε hε
apply ((this ε hε).filter_mono curry_le_prod).mono
intro n hn
- rw [dist_eq_norm] at hn⊢
- rw [← smul_sub] at hn
+ rw [dist_eq_norm] at hn ⊢
+ rw [← smul_sub] at hn
rwa [sub_zero]
· -- (Almost) the definition of the derivatives
rw [Metric.tendsto_nhds]
@@ -379,21 +379,21 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
rw [eventually_curry_iff]
refine' hf.curry.mono fun n hn => _
have := hn.self_of_nhds
- rw [hasFDerivAt_iff_tendsto, Metric.tendsto_nhds] at this
+ rw [hasFDerivAt_iff_tendsto, Metric.tendsto_nhds] at this
refine' (this ε hε).mono fun y hy => _
- rw [dist_eq_norm] at hy⊢
- simp only [sub_zero, map_sub, norm_mul, norm_inv, norm_norm] at hy⊢
+ rw [dist_eq_norm] at hy ⊢
+ simp only [sub_zero, map_sub, norm_mul, norm_inv, norm_norm] at hy ⊢
rw [norm_smul, norm_inv, IsROrC.norm_coe_norm]
exact hy
· -- hfg' after specializing to `x` and applying the definition of the operator norm
refine' tendsto.mono_left _ curry_le_prod
have h1 : tendsto (fun n : ι × E => g' n.2 - f' n.1 n.2) (l ×ᶠ 𝓝 x) (𝓝 0) :=
by
- rw [Metric.tendstoUniformlyOnFilter_iff] at hf'
+ rw [Metric.tendstoUniformlyOnFilter_iff] at hf'
exact metric.tendsto_nhds.mpr fun ε hε => by simpa using hf' ε hε
have h2 : tendsto (fun n : ι => g' x - f' n x) l (𝓝 0) :=
by
- rw [Metric.tendsto_nhds] at h1⊢
+ rw [Metric.tendsto_nhds] at h1 ⊢
exact fun ε hε => (h1 ε hε).curry.mono fun n hn => hn.self_of_nhds
have := tendsto_fst.comp (h2.prod_map tendsto_id)
refine' squeeze_zero_norm _ (tendsto_zero_iff_norm_tendsto_zero.mp this)
@@ -479,13 +479,13 @@ theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
-- metrics are written in terms of `<`. So we need to shrink `ε` utilizing the archimedean
-- property of `ℝ`
rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
- Metric.tendstoUniformlyOnFilter_iff] at hf'⊢
+ Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
intro ε hε
obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
apply (hf' q hq).mono
intro n hn
refine' lt_of_le_of_lt _ hq'
- simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn⊢
+ simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
intro z
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
@@ -498,7 +498,7 @@ theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (
(hf : ∀ᶠ n : ι × 𝕜 in l ×ᶠ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) :=
by
- simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
+ simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
exact uniformCauchySeqOnFilter_of_fderiv hf'.one_smul_right hf hfg
#align uniform_cauchy_seq_on_filter_of_deriv uniformCauchySeqOnFilter_of_deriv
@@ -506,8 +506,8 @@ theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f'
(hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) :=
by
- simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
- rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
+ simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
+ rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
have hf' :
UniformCauchySeqOn (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smul_right (f' n z)) l
(Metric.ball x r) :=
@@ -526,19 +526,19 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
-- can recognize them when we apply `has_fderiv_at_of_tendsto_uniformly_on_filter`
let F' n z := (1 : 𝕜 →L[𝕜] 𝕜).smul_right (f' n z)
let G' z := (1 : 𝕜 →L[𝕜] 𝕜).smul_right (g' z)
- simp_rw [hasDerivAt_iff_hasFDerivAt] at hf⊢
+ simp_rw [hasDerivAt_iff_hasFDerivAt] at hf ⊢
-- Now we need to rewrite hf' in terms of continuous_linear_maps. The tricky part is that
-- operator norms are written in terms of `≤` whereas metrics are written in terms of `<`. So we
-- need to shrink `ε` utilizing the archimedean property of `ℝ`
have hf' : TendstoUniformlyOnFilter F' G' l (𝓝 x) :=
by
- rw [Metric.tendstoUniformlyOnFilter_iff] at hf'⊢
+ rw [Metric.tendstoUniformlyOnFilter_iff] at hf' ⊢
intro ε hε
obtain ⟨q, hq, hq'⟩ := exists_between hε.lt
apply (hf' q hq).mono
intro n hn
refine' lt_of_le_of_lt _ hq'
- simp only [F', G', dist_eq_norm] at hn⊢
+ simp only [F', G', dist_eq_norm] at hn ⊢
refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
intro z
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -100,7 +100,7 @@ uniform convergence, limits of derivatives
open Filter
-open uniformity Filter Topology
+open scoped uniformity Filter Topology
section LimitsOfDerivatives
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -116,8 +116,7 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
(hf : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFDerivAt (f n.1) (f' n.1 n.2) n.2)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) :=
by
- let : NormedSpace ℝ E
- exact NormedSpace.restrictScalars ℝ 𝕜 _
+ let : NormedSpace ℝ E; exact NormedSpace.restrictScalars ℝ 𝕜 _
rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hf'⊢
suffices
TendstoUniformlyOnFilter (fun (n : ι × ι) (z : E) => f n.1 z - f n.2 z - (f n.1 x - f n.2 x)) 0
@@ -183,8 +182,7 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
(hf : ∀ n : ι, ∀ y : E, y ∈ Metric.ball x r → HasFDerivAt (f n) (f' n y) y)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) :=
by
- let : NormedSpace ℝ E
- exact NormedSpace.restrictScalars ℝ 𝕜 _
+ let : NormedSpace ℝ E; exact NormedSpace.restrictScalars ℝ 𝕜 _
have : ne_bot l := (cauchy_map_iff.1 hfg).1
rcases le_or_lt r 0 with (hr | hr)
·
@@ -242,8 +240,7 @@ theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's
by
have : ne_bot l := (cauchy_map_iff.1 hfg).1
let t := { y | y ∈ s ∧ Cauchy (map (fun n => f n y) l) }
- suffices H : s ⊆ t
- exact (H hx).2
+ suffices H : s ⊆ t; exact (H hx).2
have A : ∀ x ε, x ∈ t → Metric.ball x ε ⊆ s → Metric.ball x ε ⊆ t := fun x ε xt hx y hy =>
⟨hx hy,
(uniformCauchySeqOn_ball_of_fderiv (hf'.mono hx) (fun n y hy => hf n y (hx hy))
@@ -255,18 +252,14 @@ theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's
rcases Metric.isOpen_iff.1 hs x hx.1 with ⟨ε, εpos, hε⟩
exact ⟨ε, εpos, A x ε hx hε⟩
have st_nonempty : (s ∩ t).Nonempty := ⟨x₀, hx₀, ⟨hx₀, hfg⟩⟩
- suffices H : closure t ∩ s ⊆ t
- exact h's.subset_of_closure_inter_subset open_t st_nonempty H
+ suffices H : closure t ∩ s ⊆ t; exact h's.subset_of_closure_inter_subset open_t st_nonempty H
rintro x ⟨xt, xs⟩
obtain ⟨ε, εpos, hε⟩ : ∃ (ε : ℝ)(H : ε > 0), Metric.ball x ε ⊆ s
exact Metric.isOpen_iff.1 hs x xs
obtain ⟨y, yt, hxy⟩ : ∃ (y : E)(yt : y ∈ t), dist x y < ε / 2
exact Metric.mem_closure_iff.1 xt _ (half_pos εpos)
- have B : Metric.ball y (ε / 2) ⊆ Metric.ball x ε :=
- by
- apply Metric.ball_subset_ball'
- rw [dist_comm]
- linarith
+ have B : Metric.ball y (ε / 2) ⊆ Metric.ball x ε := by apply Metric.ball_subset_ball';
+ rw [dist_comm]; linarith
exact A y (ε / 2) yt (B.trans hε) (Metric.mem_ball.2 hxy)
#align cauchy_map_of_uniform_cauchy_seq_on_fderiv cauchy_map_of_uniformCauchySeqOn_fderiv
@@ -279,8 +272,7 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
TendstoUniformlyOnFilter (fun n : ι => fun y : E => (‖y - x‖⁻¹ : 𝕜) • (f n y - f n x))
(fun y : E => (‖y - x‖⁻¹ : 𝕜) • (g y - g x)) l (𝓝 x) :=
by
- let : NormedSpace ℝ E
- exact NormedSpace.restrictScalars ℝ 𝕜 _
+ let : NormedSpace ℝ E; exact NormedSpace.restrictScalars ℝ 𝕜 _
rcases eq_or_ne l ⊥ with (hl | hl)
· simp only [hl, TendstoUniformlyOnFilter, bot_prod, eventually_bot, imp_true_iff]
haveI : ne_bot l := ⟨hl⟩
@@ -306,12 +298,8 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
simp only [Pi.zero_apply, dist_zero_left]
rw [← smul_sub, norm_smul, norm_inv, IsROrC.norm_coe_norm]
refine' lt_of_le_of_lt _ hqε
- by_cases hyz' : x = y
- · simp [hyz', hqpos.le]
- have hyz : 0 < ‖y - x‖ := by
- rw [norm_pos_iff]
- intro hy'
- exact hyz' (eq_of_sub_eq_zero hy').symm
+ by_cases hyz' : x = y; · simp [hyz', hqpos.le]
+ have hyz : 0 < ‖y - x‖ := by rw [norm_pos_iff]; intro hy'; exact hyz' (eq_of_sub_eq_zero hy').symm
rw [inv_mul_le_iff hyz, mul_comm, sub_sub_sub_comm]
simp only [Pi.zero_apply, dist_zero_left] at e
refine'
@@ -369,14 +357,10 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
(‖a.2 - x‖⁻¹ : 𝕜) • (f a.1 a.2 - f a.1 x - ((f' a.1 x) a.2 - (f' a.1 x) x))) +
fun a : ι × E => (‖a.2 - x‖⁻¹ : 𝕜) • (f' a.1 x - g' x) (a.2 - x) :=
by
- ext
- simp only [Pi.add_apply]
- rw [← smul_add, ← smul_add]
- congr
+ ext; simp only [Pi.add_apply]; rw [← smul_add, ← smul_add]; congr
simp only [map_sub, sub_add_sub_cancel, ContinuousLinearMap.coe_sub', Pi.sub_apply]
simp_rw [this]
- have : 𝓝 (0 : G) = 𝓝 (0 + 0 + 0)
- simp only [add_zero]
+ have : 𝓝 (0 : G) = 𝓝 (0 + 0 + 0); simp only [add_zero]
rw [this]
refine' tendsto.add (tendsto.add _ _) _
simp only
@@ -415,11 +399,8 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
refine' squeeze_zero_norm _ (tendsto_zero_iff_norm_tendsto_zero.mp this)
intro n
simp_rw [norm_smul, norm_inv, IsROrC.norm_coe_norm]
- by_cases hx : x = n.2
- · simp [hx]
- have hnx : 0 < ‖n.2 - x‖ := by
- rw [norm_pos_iff]
- intro hx'
+ by_cases hx : x = n.2; · simp [hx]
+ have hnx : 0 < ‖n.2 - x‖ := by rw [norm_pos_iff]; intro hx';
exact hx (eq_of_sub_eq_zero hx').symm
rw [inv_mul_le_iff hnx, mul_comm]
simp only [Function.comp_apply, Prod_map]
mathlib commit https://github.com/leanprover-community/mathlib/commit/33c67ae661dd8988516ff7f247b0be3018cdd952
@@ -113,7 +113,7 @@ neighborhood of `x`, they are Cauchy _at_ `x`, and their derivatives
are a uniform Cauchy sequence in a neighborhood of `x`, then the functions form a uniform Cauchy
sequence in a neighborhood of `x`. -/
theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l (𝓝 x))
- (hf : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFderivAt (f n.1) (f' n.1 n.2) n.2)
+ (hf : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFDerivAt (f n.1) (f' n.1 n.2) n.2)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) :=
by
let : NormedSpace ℝ E
@@ -157,7 +157,7 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
refine' lt_of_le_of_lt _ (hxyε y hy)
exact
Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
- (fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFderivWithinAt)
+ (fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFDerivWithinAt)
(fun y hy => (e hn (hr' hy)).1.le) (convex_ball x r) (Metric.mem_ball_self hr) hy
· -- This is just `hfg` run through `eventually_prod_iff`
refine' metric.tendsto_uniformly_on_filter_iff.mpr fun ε hε => _
@@ -180,7 +180,7 @@ with any connected, bounded, open set and replacing uniform convergence with loc
convergence. See `cauchy_map_of_uniform_cauchy_seq_on_fderiv`.
-/
theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
- (hf : ∀ n : ι, ∀ y : E, y ∈ Metric.ball x r → HasFderivAt (f n) (f' n y) y)
+ (hf : ∀ n : ι, ∀ y : E, y ∈ Metric.ball x r → HasFDerivAt (f n) (f' n y) y)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) :=
by
let : NormedSpace ℝ E
@@ -215,7 +215,7 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
simp_rw [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn⊢
have mvt :=
Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
- (fun z hz => ((hf n.1 z hz).sub (hf n.2 z hz)).HasFderivWithinAt) (fun z hz => (hn z hz).le)
+ (fun z hz => ((hf n.1 z hz).sub (hf n.2 z hz)).HasFDerivWithinAt) (fun z hz => (hn z hz).le)
(convex_ball x r) (Metric.mem_ball_self hr) hy
refine' lt_of_le_of_lt mvt _
have : q * ‖y - x‖ < q * r :=
@@ -236,7 +236,7 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
preconnected open set, they form a Cauchy sequence _at_ `x`, and their derivatives are Cauchy
uniformly on the set, then the functions form a Cauchy sequence at any point in the set. -/
theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's : IsPreconnected s)
- (hf' : UniformCauchySeqOn f' l s) (hf : ∀ n : ι, ∀ y : E, y ∈ s → HasFderivAt (f n) (f' n y) y)
+ (hf' : UniformCauchySeqOn f' l s) (hf : ∀ n : ι, ∀ y : E, y ∈ s → HasFDerivAt (f n) (f' n y) y)
{x₀ x : E} (hx₀ : x₀ ∈ s) (hx : x ∈ s) (hfg : Cauchy (map (fun n => f n x₀) l)) :
Cauchy (map (fun n => f n x) l) :=
by
@@ -274,7 +274,7 @@ theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's
in fact for a fixed `y`, the difference quotients `‖z - y‖⁻¹ • (f_n z - f_n y)` converge
_uniformly_ to `‖z - y‖⁻¹ • (g z - g y)` -/
theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x))
- (hf : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFderivAt (f n.1) (f' n.1 n.2) n.2)
+ (hf : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFDerivAt (f n.1) (f' n.1 n.2) n.2)
(hfg : ∀ᶠ y : E in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))) :
TendstoUniformlyOnFilter (fun n : ι => fun y : E => (‖y - x‖⁻¹ : 𝕜) • (f n y - f n x))
(fun y : E => (‖y - x‖⁻¹ : 𝕜) • (g y - g x)) l (𝓝 x) :=
@@ -316,7 +316,7 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
simp only [Pi.zero_apply, dist_zero_left] at e
refine'
Convex.norm_image_sub_le_of_norm_has_fderiv_within_le
- (fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFderivWithinAt)
+ (fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).HasFDerivWithinAt)
(fun y hy => (e hn (hr' hy)).1.le) (convex_ball x r) (Metric.mem_ball_self hr) hy
#align difference_quotients_converge_uniformly difference_quotients_converge_uniformly
@@ -329,10 +329,10 @@ In words the assumptions mean the following:
* `hf`: For all `(y, n)` with `y` sufficiently close to `x` and `n` sufficiently large, `f' n` is
the derivative of `f n`
* `hfg`: The `f n` converge pointwise to `g` on a neighborhood of `x` -/
-theorem hasFderivAt_of_tendstoUniformlyOnFilter [NeBot l]
+theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
(hf' : TendstoUniformlyOnFilter f' g' l (𝓝 x))
- (hf : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFderivAt (f n.1) (f' n.1 n.2) n.2)
- (hfg : ∀ᶠ y in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))) : HasFderivAt g (g' x) x :=
+ (hf : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFDerivAt (f n.1) (f' n.1 n.2) n.2)
+ (hfg : ∀ᶠ y in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))) : HasFDerivAt g (g' x) x :=
by
-- The proof strategy follows several steps:
-- 1. The quantifiers in the definition of the derivative are
@@ -340,7 +340,7 @@ theorem hasFderivAt_of_tendstoUniformlyOnFilter [NeBot l]
-- `∀ ε > 0, ∃N, ∀n ≥ N, ∃δ > 0, ∀y ∈ B_δ(x)` which will allow us to introduce the `f(') n`
-- 2. The order of the quantifiers `hfg` are opposite to what we need. We will be able to swap
-- the quantifiers using the uniform convergence assumption
- rw [hasFderivAt_iff_tendsto]
+ rw [hasFDerivAt_iff_tendsto]
-- Introduce extra quantifier via curried filters
suffices
tendsto (fun y : ι × E => ‖y.2 - x‖⁻¹ * ‖g y.2 - g x - (g' x) (y.2 - x)‖) (l.curry (𝓝 x)) (𝓝 0)
@@ -395,7 +395,7 @@ theorem hasFderivAt_of_tendstoUniformlyOnFilter [NeBot l]
rw [eventually_curry_iff]
refine' hf.curry.mono fun n hn => _
have := hn.self_of_nhds
- rw [hasFderivAt_iff_tendsto, Metric.tendsto_nhds] at this
+ rw [hasFDerivAt_iff_tendsto, Metric.tendsto_nhds] at this
refine' (this ε hε).mono fun y hy => _
rw [dist_eq_norm] at hy⊢
simp only [sub_zero, map_sub, norm_mul, norm_inv, norm_norm] at hy⊢
@@ -425,54 +425,54 @@ theorem hasFderivAt_of_tendstoUniformlyOnFilter [NeBot l]
simp only [Function.comp_apply, Prod_map]
rw [norm_sub_rev]
exact (f' n.1 x - g' x).le_op_norm (n.2 - x)
-#align has_fderiv_at_of_tendsto_uniformly_on_filter hasFderivAt_of_tendstoUniformlyOnFilter
+#align has_fderiv_at_of_tendsto_uniformly_on_filter hasFDerivAt_of_tendstoUniformlyOnFilter
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem hasFderivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
- (hf' : TendstoLocallyUniformlyOn f' g' l s) (hf : ∀ n, ∀ x ∈ s, HasFderivAt (f n) (f' n x) x)
- (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasFderivAt g (g' x) x :=
+theorem hasFDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
+ (hf' : TendstoLocallyUniformlyOn f' g' l s) (hf : ∀ n, ∀ x ∈ s, HasFDerivAt (f n) (f' n x) x)
+ (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasFDerivAt g (g' x) x :=
by
have h1 : s ∈ 𝓝 x := hs.mem_nhds hx
have h3 : Set.univ ×ˢ s ∈ l ×ᶠ 𝓝 x := by simp only [h1, prod_mem_prod_iff, univ_mem, and_self_iff]
- have h4 : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFderivAt (f n.1) (f' n.1 n.2) n.2 :=
+ have h4 : ∀ᶠ n : ι × E in l ×ᶠ 𝓝 x, HasFDerivAt (f n.1) (f' n.1 n.2) n.2 :=
eventually_of_mem h3 fun ⟨n, z⟩ ⟨hn, hz⟩ => hf n z hz
- refine' hasFderivAt_of_tendstoUniformlyOnFilter _ h4 (eventually_of_mem h1 hfg)
+ refine' hasFDerivAt_of_tendstoUniformlyOnFilter _ h4 (eventually_of_mem h1 hfg)
simpa [IsOpen.nhdsWithin_eq hs hx] using tendsto_locally_uniformly_on_iff_filter.mp hf' x hx
-#align has_fderiv_at_of_tendsto_locally_uniformly_on hasFderivAt_of_tendstoLocallyUniformlyOn
+#align has_fderiv_at_of_tendsto_locally_uniformly_on hasFDerivAt_of_tendstoLocallyUniformlyOn
/-- A slight variant of `has_fderiv_at_of_tendsto_locally_uniformly_on` with the assumption stated
in terms of `differentiable_on` rather than `has_fderiv_at`. This makes a few proofs nicer in
complex analysis where holomorphicity is assumed but the derivative is not known a priori. -/
-theorem hasFderivAt_of_tendsto_locally_uniformly_on' [NeBot l] {s : Set E} (hs : IsOpen s)
+theorem hasFDerivAt_of_tendsto_locally_uniformly_on' [NeBot l] {s : Set E} (hs : IsOpen s)
(hf' : TendstoLocallyUniformlyOn (fderiv 𝕜 ∘ f) g' l s) (hf : ∀ n, DifferentiableOn 𝕜 (f n) s)
- (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasFderivAt g (g' x) x :=
+ (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasFDerivAt g (g' x) x :=
by
- refine' hasFderivAt_of_tendstoLocallyUniformlyOn hs hf' (fun n z hz => _) hfg hx
- exact ((hf n z hz).DifferentiableAt (hs.mem_nhds hz)).HasFderivAt
-#align has_fderiv_at_of_tendsto_locally_uniformly_on' hasFderivAt_of_tendsto_locally_uniformly_on'
+ refine' hasFDerivAt_of_tendstoLocallyUniformlyOn hs hf' (fun n z hz => _) hfg hx
+ exact ((hf n z hz).DifferentiableAt (hs.mem_nhds hz)).HasFDerivAt
+#align has_fderiv_at_of_tendsto_locally_uniformly_on' hasFDerivAt_of_tendsto_locally_uniformly_on'
/-- `(d/dx) lim_{n → ∞} f n x = lim_{n → ∞} f' n x` when the `f' n` converge
_uniformly_ to their limit on an open set containing `x`. -/
-theorem hasFderivAt_of_tendstoUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
+theorem hasFDerivAt_of_tendstoUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
(hf' : TendstoUniformlyOn f' g' l s)
- (hf : ∀ n : ι, ∀ x : E, x ∈ s → HasFderivAt (f n) (f' n x) x)
+ (hf : ∀ n : ι, ∀ x : E, x ∈ s → HasFDerivAt (f n) (f' n x) x)
(hfg : ∀ x : E, x ∈ s → Tendsto (fun n => f n x) l (𝓝 (g x))) :
- ∀ x : E, x ∈ s → HasFderivAt g (g' x) x := fun x =>
- hasFderivAt_of_tendstoLocallyUniformlyOn hs hf'.TendstoLocallyUniformlyOn hf hfg
-#align has_fderiv_at_of_tendsto_uniformly_on hasFderivAt_of_tendstoUniformlyOn
+ ∀ x : E, x ∈ s → HasFDerivAt g (g' x) x := fun x =>
+ hasFDerivAt_of_tendstoLocallyUniformlyOn hs hf'.TendstoLocallyUniformlyOn hf hfg
+#align has_fderiv_at_of_tendsto_uniformly_on hasFDerivAt_of_tendstoUniformlyOn
/-- `(d/dx) lim_{n → ∞} f n x = lim_{n → ∞} f' n x` when the `f' n` converge
_uniformly_ to their limit. -/
-theorem hasFderivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l)
- (hf : ∀ n : ι, ∀ x : E, HasFderivAt (f n) (f' n x) x)
- (hfg : ∀ x : E, Tendsto (fun n => f n x) l (𝓝 (g x))) : ∀ x : E, HasFderivAt g (g' x) x :=
+theorem hasFDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l)
+ (hf : ∀ n : ι, ∀ x : E, HasFDerivAt (f n) (f' n x) x)
+ (hfg : ∀ x : E, Tendsto (fun n => f n x) l (𝓝 (g x))) : ∀ x : E, HasFDerivAt g (g' x) x :=
by
intro x
- have hf : ∀ n : ι, ∀ x : E, x ∈ Set.univ → HasFderivAt (f n) (f' n x) x := by simp [hf]
+ have hf : ∀ n : ι, ∀ x : E, x ∈ Set.univ → HasFDerivAt (f n) (f' n x) x := by simp [hf]
have hfg : ∀ x : E, x ∈ Set.univ → tendsto (fun n => f n x) l (𝓝 (g x)) := by simp [hfg]
have hf' : TendstoUniformlyOn f' g' l Set.univ := by rwa [tendstoUniformlyOn_univ]
- refine' hasFderivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg x (Set.mem_univ x)
-#align has_fderiv_at_of_tendsto_uniformly hasFderivAt_of_tendstoUniformly
+ refine' hasFDerivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg x (Set.mem_univ x)
+#align has_fderiv_at_of_tendsto_uniformly hasFDerivAt_of_tendstoUniformly
end LimitsOfDerivatives
@@ -517,7 +517,7 @@ theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (
(hf : ∀ᶠ n : ι × 𝕜 in l ×ᶠ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) :=
by
- simp_rw [hasDerivAt_iff_hasFderivAt] at hf
+ simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
exact uniformCauchySeqOnFilter_of_fderiv hf'.one_smul_right hf hfg
#align uniform_cauchy_seq_on_filter_of_deriv uniformCauchySeqOnFilter_of_deriv
@@ -525,7 +525,7 @@ theorem uniformCauchySeqOn_ball_of_deriv {r : ℝ} (hf' : UniformCauchySeqOn f'
(hf : ∀ n : ι, ∀ y : 𝕜, y ∈ Metric.ball x r → HasDerivAt (f n) (f' n y) y)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) :=
by
- simp_rw [hasDerivAt_iff_hasFderivAt] at hf
+ simp_rw [hasDerivAt_iff_hasFDerivAt] at hf
rw [uniformCauchySeqOn_iff_uniformCauchySeqOnFilter] at hf'
have hf' :
UniformCauchySeqOn (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smul_right (f' n z)) l
@@ -545,7 +545,7 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
-- can recognize them when we apply `has_fderiv_at_of_tendsto_uniformly_on_filter`
let F' n z := (1 : 𝕜 →L[𝕜] 𝕜).smul_right (f' n z)
let G' z := (1 : 𝕜 →L[𝕜] 𝕜).smul_right (g' z)
- simp_rw [hasDerivAt_iff_hasFderivAt] at hf⊢
+ simp_rw [hasDerivAt_iff_hasFDerivAt] at hf⊢
-- Now we need to rewrite hf' in terms of continuous_linear_maps. The tricky part is that
-- operator norms are written in terms of `≤` whereas metrics are written in terms of `<`. So we
-- need to shrink `ε` utilizing the archimedean property of `ℝ`
@@ -564,7 +564,7 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
ContinuousLinearMap.one_apply]
rw [← smul_sub, norm_smul, mul_comm]
exact mul_le_mul hn.le rfl.le (norm_nonneg _) hq.le
- exact hasFderivAt_of_tendstoUniformlyOnFilter hf' hf hfg
+ exact hasFDerivAt_of_tendstoUniformlyOnFilter hf' hf hfg
#align has_deriv_at_of_tendsto_uniformly_on_filter hasDerivAt_of_tendstoUniformlyOnFilter
theorem hasDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set 𝕜} (hs : IsOpen s)
mathlib commit https://github.com/leanprover-community/mathlib/commit/2f8347015b12b0864dfaf366ec4909eb70c78740
@@ -360,7 +360,7 @@ theorem hasFderivAt_of_tendstoUniformlyOnFilter [NeBot l]
conv =>
congr
ext
- rw [← abs_norm, ← abs_inv, ← @IsROrC.norm_of_real 𝕜 _ _, IsROrC.of_real_inv, ← norm_smul]
+ rw [← abs_norm, ← abs_inv, ← @IsROrC.norm_ofReal 𝕜 _ _, IsROrC.ofReal_inv, ← norm_smul]
rw [← tendsto_zero_iff_norm_tendsto_zero]
have :
(fun a : ι × E => (‖a.2 - x‖⁻¹ : 𝕜) • (g a.2 - g x - (g' x) (a.2 - x))) =
mathlib commit https://github.com/leanprover-community/mathlib/commit/d4437c68c8d350fc9d4e95e1e174409db35e30d7
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin H. Wilson
! This file was ported from Lean 3 source module analysis.calculus.uniform_limits_deriv
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 3f655f5297b030a87d641ad4e825af8d9679eb0b
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -360,7 +360,7 @@ theorem hasFderivAt_of_tendstoUniformlyOnFilter [NeBot l]
conv =>
congr
ext
- rw [← norm_norm, ← norm_inv, ← @IsROrC.norm_of_real 𝕜 _ _, IsROrC.of_real_inv, ← norm_smul]
+ rw [← abs_norm, ← abs_inv, ← @IsROrC.norm_of_real 𝕜 _ _, IsROrC.of_real_inv, ← norm_smul]
rw [← tendsto_zero_iff_norm_tendsto_zero]
have :
(fun a : ι × E => (‖a.2 - x‖⁻¹ : 𝕜) • (g a.2 - g x - (g' x) (a.2 - x))) =
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -350,8 +350,8 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
have : 𝓝 (0 : G) = 𝓝 (0 + 0 + 0) := by simp only [add_zero]
rw [this]
refine' Tendsto.add (Tendsto.add _ _) _
- simp only
- · have := difference_quotients_converge_uniformly hf' hf hfg
+ · simp only
+ have := difference_quotients_converge_uniformly hf' hf hfg
rw [Metric.tendstoUniformlyOnFilter_iff] at this
rw [Metric.tendsto_nhds]
intro ε hε
@@ -503,7 +503,7 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
let F' n z := (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)
let G' z := (1 : 𝕜 →L[𝕜] 𝕜).smulRight (g' z)
simp_rw [hasDerivAt_iff_hasFDerivAt] at hf ⊢
- -- Now we need to rewrite hf' in terms of continuous_linear_maps. The tricky part is that
+ -- Now we need to rewrite hf' in terms of `ContinuousLinearMap`s. The tricky part is that
-- operator norms are written in terms of `≤` whereas metrics are written in terms of `<`. So we
-- need to shrink `ε` utilizing the archimedean property of `ℝ`
have hf' : TendstoUniformlyOnFilter F' G' l (𝓝 x) := by
IsROrC
to RCLike
(#10819)
IsROrC
contains data, which goes against the expectation that classes prefixed with Is
are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC
to RCLike
.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin H. Wilson
-/
import Mathlib.Analysis.Calculus.MeanValue
-import Mathlib.Analysis.NormedSpace.IsROrC
+import Mathlib.Analysis.NormedSpace.RCLike
import Mathlib.Order.Filter.Curry
#align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
@@ -101,7 +101,7 @@ open scoped uniformity Filter Topology
section LimitsOfDerivatives
-variable {ι : Type*} {l : Filter ι} {E : Type*} [NormedAddCommGroup E] {𝕜 : Type*} [IsROrC 𝕜]
+variable {ι : Type*} {l : Filter ι} {E : Type*} [NormedAddCommGroup E] {𝕜 : Type*} [RCLike 𝕜]
[NormedSpace 𝕜 E] {G : Type*} [NormedAddCommGroup G] [NormedSpace 𝕜 G] {f : ι → E → G}
{g : E → G} {f' : ι → E → E →L[𝕜] G} {g' : E → E →L[𝕜] G} {x : E}
@@ -283,7 +283,7 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
⟨_, b, fun e : E => Metric.ball x r e,
eventually_mem_set.mpr (Metric.nhds_basis_ball.mem_of_mem hr), fun {n} hn {y} hy => _⟩
simp only [Pi.zero_apply, dist_zero_left]
- rw [← smul_sub, norm_smul, norm_inv, IsROrC.norm_coe_norm]
+ rw [← smul_sub, norm_smul, norm_inv, RCLike.norm_coe_norm]
refine' lt_of_le_of_lt _ hqε
by_cases hyz' : x = y; · simp [hyz', hqpos.le]
have hyz : 0 < ‖y - x‖ := by rw [norm_pos_iff]; intro hy'; exact hyz' (eq_of_sub_eq_zero hy').symm
@@ -334,7 +334,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
conv =>
congr
ext
- rw [← abs_norm, ← abs_inv, ← @IsROrC.norm_ofReal 𝕜 _ _, IsROrC.ofReal_inv, ← norm_smul]
+ rw [← abs_norm, ← abs_inv, ← @RCLike.norm_ofReal 𝕜 _ _, RCLike.ofReal_inv, ← norm_smul]
rw [← tendsto_zero_iff_norm_tendsto_zero]
have :
(fun a : ι × E => (‖a.2 - x‖⁻¹ : 𝕜) • (g a.2 - g x - (g' x) (a.2 - x))) =
@@ -370,7 +370,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
refine' (this ε hε).mono fun y hy => _
rw [dist_eq_norm] at hy ⊢
simp only [sub_zero, map_sub, norm_mul, norm_inv, norm_norm] at hy ⊢
- rw [norm_smul, norm_inv, IsROrC.norm_coe_norm]
+ rw [norm_smul, norm_inv, RCLike.norm_coe_norm]
exact hy
· -- hfg' after specializing to `x` and applying the definition of the operator norm
refine' Tendsto.mono_left _ curry_le_prod
@@ -383,7 +383,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
refine' squeeze_zero_norm _
(tendsto_zero_iff_norm_tendsto_zero.mp (tendsto_fst.comp (h2.prod_map tendsto_id)))
intro n
- simp_rw [norm_smul, norm_inv, IsROrC.norm_coe_norm]
+ simp_rw [norm_smul, norm_inv, RCLike.norm_coe_norm]
by_cases hx : x = n.2; · simp [hx]
have hnx : 0 < ‖n.2 - x‖ := by
rw [norm_pos_iff]; intro hx'; exact hx (eq_of_sub_eq_zero hx').symm
@@ -448,7 +448,7 @@ In this section, we provide `deriv` equivalents of the `fderiv` lemmas in the pr
-/
-variable {ι : Type*} {l : Filter ι} {𝕜 : Type*} [IsROrC 𝕜] {G : Type*} [NormedAddCommGroup G]
+variable {ι : Type*} {l : Filter ι} {𝕜 : Type*} [RCLike 𝕜] {G : Type*} [NormedAddCommGroup G]
[NormedSpace 𝕜 G] {f : ι → 𝕜 → G} {g : 𝕜 → G} {f' : ι → 𝕜 → G} {g' : 𝕜 → G} {x : 𝕜}
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
filter_upwards
(#11208)
This is presumably not exhaustive, but covers about a hundred instances.
Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
@@ -189,10 +189,8 @@ theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f'
(l ×ˢ l) (Metric.ball x r) by
have := this.1.add this.2
rw [add_zero] at this
- refine' this.congr _
- apply eventually_of_forall
- intro n z _
- simp
+ refine this.congr ?_
+ filter_upwards with n z _ using (by simp)
constructor
· -- This inequality follows from the mean value theorem
rw [Metric.tendstoUniformlyOn_iff] at hf' ⊢
@@ -130,7 +130,7 @@ theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l
obtain ⟨a, b, c, d, e⟩ := eventually_prod_iff.1 ((hf' ε hε).and this)
obtain ⟨R, hR, hR'⟩ := Metric.nhds_basis_ball.eventually_iff.mp d
let r := min 1 R
- have hr : 0 < r := by simp [hR]
+ have hr : 0 < r := by simp [r, hR]
have hr' : ∀ ⦃y : E⦄, y ∈ Metric.ball x r → c y := fun y hy =>
hR' (lt_of_lt_of_le (Metric.mem_ball.mp hy) (min_le_right _ _))
have hxy : ∀ y : E, y ∈ Metric.ball x r → ‖y - x‖ < 1 := by
@@ -518,8 +518,8 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
simp only [dist_eq_norm] at hn ⊢
refine' ContinuousLinearMap.opNorm_le_bound _ hq.le _
intro z
- simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
- ContinuousLinearMap.one_apply]
+ simp only [F', G', ContinuousLinearMap.coe_sub', Pi.sub_apply,
+ ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply]
rw [← smul_sub, norm_smul, mul_comm]
gcongr
exact hasFDerivAt_of_tendstoUniformlyOnFilter hf' hf hfg
refine
s (#10762)
I replaced a few "terminal" refine/refine'
s with exact
.
The strategy was very simple-minded: essentially any refine
whose following line had smaller indentation got replaced by exact
and then I cleaned up the mess.
This PR certainly leaves some further terminal refine
s, but maybe the current change is beneficial.
@@ -437,7 +437,7 @@ theorem hasFDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g'
have hf : ∀ n : ι, ∀ x : E, x ∈ Set.univ → HasFDerivAt (f n) (f' n x) x := by simp [hf]
have hfg : ∀ x : E, x ∈ Set.univ → Tendsto (fun n => f n x) l (𝓝 (g x)) := by simp [hfg]
have hf' : TendstoUniformlyOn f' g' l Set.univ := by rwa [tendstoUniformlyOn_univ]
- refine' hasFDerivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg x (Set.mem_univ x)
+ exact hasFDerivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg x (Set.mem_univ x)
#align has_fderiv_at_of_tendsto_uniformly hasFDerivAt_of_tendstoUniformly
end LimitsOfDerivatives
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -231,7 +231,7 @@ theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's
Cauchy (map (fun n => f n x) l) := by
have : NeBot l := (cauchy_map_iff.1 hfg).1
let t := { y | y ∈ s ∧ Cauchy (map (fun n => f n y) l) }
- suffices H : s ⊆ t; exact (H hx).2
+ suffices H : s ⊆ t from (H hx).2
have A : ∀ x ε, x ∈ t → Metric.ball x ε ⊆ s → Metric.ball x ε ⊆ t := fun x ε xt hx y hy =>
⟨hx hy,
(uniformCauchySeqOn_ball_of_fderiv (hf'.mono hx) (fun n y hy => hf n y (hx hy))
@@ -243,7 +243,7 @@ theorem cauchy_map_of_uniformCauchySeqOn_fderiv {s : Set E} (hs : IsOpen s) (h's
rcases Metric.isOpen_iff.1 hs x hx.1 with ⟨ε, εpos, hε⟩
exact ⟨ε, εpos, A x ε hx hε⟩
have st_nonempty : (s ∩ t).Nonempty := ⟨x₀, hx₀, ⟨hx₀, hfg⟩⟩
- suffices H : closure t ∩ s ⊆ t; exact h's.subset_of_closure_inter_subset open_t st_nonempty H
+ suffices H : closure t ∩ s ⊆ t from h's.subset_of_closure_inter_subset open_t st_nonempty H
rintro x ⟨xt, xs⟩
obtain ⟨ε, εpos, hε⟩ : ∃ (ε : ℝ), ε > 0 ∧ Metric.ball x ε ⊆ s := Metric.isOpen_iff.1 hs x xs
obtain ⟨y, yt, hxy⟩ : ∃ (y : E), y ∈ t ∧ dist x y < ε / 2 :=
@@ -261,7 +261,7 @@ theorem difference_quotients_converge_uniformly (hf' : TendstoUniformlyOnFilter
(hfg : ∀ᶠ y : E in 𝓝 x, Tendsto (fun n => f n y) l (𝓝 (g y))) :
TendstoUniformlyOnFilter (fun n : ι => fun y : E => (‖y - x‖⁻¹ : 𝕜) • (f n y - f n x))
(fun y : E => (‖y - x‖⁻¹ : 𝕜) • (g y - g x)) l (𝓝 x) := by
- let : NormedSpace ℝ E; exact NormedSpace.restrictScalars ℝ 𝕜 _
+ let A : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 _
rcases eq_or_ne l ⊥ with (hl | hl)
· simp only [hl, TendstoUniformlyOnFilter, bot_prod, eventually_bot, imp_true_iff]
haveI : NeBot l := ⟨hl⟩
@@ -349,7 +349,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
-- Porting note: added
abel
simp_rw [this]
- have : 𝓝 (0 : G) = 𝓝 (0 + 0 + 0); simp only [add_zero]
+ have : 𝓝 (0 : G) = 𝓝 (0 + 0 + 0) := by simp only [add_zero]
rw [this]
refine' Tendsto.add (Tendsto.add _ _) _
simp only
@@ -392,7 +392,7 @@ theorem hasFDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
rw [inv_mul_le_iff hnx, mul_comm]
simp only [Function.comp_apply, Prod_map]
rw [norm_sub_rev]
- exact (f' n.1 x - g' x).le_op_norm (n.2 - x)
+ exact (f' n.1 x - g' x).le_opNorm (n.2 - x)
#align has_fderiv_at_of_tendsto_uniformly_on_filter hasFDerivAt_of_tendstoUniformlyOnFilter
theorem hasFDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
@@ -468,7 +468,7 @@ theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
intro n hn
refine' lt_of_le_of_lt _ hq'
simp only [dist_eq_norm, Pi.zero_apply, zero_sub, norm_neg] at hn ⊢
- refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
+ refine' ContinuousLinearMap.opNorm_le_bound _ hq.le _
intro z
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
ContinuousLinearMap.one_apply]
@@ -516,7 +516,7 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
intro n hn
refine' lt_of_le_of_lt _ hq'
simp only [dist_eq_norm] at hn ⊢
- refine' ContinuousLinearMap.op_norm_le_bound _ hq.le _
+ refine' ContinuousLinearMap.opNorm_le_bound _ hq.le _
intro z
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
ContinuousLinearMap.one_apply]
filter_upwards
(#7719)
mathport was forgetting a space in filter_upwards [...]with
instead of filter_upwards [...] with
.
@@ -544,7 +544,7 @@ theorem hasDerivAt_of_tendsto_locally_uniformly_on' [NeBot l] {s : Set 𝕜} (hs
(hf : ∀ᶠ n in l, DifferentiableOn 𝕜 (f n) s)
(hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasDerivAt g (g' x) x := by
refine' hasDerivAt_of_tendstoLocallyUniformlyOn hs hf' _ hfg hx
- filter_upwards [hf]with n h z hz using((h z hz).differentiableAt (hs.mem_nhds hz)).hasDerivAt
+ filter_upwards [hf] with n h z hz using ((h z hz).differentiableAt (hs.mem_nhds hz)).hasDerivAt
#align has_deriv_at_of_tendsto_locally_uniformly_on' hasDerivAt_of_tendsto_locally_uniformly_on'
theorem hasDerivAt_of_tendstoUniformlyOn [NeBot l] {s : Set 𝕜} (hs : IsOpen s)
@@ -560,7 +560,7 @@ theorem hasDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l
(hfg : ∀ x : 𝕜, Tendsto (fun n => f n x) l (𝓝 (g x))) : ∀ x : 𝕜, HasDerivAt g (g' x) x := by
intro x
have hf : ∀ᶠ n in l, ∀ x : 𝕜, x ∈ Set.univ → HasDerivAt (f n) (f' n x) x := by
- filter_upwards [hf]with n h x _ using h x
+ filter_upwards [hf] with n h x _ using h x
have hfg : ∀ x : 𝕜, x ∈ Set.univ → Tendsto (fun n => f n x) l (𝓝 (g x)) := by simp [hfg]
have hf' : TendstoUniformlyOn f' g' l Set.univ := by rwa [tendstoUniformlyOn_univ]
exact hasDerivAt_of_tendstoUniformlyOn isOpen_univ hf' hf hfg x (Set.mem_univ x)
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -101,8 +101,8 @@ open scoped uniformity Filter Topology
section LimitsOfDerivatives
-variable {ι : Type _} {l : Filter ι} {E : Type _} [NormedAddCommGroup E] {𝕜 : Type _} [IsROrC 𝕜]
- [NormedSpace 𝕜 E] {G : Type _} [NormedAddCommGroup G] [NormedSpace 𝕜 G] {f : ι → E → G}
+variable {ι : Type*} {l : Filter ι} {E : Type*} [NormedAddCommGroup E] {𝕜 : Type*} [IsROrC 𝕜]
+ [NormedSpace 𝕜 E] {G : Type*} [NormedAddCommGroup G] [NormedSpace 𝕜 G] {f : ι → E → G}
{g : E → G} {f' : ι → E → E →L[𝕜] G} {g' : E → E →L[𝕜] G} {x : E}
/-- If a sequence of functions real or complex functions are eventually differentiable on a
@@ -450,7 +450,7 @@ In this section, we provide `deriv` equivalents of the `fderiv` lemmas in the pr
-/
-variable {ι : Type _} {l : Filter ι} {𝕜 : Type _} [IsROrC 𝕜] {G : Type _} [NormedAddCommGroup G]
+variable {ι : Type*} {l : Filter ι} {𝕜 : Type*} [IsROrC 𝕜] {G : Type*} [NormedAddCommGroup G]
[NormedSpace 𝕜 G] {f : ι → 𝕜 → G} {g : 𝕜 → G} {f' : ι → 𝕜 → G} {g' : 𝕜 → G} {x : 𝕜}
/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
@@ -2,16 +2,13 @@
Copyright (c) 2022 Kevin H. Wilson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin H. Wilson
-
-! This file was ported from Lean 3 source module analysis.calculus.uniform_limits_deriv
-! leanprover-community/mathlib commit 3f655f5297b030a87d641ad4e825af8d9679eb0b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.Calculus.MeanValue
import Mathlib.Analysis.NormedSpace.IsROrC
import Mathlib.Order.Filter.Curry
+#align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
+
/-!
# Swapping limits and derivatives via uniform convergence
@@ -17,7 +17,7 @@ import Mathlib.Order.Filter.Curry
The purpose of this file is to prove that the derivative of the pointwise limit of a sequence of
functions is the pointwise limit of the functions' derivatives when the derivatives converge
-_uniformly_. The formal statement appears as `has_fderiv_at_of_tendsto_locally_uniformly_at`.
+_uniformly_. The formal statement appears as `hasFDerivAt_of_tendstoLocallyUniformlyOn`.
## Main statements
@@ -62,7 +62,7 @@ tendsto (|y - x|⁻¹ * |(g y - g x) - g' x (y - x)|) (𝓝 x) (𝓝 0)
There are two ways we might introduce `n`. We could do:
```lean
-∀ᶠ (n : ℕ) in at_top, tendsto (|y - x|⁻¹ * |(g y - g x) - g' x (y - x)|) (𝓝 x) (𝓝 0)
+∀ᶠ (n : ℕ) in atTop, Tendsto (|y - x|⁻¹ * |(g y - g x) - g' x (y - x)|) (𝓝 x) (𝓝 0)
```
but this is equivalent to the quantifier order `∃ N, ∀ n ≥ N, ∀ ε > 0, ∃ δ > 0, ∀ y ∈ B_δ(x)`,
@@ -70,7 +70,7 @@ which _implies_ our desired `∀ ∃ ∀ ∃ ∀` but is _not_ equivalent to it.
try
```lean
-tendsto (|y - x|⁻¹ * |(g y - g x) - g' x (y - x)|) (at_top ×ˢ 𝓝 x) (𝓝 0)
+Tendsto (|y - x|⁻¹ * |(g y - g x) - g' x (y - x)|) (atTop ×ˢ 𝓝 x) (𝓝 0)
```
but this is equivalent to the quantifier order `∀ ε > 0, ∃ N, ∃ δ > 0, ∀ n ≥ N, ∀ y ∈ B_δ(x)`, which
@@ -80,7 +80,7 @@ So to get the quantifier order we want, we need to introduce a new filter constr
call a "curried filter"
```lean
-tendsto (|y - x|⁻¹ * |(g y - g x) - g' x (y - x)|) (at_top.curry (𝓝 x)) (𝓝 0)
+Tendsto (|y - x|⁻¹ * |(g y - g x) - g' x (y - x)|) (atTop.curry (𝓝 x)) (𝓝 0)
```
Then the above implications are `Filter.Tendsto.curry` and
@@ -450,8 +450,6 @@ section deriv
/-! ### `deriv` versions of above theorems
In this section, we provide `deriv` equivalents of the `fderiv` lemmas in the previous section.
-The protected function `promote_deriv` provides the translation between derivatives and Fréchet
-derivatives
-/
@@ -47,7 +47,7 @@ That is, we want to prove something like:
∀ ε > 0, ∃ δ > 0, ∀ y ∈ B_δ(x), |y - x|⁻¹ * |(g y - g x) - g' x (y - x)| < ε.
```
-To do so, we will need to introduce a pair of quantifers
+To do so, we will need to introduce a pair of quantifiers
```lean
∀ ε > 0, ∃ N, ∀ n ≥ N, ∃ δ > 0, ∀ y ∈ B_δ(x), |y - x|⁻¹ * |(g y - g x) - g' x (y - x)| < ε.
@@ -73,7 +73,7 @@ try
tendsto (|y - x|⁻¹ * |(g y - g x) - g' x (y - x)|) (at_top ×ˢ 𝓝 x) (𝓝 0)
```
-but this is equivalent to the quantifer order `∀ ε > 0, ∃ N, ∃ δ > 0, ∀ n ≥ N, ∀ y ∈ B_δ(x)`, which
+but this is equivalent to the quantifier order `∀ ε > 0, ∃ N, ∃ δ > 0, ∀ n ≥ N, ∀ y ∈ B_δ(x)`, which
again _implies_ our desired `∀ ∃ ∀ ∃ ∀` but is not equivalent to it.
So to get the quantifier order we want, we need to introduce a new filter construction, which we
@@ -115,7 +115,7 @@ sequence in a neighborhood of `x`. -/
theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l (𝓝 x))
(hf : ∀ᶠ n : ι × E in l ×ˢ 𝓝 x, HasFDerivAt (f n.1) (f' n.1 n.2) n.2)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) := by
- let : NormedSpace ℝ E; exact NormedSpace.restrictScalars ℝ 𝕜 _
+ letI : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 _
rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hf' ⊢
suffices
TendstoUniformlyOnFilter (fun (n : ι × ι) (z : E) => f n.1 z - f n.2 z - (f n.1 x - f n.2 x)) 0
@@ -179,7 +179,7 @@ convergence. See `cauchy_map_of_uniformCauchySeqOn_fderiv`.
theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
(hf : ∀ n : ι, ∀ y : E, y ∈ Metric.ball x r → HasFDerivAt (f n) (f' n y) y)
(hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) := by
- let : NormedSpace ℝ E; exact NormedSpace.restrictScalars ℝ 𝕜 _
+ letI : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 _
have : NeBot l := (cauchy_map_iff.1 hfg).1
rcases le_or_lt r 0 with (hr | hr)
· simp only [Metric.ball_eq_empty.2 hr, UniformCauchySeqOn, Set.mem_empty_iff_false,
@@ -478,7 +478,7 @@ theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
ContinuousLinearMap.one_apply]
rw [← smul_sub, norm_smul, mul_comm]
- exact mul_le_mul hn.le rfl.le (norm_nonneg _) hq.le
+ gcongr
#align uniform_cauchy_seq_on_filter.one_smul_right UniformCauchySeqOnFilter.one_smulRight
theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (𝓝 x))
@@ -526,7 +526,7 @@ theorem hasDerivAt_of_tendstoUniformlyOnFilter [NeBot l]
simp only [ContinuousLinearMap.coe_sub', Pi.sub_apply, ContinuousLinearMap.smulRight_apply,
ContinuousLinearMap.one_apply]
rw [← smul_sub, norm_smul, mul_comm]
- exact mul_le_mul hn.le rfl.le (norm_nonneg _) hq.le
+ gcongr
exact hasFDerivAt_of_tendstoUniformlyOnFilter hf' hf hfg
#align has_deriv_at_of_tendsto_uniformly_on_filter hasDerivAt_of_tendstoUniformlyOnFilter
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