Lean library · module TopologyByExample.Spaces.CocountableFibreSpace

A scattered space with no countably metacompact refinement property

Source file

Attach one point for every natural-valued function on an uncountable discrete set, along the cocountable filter restricted to an uncountable fibre of that function.

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
variable (B : Type*) [Uncountable B]

theorem exists_uncountable_fibre

TopologyByExample.CocountableFibre.exists_uncountable_fibre

Some fibre of every natural-valued function on an uncountable set is uncountable.

theorem exists_uncountable_fibre (f : B → ℕ) : ∃ n, ¬ ({b | f b = n} : Set B).Countable
Proof
:= by
  by_contra h
  push Not at h
  have hc := Set.countable_iUnion h
  have he : (⋃ n, {b | f b = n}) = (univ : Set B) := by ext b; simp
  rw [he] at hc
  exact Set.not_countable_univ hc

definition label

TopologyByExample.CocountableFibre.label

A selected value with an uncountable fibre.

noncomputable def label (f : B → ℕ) : ℕ
:= (exists_uncountable_fibre B f).choose

definition attaching

TopologyByExample.CocountableFibre.attaching

The attaching filter at a function is concentrated on its selected fibre.

noncomputable def attaching (f : B → ℕ) : Filter B
:=
  cocountable ⊓ 𝓟 {b | f b = label B f}

theorem fibre_uncountable

TopologyByExample.CocountableFibre.fibre_uncountable

The selected fibre cannot be discarded by the cocountable filter.

theorem fibre_uncountable (f : B → ℕ) : ¬ ({b | f b = label B f} : Set B).Countable
Proof
:=
  (exists_uncountable_fibre B f).choose_spec

instance attaching_neBot

TopologyByExample.CocountableFibre.attaching_neBot

Each attaching filter is nontrivial.

instance attaching_neBot (f : B → ℕ) : (attaching B f).NeBot
Proof
:= by
  constructor
  intro h
  rw [attaching, Filter.inf_principal_eq_bot, Filter.mem_cocountable] at h
  exact fibre_uncountable B f (by simpa using h)

theorem upper_mem_closure

TopologyByExample.CocountableFibre.upper_mem_closure

A set whose lower trace belongs to an attaching filter accumulates at that upper point.

