Lean library · module TopologyByExample.Spaces.BingSeparation

Separation and support strata in Bing's example

Source file

A coordinate separates any partition of the principal points. Sets of vectors having at most a fixed finite number of nonzero coordinates are closed and discrete. Together with the principal points, these sets cover Michael's subspace.

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

instance

instance : CompletelyNormalSpace Space
Proof
:= by
  refine ⟨fun {s t} hst hts ↦ SeparatedNhds.disjoint_nhdsSet ?_⟩
  let H := yes (point ⁻¹' s)
  have hH : IsClopen H := isClopen_yes _
  have hd : Disjoint s t := hst.mono_left subset_closure
  refine ⟨(H \ closure t) ∪ (s \ range point), (Hᶜ \ closure s) ∪ (t \ range point),
    (hH.isOpen.sdiff isClosed_closure).union (isOpen_of_disjoint_principals disjoint_sdiff_left),
    (hH.isClosed.isOpen_compl.sdiff isClosed_closure).union
      (isOpen_of_disjoint_principals disjoint_sdiff_left), ?_, ?_, ?_⟩
  · intro x hx
    by_cases h : x ∈ range point
    · obtain ⟨r, rfl⟩ := h
      exact Or.inl ⟨hx, Set.disjoint_left.1 hts hx⟩
    · exact Or.inr ⟨hx, h⟩
  · intro x hx
    by_cases h : x ∈ range point
    · obtain ⟨r, rfl⟩ := h
      exact Or.inl ⟨Set.disjoint_left.1 hd.symm hx, Set.disjoint_left.1 hst.symm hx⟩
    · exact Or.inr ⟨hx, h⟩
  · apply Set.disjoint_left.2
    intro x h₁ h₂
    rcases h₁ with h₁ | h₁ <;> rcases h₂ with h₂ | h₂
    · exact h₂.1 h₁.1
    · exact h₁.2 (subset_closure h₂.1)
    · exact h₂.2 (subset_closure h₁.1)
    · exact Set.disjoint_left.1 hd h₁.1 h₂.1

definition level

TopologyByExample.BingExampleG.level

All binary vectors with at most n nonzero coordinates.

def level (n : ℕ) : Set Space
:=
  {x | ∀ f : Finset Coord, ↑f ⊆ x.support → f.card ≤ n}

theorem level_disjoint_principals

TopologyByExample.BingExampleG.level_disjoint_principals

A fixed finite support bound excludes all principal evaluations.

theorem level_disjoint_principals (n : ℕ) : Disjoint (level n) (range point)
Proof
:= by
  apply Set.disjoint_left.2
  rintro _ hn ⟨r, rfl⟩
  obtain ⟨f, hf, he⟩ := (show (point r).support.Infinite from
    fun h ↦ not_countable_support_point r h.countable).exists_subset_card_eq (n + 1)
  have := hn f hf
  omega

theorem isClosed_level

TopologyByExample.BingExampleG.isClosed_level

The vectors with a fixed finite bound on their support size form a closed set.

theorem isClosed_level (n : ℕ) : IsClosed (level n)
Proof
:= by
  apply isOpen_compl_iff.1
  apply isOpen_iff_mem_nhds.2
  intro x hx
  change ¬∀ f : Finset Coord, ↑f ⊆ x.support → f.card ≤ n at hx
  push Not at hx
  obtain ⟨f, hf, hn⟩ := hx
  refine (nhds_basis x).mem_iff.2 ⟨f, trivial, fun y hy hyl ↦ hn.not_ge (hyl f ?_)⟩
  exact fun q hq ↦ (basic_subset_cyl x f hy q hq).2 (hf hq)

theorem isDiscrete_level

TopologyByExample.BingExampleG.isDiscrete_level

The vectors with bounded finite support form a discrete subspace.

theorem isDiscrete_level (n : ℕ) : IsDiscrete (level n)
Proof
:= by
  apply isDiscrete_iff_forall_mem_exists_isOpen.2
  intro x hx
  exact ⟨{x}, isOpen_singleton_of_not_principal
    (Set.disjoint_left.1 (level_disjoint_principals n) hx),
    inter_eq_left.2 (singleton_subset_iff.2 hx)⟩

theorem finite_mem_level

TopologyByExample.BingExampleG.finite_mem_level

Every finite support belongs to some bounded support level.

theorem finite_mem_level {x : Space} (hx : x.support.Finite) : ∃ n, x ∈ level n
Proof
:= by
  classical
  refine ⟨hx.toFinset.card, fun f hf ↦ Finset.card_le_card fun q hq ↦ ?_⟩
  exact hx.mem_toFinset.2 (hf hq)

theorem isGδ_michael

TopologyByExample.BingExampleG.isGδ_michael

Every subset of Michael's space is a countable intersection of open sets.

theorem isGδ_michael (s : Set Michael) : IsGδ s
Proof
:= by
  let E := Subtype.val '' sᶜ
  let F := fun n ↦ (E ∩ range point) ∪ (E ∩ level n)
  have hc (n : ℕ) : IsClosed (F n) :=
    (isClosed_of_subset_discrete_closed inter_subset_right isDiscrete_principals
      isClosed_principals).union
      (isClosed_of_subset_discrete_closed inter_subset_right
        (isDiscrete_level n) (isClosed_level n))
  have he : s = ⋂ n, (Subtype.val ⁻¹' (F n)ᶜ : Set Michael) := by
    ext x
    simp only [mem_iInter]
    constructor
    · intro hx n hn
      have hE : x.val ∈ E := hn.elim And.left And.left
      obtain ⟨y, hy, he⟩ := hE
      exact hy (Subtype.ext he ▸ hx)
    · intro hx
      by_contra h
      have hxE : x.val ∈ E := ⟨x, h, rfl⟩
      rcases x.property with hM | hf
      · exact hx 0 (Or.inl ⟨hxE, hM⟩)
      · obtain ⟨n, hn⟩ := finite_mem_level hf
        exact hx n (Or.inr ⟨hxE, hn⟩)
  rw [he]
  exact IsGδ.iInter_of_isOpen fun n ↦ (hc n).isOpen_compl.preimage continuous_subtypeVal

instance

instance : PerfectlyNormalSpace Michael
Proof
where
  closed_gdelta := fun {_} _ ↦ isGδ_michael _

instance

instance : ScatteredSpace Space
Proof
:= by
  apply scatteredSpace_iff_exists_isolated.2
  intro s hs
  by_cases h : s ⊆ range point
  · obtain ⟨x, hx⟩ := hs
    obtain ⟨U, hU, he⟩ := isDiscrete_iff_forall_mem_exists_isOpen.1 isDiscrete_principals x (h hx)
    have hxU : x ∈ U := (show x ∈ U ∩ range point from he ▸ mem_singleton x).1
    exact ⟨x, hx, U, hU.mem_nhds hxU, he ▸ inter_subset_inter_right _ h⟩
  · obtain ⟨x, hx, hM⟩ := not_subset.1 h
    exact ⟨x, hx, {x}, (isOpen_singleton_of_not_principal hM).mem_nhds rfl, inter_subset_left⟩