Lean library · module TopologyByExample.Theorems.ScatteredZeroDimensional
Zero-dimensionality of scattered metric spaces
This file was written by Codex (OpenAI's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.
theorem isClosed_of_dist_lower_bound
TopologyByExample.isClosed_of_dist_lower_bound
A uniformly separated set in a metric space is closed.
theorem isClosed_of_dist_lower_bound {X : Type*} [MetricSpace X] {s : Set X}
{δ : ℝ} (hδ : 0 < δ) (hsep : s.Pairwise fun x y ↦ δ ≤ dist x y) : IsClosed s
Proof
:= by
rw [isClosed_iff_derivedSet_subset]
intro z hz
exfalso
have hz' := accPt_iff_nhds.mp hz
obtain ⟨y, ⟨hyball, hys⟩, hyz⟩ := hz' (ball z (δ / 3)) (ball_mem_nhds z (by positivity))
have hpos : 0 < min (δ / 3) (dist y z) := lt_min (by positivity) (dist_pos.mpr hyz)
obtain ⟨w, ⟨hwball, hws⟩, _⟩ := hz' (ball z _) (ball_mem_nhds z hpos)
change dist w z < min (δ / 3) (dist y z) at hwball
have hwy : w ≠ y := by
intro he
have := lt_of_lt_of_le hwball (min_le_right _ _)
simp [he] at this
have hbound := hsep hws hys hwy
have hwsmall := lt_of_lt_of_le hwball (min_le_left _ _)
have htri := dist_triangle w z y
rw [dist_comm z y] at htri
change dist y z < δ / 3 at hyball
linarith
theorem exists_closed_discrete_cover_of_scatteredSpace
TopologyByExample.exists_closed_discrete_cover_of_scatteredSpace
A scattered metric space is covered by countably many sets all of whose subsets are closed.
theorem exists_closed_discrete_cover_of_scatteredSpace {X : Type*} [MetricSpace X]
[ScatteredSpace X] : ∃ D : ℕ → Set X,
(∀ n, ∀ s ⊆ D n, IsClosed s) ∧ ⋃ n, D n = univ
Proof
:= by
classical
obtain ⟨r, hr, ε, hε, hlocal⟩ := exists_wellFounded_metric_neighbourhoods (X := X)
let D : ℕ → Set X := fun n ↦ {x | 1 / (n + 1 : ℝ) ≤ ε x}
refine ⟨D, ?_, ?_⟩
· intro n s hs
apply isClosed_of_dist_lower_bound (δ := 1 / (n + 1 : ℝ)) (by positivity)
intro x hx y hy hxy
by_contra hdist
have hd : dist x y < 1 / (n + 1 : ℝ) := lt_of_not_ge hdist
have hxy' : r x y := hlocal y x hxy (lt_of_lt_of_le hd (hs hy))
have hyx' : r y x := hlocal x y hxy.symm (by
rw [dist_comm]
exact lt_of_lt_of_le hd (hs hx))
exact hr.asymmetric x y hxy' hyx'
· apply eq_univ_of_forall
intro x
obtain ⟨n, hn⟩ := exists_nat_one_div_lt (hε x)
exact mem_iUnion.mpr ⟨n, hn.le⟩
On this site: Theorem: Scattered metric spaces have countable closed discrete covers
structure ClosedDisjointPair
TopologyByExample.ClosedDisjointPair
private structure ClosedDisjointPair (X : Type*) [TopologicalSpace X] where
left : Set X
right : Set X
closed_left : IsClosed left
closed_right : IsClosed right
disjoint : Disjoint left right
theorem extend_closed_pair
TopologyByExample.extend_closed_pair
private theorem extend_closed_pair {X : Type*} [TopologicalSpace X] [NormalSpace X]
(p : ClosedDisjointPair X) (D : Set X) (hD : ∀ s ⊆ D, IsClosed s) :
∃ q : ClosedDisjointPair X, p.left ⊆ interior q.left ∧
p.right ⊆ interior q.right ∧ D ⊆ interior q.left ∪ interior q.right
Proof
:= by
let L := p.left ∪ (D \ p.right)
have hL : IsClosed L := p.closed_left.union (hD _ sdiff_subset)
have hdis : Disjoint L p.right := by
simp only [L, disjoint_union_left]
exact ⟨p.disjoint, disjoint_sdiff_left⟩
obtain ⟨U, V, hU, hV, hLU, hRV, hUV⟩ := normal_separation hL p.closed_right hdis
obtain ⟨U', hU', hLU', hU'U⟩ := normal_exists_closure_subset hL hU hLU
obtain ⟨V', hV', hRV', hV'V⟩ := normal_exists_closure_subset p.closed_right hV hRV
refine ⟨⟨closure U', closure V', isClosed_closure, isClosed_closure,
hUV.mono hU'U hV'V⟩, ?_, ?_, ?_⟩
· exact subset_union_left.trans (hLU'.trans hU'.subset_interior_closure)
· exact hRV'.trans hV'.subset_interior_closure
· intro x hx
by_cases hr : x ∈ p.right
· exact Or.inr (hV'.subset_interior_closure (hRV' hr))
· exact Or.inl (hU'.subset_interior_closure (hLU' (Or.inr ⟨hx, hr⟩)))
theorem exists_isClopen_separator_of_closed_discrete_cover
TopologyByExample.exists_isClopen_separator_of_closed_discrete_cover
A normal space covered by countably many closed discrete sets separates closed sets by clopen sets.
theorem exists_isClopen_separator_of_closed_discrete_cover {X : Type*}
[TopologicalSpace X] [NormalSpace X] (D : ℕ → Set X)
(hD : ∀ n, ∀ s ⊆ D n, IsClosed s) (hcover : ⋃ n, D n = univ)
{A B : Set X} (hA : IsClosed A) (hB : IsClosed B) (hAB : Disjoint A B) :
∃ U : Set X, IsClopen U ∧ A ⊆ U ∧ Disjoint U B
Proof
:= by
classical
choose next hnext using fun (n : ℕ) (p : ClosedDisjointPair X) ↦
extend_closed_pair p (D n) (hD n)
let S : ℕ → ClosedDisjointPair X := Nat.rec ⟨A, B, hA, hB, hAB⟩ next
have hstep (n : ℕ) : (S n).left ⊆ interior (S (n + 1)).left ∧
(S n).right ⊆ interior (S (n + 1)).right ∧
D n ⊆ interior (S (n + 1)).left ∪ interior (S (n + 1)).right := hnext n (S n)
have hmonoL : Monotone (fun n ↦ (S n).left) :=
monotone_nat_of_le_succ fun n ↦ (hstep n).1.trans interior_subset
have hmonoR : Monotone (fun n ↦ (S n).right) :=
monotone_nat_of_le_succ fun n ↦ (hstep n).2.1.trans interior_subset
let U := ⋃ n, interior (S n).left
let V := ⋃ n, interior (S n).right
have hUV : Disjoint U V := by
apply disjoint_left.mpr
intro x hxU hxV
obtain ⟨n, hn⟩ := mem_iUnion.mp hxU
obtain ⟨m, hm⟩ := mem_iUnion.mp hxV
exact (S (max n m)).disjoint.le_bot
⟨hmonoL (le_max_left _ _) (interior_subset hn),
hmonoR (le_max_right _ _) (interior_subset hm)⟩
have hfull : U ∪ V = univ := by
apply eq_univ_of_forall
intro x
have hx : x ∈ ⋃ n, D n := hcover.symm ▸ mem_univ x
obtain ⟨n, hn⟩ := mem_iUnion.mp hx
rcases (hstep n).2.2 hn with h | h
· exact Or.inl (mem_iUnion.mpr ⟨n + 1, h⟩)
· exact Or.inr (mem_iUnion.mpr ⟨n + 1, h⟩)
have hcomp : Uᶜ = V := by
ext x
have hf : x ∈ U ∪ V := hfull.symm ▸ mem_univ x
exact ⟨fun hx ↦ hf.resolve_left hx, fun hx hxu ↦ hUV.le_bot ⟨hxu, hx⟩⟩
have hBU : B ⊆ V := fun x hx ↦ mem_iUnion.mpr ⟨1, (hstep 0).2.1 hx⟩
refine ⟨U, ⟨?_, isOpen_iUnion fun _ ↦ isOpen_interior⟩, ?_, hUV.mono_right hBU⟩
· rw [← isOpen_compl_iff, hcomp]
exact isOpen_iUnion fun _ ↦ isOpen_interior
· exact fun x hx ↦ mem_iUnion.mpr ⟨1, (hstep 0).1 hx⟩
On this site: Theorem: Clopen separation from countable closed discrete covers
theorem zeroDimensionalSpace_of_scatteredSpace_of_metrizableSpace
TopologyByExample.zeroDimensionalSpace_of_scatteredSpace_of_metrizableSpace
A scattered metrizable space has a basis of clopen sets.
theorem zeroDimensionalSpace_of_scatteredSpace_of_metrizableSpace {X : Type*}
[TopologicalSpace X] [MetrizableSpace X] [ScatteredSpace X] : ZeroDimensionalSpace X
Proof
:= by
let := metrizableSpaceMetric X
obtain ⟨D, hD, hcover⟩ := exists_closed_discrete_cover_of_scatteredSpace (X := X)
rw [zeroDimensionalSpace_iff_isTopologicalBasis_isClopen]
apply isTopologicalBasis_of_isOpen_of_nhds (fun _ h ↦ IsClopen.isOpen h)
intro x U hx hU
obtain ⟨V, hV, hxV, hVU⟩ := exists_isClopen_separator_of_closed_discrete_cover
D hD hcover isClosed_singleton hU.isClosed_compl
(by simpa using hx : Disjoint ({x} : Set X) Uᶜ)
exact ⟨V, hV, hxV (mem_singleton x), fun y hy ↦ by
by_contra hyU
exact hVU.le_bot ⟨hy, hyU⟩⟩
On this site: Theorem: Scattered metrizable spaces are zero-dimensional