Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(order/filter): add two lemmas #11519

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/order/filter/at_top_bot.lean
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ lemma eventually_gt_at_top [preorder α] [no_max_order α] (a : α) :
∀ᶠ x in at_top, a < x :=
Ioi_mem_at_top a

lemma eventually_ne_at_top [preorder α] [no_max_order α] (a : α) :
∀ᶠ x in at_top, x ≠ a :=
(eventually_gt_at_top a).mono (λ x hx, hx.ne.symm)

lemma eventually_lt_at_bot [preorder α] [no_min_order α] (a : α) :
∀ᶠ x in at_bot, x < a :=
Iio_mem_at_bot a
Expand Down
13 changes: 8 additions & 5 deletions src/order/filter/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,19 @@ filter.ext_iff.2
@[simp] lemma univ_mem : univ ∈ f :=
f.univ_sets

lemma mem_of_superset : ∀ {x y : set α}, x ∈ fx ⊆ y y ∈ f :=
f.sets_of_superset
lemma mem_of_superset {x y : set α} (hx : x ∈ f) (hxy : x ⊆ y) : y ∈ f :=
f.sets_of_superset hx hxy

lemma inter_mem : ∀ {s t}, s ∈ ft ∈ f s ∩ t ∈ f :=
f.inter_sets
lemma inter_mem {s t : set α} (hs : s ∈ f) (ht : t ∈ f) : s ∩ t ∈ f :=
f.inter_sets hs ht

@[simp] lemma inter_mem_iff {s t} : s ∩ t ∈ f ↔ s ∈ f ∧ t ∈ f :=
@[simp] lemma inter_mem_iff {s t : set α} : s ∩ t ∈ f ↔ s ∈ f ∧ t ∈ f :=
⟨λ h, ⟨mem_of_superset h (inter_subset_left s t),
mem_of_superset h (inter_subset_right s t)⟩, and_imp.2 inter_mem⟩

lemma diff_mem {s t : set α} (hs : s ∈ f) (ht : tᶜ ∈ f) : s \ t ∈ f :=
inter_mem hs ht

lemma univ_mem' (h : ∀ a, a ∈ s) : s ∈ f :=
mem_of_superset univ_mem (λ x _, h x)

Expand Down