topology.bases

# Bases of topologies. Countability axioms. #

A topological basis on a topological space t is a collection of sets, such that all open sets can be generated as unions of these sets, without the need to take finite intersections of them. This file introduces a framework for dealing with these collections, and also what more we can say under certain countability conditions on bases, which are referred to as first- and second-countable. We also briefly cover the theory of separable spaces, which are those with a countable, dense subset. If a space is second-countable, and also has a countably generated uniformity filter (for example, if t is a metric space), it will automatically be separable (and indeed, these conditions are equivalent in this case).

## Main definitions #

• is_topological_basis s: The topological space t has basis s.
• separable_space α: The topological space t has a countable, dense subset.
• first_countable_topology α: A topology in which 𝓝 x is countably generated for every x.
• second_countable_topology α: A topology which has a topological basis which is countable.

## Main results #

• first_countable_topology.tendsto_subseq: In a first-countable space, cluster points are limits of subsequences.
• second_countable_topology.is_open_Union_countable: In a second-countable space, the union of arbitrarily-many open sets is equal to a sub-union of only countably many of these sets.
• second_countable_topology.countable_cover_nhds: Consider f : α → set α with the property that f x ∈ 𝓝 x for all x. Then there is some countable set s whose image covers the space.

## Implementation Notes #

For our applications we are interested that there exists a countable basis, but we do not need the concrete basis itself. This allows us to declare these type classes as Prop to use them as mixins.

### TODO: #

More fine grained instances for first_countable_topology, separable_space, t2_space, and more (see the comment below subtype.second_countable_topology.)

structure topological_space.is_topological_basis {α : Type u} [t : topological_space α] (s : set (set α)) :
Prop
• exists_subset_inter : ∀ (t₁ : set α), t₁ s∀ (t₂ : set α), t₂ s∀ (x : α), x t₁ t₂(∃ (t₃ : set α) (H : t₃ s), x t₃ t₃ t₁ t₂)
• sUnion_eq :
• eq_generate_from :

A topological basis is one that satisfies the necessary conditions so that it suffices to take unions of the basis sets to get a topology (without taking finite intersections as well).

theorem topological_space.is_topological_basis_of_subbasis {α : Type u} [t : topological_space α] {s : set (set α)} (hs : t = ) :

If a family of sets s generates the topology, then nonempty intersections of finite subcollections of s form a topological basis.

theorem topological_space.is_topological_basis_of_open_of_nhds {α : Type u} [t : topological_space α] {s : set (set α)} (h_open : ∀ (u : set α), u s) (h_nhds : ∀ (a : α) (u : set α), a u(∃ (v : set α) (H : v s), a v v u)) :

If a family of open sets s is such that every open neighbourhood contains some member of s, then s is a topological basis.

theorem topological_space.is_topological_basis.mem_nhds_iff {α : Type u} [t : topological_space α] {a : α} {s : set α} {b : set (set α)}  :
s 𝓝 a ∃ (t : set α) (H : t b), a t t s

A set s is in the neighbourhood of a iff there is some basis set t, which contains a and is itself contained in s.

theorem topological_space.is_topological_basis.nhds_has_basis {α : Type u} [t : topological_space α] {b : set (set α)} {a : α} :
(𝓝 a).has_basis (λ (t : set α), t b a t) (λ (t : set α), t)
@[protected]
theorem topological_space.is_topological_basis.is_open {α : Type u} [t : topological_space α] {s : set α} {b : set (set α)} (hs : s b) :
@[protected]
theorem topological_space.is_topological_basis.mem_nhds {α : Type u} [t : topological_space α] {a : α} {s : set α} {b : set (set α)} (hs : s b) (ha : a s) :
s 𝓝 a
theorem topological_space.is_topological_basis.exists_subset_of_mem_open {α : Type u} [t : topological_space α] {b : set (set α)} {a : α} {u : set α} (au : a u) (ou : is_open u) :
∃ (v : set α) (H : v b), a v v u
theorem topological_space.is_topological_basis.open_eq_sUnion' {α : Type u} [t : topological_space α] {B : set (set α)} {u : set α} (ou : is_open u) :
u = ⋃₀{s ∈ B | s u}

