Lean library · module TopologyByExample.Spaces.LexicographicIntegerOmegaOne

The lexicographic integer power indexed by the countable ordinals

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 LexicographicIntegerOmegaOne

TopologyByExample.LexicographicIntegerOmegaOne

Integer sequences indexed by the countable ordinals.

def LexicographicIntegerOmegaOne
:= Lex (OmegaOne → ℤ)

On this site: Space: Lexicographically ordered integer power over the countable ordinals

instance

noncomputable instance : LinearOrder LexicographicIntegerOmegaOne
Proof
:=
  inferInstanceAs (LinearOrder (Lex (OmegaOne → ℤ)))

instance

noncomputable instance : TopologicalSpace LexicographicIntegerOmegaOne
Proof
:= Preorder.topology _

instance

instance : OrderTopology LexicographicIntegerOmegaOne
Proof
:= ⟨rfl⟩

instance

instance : Nontrivial LexicographicIntegerOmegaOne
Proof
:=
  inferInstanceAs (Nontrivial (Lex (OmegaOne → ℤ)))

theorem linearlyOrderable

TopologyByExample.LexicographicIntegerOmegaOne.linearlyOrderable

The specified topology is a linear order topology.

theorem linearlyOrderable : ∃ o : LinearOrder LexicographicIntegerOmegaOne,
    letI := o; OrderTopology LexicographicIntegerOmegaOne
Proof
:= ⟨inferInstance, inferInstance⟩

On this site: The lexicographically ordered integer power over the countable ordinals is linearly orderable

definition change

TopologyByExample.LexicographicIntegerOmegaOne.change

Change one coordinate of a sequence.

noncomputable def change (x : LexicographicIntegerOmegaOne) (a : OmegaOne) (v : ℤ) :
    LexicographicIntegerOmegaOne
:= toLex (Function.update (fun i => x i) a v)

definition cylinder

TopologyByExample.LexicographicIntegerOmegaOne.cylinder

Fix the coordinates strictly below a given countable ordinal.

def cylinder (x : LexicographicIntegerOmegaOne) (a : OmegaOne) :
    Set LexicographicIntegerOmegaOne
:= {y | ∀ i < a, y i = x i}

theorem mem_cylinder

TopologyByExample.LexicographicIntegerOmegaOne.mem_cylinder

@[simp] theorem mem_cylinder (x : LexicographicIntegerOmegaOne) (a : OmegaOne) :
    x ∈ cylinder x a
Proof
:= fun _ _ => rfl

theorem change_lt

TopologyByExample.LexicographicIntegerOmegaOne.change_lt

theorem change_lt (x : LexicographicIntegerOmegaOne) (a : OmegaOne) {v : ℤ}
    (hv : v < x a) : change x a v < x
Proof
:= by
  refine ⟨a, ?_, ?_⟩
  · intro j hj
    simp [change, Function.update_of_ne hj.ne]
  · simpa [change] using hv

theorem lt_change

TopologyByExample.LexicographicIntegerOmegaOne.lt_change

theorem lt_change (x : LexicographicIntegerOmegaOne) (a : OmegaOne) {v : ℤ}
    (hv : x a < v) : x < change x a v
Proof
:= by
  refine ⟨a, ?_, ?_⟩
  · intro j hj
    simp [change, Function.update_of_ne hj.ne]
  · simpa [change] using hv

instance

instance : NoMinOrder LexicographicIntegerOmegaOne
Proof
:= ⟨fun x =>
  ⟨change x ⊥ (x ⊥ - 1), change_lt _ _ (by omega)⟩⟩

instance

instance : NoMaxOrder LexicographicIntegerOmegaOne
Proof
:= ⟨fun x =>
  ⟨change x ⊥ (x ⊥ + 1), lt_change _ _ (by omega)⟩⟩

theorem interval_subset_cylinder

TopologyByExample.LexicographicIntegerOmegaOne.interval_subset_cylinder

Bounds with a common prefix force that prefix throughout the interval.

theorem interval_subset_cylinder (x : LexicographicIntegerOmegaOne) (a : OmegaOne) :
    Ioo (change x a (x a - 1)) (change x a (x a + 1)) ⊆ cylinder x a
