Skip to content

Commit

Permalink
feat(topology): is_open and is_closed in term of ∀ᶠ and ∃ᶠ (#16545)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickMassot committed Sep 18, 2022
1 parent 8c9342f commit b4502fd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/topology/basic.lean
Expand Up @@ -965,6 +965,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

/-- A set `s` is open iff for every point `x` in `s` and every `y` close to `x`, `y` is in `s`. -/
lemma is_open_iff_eventually {s : set α} : is_open s ↔ ∀ x, x ∈ s → ∀ᶠ y in 𝓝 x, y ∈ s :=
is_open_iff_mem_nhds

theorem is_open_iff_ultrafilter {s : set α} :
is_open s ↔ (∀ (x ∈ s) (l : ultrafilter α), ↑l ≤ 𝓝 x → s ∈ l) :=
by simp_rw [is_open_iff_mem_nhds, ← mem_iff_ultrafilter]
Expand All @@ -987,6 +991,15 @@ by rw [filter.frequently, filter.eventually, ← mem_interior_iff_mem_nhds,

alias mem_closure_iff_frequently ↔ _ filter.frequently.mem_closure

/-- A set `s` is closed iff for every point `x`, if there is a point `y` close to `x` that belongs
to `s` then `x` is in `s`. -/
lemma is_closed_iff_frequently {s : set α} : is_closed s ↔ ∀ x, (∃ᶠ y in 𝓝 x, y ∈ s) → x ∈ s :=
begin
rw ← closure_subset_iff_is_closed,
apply forall_congr (λ x, _),
rw mem_closure_iff_frequently
end

/-- The set of cluster points of a filter is closed. In particular, the set of limit points
of a sequence is closed. -/
lemma is_closed_set_of_cluster_pt {f : filter α} : is_closed {x | cluster_pt x f} :=
Expand Down

0 comments on commit b4502fd

Please sign in to comment.