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

Commit 541df8a

Browse files
committed
feat(topology/algebra/ordered/liminf_limsup): convergence of a sequence which does not oscillate infinitely (#10073)
If, for all `a < b`, a sequence is not frequently below `a` and frequently above `b`, then it has to converge. This is a useful convergence criterion (called no upcrossings), used for instance in martingales. Also generalize several statements on liminfs and limsups from complete linear orders to conditionally complete linear orders.
1 parent 880182d commit 541df8a

File tree

2 files changed

+55
-15
lines changed

2 files changed

+55
-15
lines changed

src/order/liminf_limsup.lean

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ lemma is_bounded.is_cobounded_flip [is_trans α r] [ne_bot f] :
148148
let ⟨x, rxa, rbx⟩ := (ha.and hb).exists in
149149
show r b a, from trans rbx rxa⟩
150150

151+
lemma is_bounded.is_cobounded_ge [preorder α] [ne_bot f] (h : f.is_bounded (≤)) :
152+
f.is_cobounded (≥) :=
153+
h.is_cobounded_flip
154+
155+
lemma is_bounded.is_cobounded_le [preorder α] [ne_bot f] (h : f.is_bounded (≥)) :
156+
f.is_cobounded (≤) :=
157+
h.is_cobounded_flip
158+
151159
lemma is_cobounded_bot : is_cobounded r ⊥ ↔ (∃b, ∀x, r b x) :=
152160
by simp [is_cobounded]
153161

@@ -321,6 +329,12 @@ lemma liminf_const {α : Type*} [conditionally_complete_lattice β] {f : filter
321329
(b : β) : liminf f (λ x, b) = b :=
322330
@limsup_const (order_dual β) α _ f _ b
323331

332+
lemma liminf_le_limsup {f : filter β} [ne_bot f] {u : β → α}
333+
(h : f.is_bounded_under (≤) u . is_bounded_default)
334+
(h' : f.is_bounded_under (≥) u . is_bounded_default) :
335+
liminf f u ≤ limsup f u :=
336+
Liminf_le_Limsup h h'
337+
324338
end conditionally_complete_lattice
325339

326340
section complete_lattice
@@ -351,9 +365,6 @@ end
351365
lemma liminf_const_top {f : filter β} : liminf f (λ x : β, (⊤ : α)) = (⊤ : α) :=
352366
@limsup_const_bot (order_dual α) β _ _
353367

354-
lemma liminf_le_limsup {f : filter β} [ne_bot f] {u : β → α} : liminf f u ≤ limsup f u :=
355-
Liminf_le_Limsup is_bounded_le_of_top is_bounded_ge_of_bot
356-
357368
theorem has_basis.Limsup_eq_infi_Sup {ι} {p : ι → Prop} {s} {f : filter α} (h : f.has_basis p s) :
358369
f.Limsup = ⨅ i (hi : p i), Sup (s i) :=
359370
le_antisymm

src/topology/algebra/ordered/liminf_limsup.lean

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,28 +121,57 @@ theorem filter.tendsto.liminf_eq {f : filter β} {u : β → α} {a : α} [ne_bo
121121
(h : tendsto u f (𝓝 a)) : liminf f u = a :=
122122
Liminf_eq_of_le_nhds h
123123

124-
end conditionally_complete_linear_order
125-
126-
section complete_linear_order
127-
variables [complete_linear_order α] [topological_space α] [order_topology α]
128-
-- In complete_linear_order, the above theorems take a simpler form
129-
130124
/-- If the liminf and the limsup of a function coincide, then the limit of the function
131125
exists and has the same value -/
132126
theorem tendsto_of_liminf_eq_limsup {f : filter β} {u : β → α} {a : α}
133-
(hinf : liminf f u = a) (hsup : limsup f u = a) : tendsto u f (𝓝 a) :=
134-
le_nhds_of_Limsup_eq_Liminf is_bounded_le_of_top is_bounded_ge_of_bot hsup hinf
127+
(hinf : liminf f u = a) (hsup : limsup f u = a)
128+
(h : f.is_bounded_under (≤) u . is_bounded_default)
129+
(h' : f.is_bounded_under (≥) u . is_bounded_default) :
130+
tendsto u f (𝓝 a) :=
131+
le_nhds_of_Limsup_eq_Liminf h h' hsup hinf
135132

136133
/-- If a number `a` is less than or equal to the `liminf` of a function `f` at some filter
137134
and is greater than or equal to the `limsup` of `f`, then `f` tends to `a` along this filter. -/
138135
theorem tendsto_of_le_liminf_of_limsup_le {f : filter β} {u : β → α} {a : α}
139-
(hinf : a ≤ liminf f u) (hsup : limsup f u ≤ a) :
136+
(hinf : a ≤ liminf f u) (hsup : limsup f u ≤ a)
137+
(h : f.is_bounded_under (≤) u . is_bounded_default)
138+
(h' : f.is_bounded_under (≥) u . is_bounded_default) :
140139
tendsto u f (𝓝 a) :=
141140
if hf : f = ⊥ then hf.symm ▸ tendsto_bot
142141
else by haveI : ne_bot f := ⟨hf⟩; exact tendsto_of_liminf_eq_limsup
143-
(le_antisymm (le_trans liminf_le_limsup hsup) hinf)
144-
(le_antisymm hsup (le_trans hinf liminf_le_limsup))
142+
(le_antisymm (le_trans (liminf_le_limsup h h') hsup) hinf)
143+
(le_antisymm hsup (le_trans hinf (liminf_le_limsup h h'))) h h'
145144

146-
end complete_linear_order
145+
/-- Assume that, for any `a < b`, a sequence can not be infinitely many times below `a` and
146+
above `b`. If it is also ultimately bounded above and below, then it has to converge. This even
147+
works if `a` and `b` are restricted to a dense subset.
148+
-/
149+
lemma tendsto_of_no_upcrossings [densely_ordered α]
150+
{f : filter β} {u : β → α} {s : set α} (hs : dense s)
151+
(H : ∀ (a ∈ s) (b ∈ s), a < b → ¬((∃ᶠ n in f, u n < a) ∧ (∃ᶠ n in f, b < u n)))
152+
(h : f.is_bounded_under (≤) u . is_bounded_default)
153+
(h' : f.is_bounded_under (≥) u . is_bounded_default) :
154+
∃ (c : α), tendsto u f (𝓝 c) :=
155+
begin
156+
by_cases hbot : f = ⊥, { rw hbot, exact ⟨Inf ∅, tendsto_bot⟩ },
157+
haveI : ne_bot f := ⟨hbot⟩,
158+
refine ⟨limsup f u, _⟩,
159+
apply tendsto_of_le_liminf_of_limsup_le _ le_rfl h h',
160+
by_contra hlt,
161+
push_neg at hlt,
162+
obtain ⟨a, ⟨⟨la, au⟩, as⟩⟩ : ∃ a, (f.liminf u < a ∧ a < f.limsup u) ∧ a ∈ s :=
163+
dense_iff_inter_open.1 hs (set.Ioo (f.liminf u) (f.limsup u)) is_open_Ioo
164+
(set.nonempty_Ioo.2 hlt),
165+
obtain ⟨b, ⟨⟨ab, bu⟩, bs⟩⟩ : ∃ b, (a < b ∧ b < f.limsup u) ∧ b ∈ s :=
166+
dense_iff_inter_open.1 hs (set.Ioo a (f.limsup u)) is_open_Ioo
167+
(set.nonempty_Ioo.2 au),
168+
have A : ∃ᶠ n in f, u n < a :=
169+
frequently_lt_of_liminf_lt (is_bounded.is_cobounded_ge h) la,
170+
have B : ∃ᶠ n in f, b < u n :=
171+
frequently_lt_of_lt_limsup (is_bounded.is_cobounded_le h') bu,
172+
exact H a as b bs ab ⟨A, B⟩,
173+
end
174+
175+
end conditionally_complete_linear_order
147176

148177
end liminf_limsup

0 commit comments

Comments
 (0)