Proof
:= by
  intro z hz j hj
  induction j using WellFoundedLT.induction with
  | ind j ih =>
    have he (k : OmegaOne) (hk : k < j) : z k = x k := ih k hk (hk.trans hj)
    apply le_antisymm
    · have h := Pi.apply_le_of_toLex hz.2.le (fun k hk => by
        simpa [change, Function.update_of_ne (hk.trans hj).ne] using he k hk)
      simpa [change, Function.update_of_ne hj.ne] using h
    · have h := Pi.apply_le_of_toLex hz.1.le (fun k hk => by
        simpa [change, Function.update_of_ne (hk.trans hj).ne] using (he k hk).symm)
      simpa [change, Function.update_of_ne hj.ne] using h

theorem isOpen_cylinder

TopologyByExample.LexicographicIntegerOmegaOne.isOpen_cylinder

Initial-segment cylinders are open.

theorem isOpen_cylinder (x : LexicographicIntegerOmegaOne) (a : OmegaOne) :
    IsOpen (cylinder x a)
Proof
:= by
  rw [isOpen_iff_mem_nhds]
  intro y hy
  refine mem_of_superset (isOpen_Ioo.mem_nhds
    ⟨change_lt y a (v := y a - 1) (by omega),
      lt_change y a (v := y a + 1) (by omega)⟩) ?_
  intro z hz j hj
  exact (interval_subset_cylinder y a hz j hj).trans (hy j hj)

theorem isClopen_cylinder

TopologyByExample.LexicographicIntegerOmegaOne.isClopen_cylinder

Initial-segment cylinders are also closed.

theorem isClopen_cylinder (x : LexicographicIntegerOmegaOne) (a : OmegaOne) :
    IsClopen (cylinder x a)
Proof
:= by
  refine ⟨?_, isOpen_cylinder x a⟩
  rw [← isOpen_compl_iff, isOpen_iff_mem_nhds]
  intro y hy
  refine mem_of_superset ((isOpen_cylinder y a).mem_nhds (mem_cylinder y a)) ?_
  intro z hz hzx
  apply hy
  intro j hj
  exact (hz j hj).symm.trans (hzx j hj)

theorem nhds_basis

TopologyByExample.LexicographicIntegerOmegaOne.nhds_basis

Cylinders form a neighbourhood base at every point.

theorem nhds_basis (x : LexicographicIntegerOmegaOne) :
    (𝓝 x).HasBasis (fun _ : OmegaOne => True) (cylinder x)
Proof
:= by
  refine (nhds_basis_Ioo x).to_hasBasis ?_ ?_
  · rintro ⟨l, u⟩ ⟨hl, hu⟩
    obtain ⟨a, ha, hla⟩ := hl
    obtain ⟨b, hb, hbu⟩ := hu
    refine ⟨Order.succ (max a b), trivial, ?_⟩
    intro y hy
    have hA : a < Order.succ (max a b) := (le_max_left _ _).trans_lt (Order.lt_succ _)
    have hB : b < Order.succ (max a b) := (le_max_right _ _).trans_lt (Order.lt_succ _)
    constructor
    · refine ⟨a, fun j hj => (ha j hj).trans (hy j (hj.trans hA)).symm, ?_⟩
      simpa only [hy a hA] using hla
    · refine ⟨b, fun j hj => (hy j (hj.trans hB)).trans (hb j hj), ?_⟩
      simpa only [hy b hB] using hbu
  · intro a _
    exact ⟨(change x a (x a - 1), change x a (x a + 1)),
      ⟨change_lt _ _ (by omega), lt_change _ _ (by omega)⟩,
      interval_subset_cylinder x a⟩

instance instZeroDimensionalSpace

TopologyByExample.LexicographicIntegerOmegaOne.instZeroDimensionalSpace

instance instZeroDimensionalSpace : ZeroDimensionalSpace LexicographicIntegerOmegaOne
Proof
:= by
  rw [zeroDimensionalSpace_iff_nhds_hasBasis_isClopen]
  intro x
  exact (nhds_basis x).to_hasBasis
    (fun a _ => ⟨cylinder x a, ⟨isClopen_cylinder x a, mem_cylinder x a⟩, subset_rfl⟩)
    (fun s hs => ((nhds_basis x).mem_iff.mp (hs.1.isOpen.mem_nhds hs.2)))

On this site: The lexicographically ordered integer power over the countable ordinals is zero-dimensional

theorem isOpen_iInter

TopologyByExample.LexicographicIntegerOmegaOne.isOpen_iInter

Countable intersections of open sets remain open.

