Lean library · module TopologyByExample.Spaces.HartModifiedCocountable
Hart's modified cocountable topology
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.
Imports
definition HartModifiedCocountable
TopologyByExample.HartModifiedCocountable
A cocountable real line with an attached closed convergent sequence.
def HartModifiedCocountable : Type
:= ℝ ⊕ OnePoint ℕ
On this site: Space: Hart's modified cocountable topology
definition left
TopologyByExample.HartModifiedCocountable.left
The inclusion of the cocountable part.
def left : ℝ → HartModifiedCocountable
:= Sum.inl
definition right
TopologyByExample.HartModifiedCocountable.right
The inclusion of the convergent sequence.
def right : OnePoint ℕ → HartModifiedCocountable
:= Sum.inr
instance
Nonempty open sets are cocountable and have open trace on the attached sequence.
instance : TopologicalSpace HartModifiedCocountable
Proof
where
IsOpen s := s.Nonempty → sᶜ.Countable ∧ IsOpen (right ⁻¹' s)
isOpen_univ := by simp
isOpen_inter s t hs ht := by
rintro ⟨x, hx, hxt⟩
obtain ⟨hsc, hso⟩ := hs ⟨x, hx⟩
obtain ⟨htc, hto⟩ := ht ⟨x, hxt⟩
exact ⟨by simpa only [compl_inter] using hsc.union htc, hso.inter hto⟩
isOpen_sUnion S hS := by
intro hne
obtain ⟨x, s, hs, hx⟩ := hne
refine ⟨((hS s hs ⟨x, hx⟩).1).mono (compl_subset_compl.mpr
(subset_sUnion_of_mem hs)), ?_⟩
rw [preimage_sUnion]
apply isOpen_biUnion
intro t ht
by_cases htn : t.Nonempty
· exact (hS t ht htn).2
· simp [Set.not_nonempty_iff_eq_empty.mp htn]
theorem isOpen_iff
TopologyByExample.HartModifiedCocountable.isOpen_iff
The defining open-set criterion.
theorem isOpen_iff {s : Set HartModifiedCocountable} :
IsOpen s ↔ (s.Nonempty → sᶜ.Countable ∧ IsOpen (right ⁻¹' s))
Proof
:= Iff.rfl
instance
The underlying set is nonempty.
instance : Nonempty HartModifiedCocountable
Proof
:= ⟨left 0⟩
instance
The underlying set is uncountable.
instance : Uncountable HartModifiedCocountable
Proof
:= Sum.inl_injective.uncountable
theorem continuous_right
TopologyByExample.HartModifiedCocountable.continuous_right
The attached sequence has a continuous inclusion.
theorem continuous_right : Continuous right
Proof
:= continuous_def.mpr fun s hs ↦ by
by_cases hne : s.Nonempty
· exact (hs hne).2
· simp [Set.not_nonempty_iff_eq_empty.mp hne]
instance
Every singleton is closed.
instance : T1Space HartModifiedCocountable
Proof
:= by
refine ⟨fun x ↦ isOpen_compl_iff.mp ?_⟩
intro _
refine ⟨by simp, ?_⟩
cases x with
| inl a =>
change IsOpen {b : OnePoint ℕ | (Sum.inr b : ℝ ⊕ OnePoint ℕ) ≠ Sum.inl a}
convert (isOpen_univ : IsOpen (univ : Set (OnePoint ℕ))) using 1
ext b
exact iff_true_intro Sum.inr_ne_inl
| inr b =>
change IsOpen {c : OnePoint ℕ | (Sum.inr c : ℝ ⊕ OnePoint ℕ) ≠ Sum.inr b}
convert (isOpen_compl_singleton (x := b)) using 1
ext c
exact not_congr ⟨Sum.inr.inj, congrArg Sum.inr⟩
theorem nonempty_inter
TopologyByExample.HartModifiedCocountable.nonempty_inter
Any two nonempty open sets meet.
theorem nonempty_inter {U V : Set HartModifiedCocountable}
(hU : IsOpen U) (hV : IsOpen V) (hneU : U.Nonempty) (hneV : V.Nonempty) :
(U ∩ V).Nonempty
Proof
:= by
by_contra h
apply not_countable_univ (α := HartModifiedCocountable)
rw [← compl_empty, ← Set.not_nonempty_iff_eq_empty.mp h, compl_inter]
exact (hU hneU).1.union (hV hneV).1
instance
Hart's space is hyperconnected.
instance : PreirreducibleSpace HartModifiedCocountable
Proof
:=
⟨fun _ _ hU hV ⟨x, _, hxU⟩ ⟨y, _, hyV⟩ ↦ by
simpa using nonempty_inter hU hV ⟨x, hxU⟩ ⟨y, hyV⟩⟩
theorem countable_of_isClosed_of_ne_univ
TopologyByExample.HartModifiedCocountable.countable_of_isClosed_of_ne_univ
Proper closed subsets are countable.
theorem countable_of_isClosed_of_ne_univ {s : Set HartModifiedCocountable}
(hs : IsClosed s) (hne : s ≠ univ) : s.Countable
Proof
:= by
simpa using (hs.isOpen_compl (Set.nonempty_compl.mpr hne)).1
theorem not_isMeagre_univ
TopologyByExample.HartModifiedCocountable.not_isMeagre_univ
Hart's space is not meagre in itself.
theorem not_isMeagre_univ : ¬ IsMeagre (univ : Set HartModifiedCocountable)
Proof
:= by
intro h
obtain ⟨S, hSn, hSc, hS⟩ := isMeagre_iff_countable_union_isNowhereDense.mp h
have hcount (t : Set HartModifiedCocountable) (ht : t ∈ S) : t.Countable := by
apply (countable_of_isClosed_of_ne_univ isClosed_closure ?_).mono subset_closure
intro he
have hn := hSn t ht
rw [IsNowhereDense, he, interior_univ] at hn
exact Set.univ_nonempty.ne_empty hn
exact not_countable_univ ((hSc.sUnion hcount).mono hS)
On this site: Hart's modified cocountable topology is of second category
definition collapse
TopologyByExample.HartModifiedCocountable.collapse
Collapse the attached sequence while keeping all real points distinct.
def collapse : HartModifiedCocountable → CocountableTopology (Option ℝ)
:=
fun x ↦ CocountableTopology.of (match x with | .inl a => some a | .inr _ => none)
theorem collapse_surjective
TopologyByExample.HartModifiedCocountable.collapse_surjective
The collapse map is surjective.
theorem collapse_surjective : Function.Surjective collapse
Proof
:= by
intro y
obtain ⟨y, rfl⟩ := CocountableTopology.of.surjective y
cases y with
| none => exact ⟨right ∞, rfl⟩
| some a => exact ⟨left a, rfl⟩
theorem countable_preimage_collapse
TopologyByExample.HartModifiedCocountable.countable_preimage_collapse
The inverse image of a countable set under the collapse map is countable.
theorem countable_preimage_collapse {s : Set (CocountableTopology (Option ℝ))}
(hs : s.Countable) : (collapse ⁻¹' s).Countable
Proof
:= by
let : Countable (OnePoint ℕ) := inferInstanceAs (Countable (Option ℕ))
have hleft : Function.Injective (fun a : ℝ ↦ collapse (left a)) := by
intro a b hab
exact Option.some.inj (CocountableTopology.of.injective hab)
have hc := hs.preimage hleft
apply ((hc.image left).union (countable_range right)).mono
intro x hx
cases x with
| inl a => exact Or.inl ⟨a, hx, rfl⟩
| inr b => exact Or.inr ⟨b, rfl⟩
theorem continuous_collapse
TopologyByExample.HartModifiedCocountable.continuous_collapse
The collapse map is continuous.
theorem continuous_collapse : Continuous collapse
Proof
:= continuous_def.mpr fun s hs ↦ by
intro hne
have hsn : s.Nonempty := by
obtain ⟨x, hx⟩ := hne
exact ⟨collapse x, hx⟩
have hsc := CocountableTopology.isOpen_iff.mp hs hsn
refine ⟨?_, ?_⟩
· simpa only [preimage_compl] using countable_preimage_collapse hsc
· by_cases hn : CocountableTopology.of (none : Option ℝ) ∈ s
· have he : right ⁻¹' (collapse ⁻¹' s) = univ := by
ext x
change (CocountableTopology.of (none : Option ℝ) ∈ s) ↔ _
simp [hn]
rw [he]
exact isOpen_univ
· have he : right ⁻¹' (collapse ⁻¹' s) = ∅ := by
ext x
change (CocountableTopology.of (none : Option ℝ) ∈ s) ↔ _
simp [hn]
rw [he]
exact isOpen_empty
On this site: Hart's modified cocountable topology: Collapsing the attached sequence
instance
One open set leaves only countably many points to cover.
instance : LindelofSpace HartModifiedCocountable
Proof
:= by
refine ⟨isLindelof_of_countable_subcover fun {ι} U hU hcover ↦ ?_⟩
let x := left 0
have hmem (y : HartModifiedCocountable) : ∃ i, y ∈ U i :=
mem_iUnion.mp (hcover (mem_univ y))
choose f hf using hmem
refine ⟨insert (f x) (f '' (U (f x))ᶜ),
(((hU (f x)) ⟨x, hf x⟩).1.image f).insert _, fun y _ ↦ ?_⟩
by_cases hy : y ∈ U (f x)
· exact mem_biUnion (mem_insert _ _) hy
· exact mem_biUnion (mem_insert_of_mem _ (mem_image_of_mem f hy)) (hf y)
theorem not_separableSpace
TopologyByExample.HartModifiedCocountable.not_separableSpace
Hart's space is not separable.
theorem not_separableSpace : ¬ SeparableSpace HartModifiedCocountable
Proof
:= by
intro h
have : SeparableSpace (CocountableTopology (Option ℝ)) :=
collapse_surjective.denseRange.separableSpace continuous_collapse
exact CocountableTopology.not_separableSpace this
On this site: Hart's modified cocountable topology is not separable
theorem not_sigmaCompactSpace
TopologyByExample.HartModifiedCocountable.not_sigmaCompactSpace
Hart's space is not a countable union of compact sets.
theorem not_sigmaCompactSpace : ¬ SigmaCompactSpace HartModifiedCocountable
Proof
:= by
intro h
have : SigmaCompactSpace (CocountableTopology (Option ℝ)) :=
⟨by simpa only [collapse_surjective.range_eq] using isSigmaCompact_range continuous_collapse⟩
have : Countable (CocountableTopology (Option ℝ)) := AnticompactSpace.countable
have := CocountableTopology.uncountable (X := Option ℝ)
exact not_countable (α := CocountableTopology (Option ℝ)) inferInstance
On this site: Hart's modified cocountable topology is not σ-compact