Skip to content

Commit

Permalink
feat(topology/basic): add is_open_iff_ultrafilter (#4529)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Oct 8, 2020
1 parent a912455 commit ce999a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/order/filter/ultrafilter.lean
Expand Up @@ -211,11 +211,18 @@ begin
exact absurd this u'.1
end

lemma le_iff_ultrafilter {l₁ l₂ : filter α} :
l₁ ≤ l₂ ↔ ∀ g, is_ultrafilter g → g ≤ l₁ → g ≤ l₂ :=
by { rw [sup_of_ultrafilters l₁] { occs := occurrences.pos [1] }, simp only [supr_le_iff] }

lemma mem_iff_ultrafilter {l : filter α} {s : set α} :
s ∈ l ↔ ∀ g, is_ultrafilter g → g ≤ l → s ∈ g :=
by simpa only [← le_principal_iff] using le_iff_ultrafilter

/-- The `tendsto` relation can be checked on ultrafilters. -/
lemma tendsto_iff_ultrafilter (f : α → β) (l₁ : filter α) (l₂ : filter β) :
tendsto f l₁ l₂ ↔ ∀ g, is_ultrafilter g → g ≤ l₁ → g.map f ≤ l₂ :=
⟨assume h g u gx, le_trans (map_mono gx) h,
assume h, by rw [sup_of_ultrafilters l₁]; simpa only [tendsto, map_supr, supr_le_iff]⟩
tendsto_iff_comap.trans $ le_iff_ultrafilter.trans $ by simp only [map_le_iff_le_comap]

/-- The ultrafilter monad. The monad structure on ultrafilters is the
restriction of the one on filters. -/
Expand Down
4 changes: 4 additions & 0 deletions src/topology/basic.lean
Expand Up @@ -691,6 +691,10 @@ calc is_open s ↔ s ⊆ interior s : subset_interior_iff_open.symm
lemma is_open_iff_mem_nhds {s : set α} : is_open s ↔ ∀a∈s, s ∈ 𝓝 a :=
is_open_iff_nhds.trans $ forall_congr $ λ _, imp_congr_right $ λ _, le_principal_iff

theorem is_open_iff_ultrafilter {s : set α} :
is_open s ↔ (∀ (x ∈ s) (l : filter α), is_ultrafilter l → l ≤ 𝓝 x → s ∈ l) :=
by simp_rw [is_open_iff_mem_nhds, @mem_iff_ultrafilter _ (𝓝 _)]

lemma mem_closure_iff_frequently {s : set α} {a : α} : a ∈ closure s ↔ ∃ᶠ x in 𝓝 a, x ∈ s :=
by rw [filter.frequently, filter.eventually, ← mem_interior_iff_mem_nhds,
closure_eq_compl_interior_compl]; refl
Expand Down

0 comments on commit ce999a8

Please sign in to comment.