theorem isOpen_iInter {ι : Type*} [Countable ι]
    (U : ι → Set LexicographicIntegerOmegaOne) (hU : ∀ i, IsOpen (U i)) :
    IsOpen (⋂ i, U i)
Proof
:= by
  classical
  rw [isOpen_iff_mem_nhds]
  intro x hx
  have h := fun i => (nhds_basis x).mem_iff.mp ((hU i).mem_nhds (mem_iInter.mp hx i))
  choose a _ ha using h
  obtain ⟨b, hb⟩ := OmegaOne.bddAbove_of_countable (countable_range a)
  refine mem_of_superset ((isOpen_cylinder x b).mem_nhds (mem_cylinder x b)) ?_
  intro y hy
  apply mem_iInter.mpr
  intro i
  apply ha i
  intro j hj
  exact hy j (hj.trans_le (hb (mem_range_self i)))

theorem isClosed_of_countable

TopologyByExample.LexicographicIntegerOmegaOne.isClosed_of_countable

Every countable subset is closed.

theorem isClosed_of_countable {s : Set LexicographicIntegerOmegaOne} (hs : s.Countable) :
    IsClosed s
Proof
:= by
  have : Countable s := hs.to_subtype
  have h : sᶜ = ⋂ x : s, ({x.val}ᶜ : Set LexicographicIntegerOmegaOne) := by
    ext y
    simp only [mem_compl_iff, mem_iInter, mem_singleton_iff, Subtype.forall]
    aesop
  rw [← isOpen_compl_iff, h]
  exact isOpen_iInter _ fun _ => isClosed_singleton.isOpen_compl

theorem isDiscrete_of_countable

TopologyByExample.LexicographicIntegerOmegaOne.isDiscrete_of_countable

Every countable subset is discrete as a subspace.

theorem isDiscrete_of_countable {s : Set LexicographicIntegerOmegaOne} (hs : s.Countable) :
    IsDiscrete s
Proof
:= by
  apply isDiscrete_iff_forall_mem_exists_isOpen.mpr
  intro x hx
  refine ⟨(s \ {x})ᶜ, (isClosed_of_countable (hs.mono sdiff_subset)).isOpen_compl, ?_⟩
  ext y
  simp only [mem_inter_iff, mem_compl_iff, Set.mem_sdiff, mem_singleton_iff]
  aesop

instance instAnticompactSpace

TopologyByExample.LexicographicIntegerOmegaOne.instAnticompactSpace

Compact subsets are finite.

instance instAnticompactSpace : AnticompactSpace LexicographicIntegerOmegaOne
Proof
:= by
  refine ⟨fun K hK => ?_⟩
  by_contra h
  obtain ⟨s, hsK, hsc, hsi⟩ := (show K.Infinite from h).exists_subset_countable_infinite
  exact hsi ((hK.of_isClosed_subset (isClosed_of_countable hsc) hsK).finite
    (isDiscrete_of_countable hsc))

On this site: The lexicographically ordered integer power over the countable ordinals is anticompact

theorem not_isOpen_singleton

TopologyByExample.LexicographicIntegerOmegaOne.not_isOpen_singleton

No point is isolated.

theorem not_isOpen_singleton (x : LexicographicIntegerOmegaOne) : ¬ IsOpen ({x} : Set _)
Proof
:= by
  intro h
  obtain ⟨a, _, ha⟩ := (nhds_basis x).mem_iff.mp (h.mem_nhds (mem_singleton x))
  have hm : change x a (x a + 1) ∈ cylinder x a := by
    intro j hj
    simp [change, Function.update_of_ne hj.ne]
  have he : change x a (x a + 1) = x := ha hm
  exact (lt_change x a (v := x a + 1) (by omega)).ne he.symm

theorem cylinder_subset_of_common

TopologyByExample.LexicographicIntegerOmegaOne.cylinder_subset_of_common

Two cylinders sharing a point are nested according to their prefix lengths.

theorem cylinder_subset_of_common {x y z : LexicographicIntegerOmegaOne} {a b : OmegaOne}
    (ha : z ∈ cylinder x a) (hb : z ∈ cylinder y b) (hab : a ≤ b) :
    cylinder y b ⊆ cylinder x a
Proof
:= by
  intro w hw j hj
  exact (hw j (hj.trans_le hab)).trans ((hb j (hj.trans_le hab)).symm.trans (ha j hj))

instance instParacompactSpace