theorem upper_mem_closure (i : B → ℕ)
    {s : Set (FilterAttachment.Space (attaching B))}
    (hs : FilterAttachment.Space.lower ⁻¹' s ∈ attaching B i) :
    FilterAttachment.Space.upper i ∈ closure s
Proof
:= by
  apply mem_closure_iff.mpr
  intro V hV hi
  obtain ⟨b, hbV, hbs⟩ := Filter.nonempty_of_mem (Filter.inter_mem (hV i hi) hs)
  exact ⟨FilterAttachment.Space.lower b, hbV, hbs⟩

theorem label_const

TopologyByExample.CocountableFibre.label_const

A constant function has its constant value as selected label.

theorem label_const (n : ℕ) : label B (fun _ ↦ n) = n
Proof
:= by
  by_contra h
  apply fibre_uncountable B (fun _ ↦ n)
  have he : {b : B | n = label B (fun _ ↦ n)} = ∅ := by
    ext b
    simp [Ne.symm h]
  rw [he]
  exact countable_empty

theorem attaching_const

TopologyByExample.CocountableFibre.attaching_const

The constant functions attach along the same cocountable filter.

theorem attaching_const (n : ℕ) : attaching B (fun _ ↦ n) = cocountable
Proof
:= by
  simp [attaching, label_const]

theorem not_t2Space

TopologyByExample.CocountableFibre.not_t2Space

Distinct constant-function points cannot have disjoint neighbourhoods.

theorem not_t2Space : ¬ T2Space (FilterAttachment.Space (attaching B))
Proof
:= by
  intro h
  let := h
  have hne : (FilterAttachment.Space.upper (fun _ : B ↦ 0) :
      FilterAttachment.Space (attaching B)) ≠ FilterAttachment.Space.upper (fun _ ↦ 1) := by
    intro he
    have hf := FilterAttachment.Space.upper.inj he
    have := congrFun hf (Classical.choice (inferInstance : Nonempty B))
    omega
  obtain ⟨U, V, hU, hV, hu, hv, hd⟩ := t2_separation hne
  have hu' := hU _ hu
  have hv' := hV _ hv
  rw [attaching_const] at hu' hv'
  have hc := Filter.mem_cocountable.mp (Filter.inter_mem hu' hv')
  have he : (FilterAttachment.Space.lower ⁻¹' U ∩
      FilterAttachment.Space.lower ⁻¹' V : Set B) = ∅ := by
    apply eq_empty_of_forall_notMem
    intro b hb
    exact Set.disjoint_left.mp hd hb.1 hb.2
  rw [he, compl_empty] at hc
  exact Set.not_countable_univ hc

On this site: The cocountable fibre attachment is not Hausdorff

theorem isClosed_of_countable

TopologyByExample.CocountableFibre.isClosed_of_countable

Every countable set is closed in the fibre attachment.

theorem isClosed_of_countable {s : Set (FilterAttachment.Space (attaching B))}
    (hs : s.Countable) : IsClosed s
Proof
:= by
  rw [← isOpen_compl_iff]
  intro i _
  apply Filter.mem_of_superset (Filter.mem_inf_of_left (Filter.mem_cocountable.mpr
    (show (((FilterAttachment.Space.lower ⁻¹' s)ᶜ)ᶜ).Countable from by
      rw [compl_compl]
      exact hs.preimage (fun _ _ h ↦ FilterAttachment.Space.lower.inj h))))
  intro b hb
  exact hb

instance t1Space

TopologyByExample.CocountableFibre.t1Space

In particular, the fibre attachment is T₁.

instance t1Space : T1Space (FilterAttachment.Space (attaching B))
Proof
where
  t1 x := isClosed_of_countable B (countable_singleton x)

instance anticompactSpace

TopologyByExample.CocountableFibre.anticompactSpace

Every compact subset is finite.

instance anticompactSpace : AnticompactSpace (FilterAttachment.Space (attaching B))
Proof
:= by
  refine ⟨fun s hs ↦ ?_⟩
  by_contra hinf
  obtain ⟨t, hts, htc, hti⟩ := Set.Infinite.exists_subset_countable_infinite hinf
  have hopen (x : t) : IsOpen ((t \ {(x : FilterAttachment.Space (attaching B))})ᶜ) :=
    (isClosed_of_countable B (htc.mono sdiff_subset)).isOpen_compl
  have hcover : s ⊆ ⋃ x : t, (t \ {(x : FilterAttachment.Space (attaching B))})ᶜ := by
    intro y _
    by_cases hy : y ∈ t
    · exact mem_iUnion.2 ⟨⟨y, hy⟩, fun h ↦ h.2 rfl⟩
    · obtain ⟨x, hx⟩ := hti.nonempty
      exact mem_iUnion.2 ⟨⟨x, hx⟩, fun h ↦ hy h.1⟩
  obtain ⟨F, hF⟩ := hs.elim_finite_subcover _ hopen hcover
  obtain ⟨y, hyt, hyF⟩ := (hti.sdiff (F.finite_toSet.image Subtype.val)).nonempty
  obtain ⟨x, hxF, hyx⟩ := mem_iUnion₂.1 (hF (hts hyt))
  refine hyF ⟨x, hxF, ?_⟩
  by_contra hne
  exact hyx ⟨hyt, Ne.symm hne⟩

theorem not_semiregularSpace

TopologyByExample.CocountableFibre.not_semiregularSpace

The two constant-function points cannot be separated by regular open neighbourhoods.

theorem not_semiregularSpace : ¬ SemiregularSpace (FilterAttachment.Space (attaching B))
Proof
:= by
  apply not_semiregularSpace_of_closure_mem_nhds_of_ne
    (x := FilterAttachment.Space.upper (fun _ : B ↦ 0))
    (y := FilterAttachment.Space.upper (fun _ : B ↦ 1))
  · intro U hU
    obtain ⟨V, hVU, hVo, hv⟩ := mem_nhds_iff.mp hU
    have ht := hVo _ hv
    rw [attaching_const] at ht
    have ht1 : FilterAttachment.Space.lower ⁻¹' V ∈ attaching B (fun _ ↦ 1) := by
      rwa [attaching_const]
    apply mem_of_superset ((FilterAttachment.isOpen_basic _ _ ht1).mem_nhds (Or.inr rfl))
    rintro z (⟨b, hb, rfl⟩ | hz)
    · exact subset_closure (hVU hb)
    · have he : z = FilterAttachment.Space.upper (fun _ : B ↦ 1) := hz
      rw [he]
      exact closure_mono hVU (upper_mem_closure B _ ht1)
  · intro h
    have hf := FilterAttachment.Space.upper.inj h
    have := congrFun hf (Classical.choice (inferInstance : Nonempty B))
    omega

On this site: The cocountable fibre attachment is not semiregular

theorem not_extremallyDisconnected_of_split

TopologyByExample.CocountableFibre.not_extremallyDisconnected_of_split

Splitting the lower layer into two uncountable sets obstructs extremal disconnectedness.

theorem not_extremallyDisconnected_of_split (s : Set B)
    (hs : ¬ s.Countable) (hsc : ¬ sᶜ.Countable) :
    ¬ ExtremallyDisconnected (FilterAttachment.Space (attaching B))
Proof
:= by
  intro h
  let A : Set (FilterAttachment.Space (attaching B)) := FilterAttachment.Space.lower '' s
  have hAo : IsOpen A := by
    intro i hi
    simp [A] at hi
  have hx : FilterAttachment.Space.upper (fun _ : B ↦ 0) ∈ closure A := by
    apply mem_closure_iff.mpr
    intro V hV hv
    have ht := hV _ hv
    rw [attaching_const, Filter.mem_cocountable] at ht
    by_contra hempty
    apply hs
    apply ht.mono
    intro b hb hbV
    exact hempty ⟨FilterAttachment.Space.lower b, hbV, ⟨b, hb, rfl⟩⟩
  have he : FilterAttachment.Space.lower ⁻¹' closure A = s := by
    ext b
    constructor
    · intro hb
      obtain ⟨x, hx, ha⟩ := mem_closure_iff.mp hb _
        (FilterAttachment.isOpen_singleton_lower _ b) rfl
      have hx' : x = FilterAttachment.Space.lower b := hx
      rw [hx'] at ha
      simpa [A] using ha
    · intro hb
      exact subset_closure ⟨b, hb, rfl⟩
  have ht := h.open_closure A hAo _ hx
  rw [attaching_const, he, Filter.mem_cocountable] at ht
  exact hsc ht

theorem not_countableChainCondition

TopologyByExample.CocountableFibre.not_countableChainCondition

The uncountably many isolated lower points violate the countable chain condition.

theorem not_countableChainCondition :
    ¬∀ S : Set (Set (FilterAttachment.Space (attaching B))),
      (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id → S.Countable
Proof
:= by
  apply not_countableChainCondition_of_pairwise_disjoint
    (U := fun b : B ↦ {FilterAttachment.Space.lower b})
  · exact FilterAttachment.isOpen_singleton_lower _
  · intro b
    exact singleton_nonempty _
  · intro b c hbc
    simpa using hbc

On this site: The cocountable fibre attachment does not satisfy the countable chain condition

theorem not_weaklyLocallyCompactSpace

TopologyByExample.CocountableFibre.not_weaklyLocallyCompactSpace

A compact neighbourhood would be finite and force every point to be isolated.

theorem not_weaklyLocallyCompactSpace :
    ¬ WeaklyLocallyCompactSpace (FilterAttachment.Space (attaching B))
Proof
:= by
  intro h
  let := h
  have hd : DiscreteTopology (FilterAttachment.Space (attaching B)) :=
    discreteTopology_iff_isOpen_singleton.mpr fun x ↦ by
      obtain ⟨s, hs, hx⟩ := exists_compact_mem_nhds x
      exact isOpen_singleton_of_finite_mem_nhds x hx
        (AnticompactSpace.finite_of_isCompact s hs)
  exact not_t2Space B inferInstance

On this site: The cocountable fibre attachment is not weakly locally compact

theorem uncountable_functions

TopologyByExample.CocountableFibre.uncountable_functions

The upper layer has uncountably many points.

theorem uncountable_functions : Uncountable (B → ℕ)
Proof
:= by
  classical
  let e : B → (B → ℕ) := fun b c ↦ if c = b then 1 else 0
  have he : Function.Injective e := by
    intro b c h
    have hh := congrFun h b
    by_contra hbc
    simp [e, hbc] at hh
  exact he.uncountable

theorem not_lindelofSpace

TopologyByExample.CocountableFibre.not_lindelofSpace

The open cover with one upper point per member has no countable subcover.

theorem not_lindelofSpace : ¬ LindelofSpace (FilterAttachment.Space (attaching B))
Proof
:= by
  intro h
  let := h
  let := uncountable_functions B
  let U : (B → ℕ) → Set (FilterAttachment.Space (attaching B)) :=
    fun i ↦ FilterAttachment.basic (attaching B) i univ
  have ho (i : B → ℕ) : IsOpen (U i) := FilterAttachment.isOpen_basic _ _ Filter.univ_mem
  have hc : univ ⊆ ⋃ i, U i := by
    intro x _
    cases x with
    | lower b => exact mem_iUnion.mpr ⟨fun _ ↦ 0, Or.inl ⟨b, mem_univ _, rfl⟩⟩
    | upper i => exact mem_iUnion.mpr ⟨i, Or.inr rfl⟩
  obtain ⟨s, hs, hcover⟩ := isLindelof_univ.elim_countable_subcover U ho hc
  have hall : s = univ := by
    apply eq_univ_of_forall
    intro i
    obtain ⟨j, hj, hij⟩ := mem_iUnion₂.mp (hcover (mem_univ (FilterAttachment.Space.upper i)))
    have he : i = j := by simpa [U, FilterAttachment.basic] using hij
    exact he.symm ▸ hj
  rw [hall] at hs
  exact Set.not_countable_univ hs

On this site: The cocountable fibre attachment is not Lindelöf

definition extendLower

TopologyByExample.CocountableFibre.extendLower

Extend a lower-layer function by zero on the upper layer.

def extendLower (f : B → ℝ) : FilterAttachment.Space (attaching B) → ℝ
  | .lower b => f b
  | .upper _ => 0

theorem continuous_extendLower

TopologyByExample.CocountableFibre.continuous_extendLower

A function supported on countably many isolated points extends continuously by zero.

theorem continuous_extendLower {f : B → ℝ} (hf : {b | f b ≠ 0}.Countable) :
    Continuous (extendLower B f)
Proof
:= by
  apply continuous_def.mpr
  intro V _ i hi
  have hzero : (0 : ℝ) ∈ V := hi
  apply Filter.mem_of_superset (Filter.mem_inf_of_left
    (Filter.mem_cocountable.mpr (show ({b | f b ≠ 0}ᶜ)ᶜ.Countable from by
      simpa using hf)))
  intro b hb
  have he : f b = 0 := by simpa using hb
  change f b ∈ V
  rwa [he]

theorem not_pseudocompactSpace

TopologyByExample.CocountableFibre.not_pseudocompactSpace

An unbounded function supported on a countable lower subset rules out pseudocompactness.

theorem not_pseudocompactSpace : ¬ PseudocompactSpace (FilterAttachment.Space (attaching B))
Proof
:= by
  classical
  intro h
  let := h
  let e : ℕ ↪ B := Infinite.natEmbedding B
  let f : B → ℝ := Function.extend e (fun n : ℕ ↦ (n : ℝ)) (fun _ ↦ 0)
  have hf : {b | f b ≠ 0}.Countable := by
    apply (countable_range e).mono
    intro b hb
    by_contra he
    have hz : f b = 0 := Function.extend_apply' _ _ _ he
    exact hb hz
  let g : C(FilterAttachment.Space (attaching B), ℝ) :=
    ⟨extendLower B f, continuous_extendLower B hf⟩
  obtain ⟨M, hM⟩ := (PseudocompactSpace.bddAbove_and_bddBelow_range g).1
  obtain ⟨n, hn⟩ := exists_nat_gt M
  have hval : g (FilterAttachment.Space.lower (e n)) = (n : ℝ) :=
    by
      change Function.extend e (fun n : ℕ ↦ (n : ℝ)) (fun _ ↦ 0) (e n) = (n : ℝ)
      exact e.injective.extend_apply _ _ n
  have hle := hM (mem_range_self (FilterAttachment.Space.lower (e n)))
  rw [hval] at hle
  exact (not_lt_of_ge hle) hn

On this site: The cocountable fibre attachment is not pseudocompact

theorem not_countablyMetacompactSpace

TopologyByExample.CocountableFibre.not_countablyMetacompactSpace

Diagonalizing against the lower-layer bound rules out countable metacompactness.

theorem not_countablyMetacompactSpace :
    ¬ CountablyMetacompactSpace (FilterAttachment.Space (attaching B))
Proof
:= by
  intro h
  let := h
  obtain ⟨f, hf⟩ := FilterAttachment.exists_eventual_domination (attaching B) (label B)
  have hh := hf f
  rw [attaching, Filter.mem_inf_principal, Filter.mem_cocountable] at hh
  apply fibre_uncountable B f
  apply hh.mono
  intro b hb
  simp only [mem_compl_iff, mem_ofPred_eq, not_imp]
  change f b = label B f at hb
  exact ⟨hb, by omega⟩

On this site: The cocountable fibre attachment is not countably metacompact