Skip to content

Commit

Permalink
feat(order/filter): add two lemmas (#11519)
Browse files Browse the repository at this point in the history
Two easy lemmas (from the sphere eversion project) and some minor style changes.
  • Loading branch information
fpvandoorn committed Jan 17, 2022
1 parent e096b99 commit 1fbef63
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/order/filter/at_top_bot.lean
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
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

0 comments on commit 1fbef63

Please sign in to comment.