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

Commit 0b81b24

Browse files
committed
feat(analysis/topological_structures): add tendsto_of_tendsto_of_tendsto_of_le_of_le
1 parent 353c494 commit 0b81b24

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

analysis/ennreal.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -913,15 +913,15 @@ section tsum
913913
variables {α : Type*} {β : Type*} {f g : α → ennreal}
914914

915915
protected lemma is_sum : is_sum f (⨆s:finset α, s.sum f) :=
916-
tendsto_orderable
917-
(assume a' ha',
916+
tendsto_orderable.2
917+
assume a' ha',
918918
let ⟨s, hs⟩ := lt_supr_iff.mp ha' in
919-
mem_at_top_sets.mpr ⟨s, assume t ht, lt_of_lt_of_le hs $ finset.sum_le_sum_of_subset ht⟩)
920-
(assume a' ha',
919+
mem_at_top_sets.mpr ⟨s, assume t ht, lt_of_lt_of_le hs $ finset.sum_le_sum_of_subset ht⟩,
920+
assume a' ha',
921921
univ_mem_sets' $ assume s,
922922
have s.sum f ≤ ⨆(s : finset α), s.sum f,
923923
from le_supr (λ(s : finset α), s.sum f) s,
924-
lt_of_le_of_lt this ha')
924+
lt_of_le_of_lt this ha'
925925

926926
@[simp] protected lemma has_sum : has_sum f := ⟨_, ennreal.is_sum⟩
927927

analysis/topology/topological_structures.lean

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,22 @@ from le_antisymm
338338
| _, h, (or.inr rfl) := inf_le_right_of_le $ infi_le_of_le b $ infi_le _ h
339339
end)
340340

341-
lemma tendsto_orderable {f : β → α} {a : α} {x : filter β}
342-
(h₁ : ∀a'<a, {b | a' < f b } ∈ x.sets) (h₂ : ∀a'>a, {b | a' > f b } ∈ x.sets) :
343-
tendsto f x (nhds a) :=
344-
by rw [@nhds_eq_orderable α _ _];
345-
from tendsto_inf.2
346-
⟨tendsto_infi.2 $ assume b, tendsto_infi.2 $ assume hb, tendsto_principal.2 $ h₁ b hb,
347-
tendsto_infi.2 $ assume b, tendsto_infi.2 $ assume hb, tendsto_principal.2 $ h₂ b hb⟩
341+
lemma tendsto_orderable {f : β → α} {a : α} {x : filter β} :
342+
tendsto f x (nhds a) ↔ (∀a'<a, {b | a' < f b} ∈ x.sets) ∧ (∀a'>a, {b | a' > f b} ∈ x.sets) :=
343+
by simp [@nhds_eq_orderable α _ _, tendsto_inf, tendsto_infi, tendsto_principal]
344+
345+
/-- Also known as squeez or sandwich theorem. -/
346+
lemma tendsto_of_tendsto_of_tendsto_of_le_of_le {f g h : β → α} {b : filter β} {a : α} (hb : b ≠ ⊥)
347+
(hg : tendsto g b (nhds a)) (hh : tendsto h b (nhds a))
348+
(hgf : {b | g b ≤ f b} ∈ b.sets) (hfh : {b | f b ≤ h b} ∈ b.sets) :
349+
tendsto f b (nhds a) :=
350+
tendsto_orderable.2
351+
⟨assume a' h',
352+
have {b : β | a' < g b} ∈ b.sets, from (tendsto_orderable.1 hg).left a' h',
353+
by filter_upwards [this, hgf] assume a, lt_of_lt_of_le,
354+
assume a' h',
355+
have {b : β | h b < a'} ∈ b.sets, from (tendsto_orderable.1 hh).right a' h',
356+
by filter_upwards [this, hfh] assume a h₁ h₂, lt_of_le_of_lt h₂ h₁⟩
348357

349358
lemma nhds_orderable_unbounded {a : α} (hu : ∃u, a < u) (hl : ∃l, l < a) :
350359
nhds a = (⨅l (h₂ : l < a) u (h₂ : a < u), principal {x | l < x ∧ x < u }) :=

0 commit comments

Comments
 (0)