Any open set is the union of the basis sets contained in it.

theorem topological_space.is_topological_basis.open_eq_sUnion {α : Type u} [t : topological_space α] {B : set (set α)} {u : set α} (ou : is_open u) :
∃ (S : set (set α)) (H : S B), u = ⋃₀S
theorem topological_space.is_topological_basis.open_eq_Union {α : Type u} [t : topological_space α] {B : set (set α)} {u : set α} (ou : is_open u) :
∃ (β : Type u) (f : β → set α), (u = ⋃ (i : β), f i) ∀ (i : β), f i B
theorem topological_space.is_topological_basis.mem_closure_iff {α : Type u} [t : topological_space α] {b : set (set α)} {s : set α} {a : α} :
a ∀ (o : set α), o ba o(o s).nonempty

A point a is in the closure of s iff all basis sets containing a intersect s.

theorem topological_space.is_topological_basis.dense_iff {α : Type u} [t : topological_space α] {b : set (set α)} {s : set α} :
∀ (o : set α), o bo.nonempty(o s).nonempty

A set is dense iff it has non-trivial intersection with all basis sets.

theorem topological_space.is_topological_basis.is_open_map_iff {α : Type u} [t : topological_space α] {β : Type u_1} {B : set (set α)} {f : α → β} :
∀ (s : set α), s Bis_open (f '' s)
theorem topological_space.is_topological_basis.exists_nonempty_subset {α : Type u} [t : topological_space α] {B : set (set α)} {u : set α} (hu : u.nonempty) (ou : is_open u) :
∃ (v : set α) (H : v B), v.nonempty v u
@[protected]
theorem topological_space.is_topological_basis.prod {α : Type u} [t : topological_space α] {β : Type u_1} {B₁ : set (set α)} {B₂ : set (set β)}  :
@[protected]
theorem topological_space.is_topological_basis.inducing {α : Type u} [t : topological_space α] {β : Type u_1} {f : α → β} {T : set (set β)} (hf : inducing f)  :
theorem topological_space.is_topological_basis_of_cover {α : Type u} [t : topological_space α] {ι : Sort u_1} {U : ι → set α} (Uo : ∀ (i : ι), is_open (U i)) (Uc : (⋃ (i : ι), U i) = set.univ) {b : Π (i : ι), set (set (U i))} (hb : ∀ (i : ι), ) :
@[protected]
theorem topological_space.is_topological_basis.continuous {α : Type u} [t : topological_space α] {β : Type u_1} {B : set (set β)} (f : α → β) (hf : ∀ (s : set β), s Bis_open (f ⁻¹' s)) :
@[class]
structure topological_space.separable_space (α : Type u) [t : topological_space α] :
Prop

A separable space is one with a countable dense subset, available through topological_space.exists_countable_dense. If α is also known to be nonempty, then topological_space.dense_seq provides a sequence ℕ → α with dense range, see topological_space.dense_range_dense_seq.

If α is a uniform space with countably generated uniformity filter (e.g., an emetric_space), then this condition is equivalent to topological_space.second_countable_topology α. In this case the latter should be used as a typeclass argument in theorems because Lean can automatically deduce separable_space from second_countable_topology but it can't deduce second_countable_topology and emetric_space.

Instances
theorem topological_space.exists_countable_dense (α : Type u) [t : topological_space α]  :
∃ (s : set α), s.countable
theorem topological_space.exists_dense_seq (α : Type u) [t : topological_space α] [nonempty α] :
∃ (u : → α),

A nonempty separable space admits a sequence with dense range. Instead of running cases on the conclusion of this lemma, you might want to use topological_space.dense_seq and topological_space.dense_range_dense_seq.

If α might be empty, then exists_countable_dense is the main way to use separability of α.

noncomputable def topological_space.dense_seq (α : Type u) [t : topological_space α] [nonempty α] :
→ α

A dense sequence in a non-empty separable topological space.

If α might be empty, then exists_countable_dense is the main way to use separability of α.

Equations
@[simp]
theorem topological_space.dense_range_dense_seq (α : Type u) [t : topological_space α] [nonempty α] :

The sequence dense_seq α has dense range.

theorem set.pairwise_disjoint.countable_of_is_open {α : Type u} [t : topological_space α] {ι : Type u_1} {s : ι → set α} {a : set ι} (h : a.pairwise_disjoint s) (ha : ∀ (i : ι), i ais_open (s i)) (h'a : ∀ (i : ι), i a(s i).nonempty) :

In a separable space, a family of nonempty disjoint open sets is countable.

theorem set.pairwise_disjoint.countable_of_nonempty_interior {α : Type u} [t : topological_space α] {ι : Type u_1} {s : ι → set α} {a : set ι} (h : a.pairwise_disjoint s) (ha : ∀ (i : ι), i a(interior (s i)).nonempty) :

In a separable space, a family of disjoint sets with nonempty interiors is countable.

theorem is_topological_basis_pi {ι : Type u_1} {X : ι → Type u_2} [Π (i : ι), topological_space (X i)] {T : Π (i : ι), set (set (X i))} (cond : ∀ (i : ι), ) :
topological_space.is_topological_basis {S : set (Π (i : ι), X i) | ∃ (U : Π (i : ι), set (X i)) (F : finset ι), (∀ (i : ι), i FU i T i) S = F.pi U}
theorem is_topological_basis_infi {β : Type u_1} {ι : Type u_2} {X : ι → Type u_3} [t : Π (i : ι), topological_space (X i)] {T : Π (i : ι), set (set (X i))} (cond : ∀ (i : ι), ) (f : Π (i : ι), β → X i) :
topological_space.is_topological_basis {S : set β | ∃ (U : Π (i : ι), set (X i)) (F : finset ι), (∀ (i : ι), i FU i T i) S = ⋂ (i : ι) (hi : i F), f i ⁻¹' U i}
@[protected]
theorem dense_range.separable_space {α : Type u_1} {β : Type u_2} {f : α → β} (h : dense_range f) (h' : continuous f) :

If α is a separable space and f : α → β is a continuous map with dense range, then β is a separable space as well. E.g., the completion of a separable uniform space is separable.

theorem dense.exists_countable_dense_subset {α : Type u_1} {s : set α} (hs : dense s) :
∃ (t : set α) (H : t s), t.countable
theorem dense.exists_countable_dense_subset_bot_top {α : Type u_1} {s : set α} (hs : dense s) :
∃ (t : set α) (H : t s), t.countable (∀ (x : α), x sx t) ∀ (x : α), x sx t

Let s be a dense set in a topological space α with partial order structure. If s is a separable space (e.g., if α has a second countable topology), then there exists a countable dense subset t ⊆ s such that t contains bottom/top element of α when they exist and belong to s. For a dense subset containing neither bot nor top elements, see dense.exists_countable_dense_subset_no_bot_top.

@[protected, instance]
theorem exists_countable_dense_bot_top (α : Type u_1)  :
∃ (s : set α), s.countable (∀ (x : α), x s) ∀ (x : α), x s

If α is a separable topological space with a partial order, then there exists a countable dense set s : set α that contains those of both bottom and top elements of α that actually exist. For a dense set containing neither bot nor top elements, see exists_countable_dense_no_bot_top.

@[class]
structure topological_space.first_countable_topology (α : Type u) [t : topological_space α] :
Prop
• nhds_generated_countable : ∀ (a : α),

A first-countable space is one in which every point has a countable neighborhood basis.

Instances
theorem topological_space.first_countable_topology.tendsto_subseq {α : Type u} [t : topological_space α] {u : → α} {x : α} (hx : u) :
∃ (ψ : ), filter.tendsto (u ψ) filter.at_top (𝓝 x)

In a first-countable space, a cluster point x of a sequence is the limit of some subsequence.

@[protected, instance]
@[class]
structure topological_space.second_countable_topology (α : Type u) [t : topological_space α] :
Prop
• is_open_generated_countable : ∃ (b : set (set α)),

A second-countable space is one with a countable basis.

Instances
@[protected]
theorem topological_space.exists_countable_basis (α : Type u) [t : topological_space α]  :
∃ (b : set (set α)),
def topological_space.countable_basis (α : Type u) [t : topological_space α]  :
set (set α)

A countable topological basis of α.

Equations
@[protected, instance]
noncomputable def topological_space.encodable_countable_basis (α : Type u) [t : topological_space α]  :
Equations
theorem topological_space.is_open_of_mem_countable_basis {α : Type u} [t : topological_space α] {s : set α} (hs : s ) :
theorem topological_space.nonempty_of_mem_countable_basis {α : Type u} [t : topological_space α] {s : set α} (hs : s ) :
@[protected, instance]
theorem topological_space.second_countable_topology_induced (α : Type u) (β : Type u_1) [t : topological_space β] (f : α → β) :

If β is a second-countable space, then its induced topology via f on α is also second-countable.

@[protected, instance]
@[protected, instance]
def topological_space.prod.second_countable_topology (α : Type u) [t : topological_space α] {β : Type u_1}  :
@[protected, instance]
def topological_space.second_countable_topology_encodable {ι : Type u_1} {π : ι → Type u_2} [encodable ι] [t : Π (a : ι), topological_space (π a)] [∀ (a : ι), ] :
@[protected, instance]
def topological_space.second_countable_topology_fintype {ι : Type u_1} {π : ι → Type u_2} [fintype ι] [t : Π (a : ι), topological_space (π a)] [∀ (a : ι), ] :
@[protected, instance]
theorem topological_space.second_countable_topology_of_countable_cover {α : Type u} [t : topological_space α] {ι : Type u_1} [encodable ι] {U : ι → set α} [∀ (i : ι), ] (Uo : ∀ (i : ι), is_open (U i)) (hc : (⋃ (i : ι), U i) = set.univ) :

A countable open cover induces a second-countable topology if all open covers are themselves second countable.

theorem topological_space.is_open_Union_countable {α : Type u} [t : topological_space α] {ι : Type u_1} (s : ι → set α) (H : ∀ (i : ι), is_open (s i)) :
∃ (T : set ι), T.countable (⋃ (i : ι) (H : i T), s i) = ⋃ (i : ι), s i

In a second-countable space, an open set, given as a union of open sets, is equal to the union of countably many of those sets.

theorem topological_space.is_open_sUnion_countable {α : Type u} [t : topological_space α] (S : set (set α)) (H : ∀ (s : set α), s S) :
∃ (T : set (set α)), T.countable T S ⋃₀T = ⋃₀S
theorem topological_space.countable_cover_nhds {α : Type u} [t : topological_space α] {f : α → set α} (hf : ∀ (x : α), f x 𝓝 x) :
∃ (s : set α), s.countable (⋃ (x : α) (H : x s), f x) = set.univ

In a topological space with second countable topology, if f is a function that sends each point x to a neighborhood of x, then for some countable set s, the neighborhoods f x, x ∈ s, cover the whole space.

theorem topological_space.countable_cover_nhds_within {α : Type u} [t : topological_space α] {f : α → set α} {s : set α} (hf : ∀ (x : α), x sf x 𝓝[s] x) :
∃ (t : set α) (H : t s), t.countable s ⋃ (x : α) (H : x t), f x
@[protected]
theorem inducing.second_countable_topology {α : Type u_1} {β : Type u_2} {f : α → β} (hf : inducing f) :
@[protected]
theorem embedding.second_countable_topology {α : Type u_1} {β : Type u_2} {f : α → β} (hf : embedding f) :