Skip to content

Commit 62878e8

Browse files
committed
feat(Topology/Order): add Dense.exists_seq_strict{Mono/Anti}_tendsto (#23648)
Add `Dense.exists_seq_strict{Mono/Anti}_tendsto{'}` that restricts the sequence to a dense subset. This is useful for e.g. finding a monotone rational sequence approaching a real number. Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
1 parent dadd3da commit 62878e8

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

Mathlib/Topology/Instances/Real/Lemmas.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ theorem Real.subfield_eq_of_closed {K : Subfield ℝ} (hc : IsClosed (K : Set
8080
rintro - ⟨_, rfl⟩
8181
exact SubfieldClass.ratCast_mem K _
8282

83+
theorem Real.exists_seq_rat_strictMono_tendsto (x : ℝ) :
84+
∃ u : ℕ → ℚ, StrictMono u ∧ (∀ n, u n < x) ∧ Tendsto (u · : ℕ → ℝ) atTop (𝓝 x) :=
85+
Rat.denseRange_cast.exists_seq_strictMono_tendsto Rat.cast_strictMono.monotone x
86+
87+
theorem Real.exists_seq_rat_strictAnti_tendsto (x : ℝ) :
88+
∃ u : ℕ → ℚ, StrictAnti u ∧ (∀ n, x < u n) ∧ Tendsto (u · : ℕ → ℝ) atTop (𝓝 x) :=
89+
Rat.denseRange_cast.exists_seq_strictAnti_tendsto Rat.cast_strictMono.monotone x
90+
8391
section
8492

8593
theorem closure_of_rat_image_lt {q : ℚ} :

Mathlib/Topology/Order/IsLUB.lean

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,27 @@ theorem IsGLB.mem_of_isClosed {a : α} {s : Set α} (ha : IsGLB s a) (hs : s.Non
142142

143143
alias IsClosed.isGLB_mem := IsGLB.mem_of_isClosed
144144

145+
theorem isLUB_iff_of_subset_of_subset_closure {α : Type*} [TopologicalSpace α] [Preorder α]
146+
[ClosedIicTopology α] {s t : Set α} (hst : s ⊆ t) (hts : t ⊆ closure s) {x : α} :
147+
IsLUB s x ↔ IsLUB t x :=
148+
isLUB_congr <| (upperBounds_closure (s := s) ▸ upperBounds_mono_set hts).antisymm <|
149+
upperBounds_mono_set hst
150+
151+
theorem isGLB_iff_of_subset_of_subset_closure {α : Type*} [TopologicalSpace α] [Preorder α]
152+
[ClosedIciTopology α] {s t : Set α} (hst : s ⊆ t) (hts : t ⊆ closure s) {x : α} :
153+
IsGLB s x ↔ IsGLB t x :=
154+
isLUB_iff_of_subset_of_subset_closure (α := αᵒᵈ) hst hts
155+
156+
theorem Dense.isLUB_inter_iff {α : Type*} [TopologicalSpace α] [Preorder α] [ClosedIicTopology α]
157+
{s t : Set α} (hs : Dense s) (ht : IsOpen t) {x : α} :
158+
IsLUB (t ∩ s) x ↔ IsLUB t x :=
159+
isLUB_iff_of_subset_of_subset_closure (by simp) <| hs.open_subset_closure_inter ht
160+
161+
theorem Dense.isGLB_inter_iff {α : Type*} [TopologicalSpace α] [Preorder α] [ClosedIciTopology α]
162+
{s t : Set α} (hs : Dense s) (ht : IsOpen t) {x : α} :
163+
IsGLB (t ∩ s) x ↔ IsGLB t x :=
164+
hs.isLUB_inter_iff (α := αᵒᵈ) ht
165+
145166
/-!
146167
### Existence of sequences tending to `sInf` or `sSup` of a given set
147168
-/
@@ -193,6 +214,45 @@ theorem exists_seq_tendsto_sSup {α : Type*} [ConditionallyCompleteLinearOrder
193214
rcases (isLUB_csSup hS hS').exists_seq_monotone_tendsto hS with ⟨u, hu⟩
194215
exact ⟨u, hu.1, hu.2.2
195216

217+
theorem Dense.exists_seq_strictMono_tendsto_of_lt [DenselyOrdered α] [FirstCountableTopology α]
218+
{s : Set α} (hs : Dense s) {x y : α} (hy : y < x) :
219+
∃ u : ℕ → α, StrictMono u ∧ (∀ n, u n ∈ (Ioo y x ∩ s)) ∧ Tendsto u atTop (𝓝 x) := by
220+
have hnonempty : (Ioo y x ∩ s).Nonempty := by
221+
obtain ⟨z, hyz, hzx⟩ := hs.exists_between hy
222+
exact ⟨z, mem_inter hzx hyz⟩
223+
have hx : IsLUB (Ioo y x ∩ s) x := hs.isLUB_inter_iff isOpen_Ioo |>.mpr <| isLUB_Ioo hy
224+
apply hx.exists_seq_strictMono_tendsto_of_not_mem (by aesop) hnonempty |>.imp
225+
aesop
226+
227+
theorem Dense.exists_seq_strictMono_tendsto [DenselyOrdered α] [NoMinOrder α]
228+
[FirstCountableTopology α] {s : Set α} (hs : Dense s) (x : α) :
229+
∃ u : ℕ → α, StrictMono u ∧ (∀ n, u n ∈ (Iio x ∩ s)) ∧ Tendsto u atTop (𝓝 x) := by
230+
obtain ⟨y, hy⟩ := exists_lt x
231+
apply hs.exists_seq_strictMono_tendsto_of_lt (exists_lt x).choose_spec |>.imp
232+
aesop
233+
234+
theorem DenseRange.exists_seq_strictMono_tendsto_of_lt {β : Type*} [LinearOrder β]
235+
[DenselyOrdered α] [FirstCountableTopology α] {f : β → α} {x y : α} (hf : DenseRange f)
236+
(hmono : Monotone f) (hlt : y < x) :
237+
∃ u : ℕ → β, StrictMono u ∧ (∀ n, f (u n) ∈ Ioo y x) ∧ Tendsto (f ∘ u) atTop (𝓝 x) := by
238+
rcases Dense.exists_seq_strictMono_tendsto_of_lt hf hlt with ⟨u, hu, huyxf, hlim⟩
239+
have huyx (n : ℕ) : u n ∈ Ioo y x := (huyxf n).1
240+
have huf (n : ℕ) : u n ∈ range f := (huyxf n).2
241+
choose v hv using huf
242+
obtain rfl : f ∘ v = u := funext hv
243+
exact ⟨v, fun a b hlt ↦ hmono.reflect_lt <| hu hlt, huyx, hlim⟩
244+
245+
theorem DenseRange.exists_seq_strictMono_tendsto {β : Type*} [LinearOrder β] [DenselyOrdered α]
246+
[NoMinOrder α] [FirstCountableTopology α] {f : β → α} (hf : DenseRange f) (hmono : Monotone f)
247+
(x : α):
248+
∃ u : ℕ → β, StrictMono u ∧ (∀ n, f (u n) ∈ Iio x) ∧ Tendsto (f ∘ u) atTop (𝓝 x) := by
249+
rcases Dense.exists_seq_strictMono_tendsto hf x with ⟨u, hu, huxf, hlim⟩
250+
have hux (n : ℕ) : u n ∈ Iio x := (huxf n).1
251+
have huf (n : ℕ) : u n ∈ range f := (huxf n).2
252+
choose v hv using huf
253+
obtain rfl : f ∘ v = u := funext hv
254+
exact ⟨v, fun a b hlt ↦ hmono.reflect_lt <| hu hlt, hux, hlim⟩
255+
196256
theorem IsGLB.exists_seq_strictAnti_tendsto_of_not_mem {t : Set α} {x : α}
197257
[IsCountablyGenerated (𝓝 x)] (htx : IsGLB t x) (not_mem : x ∉ t) (ht : t.Nonempty) :
198258
∃ u : ℕ → α, StrictAnti u ∧ (∀ n, x < u n) ∧ Tendsto u atTop (𝓝 x) ∧ ∀ n, u n ∈ t :=
@@ -231,4 +291,27 @@ theorem exists_seq_tendsto_sInf {α : Type*} [ConditionallyCompleteLinearOrder
231291
(hS' : BddBelow S) : ∃ u : ℕ → α, Antitone u ∧ Tendsto u atTop (𝓝 (sInf S)) ∧ ∀ n, u n ∈ S :=
232292
exists_seq_tendsto_sSup (α := αᵒᵈ) hS hS'
233293

294+
theorem Dense.exists_seq_strictAnti_tendsto_of_lt [DenselyOrdered α] [FirstCountableTopology α]
295+
{s : Set α} (hs : Dense s) {x y : α} (hy : x < y) :
296+
∃ u : ℕ → α, StrictAnti u ∧ (∀ n, u n ∈ (Ioo x y ∩ s)) ∧ Tendsto u atTop (𝓝 x) := by
297+
simpa using hs.exists_seq_strictMono_tendsto_of_lt (α := αᵒᵈ) (OrderDual.toDual_lt_toDual.2 hy)
298+
299+
theorem Dense.exists_seq_strictAnti_tendsto [DenselyOrdered α] [NoMaxOrder α]
300+
[FirstCountableTopology α] {s : Set α} (hs : Dense s) (x : α) :
301+
∃ u : ℕ → α, StrictAnti u ∧ (∀ n, u n ∈ (Ioi x ∩ s)) ∧ Tendsto u atTop (𝓝 x) :=
302+
hs.exists_seq_strictMono_tendsto (α := αᵒᵈ) x
303+
304+
theorem DenseRange.exists_seq_strictAnti_tendsto_of_lt {β : Type*} [LinearOrder β]
305+
[DenselyOrdered α] [FirstCountableTopology α] {f : β → α} {x y : α} (hf : DenseRange f)
306+
(hmono : Monotone f) (hlt : x < y) :
307+
∃ u : ℕ → β, StrictAnti u ∧ (∀ n, f (u n) ∈ Ioo x y) ∧ Tendsto (f ∘ u) atTop (𝓝 x) := by
308+
simpa using hf.exists_seq_strictMono_tendsto_of_lt (α := αᵒᵈ) (β := βᵒᵈ) hmono.dual
309+
(OrderDual.toDual_lt_toDual.2 hlt)
310+
311+
theorem DenseRange.exists_seq_strictAnti_tendsto {β : Type*} [LinearOrder β] [DenselyOrdered α]
312+
[NoMaxOrder α] [FirstCountableTopology α] {f : β → α} (hf : DenseRange f) (hmono : Monotone f)
313+
(x : α):
314+
∃ u : ℕ → β, StrictAnti u ∧ (∀ n, f (u n) ∈ Ioi x) ∧ Tendsto (f ∘ u) atTop (𝓝 x) :=
315+
hf.exists_seq_strictMono_tendsto (α := αᵒᵈ) (β := βᵒᵈ) hmono.dual x
316+
234317
end OrderTopology

0 commit comments

Comments
 (0)