Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 64770a8

Browse files
urkudmergify[bot]
authored andcommitted
feat(analysis/calculus/deriv): Prove equivalence of Fréchet derivative and the classical definition (#1834)
* feat(analysis/calculus/deriv): Prove equivalence of Fréchet derivative and the classical definition * Fix a typo * Move, change doc, add versions for `has_deriv_within_at` and `has_deriv_at`. * Fix docstring, remove an unsed argument
1 parent e43905b commit 64770a8

File tree

4 files changed

+58
-6
lines changed

4 files changed

+58
-6
lines changed

src/analysis/calculus/deriv.lean

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,37 @@ theorem has_deriv_at_iff_tendsto : has_deriv_at f f' x ↔
171171
tendsto (λ x', ∥x' - x∥⁻¹ * ∥f x' - f x - (x' - x) • f'∥) (𝓝 x) (𝓝 0) :=
172172
has_fderiv_at_filter_iff_tendsto
173173

174+
/-- If the domain has dimension one, then Fréchet derivative is equivalent to the classical
175+
definition with a limit. In this version we have to take the limit along the subset `-{x}`,
176+
because for `y=x` the slope equals zero due to the convention `0⁻¹=0`. -/
177+
lemma has_deriv_at_filter_iff_tendsto_slope {x : 𝕜} {L : filter 𝕜} :
178+
has_deriv_at_filter f f' x L ↔
179+
tendsto (λ y, (y - x)⁻¹ • (f y - f x)) (L ⊓ principal (-{x})) (𝓝 f') :=
180+
begin
181+
conv_lhs { simp only [has_deriv_at_filter_iff_tendsto, (normed_field.norm_inv _).symm,
182+
(norm_smul _ _).symm, tendsto_zero_iff_norm_tendsto_zero.symm] },
183+
conv_rhs { rw [← nhds_translation f', tendsto_comap_iff] },
184+
refine (tendsto_inf_principal_nhds_iff_of_forall_eq $ by simp).symm.trans (tendsto_congr' _),
185+
rw mem_inf_principal,
186+
refine univ_mem_sets' (λ z hz, _),
187+
have : z ≠ x, by simpa [function.comp] using hz,
188+
simp only [mem_set_of_eq],
189+
rw [smul_sub, ← mul_smul, inv_mul_cancel (sub_ne_zero.2 this), one_smul]
190+
end
191+
192+
lemma has_deriv_within_at_iff_tendsto_slope {x : 𝕜} {s : set 𝕜} :
193+
has_deriv_within_at f f' s x ↔
194+
tendsto (λ y, (y - x)⁻¹ • (f y - f x)) (nhds_within x (s \ {x})) (𝓝 f') :=
195+
begin
196+
simp only [has_deriv_within_at, nhds_within, diff_eq, lattice.inf_assoc.symm, inf_principal.symm],
197+
exact has_deriv_at_filter_iff_tendsto_slope
198+
end
199+
200+
lemma has_deriv_at_iff_tendsto_slope {x : 𝕜} :
201+
has_deriv_at f f' x ↔
202+
tendsto (λ y, (y - x)⁻¹ • (f y - f x)) (nhds_within x (-{x})) (𝓝 f') :=
203+
has_deriv_at_filter_iff_tendsto_slope
204+
174205
theorem has_deriv_at_iff_is_o_nhds_zero : has_deriv_at f f' x ↔
175206
is_o (λh, f (x + h) - f x - h • f') (λh, h) (𝓝 0) :=
176207
has_fderiv_at_iff_is_o_nhds_zero

src/analysis/calculus/fderiv.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ have h : ∀ x', ∥x' - x∥ = 0 → ∥f x' - f x - f' (x' - x)∥ = 0, from
235235
begin
236236
unfold has_fderiv_at_filter,
237237
rw [←is_o_norm_left, ←is_o_norm_right, is_o_iff_tendsto h],
238-
exact tendsto.congr'r (λ _, div_eq_inv_mul),
238+
exact tendsto_congr (λ _, div_eq_inv_mul),
239239
end
240240

241241
theorem has_fderiv_within_at_iff_tendsto : has_fderiv_within_at f f' s x ↔
@@ -1344,7 +1344,7 @@ theorem has_fderiv_at_filter_real_equiv {L : filter E} :
13441344
tendsto (λ x' : E, ∥x' - x∥⁻¹ • (f x' - f x - f' (x' - x))) L (𝓝 0) :=
13451345
begin
13461346
symmetry,
1347-
rw [tendsto_iff_norm_tendsto_zero], refine tendsto.congr'r (λ x', _),
1347+
rw [tendsto_iff_norm_tendsto_zero], refine tendsto_congr (λ x', _),
13481348
have : ∥x' + -x∥⁻¹ ≥ 0, from inv_nonneg.mpr (norm_nonneg _),
13491349
simp [norm_smul, real.norm_eq_abs, abs_of_nonneg this]
13501350
end

src/order/filter/basic.lean

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,17 +1183,21 @@ lemma tendsto_iff_comap {f : α → β} {l₁ : filter α} {l₂ : filter β} :
11831183
tendsto f l₁ l₂ ↔ l₁ ≤ l₂.comap f :=
11841184
map_le_iff_le_comap
11851185

1186+
lemma tendsto_congr' {f₁ f₂ : α → β} {l₁ : filter α} {l₂ : filter β}
1187+
(hl : {x | f₁ x = f₂ x} ∈ l₁) : tendsto f₁ l₁ l₂ ↔ tendsto f₂ l₁ l₂ :=
1188+
by rw [tendsto, tendsto, map_cong hl]
1189+
11861190
lemma tendsto.congr' {f₁ f₂ : α → β} {l₁ : filter α} {l₂ : filter β}
11871191
(hl : {x | f₁ x = f₂ x} ∈ l₁) (h : tendsto f₁ l₁ l₂) : tendsto f₂ l₁ l₂ :=
1188-
by rwa [tendsto, ←map_cong hl]
1192+
(tendsto_congr' hl).1 h
11891193

1190-
theorem tendsto.congr'r {f₁ f₂ : α → β} {l₁ : filter α} {l₂ : filter β}
1194+
theorem tendsto_congr {f₁ f₂ : α → β} {l₁ : filter α} {l₂ : filter β}
11911195
(h : ∀ x, f₁ x = f₂ x) : tendsto f₁ l₁ l₂ ↔ tendsto f₂ l₁ l₂ :=
1192-
iff_of_eq (by congr'; exact funext h)
1196+
tendsto_congr' (univ_mem_sets' h)
11931197

11941198
theorem tendsto.congr {f₁ f₂ : α → β} {l₁ : filter α} {l₂ : filter β}
11951199
(h : ∀ x, f₁ x = f₂ x) : tendsto f₁ l₁ l₂ → tendsto f₂ l₁ l₂ :=
1196-
(tendsto.congr'r h).1
1200+
(tendsto_congr h).1
11971201

11981202
lemma tendsto_id' {x y : filter α} : x ≤ y → tendsto id x y :=
11991203
by simp only [tendsto, map_id, forall_true_iff] {contextual := tt}

src/topology/basic.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,23 @@ lemma mem_closure_of_tendsto {f : β → α} {b : filter β} {a : α} {s : set
569569
mem_of_closed_of_tendsto hb hf (is_closed_closure) $
570570
filter.mem_sets_of_superset h (preimage_mono subset_closure)
571571

572+
/-- Suppose that `f` sends the complement to `s` to a single point `a`, and `l` is some filter.
573+
Then `f` tends to `a` along `l` restricted to `s` if and only it tends to `a` along `l`. -/
574+
lemma tendsto_inf_principal_nhds_iff_of_forall_eq {f : β → α} {l : filter β} {s : set β}
575+
{a : α} (h : ∀ x ∉ s, f x = a) :
576+
tendsto f (l ⊓ principal s) (𝓝 a) ↔ tendsto f l (𝓝 a) :=
577+
begin
578+
rw [tendsto_iff_comap, tendsto_iff_comap],
579+
replace h : principal (-s) ≤ comap f (𝓝 a),
580+
{ rintros U ⟨t, ht, htU⟩ x hx,
581+
have : f x ∈ t, from (h x hx).symm ▸ mem_of_nhds ht,
582+
exact htU this },
583+
refine ⟨λ h', _, le_trans inf_le_left⟩,
584+
have := sup_le h' h,
585+
rw [sup_inf_right, sup_principal, union_compl_self, principal_univ,
586+
inf_top_eq, sup_le_iff] at this,
587+
exact this.1
588+
end
572589

573590
section lim
574591
variables [inhabited α]

0 commit comments

Comments
 (0)