Lean library · module TopologyByExample.Spaces.EllentuckAlmostDisjoint

Almost disjoint branches in the Ellentuck space

Source file

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 bitPrefix

TopologyByExample.Ellentuck.bitPrefix

The first n bits of a binary sequence.

def bitPrefix (x : ℕ → Bool) (n : ℕ) : List Bool
:= List.ofFn (fun i : Fin n ↦ x i)

definition prefixCode

TopologyByExample.Ellentuck.prefixCode

Code a finite binary bitPrefix by a natural number.

def prefixCode (x : ℕ → Bool) (n : ℕ) : ℕ
:= Encodable.encode (bitPrefix x n)

theorem prefixCode_length

TopologyByExample.Ellentuck.prefixCode_length

Prefix codes remember their lengths.

theorem prefixCode_length {x y : ℕ → Bool} {m n : ℕ}
    (h : prefixCode x m = prefixCode y n) : m = n
Proof
:= by
  have he : bitPrefix x m = bitPrefix y n := Encodable.encode_injective h
  simpa [bitPrefix] using congrArg List.length he

theorem prefixCode_injective

TopologyByExample.Ellentuck.prefixCode_injective

The codes along one branch are distinct.

theorem prefixCode_injective (x : ℕ → Bool) : Function.Injective (prefixCode x)
Proof
:=
  fun _ _ h ↦ prefixCode_length h

definition branch

TopologyByExample.Ellentuck.branch

An infinite set of codes along one binary branch.

def branch (x : ℕ → Bool) : Ellentuck
:=
  ⟨range (prefixCode x), Set.infinite_range_of_injective (prefixCode_injective x)⟩

theorem prefixCode_agree

TopologyByExample.Ellentuck.prefixCode_agree

Equal bitPrefix codes agree at every earlier coordinate.

theorem prefixCode_agree {x y : ℕ → Bool} {m n k : ℕ}
    (h : prefixCode x m = prefixCode y n) (hk : k < m) : x k = y k
Proof
:= by
  have he := prefixCode_length h
  subst n
  have hl : bitPrefix x m = bitPrefix y m := Encodable.encode_injective h
  have hb := congrArg (fun l : List Bool ↦ l[k]?) hl
  simpa [bitPrefix, hk] using hb

theorem finite_inter_branch

TopologyByExample.Ellentuck.finite_inter_branch

Different branches have finite intersection.

theorem finite_inter_branch {x y : ℕ → Bool} (hxy : x ≠ y) :
    (val (branch x) ∩ val (branch y)).Finite
Proof
:= by
  classical
  obtain ⟨k, hk⟩ := Function.ne_iff.mp hxy
  apply ((finite_Iic k).image (prefixCode x)).subset
  rintro a ⟨⟨m, rfl⟩, ⟨n, hn⟩⟩
  refine ⟨m, ?_, rfl⟩
  exact le_of_not_gt fun hkm ↦ hk (prefixCode_agree hn.symm hkm)

theorem disjoint_basic_of_finite_inter

TopologyByExample.Ellentuck.disjoint_basic_of_finite_inter

Infinite reservoirs with finite intersection give disjoint basic sets.

theorem disjoint_basic_of_finite_inter {A B : Set ℕ} (h : (A ∩ B).Finite) :
    Disjoint (basic ∅ A) (basic ∅ B)
Proof
:= by
  apply Set.disjoint_left.mpr
  intro C hCA hCB
  exact (infinite_val C) (h.subset (subset_inter hCA.2 hCB.2))

theorem pairwise_disjoint_branch_basic

TopologyByExample.Ellentuck.pairwise_disjoint_branch_basic

The branch neighborhoods are pairwise disjoint and nonempty.

theorem pairwise_disjoint_branch_basic :
    Pairwise (fun x y : ℕ → Bool ↦ Disjoint (basic ∅ (val (branch x)))
      (basic ∅ (val (branch y))))
Proof
:=
  fun _ _ h ↦ disjoint_basic_of_finite_inter (finite_inter_branch h)

theorem not_countableChainCondition

TopologyByExample.Ellentuck.not_countableChainCondition

The Ellentuck space has uncountably many disjoint nonempty open sets.

theorem not_countableChainCondition :
    ¬ ∀ S : Set (Set Ellentuck), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) →
      S.PairwiseDisjoint id → S.Countable
Proof
:= by
  classical
  intro h
  let f : (ℕ → Bool) → Set Ellentuck := fun x ↦ basic ∅ (val (branch x))
  have hne (x : ℕ → Bool) : (f x).Nonempty := ⟨branch x, by simp [f, basic]⟩
  have hfi : Function.Injective f := by
    intro x y he
    by_contra hxy
    have hd := pairwise_disjoint_branch_basic hxy
    obtain ⟨B, hB⟩ := hne x
    have hBy : B ∈ f y := by rw [← he]; exact hB
    exact Set.disjoint_left.mp hd hB hBy
  have hc := h (range f) (by
    rintro _ ⟨x, rfl⟩
    exact ⟨isOpen_basic _ _, hne x⟩) (by
      rintro _ ⟨x, rfl⟩ _ ⟨y, rfl⟩ hxy
      exact pairwise_disjoint_branch_basic (fun he ↦ hxy (congrArg f he)))
  have hcu : (univ : Set (ℕ → Bool)).Countable :=
    countable_of_injective_of_countable_image hfi.injOn (by simpa only [image_univ] using hc)
  have hcount : Countable (ℕ → Bool) := countable_univ_iff.mp hcu
  have hle := @Cardinal.mk_le_aleph0 (ℕ → Bool) hcount
  rw [← Cardinal.power_def, Cardinal.mk_bool, Cardinal.mk_nat,
    Cardinal.two_power_aleph0] at hle
  exact (not_le_of_gt Cardinal.aleph0_lt_continuum) hle

On this site: The Ellentuck space does not satisfy the countable chain condition