Skip to content

Commit 65ab68c

Browse files
committed
feat: ∃ᶠ x in š“ a, x < a (#7941)
* Add `frequently_lt_nhds` and `frequently_gt_nhds`. * Move some lemmas from `Topology/Order/Basic` to `Topology/Algebra/Order/LeftRight`. * Relax TC assumptions in `Filter.Eventually.exists_lt` (and `*_gt`). New versions assume `NeBot (š“[<] a)` and `NeBot (š“[>] a)`, so the latter one can be applied, e.g., to `((a : ā„ā‰„0) : ā„ā‰„0āˆž)`. From the Mandelbrot set connectedness project. Co-Authored-By: @girving
1 parent 442eef6 commit 65ab68c

File tree

2 files changed

+38
-30
lines changed

2 files changed

+38
-30
lines changed

ā€ŽMathlib/Topology/Algebra/Order/LeftRight.leanā€Ž

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,44 @@ left continuous, right continuous
2727

2828
open Set Filter Topology
2929

30+
section Preorder
31+
32+
variable {α : Type*} [TopologicalSpace α] [Preorder α]
33+
34+
lemma frequently_lt_nhds (a : α) [NeBot (š“[<] a)] : ∃ᶠ x in š“ a, x < a :=
35+
frequently_iff_neBot.2 ‹_›
36+
37+
lemma frequently_gt_nhds (a : α) [NeBot (š“[>] a)] : ∃ᶠ x in š“ a, a < x :=
38+
frequently_iff_neBot.2 ‹_›
39+
40+
theorem Filter.Eventually.exists_lt {a : α} [NeBot (š“[<] a)] {p : α → Prop}
41+
(h : āˆ€į¶  x in š“ a, p x) : ∃ b < a, p b :=
42+
((frequently_lt_nhds a).and_eventually h).exists
43+
#align filter.eventually.exists_lt Filter.Eventually.exists_lt
44+
45+
theorem Filter.Eventually.exists_gt {a : α} [NeBot (š“[>] a)] {p : α → Prop}
46+
(h : āˆ€į¶  x in š“ a, p x) : ∃ b > a, p b :=
47+
((frequently_gt_nhds a).and_eventually h).exists
48+
#align filter.eventually.exists_gt Filter.Eventually.exists_gt
49+
50+
theorem nhdsWithin_Ici_neBot {a b : α} (Hā‚‚ : a ≤ b) : NeBot (š“[Ici a] b) :=
51+
nhdsWithin_neBot_of_mem Hā‚‚
52+
#align nhds_within_Ici_ne_bot nhdsWithin_Ici_neBot
53+
54+
instance nhdsWithin_Ici_self_neBot (a : α) : NeBot (š“[≄] a) :=
55+
nhdsWithin_Ici_neBot (le_refl a)
56+
#align nhds_within_Ici_self_ne_bot nhdsWithin_Ici_self_neBot
57+
58+
theorem nhdsWithin_Iic_neBot {a b : α} (H : a ≤ b) : NeBot (š“[Iic b] a) :=
59+
nhdsWithin_neBot_of_mem H
60+
#align nhds_within_Iic_ne_bot nhdsWithin_Iic_neBot
61+
62+
instance nhdsWithin_Iic_self_neBot (a : α) : NeBot (š“[≤] a) :=
63+
nhdsWithin_Iic_neBot (le_refl a)
64+
#align nhds_within_Iic_self_ne_bot nhdsWithin_Iic_self_neBot
65+
66+
end Preorder
67+
3068
section PartialOrder
3169

3270
variable {α β : Type*} [TopologicalSpace α] [PartialOrder α] [TopologicalSpace β]

ā€ŽMathlib/Topology/Order/Basic.leanā€Ž

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -276,25 +276,6 @@ theorem IsClosed.hypograph [TopologicalSpace β] {f : β → α} {s : Set β} (h
276276
(hs.preimage continuous_fst).isClosed_le continuousOn_snd (hf.comp continuousOn_fst Subset.rfl)
277277
#align is_closed.hypograph IsClosed.hypograph
278278

279-
-- Porting note: todo: move these lemmas to `Topology.Algebra.Order.LeftRight`
280-
theorem nhdsWithin_Ici_neBot {a b : α} (Hā‚‚ : a ≤ b) : NeBot (š“[Ici a] b) :=
281-
nhdsWithin_neBot_of_mem Hā‚‚
282-
#align nhds_within_Ici_ne_bot nhdsWithin_Ici_neBot
283-
284-
@[instance]
285-
theorem nhdsWithin_Ici_self_neBot (a : α) : NeBot (š“[≄] a) :=
286-
nhdsWithin_Ici_neBot (le_refl a)
287-
#align nhds_within_Ici_self_ne_bot nhdsWithin_Ici_self_neBot
288-
289-
theorem nhdsWithin_Iic_neBot {a b : α} (H : a ≤ b) : NeBot (š“[Iic b] a) :=
290-
nhdsWithin_neBot_of_mem H
291-
#align nhds_within_Iic_ne_bot nhdsWithin_Iic_neBot
292-
293-
@[instance]
294-
theorem nhdsWithin_Iic_self_neBot (a : α) : NeBot (š“[≤] a) :=
295-
nhdsWithin_Iic_neBot (le_refl a)
296-
#align nhds_within_Iic_self_ne_bot nhdsWithin_Iic_self_neBot
297-
298279
end Preorder
299280

300281
section PartialOrder
@@ -2477,12 +2458,6 @@ instance nhdsWithin_Ioi_self_neBot [NoMaxOrder α] (a : α) : NeBot (š“[>] a)
24772458
nhdsWithin_Ioi_neBot (le_refl a)
24782459
#align nhds_within_Ioi_self_ne_bot nhdsWithin_Ioi_self_neBot
24792460

2480-
theorem Filter.Eventually.exists_gt [NoMaxOrder α] {a : α} {p : α → Prop} (h : āˆ€į¶  x in š“ a, p x) :
2481-
∃ b > a, p b := by
2482-
simpa only [exists_prop, gt_iff_lt, and_comm] using
2483-
((h.filter_mono (@nhdsWithin_le_nhds _ _ a (Ioi a))).and self_mem_nhdsWithin).exists
2484-
#align filter.eventually.exists_gt Filter.Eventually.exists_gt
2485-
24862461
theorem nhdsWithin_Iio_neBot' {b c : α} (H₁ : (Iio c).Nonempty) (Hā‚‚ : b ≤ c) :
24872462
NeBot (š“[Iio c] b) :=
24882463
mem_closure_iff_nhdsWithin_neBot.1 <| by rwa [closure_Iio' H₁]
@@ -2500,11 +2475,6 @@ instance nhdsWithin_Iio_self_neBot [NoMinOrder α] (a : α) : NeBot (š“[<] a)
25002475
nhdsWithin_Iio_neBot (le_refl a)
25012476
#align nhds_within_Iio_self_ne_bot nhdsWithin_Iio_self_neBot
25022477

2503-
theorem Filter.Eventually.exists_lt [NoMinOrder α] {a : α} {p : α → Prop} (h : āˆ€į¶  x in š“ a, p x) :
2504-
∃ b < a, p b :=
2505-
Filter.Eventually.exists_gt (α := Ī±įµ’įµˆ) h
2506-
#align filter.eventually.exists_lt Filter.Eventually.exists_lt
2507-
25082478
theorem right_nhdsWithin_Ico_neBot {a b : α} (H : a < b) : NeBot (š“[Ico a b] b) :=
25092479
(isLUB_Ico H).nhdsWithin_neBot (nonempty_Ico.2 H)
25102480
#align right_nhds_within_Ico_ne_bot right_nhdsWithin_Ico_neBot

0 commit comments

Comments
Ā (0)