TopologyByExample.LexicographicIntegerOmegaOne.instParacompactSpace

Choosing the shortest covering prefixes gives a disjoint open refinement.

instance instParacompactSpace : ParacompactSpace LexicographicIntegerOmegaOne
Proof
:= by
  classical
  apply ParacompactSpace.of_hasBasis nhds_basis
  intro f _
  let P (x : LexicographicIntegerOmegaOne) (a : OmegaOne) :=
    ∃ y, cylinder x a ⊆ cylinder y (f y)
  have hex (x : LexicographicIntegerOmegaOne) : ∃ a, Minimal (P x) a :=
    WellFoundedLT.exists_minimal inferInstance {a | P x a} ⟨f x, x, subset_rfl⟩
  choose a ha using hex
  let V (x : LexicographicIntegerOmegaOne) := cylinder x (a x)
  have heq {x y : LexicographicIntegerOmegaOne} (h : (V x ∩ V y).Nonempty) : V x = V y := by
    obtain ⟨z, hx, hy⟩ := h
    have hle (x y : LexicographicIntegerOmegaOne) (hx : z ∈ V x) (hy : z ∈ V y)
        (hxy : a x ≤ a y) : V x = V y := by
      have hsub := cylinder_subset_of_common hx hy hxy
      have hyP : P y (a x) := by
        obtain ⟨w, hw⟩ := (ha x).1
        refine ⟨w, subset_trans ?_ hw⟩
        exact cylinder_subset_of_common hx (fun j hj => hy j (hj.trans_le hxy)) le_rfl
      have hge := (ha y).2 hyP hxy
      exact Subset.antisymm (cylinder_subset_of_common hy hx hge) hsub
    rcases le_total (a x) (a y) with hxy | hyx
    · exact hle x y hx hy hxy
    · exact (hle y x hy hx hyx).symm
  refine ⟨range V, Subtype.val, ?_, ?_, ?_, ?_⟩
  · rintro ⟨_, x, rfl⟩
    exact isOpen_cylinder x (a x)
  · apply iUnion_eq_univ_iff.mpr
    intro x
    exact ⟨⟨V x, mem_range_self x⟩, mem_cylinder x (a x)⟩
  · intro x
    refine ⟨V x, (isOpen_cylinder x (a x)).mem_nhds (mem_cylinder x (a x)), ?_⟩
    apply (finite_singleton (⟨V x, mem_range_self x⟩ : range V)).subset
    rintro ⟨_, y, rfl⟩ h
    apply mem_singleton_iff.mpr
    apply Subtype.ext
    exact heq h
  · rintro ⟨_, x, rfl⟩
    exact (ha x).1

On this site: The lexicographically ordered integer power over the countable ordinals is paracompact

theorem not_scattered

TopologyByExample.LexicographicIntegerOmegaOne.not_scattered

The space has no isolated points and consequently is not scattered.

theorem not_scattered : ¬ ScatteredSpace LexicographicIntegerOmegaOne
Proof
:= by
  intro h
  obtain ⟨x, _, U, hU, hsub⟩ := scatteredSpace_iff_exists_isolated.mp h univ univ_nonempty
  have hs : ({x} : Set LexicographicIntegerOmegaOne) ∈ 𝓝 x :=
    mem_of_superset hU (by simpa using hsub)
  exact not_isOpen_singleton x (isOpen_iff_mem_nhds.mpr (by
    intro y hy
    simpa only [mem_singleton_iff.mp hy] using hs))

On this site: The lexicographically ordered integer power over the countable ordinals is not scattered

theorem not_extremallyDisconnected

TopologyByExample.LexicographicIntegerOmegaOne.not_extremallyDisconnected

The closure of a positive ray is not open at its endpoint.

theorem not_extremallyDisconnected : ¬ ExtremallyDisconnected LexicographicIntegerOmegaOne
Proof
:= by
  intro h
  let x : LexicographicIntegerOmegaOne := toLex (fun _ => 0)
  have hx : x ∈ closure (Ioi x) := by
    rw [mem_closure_iff_nhds]
    intro U hU
    obtain ⟨a, _, ha⟩ := (nhds_basis x).mem_iff.mp hU
    refine ⟨change x a (x a + 1), ha ?_, lt_change _ _ (by omega)⟩
    intro j hj
    simp [change, Function.update_of_ne hj.ne]
  obtain ⟨a, _, ha⟩ := (nhds_basis x).mem_iff.mp
    ((h.open_closure _ isOpen_Ioi).mem_nhds hx)
  have hm : change x a (x a - 1) ∈ cylinder x a := by
    intro j hj
    simp [change, Function.update_of_ne hj.ne]
  have hge := closure_minimal Ioi_subset_Ici_self isClosed_Ici (ha hm)
  exact (not_le_of_gt (change_lt x a (v := x a - 1) (by omega))) hge

