Skip to content

Commit

Permalink
feat(order/filter/bases): add exists_iff and forall_iff (#2507)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Apr 25, 2020
1 parent 199f6fe commit 3c8584d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/order/filter/bases.lean
Expand Up @@ -342,6 +342,19 @@ lemma has_basis.prod_self (hl : l.has_basis p s) :
{ rintros ⟨i, hi, H⟩,
exact ⟨s i, hl.mem_of_mem hi, s i, hl.mem_of_mem hi, H⟩ }
end

lemma has_basis.exists_iff (hl : l.has_basis p s) {P : set α → Prop}
(mono : ∀ ⦃s t⦄, s ⊆ t → P t → P s) :
(∃ s ∈ l, P s) ↔ ∃ (i) (hi : p i), P (s i) :=
⟨λ ⟨s, hs, hP⟩, let ⟨i, hi, his⟩ := hl.mem_iff.1 hs in ⟨i, hi, mono his hP⟩,
λ ⟨i, hi, hP⟩, ⟨s i, hl.mem_of_mem hi, hP⟩⟩

lemma has_basis.forall_iff (hl : l.has_basis p s) {P : set α → Prop}
(mono : ∀ ⦃s t⦄, s ⊆ t → P s → P t) :
(∀ s ∈ l, P s) ↔ ∀ i, p i → P (s i) :=
⟨λ H i hi, H (s i) $ hl.mem_of_mem hi,
λ H s hs, let ⟨i, hi, his⟩ := hl.mem_iff.1 hs in mono his (H i hi)⟩

variables [preorder ι] (l p s)

/-- `is_antimono_basis p s` means the image of `s` bounded by `p` is a filter basis
Expand All @@ -357,6 +370,7 @@ structure has_antimono_basis [preorder ι] (l : filter α) (p : ι → Prop) (s
extends has_basis l p s : Prop :=
(decreasing : ∀ {i j}, p i → p j → i ≤ j → s j ⊆ s i)
(mono : monotone p)

end same_type

section two_types
Expand Down

0 comments on commit 3c8584d

Please sign in to comment.