On this site: The lexicographically ordered integer power over the countable ordinals is not extremally disconnected

definition tailZero

TopologyByExample.LexicographicIntegerOmegaOne.tailZero

Sequences that vanish from a fixed ordinal onwards.

def tailZero (a : OmegaOne) : Set LexicographicIntegerOmegaOne
:= {x | ∀ j, a ≤ j → x j = 0}

theorem isClosed_tailZero

TopologyByExample.LexicographicIntegerOmegaOne.isClosed_tailZero

theorem isClosed_tailZero (a : OmegaOne) : IsClosed (tailZero a)
Proof
:= by
  rw [← isOpen_compl_iff, isOpen_iff_mem_nhds]
  intro x hx
  obtain ⟨j, hj⟩ := not_forall.mp hx
  obtain ⟨haj, hj⟩ := not_imp.mp hj
  refine mem_of_superset ((isOpen_cylinder x (Order.succ j)).mem_nhds
    (mem_cylinder x (Order.succ j))) ?_
  intro y hy hyt
  exact hj ((hy j (Order.lt_succ j)).symm.trans (hyt j haj))

theorem isDiscrete_tailZero

TopologyByExample.LexicographicIntegerOmegaOne.isDiscrete_tailZero

theorem isDiscrete_tailZero (a : OmegaOne) : IsDiscrete (tailZero a)
Proof
:= by
  apply isDiscrete_iff_forall_mem_exists_isOpen.mpr
  intro x hx
  refine ⟨cylinder x a, isOpen_cylinder x a, ?_⟩
  ext y
  constructor
  · intro hy
    apply mem_singleton_iff.mpr
    apply funext
    intro j
    rcases lt_or_ge j a with hj | hj
    · exact hy.1 j hj
    · exact (hy.2 j hj).trans (hx j hj).symm
  · rintro rfl
    exact ⟨mem_cylinder _ a, hx⟩

theorem closedDiscreteContinuum

TopologyByExample.LexicographicIntegerOmegaOne.closedDiscreteContinuum

A bounded initial segment supports a closed discrete subset of continuum size.

theorem closedDiscreteContinuum : ∃ s : Set LexicographicIntegerOmegaOne,
    IsClosed s ∧ IsDiscrete s ∧ Cardinal.continuum ≤ Cardinal.mk s
Proof
:= by
  classical
  let e := Infinite.natEmbedding OmegaOne
  obtain ⟨b, hb⟩ := OmegaOne.bddAbove_of_countable (countable_range e)
  let a := Order.succ b
  let F : (ℕ → ℤ) → LexicographicIntegerOmegaOne :=
    fun s => toLex (Function.extend e s (fun _ => 0))
  have hF (s : ℕ → ℤ) : F s ∈ tailZero a := by
    intro j hj
    apply Function.extend_apply'
    rintro ⟨n, rfl⟩
    exact (not_le_of_gt (Order.lt_succ b)) (hj.trans (hb (mem_range_self n)))
  have hinj : Function.Injective F := by
    intro s t h
    funext n
    have he := congrFun h (e n)
    simpa [F, e.injective.extend_apply] using he
  refine ⟨tailZero a, isClosed_tailZero a, isDiscrete_tailZero a, ?_⟩
  have hh := Cardinal.mk_le_of_injective (f := fun s => (⟨F s, hF s⟩ : tailZero a))
    (fun s t h => hinj (congrArg Subtype.val h))
  simpa only [Cardinal.mk_arrow, Cardinal.mk_int, Cardinal.mk_nat,
    Cardinal.lift_aleph0, Cardinal.aleph0_power_aleph0] using hh

On this site: The lexicographically ordered integer power over the countable ordinals has a closed discrete subset of cardinality \(\mathfrak{c}\)

theorem nonempty_iInter_cylinder

TopologyByExample.LexicographicIntegerOmegaOne.nonempty_iInter_cylinder

Nested prefix cylinders always have a common extension.

theorem nonempty_iInter_cylinder (x : ℕ → LexicographicIntegerOmegaOne) (a : ℕ → OmegaOne)
    (h : Antitone (fun n => cylinder (x n) (a n))) : (⋂ n, cylinder (x n) (a n)).Nonempty
Proof
:= by
  classical
  let z : LexicographicIntegerOmegaOne := toLex (fun j =>
    if hj : ∃ n, j < a n then x hj.choose j else 0)
  refine ⟨z, mem_iInter.mpr fun n j hj => ?_⟩
  have hex : ∃ n, j < a n := ⟨n, hj⟩
  simp only [z, Pi.toLex_apply, dite_eq_left hex]
  let m := hex.choose
  have hm : j < a m := hex.choose_spec
  have hmn : x (max m n) ∈ cylinder (x m) (a m) :=
    h (le_max_left _ _) (mem_cylinder _ _)
  have hnn : x (max m n) ∈ cylinder (x n) (a n) :=
    h (le_max_right _ _) (mem_cylinder _ _)
  exact (hmn j hm).symm.trans (hnn j hj)

instance instBaireSpace

TopologyByExample.LexicographicIntegerOmegaOne.instBaireSpace

Successive choices of longer prefixes prove the Baire property.

instance instBaireSpace : BaireSpace LexicographicIntegerOmegaOne
Proof
:= by
  classical
  constructor
  intro U hU hd
  apply dense_iff_inter_open.mpr
  intro O hO hOne
  obtain ⟨x, hx⟩ := hOne
  obtain ⟨a, _, ha⟩ := (nhds_basis x).mem_iff.mp (hO.mem_nhds hx)
  have step (n : ℕ) (p : LexicographicIntegerOmegaOne × OmegaOne) :
      ∃ q : LexicographicIntegerOmegaOne × OmegaOne,
        cylinder q.1 q.2 ⊆ cylinder p.1 p.2 ∩ U n := by
    obtain ⟨y, hyp, hyU⟩ := dense_iff_inter_open.mp (hd n) _
      (isOpen_cylinder p.1 p.2) ⟨p.1, mem_cylinder _ _⟩
    obtain ⟨b, _, hb⟩ := (nhds_basis y).mem_iff.mp
      (((isOpen_cylinder p.1 p.2).inter (hU n)).mem_nhds ⟨hyp, hyU⟩)
    exact ⟨(y, b), hb⟩
  choose next hnext using step
  let p : ℕ → LexicographicIntegerOmegaOne × OmegaOne :=
    Nat.rec (x, a) (fun n p => next n p)
  have hp (n : ℕ) : cylinder (p (n + 1)).1 (p (n + 1)).2 ⊆
      cylinder (p n).1 (p n).2 ∩ U n := hnext n (p n)
  have hanti : Antitone (fun n => cylinder (p n).1 (p n).2) :=
    antitone_nat_of_succ_le fun n => (hp n).trans inter_subset_left
  obtain ⟨z, hz⟩ := nonempty_iInter_cylinder (fun n => (p n).1) (fun n => (p n).2) hanti
  refine ⟨z, ha (mem_iInter.mp hz 0), mem_iInter.mpr fun n => ?_⟩
  exact (hp n (mem_iInter.mp hz (n + 1))).2

On this site: The lexicographically ordered integer power over the countable ordinals is a Baire space

theorem cardinality_eq

TopologyByExample.LexicographicIntegerOmegaOne.cardinality_eq

The sequence set has cardinality two to aleph one.

theorem cardinality_eq : Cardinal.mk LexicographicIntegerOmegaOne =
    2 ^ Cardinal.aleph 1
Proof
:= by
  have hO : Cardinal.mk OmegaOne = Cardinal.aleph 1 := by
    change Cardinal.mk (Ordinal.omega 1 : Ordinal.{0}).ToType = _
    rw [Cardinal.mk_toType, Ordinal.card_omega]
  change Cardinal.mk (OmegaOne → ℤ) = _
  rw [Cardinal.mk_arrow, hO, Cardinal.mk_int, Cardinal.lift_aleph0,
    Cardinal.lift_uzero]
  apply le_antisymm
  · calc
      Cardinal.aleph0 ^ Cardinal.aleph 1 ≤ Cardinal.continuum ^ Cardinal.aleph 1 :=
        Cardinal.power_le_power_right Cardinal.aleph0_le_continuum
      _ = 2 ^ Cardinal.aleph 1 := by
        rw [← Cardinal.two_power_aleph0, ← Cardinal.power_mul,
          Cardinal.mul_eq_right (Cardinal.aleph0_le_aleph _) (Cardinal.aleph0_le_aleph _)
            Cardinal.aleph0_ne_zero]
  · exact Cardinal.power_le_power_right (by simp)

On this site: Lexicographically ordered integer power over the countable ordinals: Cardinality

theorem cardinality_atMost

TopologyByExample.LexicographicIntegerOmegaOne.cardinality_atMost

The cardinality is at most two to the continuum.

theorem cardinality_atMost : CardinalityAtMostTwoToContinuum LexicographicIntegerOmegaOne
Proof
:= by
  change Cardinal.mk LexicographicIntegerOmegaOne ≤ 2 ^ Cardinal.continuum
  rw [cardinality_eq]
  exact Cardinal.power_le_power_left (by simp) Cardinal.aleph_one_le_continuum

On this site: The lexicographically ordered integer power over the countable ordinals has cardinality at most \(2^{\mathfrak{c}}\)

theorem not_weaklyLocallyCompact

TopologyByExample.LexicographicIntegerOmegaOne.not_weaklyLocallyCompact

No point has a compact neighbourhood.

theorem not_weaklyLocallyCompact : ¬ WeaklyLocallyCompactSpace LexicographicIntegerOmegaOne
Proof
:= by
  intro h
  let x : LexicographicIntegerOmegaOne := toLex (fun _ => 0)
  obtain ⟨K, hK, hx⟩ := h.exists_compact_mem_nhds x
  exact not_isOpen_singleton x (isOpen_singleton_of_finite_mem_nhds x hx
    (AnticompactSpace.finite_of_isCompact K hK))

On this site: The lexicographically ordered integer power over the countable ordinals is not weakly locally compact

theorem not_perfectlyNormal

TopologyByExample.LexicographicIntegerOmegaOne.not_perfectlyNormal

A closed singleton cannot be a countable intersection of open sets.

theorem not_perfectlyNormal : ¬ PerfectlyNormalSpace LexicographicIntegerOmegaOne
Proof
:= by
  intro h
  let x : LexicographicIntegerOmegaOne := toLex (fun _ => 0)
  obtain ⟨U, hU, he⟩ := (h.closed_gdelta (isClosed_singleton (x := x))).eq_iInter_nat
  exact not_isOpen_singleton x (he ▸ isOpen_iInter U hU)

On this site: The lexicographically ordered integer power over the countable ordinals is not perfectly normal

theorem cardinality_not_less

TopologyByExample.LexicographicIntegerOmegaOne.cardinality_not_less

The cardinality is not smaller than the continuum.

theorem cardinality_not_less : ¬ CardinalityLessThanContinuum LexicographicIntegerOmegaOne
Proof
:= by
  obtain ⟨s, _, _, hs⟩ := closedDiscreteContinuum
  exact not_lt_of_ge (hs.trans (Cardinal.mk_le_of_injective
    (f := (Subtype.val : s → LexicographicIntegerOmegaOne)) Subtype.val_injective))

On this site: The lexicographically ordered integer power over the countable ordinals does not have cardinality less than \(\mathfrak{c}\)

theorem cardinality_continuum_iff

TopologyByExample.LexicographicIntegerOmegaOne.cardinality_continuum_iff

Continuum cardinality is exactly the corresponding equality of cardinal powers.

theorem cardinality_continuum_iff : CardinalityContinuum LexicographicIntegerOmegaOne ↔
    2 ^ Cardinal.aleph 1 = Cardinal.continuum.{0}
Proof
:= by
  change Cardinal.mk LexicographicIntegerOmegaOne = _ ↔ _
  simp only [cardinality_eq]

On this site: Lexicographically ordered integer power over the countable ordinals: When the cardinality is continuum

theorem not_continuum_of_ch

TopologyByExample.LexicographicIntegerOmegaOne.not_continuum_of_ch

Under CH the cardinality is strictly greater than the continuum.

theorem not_continuum_of_ch (h : Cardinal.continuum.{0} = Cardinal.aleph 1) :
    ¬ CardinalityContinuum LexicographicIntegerOmegaOne
Proof
:= by
  rw [cardinality_continuum_iff, h]
  exact (Cardinal.cantor (Cardinal.aleph 1)).ne'