Lean library · module TopologyByExample.Spaces.OmegaOne

The first uncountable ordinal ω₁

Source file

The space ω₁ is the set of countable ordinals, well ordered by <, with the order topology. It is first countable, Hausdorff, ω-bounded (every countable set has compact closure), hence countably compact and sequentially compact, and weakly locally compact (indeed every initial segment [0, a] is compact and open), but it is not compact, so not Lindelöf. Everything rests on two facts about the order: every initial segment Set.Iio a is countable, and every countable set is bounded above.

Choice of type

Mathlib's ω₁ : Ordinal.{u} is an ordinal, and the set Set.Iio ω₁ of countable ordinals lives in Type (u + 1). The project's base spaces live in Type, so we use Mathlib's small type of order type ω₁, (ω₁ : Ordinal.{0}).ToType (a Shrink of Set.Iio ω₁), and convert through the order isomorphism TopologyByExample.OmegaOne.mk : Set.Iio ω₁ ≃o OmegaOne. We wrap it in a def rather than an abbrev, so that the only topology instance search finds on it is the order topology registered here (Shrink also carries an induced topology from Mathlib, which is the same topology, but not by definition).

The order structure is the well order transported from Set.Iio ω₁; on top of it we register the conditionally complete linear order of a well order (WellFoundedLT.conditionallyCompleteLinearOrderBot), which makes Mathlib's results on order topologies of conditionally complete orders available: closed intervals are compact (CompactIccSpace). Everything topological then follows from general facts about order topologies, stated here and in TopologyByExample.Theorems.OmegaBounded for any linear order.

Main definitions

Main statements

Order-theoretic facts:

The values of the content's page omega-one:

Consequences, by the general theorems (the content derives these): T2Space and LocallyCompactSpace by instance search, TopologyByExample.OmegaOne.instCountablyCompactSpace, then SeqCompactSpace by instance search, TopologyByExample.OmegaOne.not_lindelofSpace and TopologyByExample.OmegaOne.not_separableSpace. Also TopologyByExample.OmegaOne.isCompact_Iic and isOpen_Iic: each [0, a] is compact and open.

The general lemmas used are TopologyByExample.firstCountableTopology_of_countable_Iio (in TopologyByExample.Theorems.OrderTopology) and TopologyByExample.omegaBounded_of_countable_bddAbove (in TopologyByExample.Theorems.OmegaBounded).

Separation axioms

ω₁ is completely normal by Mathlib's instance for order topologies (OrderTopology.completelyNormalSpace), and:

A coherent sequence

TopologyByExample.OmegaOne.coherentSeq is a family of finite-to-one functions coherentSeq μ : ω₁ → ℕ (on the ordinals below μ), any two of which differ at only finitely many points below the smaller index (TopologyByExample.OmegaOne.finite_coherentSeq_le, TopologyByExample.OmegaOne.finite_coherentSeq_ne). Also: the parity of countable ordinals (TopologyByExample.OmegaOne.toOrd_succ, Ordinal.mod_two_eq_zero_or_one, Ordinal.add_one_mod_two), and two unbounded sets of countable ordinals interleave below some limit ordinal (TopologyByExample.OmegaOne.exists_isSuccLimit_of_not_bddAbove). These are used for Vaughan's space.

Connectedness and products

ω₁ is totally separated, as every well order is, and hence zero-dimensional, being Hausdorff and locally compact (TopologyByExample.OmegaOne.instTotallySeparatedSpace, TopologyByExample.OmegaOne.instZeroDimensionalSpace). The product ω₁ × (ω₁ + 1) is not normal (TopologyByExample.OmegaOne.not_normalSpace_prod_withTop, by the plank argument).

References

  • L. A. Steen and J. A. Seebach, Counterexamples in Topology, Example 42.

Tags

first uncountable ordinal, ordinal space, order topology, ω-bounded, countably compact

This file was written by Claude (Anthropic's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.

Imports

The type

definition OmegaOne

TopologyByExample.OmegaOne

The first uncountable ordinal ω₁, as a type: the countable ordinals, well ordered by <. It is Mathlib's (ω₁ : Ordinal.{0}).ToType, so it lives in Type; it carries the order topology.

def OmegaOne : Type
:= (ω₁ : Ordinal.{0}).ToType

On this site: Space: First uncountable ordinal

instance

noncomputable instance : LinearOrder OmegaOne
Proof
:=
  inferInstanceAs (LinearOrder (ω₁ : Ordinal.{0}).ToType)

instance

instance : WellFoundedLT OmegaOne
Proof
:=
  inferInstanceAs (WellFoundedLT (ω₁ : Ordinal.{0}).ToType)

definition mk

TopologyByExample.OmegaOne.mk

The order isomorphism between the countable ordinals Set.Iio ω₁ and OmegaOne.

noncomputable def mk : Set.Iio (ω₁ : Ordinal.{0}) ≃o OmegaOne
:=
  Ordinal.ToType.mk

definition toOrd

TopologyByExample.OmegaOne.toOrd

The countable ordinal that an element of OmegaOne represents.

noncomputable def toOrd (x : OmegaOne) : Ordinal.{0}
:=
  (mk.symm x : Ordinal.{0})

theorem toOrd_lt_omega_one

TopologyByExample.OmegaOne.toOrd_lt_omega_one

theorem toOrd_lt_omega_one (x : OmegaOne) : toOrd x < ω₁
Proof
:=
  (mk.symm x).property

theorem toOrd_mk

TopologyByExample.OmegaOne.toOrd_mk

@[simp]
theorem toOrd_mk (o : Set.Iio (ω₁ : Ordinal.{0})) : toOrd (mk o) = o
Proof
:= by
  simp [toOrd]

theorem mk_toOrd

TopologyByExample.OmegaOne.mk_toOrd

@[simp]
theorem mk_toOrd (x : OmegaOne) : mk ⟨toOrd x, toOrd_lt_omega_one x⟩ = x
Proof
:=
  mk.apply_symm_apply x

theorem toOrd_strictMono

TopologyByExample.OmegaOne.toOrd_strictMono

theorem toOrd_strictMono : StrictMono toOrd
Proof
:= fun _ _ h ↦ mk.symm.strictMono h

theorem toOrd_lt_toOrd

TopologyByExample.OmegaOne.toOrd_lt_toOrd

@[simp]
theorem toOrd_lt_toOrd {x y : OmegaOne} : toOrd x < toOrd y ↔ x < y
Proof
:=
  toOrd_strictMono.lt_iff_lt

theorem toOrd_le_toOrd

TopologyByExample.OmegaOne.toOrd_le_toOrd

@[simp]
theorem toOrd_le_toOrd {x y : OmegaOne} : toOrd x ≤ toOrd y ↔ x ≤ y
Proof
:=
  toOrd_strictMono.le_iff_le

theorem toOrd_injective

TopologyByExample.OmegaOne.toOrd_injective

theorem toOrd_injective : Function.Injective toOrd
Proof
:=
  toOrd_strictMono.injective

instance

noncomputable instance : OrderBot OmegaOne
Proof
where
  bot := mk ⟨0, Ordinal.omega_pos 1⟩
  bot_le x := mk.le_symm_apply.1 (show (0 : Ordinal) ≤ toOrd x from zero_le)

instance

OmegaOne is a conditionally complete linear order, as is any well order with a least element.

noncomputable instance : ConditionallyCompleteLinearOrderBot OmegaOne
Proof
:=
  WellFoundedLT.conditionallyCompleteLinearOrderBot OmegaOne

instance

noncomputable instance : SuccOrder OmegaOne
Proof
:=
  SuccOrder.ofLinearWellFoundedLT OmegaOne

instance

noncomputable instance : TopologicalSpace OmegaOne
Proof
:=
  Preorder.topology OmegaOne

instance

instance : OrderTopology OmegaOne
Proof
:=
  ⟨rfl⟩

Order-theoretic facts

instance instUncountable

TopologyByExample.OmegaOne.instUncountable

OmegaOne is uncountable: its cardinality is ℵ₁.

instance instUncountable : Uncountable OmegaOne
Proof
:= by
  rw [← Cardinal.aleph0_lt_mk_iff]
  change Cardinal.aleph0 < Cardinal.mk (ω₁ : Ordinal.{0}).ToType
  rw [Cardinal.mk_toType, Ordinal.card_omega]
  exact Cardinal.aleph0_lt_aleph_one

On this site: First uncountable ordinal: The space is uncountable

theorem countable_Iio

TopologyByExample.OmegaOne.countable_Iio

Every initial segment Set.Iio a of OmegaOne is countable.

theorem countable_Iio (a : OmegaOne) : (Iio a).Countable
Proof
:=
  ((Cardinal.countable_Iio_of_lt_omega_one (toOrd_lt_omega_one a)).preimage
    toOrd_injective).mono fun _ hx ↦ toOrd_lt_toOrd.2 hx

On this site: First uncountable ordinal: Initial segments are countable

theorem countable_Iic

TopologyByExample.OmegaOne.countable_Iic

Every closed initial segment Set.Iic a of OmegaOne is countable.

theorem countable_Iic (a : OmegaOne) : (Iic a).Countable
Proof
:= by
  rw [← insert_Iio]
  exact (countable_Iio a).insert a

theorem bddAbove_of_countable

TopologyByExample.OmegaOne.bddAbove_of_countable

Every countable subset of OmegaOne is bounded above: the supremum of countably many countable ordinals is countable.

theorem bddAbove_of_countable {s : Set OmegaOne} (hs : s.Countable) : BddAbove s
Proof
:= by
  have := hs.to_subtype
  have ho : ⨆ x : s, toOrd x < ω₁ := Ordinal.iSup_lt_omega_one fun x ↦ toOrd_lt_omega_one x
  exact ⟨mk ⟨_, ho⟩, fun x hx ↦ mk.symm_apply_le.1 <|
    Ordinal.le_iSup (fun x : s ↦ toOrd x) ⟨x, hx⟩⟩

On this site: First uncountable ordinal: Countable sets are bounded above

instance instNoMaxOrder

TopologyByExample.OmegaOne.instNoMaxOrder

OmegaOne has no greatest element: otherwise it would be a closed initial segment, which is countable.

instance instNoMaxOrder : NoMaxOrder OmegaOne
Proof
:=
  ⟨fun a ↦ by
    by_contra! h
    exact not_countable_univ ((countable_Iic a).mono fun b _ ↦ h b)⟩

On this site: First uncountable ordinal: There is no greatest element

Topological facts

theorem exists_linearOrder_orderTopology

TopologyByExample.OmegaOne.exists_linearOrder_orderTopology

The space OmegaOne is linearly orderable: its topology is the order topology of a linear order.

theorem exists_linearOrder_orderTopology :
    ∃ o : LinearOrder OmegaOne, letI := o; OrderTopology OmegaOne
Proof
:=
  ⟨inferInstance, inferInstance⟩

On this site: The first uncountable ordinal is linearly orderable

instance instFirstCountableTopology

TopologyByExample.OmegaOne.instFirstCountableTopology

OmegaOne is first countable, since its initial segments are countable.

instance instFirstCountableTopology : FirstCountableTopology OmegaOne
Proof
:=
  firstCountableTopology_of_countable_Iio countable_Iio

On this site: The first uncountable ordinal is first countable

theorem isCompact_Iic

TopologyByExample.OmegaOne.isCompact_Iic

Each closed initial segment [0, a] of OmegaOne is compact.

theorem isCompact_Iic (a : OmegaOne) : IsCompact (Iic a)
Proof
:=
  Icc_bot (a := a) ▸ isCompact_Icc

On this site: First uncountable ordinal: Closed initial segments are compact

theorem isOpen_Iic

TopologyByExample.OmegaOne.isOpen_Iic

Each closed initial segment [0, a] of OmegaOne is open: it is [0, a + 1).

theorem isOpen_Iic (a : OmegaOne) : IsOpen (Iic a)
Proof
:=
  Iio_succ a ▸ isOpen_Iio

On this site: First uncountable ordinal: Closed initial segments are open

theorem omegaBounded

TopologyByExample.OmegaOne.omegaBounded

OmegaOne is ω-bounded: the closure of every countable set is compact.

theorem omegaBounded : ∀ s : Set OmegaOne, s.Countable → IsCompact (closure s)
Proof
:=
  omegaBounded_of_countable_bddAbove fun _ ↦ bddAbove_of_countable

On this site: The first uncountable ordinal is ω-bounded

instance instWeaklyLocallyCompactSpace

TopologyByExample.OmegaOne.instWeaklyLocallyCompactSpace

OmegaOne is weakly locally compact: each point a has the compact open neighbourhood [0, a].

instance instWeaklyLocallyCompactSpace : WeaklyLocallyCompactSpace OmegaOne
Proof
:=
  ⟨fun a ↦ ⟨Iic a, isCompact_Iic a, (isOpen_Iic a).mem_nhds (mem_Iic.2 le_rfl)⟩⟩

On this site: The first uncountable ordinal is weakly locally compact

theorem not_compactSpace

TopologyByExample.OmegaOne.not_compactSpace

OmegaOne is not compact: a compact linear order with the order topology has a greatest element.

theorem not_compactSpace : ¬CompactSpace OmegaOne
Proof
:= fun _ ↦ by
  obtain ⟨x, -, hx⟩ := isCompact_univ.exists_isGreatest (univ_nonempty (α := OmegaOne))
  obtain ⟨y, hy⟩ := exists_gt x
  exact (hy.trans_le (hx (mem_univ y))).false

On this site: The first uncountable ordinal is not compact

instance instNoncompactSpace

TopologyByExample.OmegaOne.instNoncompactSpace

instance instNoncompactSpace : NoncompactSpace OmegaOne
Proof
:=
  ⟨fun h ↦ not_compactSpace ⟨h⟩⟩

Consequences

The content derives these values from the ones above by general theorems; we record them here for use by the study's base library.

instance instCountablyCompactSpace

TopologyByExample.OmegaOne.instCountablyCompactSpace

OmegaOne is countably compact, being ω-bounded.

instance instCountablyCompactSpace : CountablyCompactSpace OmegaOne
Proof
:=
  countablyCompactSpace_of_omegaBounded omegaBounded

check

example : SeqCompactSpace OmegaOne
Proof
:= inferInstance

check

example : T2Space OmegaOne
Proof
:= inferInstance

theorem not_lindelofSpace

TopologyByExample.OmegaOne.not_lindelofSpace

OmegaOne is not Lindelöf: a countably compact Lindelöf space is compact.

theorem not_lindelofSpace : ¬LindelofSpace OmegaOne
Proof
:= fun _ ↦
  not_compactSpace LindelofSpace.compactSpace

theorem not_separableSpace

TopologyByExample.OmegaOne.not_separableSpace

OmegaOne is not separable: a separable ω-bounded space is compact.

theorem not_separableSpace : ¬SeparableSpace OmegaOne
Proof
:= fun _ ↦
  not_compactSpace (compactSpace_of_separableSpace_of_omegaBounded omegaBounded)

Closed sets, isolated points and perfect normality

theorem exists_tendsto_of_not_bddAbove

TopologyByExample.OmegaOne.exists_tendsto_of_not_bddAbove

An unbounded closed subset C of ω₁ contains the limit l of a sequence strictly below l: the supremum of a strictly increasing sequence in C.

theorem exists_tendsto_of_not_bddAbove {C : Set OmegaOne} (hC : IsClosed C)
    (hCb : ¬BddAbove C) : ∃ c : ℕ → OmegaOne, ∃ l ∈ C, Tendsto c atTop (𝓝 l) ∧ ∀ n, c n < l
Proof
:= by
  rw [not_bddAbove_iff] at hCb
  choose f hfC hf using hCb
  let c : ℕ → OmegaOne := fun n ↦ Nat.rec (f ⊥) (fun _ d ↦ f d) n
  have hc : StrictMono c := strictMono_nat_of_lt_succ fun n ↦ hf (c n)
  have hbdd := bddAbove_of_countable (countable_range c)
  have hlim := tendsto_atTop_ciSup hc.monotone hbdd
  refine ⟨c, _, hC.mem_of_tendsto hlim (.of_forall fun n ↦ ?_), hlim,
    fun n ↦ (hc (Nat.lt_succ_self n)).trans_le (le_ciSup hbdd (n + 1))⟩
  cases n <;> exact hfC _

theorem bddAbove_of_isClosed

TopologyByExample.OmegaOne.bddAbove_of_isClosed

A closed subset of ω₁ all of whose points are isolated is bounded.

theorem bddAbove_of_isClosed {C : Set OmegaOne} (hC : IsClosed C) (h : ∀ x ∈ C, IsOpen {x}) :
    BddAbove C
Proof
:= by
  by_contra hb
  obtain ⟨c, l, hl, hlim, hcl⟩ := exists_tendsto_of_not_bddAbove hC hb
  obtain ⟨n, hn⟩ := (hlim.eventually ((h l hl).mem_nhds rfl)).exists
  exact (hcl n).ne hn

On this site: First uncountable ordinal: A closed set of isolated points is bounded

theorem exists_gt_and_forall_gt

TopologyByExample.OmegaOne.exists_gt_and_forall_gt

Above any countable ordinal δ and any sequence x of countable ordinals there is a countable ordinal strictly greater than δ and than every term of x.

theorem exists_gt_and_forall_gt (δ : OmegaOne) (x : ℕ → OmegaOne) : ∃ b, δ < b ∧ ∀ i, x i < b
Proof
:= by
  obtain ⟨b, hb⟩ := bddAbove_of_countable ((countable_range x).insert δ)
  exact ⟨Order.succ b, (hb (mem_insert _ _)).trans_lt (Order.lt_succ b),
    fun i ↦ (hb (mem_insert_of_mem _ (mem_range_self i))).trans_lt (Order.lt_succ b)⟩

theorem not_perfectlyNormalSpace

TopologyByExample.OmegaOne.not_perfectlyNormalSpace

ω₁ is not perfectly normal: its set of limit points is closed but not a Gδ set, since countable sets of countable ordinals are bounded.

theorem not_perfectlyNormalSpace : ¬PerfectlyNormalSpace OmegaOne
Proof
:=
  not_perfectlyNormalSpace_of_bddAbove_of_countable fun _ ↦ bddAbove_of_countable

On this site: The first uncountable ordinal is not perfectly normal

theorem not_normalSpace_prod_withTop

TopologyByExample.OmegaOne.not_normalSpace_prod_withTop

ω₁ × (ω₁ + 1) is not normal: the diagonal and the top edge ω₁ × {ω₁} are disjoint closed sets that cannot be separated.

theorem not_normalSpace_prod_withTop : ¬NormalSpace (OmegaOne × WithTop OmegaOne)
Proof
:=
  TopologyByExample.not_normalSpace_prod_withTop fun _ hs ↦ OmegaOne.bddAbove_of_countable hs

On this site: First uncountable ordinal: \(\omega_1 \times (\omega_1 + 1)\) is not normal

Connectedness

instance instTotallySeparatedSpace

TopologyByExample.OmegaOne.instTotallySeparatedSpace

ω₁ is totally separated, as every well order is.

instance instTotallySeparatedSpace : TotallySeparatedSpace OmegaOne
Proof
:=
  totallySeparatedSpace_of_wellFoundedLT

instance instZeroDimensionalSpace

TopologyByExample.OmegaOne.instZeroDimensionalSpace

ω₁ is zero-dimensional: it is totally disconnected, Hausdorff and locally compact.

instance instZeroDimensionalSpace : ZeroDimensionalSpace OmegaOne
Proof
:= inferInstance

A coherent sequence of finite-to-one functions

theorem exists_lt_forall_le_of_finite

TopologyByExample.OmegaOne.exists_lt_forall_le_of_finite

A finite set of countable ordinals below a nonzero μ has an upper bound below μ.

theorem exists_lt_forall_le_of_finite {μ : OmegaOne} (hμ : ⊥ < μ) {s : Set OmegaOne}
    (hs : s.Finite) (hsμ : ∀ x ∈ s, x < μ) : ∃ β < μ, ∀ x ∈ s, x ≤ β
Proof
:= by
  rcases s.eq_empty_or_nonempty with rfl | hne
  · exact ⟨⊥, hμ, by simp⟩
  · exact ⟨sSup s, hsμ _ (hne.csSup_mem hs), fun x hx ↦ le_csSup hs.bddAbove hx⟩

definition enumIio

TopologyByExample.OmegaOne.enumIio

An enumeration of the (countably many) countable ordinals below a, when there are any.

noncomputable def enumIio (a : OmegaOne) : ℕ → OmegaOne
:=
  open Classical in
  if h : (Iio a).Nonempty then ((countable_Iio a).exists_eq_range h).choose else fun _ ↦ a

theorem enumIio_lt

TopologyByExample.OmegaOne.enumIio_lt

theorem enumIio_lt {a : OmegaOne} (h : (Iio a).Nonempty) (j : ℕ) : enumIio a j < a
Proof
:= by
  have := ((countable_Iio a).exists_eq_range h).choose_spec
  rw [enumIio, dite_eq_left_of_eq_true (eq_true h)]
  exact (this.symm ▸ mem_range_self j : _ ∈ Iio a)

theorem exists_enumIio_eq

TopologyByExample.OmegaOne.exists_enumIio_eq

theorem exists_enumIio_eq {a γ : OmegaOne} (h : γ < a) : ∃ j, enumIio a j = γ
Proof
:= by
  have hne : (Iio a).Nonempty := ⟨γ, h⟩
  have := ((countable_Iio a).exists_eq_range hne).choose_spec
  rw [enumIio, dite_eq_left_of_eq_true (eq_true hne)]
  have hγ : γ ∈ Iio a := h
  rw [this] at hγ
  exact hγ

definition enumIdx

TopologyByExample.OmegaOne.enumIdx

The least index j with γ ≤ enumIio a j (for γ < a).

noncomputable def enumIdx (a γ : OmegaOne) : ℕ
Definition
:=
  open Classical in
  if h : γ < a then
    Nat.find (p := fun j ↦ γ ≤ enumIio a j) ((exists_enumIio_eq h).imp fun _ h ↦ h.ge)
  else 0

theorem le_enumIio_enumIdx

TopologyByExample.OmegaOne.le_enumIio_enumIdx

theorem le_enumIio_enumIdx {a γ : OmegaOne} (h : γ < a) : γ ≤ enumIio a (enumIdx a γ)
Proof
:= by
  classical
  rw [enumIdx, dite_eq_left_of_eq_true (eq_true h)]
  exact Nat.find_spec (p := fun j ↦ γ ≤ enumIio a j) _

theorem enumIdx_le

TopologyByExample.OmegaOne.enumIdx_le

theorem enumIdx_le {a γ : OmegaOne} {j : ℕ} (h : γ ≤ enumIio a j) : enumIdx a γ ≤ j
Proof
:= by
  classical
  rw [enumIdx]
  split_ifs with hγ
  · exact Nat.find_min' (p := fun j ↦ γ ≤ enumIio a j) _ h
  · exact Nat.zero_le j

definition coherentSeq

TopologyByExample.OmegaOne.coherentSeq

A coherent sequence of finite-to-one functions on the countable ordinals: coherentSeq a is a function on the ordinals below a taking each value only finitely often (TopologyByExample.OmegaOne.finite_coherentSeq_le), and coherentSeq a and coherentSeq μ differ at only finitely many ordinals below μ when μ < a (TopologyByExample.OmegaOne.finite_coherentSeq_ne). For γ < a, if j is least with γ ≤ enumIio a j, its value at γ is the larger of j and the value at γ of the function for enumIio a j. Values outside Iio a are irrelevant.

noncomputable def coherentSeq : OmegaOne → OmegaOne → ℕ
Definition
:=
  wellFounded_lt.fix fun a rec γ ↦
    if h : γ < a then
      max (enumIdx a γ) (rec (enumIio a (enumIdx a γ)) (enumIio_lt ⟨γ, h⟩ _) γ)
    else 0

theorem coherentSeq_of_lt

TopologyByExample.OmegaOne.coherentSeq_of_lt

theorem coherentSeq_of_lt {a γ : OmegaOne} (h : γ < a) :
    coherentSeq a γ = max (enumIdx a γ) (coherentSeq (enumIio a (enumIdx a γ)) γ)
Proof
:= by
  rw [coherentSeq, WellFounded.fix_eq, dite_eq_left_of_eq_true (eq_true h)]

theorem coherentSeq_spec

TopologyByExample.OmegaOne.coherentSeq_spec

theorem coherentSeq_spec (a : OmegaOne) :
    (∀ n, {γ | γ < a ∧ coherentSeq a γ ≤ n}.Finite) ∧
      ∀ μ < a, {γ | γ < μ ∧ coherentSeq a γ ≠ coherentSeq μ γ}.Finite
Proof
:= by
  induction a using WellFoundedLT.induction with
  | _ a ih =>
  rcases (Iio a).eq_empty_or_nonempty with he | hne
  · have h0 : ∀ γ, ¬γ < a := fun γ hγ ↦ (he ▸ hγ : γ ∈ (∅ : Set OmegaOne))
    exact ⟨fun n ↦ by simp [h0], fun μ hμ ↦ (h0 μ hμ).elim⟩
  set c := enumIio a
  refine ⟨fun n ↦ ?_, fun μ hμ ↦ ?_⟩
  · have hfin : (⋃ j ∈ Iic n, ({c j} ∪ {γ | γ < c j ∧ coherentSeq (c j) γ ≤ n})).Finite :=
      (finite_Iic n).biUnion fun j _ ↦ (finite_singleton (c j)).union
        ((ih (c j) (enumIio_lt hne j)).1 n)
    refine hfin.subset ?_
    rintro γ ⟨hγ, hn⟩
    rw [coherentSeq_of_lt hγ, max_le_iff] at hn
    refine mem_biUnion (x := enumIdx a γ) hn.1 ?_
    rcases (le_enumIio_enumIdx hγ).lt_or_eq with hlt | heq
    · exact Or.inr ⟨hlt, hn.2⟩
    · exact Or.inl heq
  · obtain ⟨J, hJ⟩ := exists_enumIio_eq hμ
    have key : ∀ j, {γ | γ < c j ∧ γ < μ ∧ coherentSeq (c j) γ ≠ coherentSeq μ γ}.Finite := by
      intro j
      rcases lt_trichotomy (c j) μ with h | h | h
      · exact ((ih μ hμ).2 (c j) h).subset fun γ hγ ↦ ⟨hγ.1, Ne.symm hγ.2.2⟩
      · exact (finite_empty).subset fun γ (hγ : _ ∧ _ ∧ _) ↦ hγ.2.2 (h ▸ rfl)
      · exact ((ih (c j) (enumIio_lt hne j)).2 μ h).subset fun γ hγ ↦ ⟨hγ.2.1, hγ.2.2⟩
    have hfin : (⋃ j ∈ Iic J, (({c j} ∪ {γ | γ < c j ∧ coherentSeq (c j) γ < j}) ∪
        {γ | γ < c j ∧ γ < μ ∧ coherentSeq (c j) γ ≠ coherentSeq μ γ})).Finite :=
      (finite_Iic J).biUnion fun j _ ↦ ((finite_singleton (c j)).union
        (((ih (c j) (enumIio_lt hne j)).1 j).subset (t := {γ | γ < c j ∧ coherentSeq (c j) γ < j})
          fun _ hγ ↦ ⟨hγ.1, hγ.2.le⟩)).union (key j)
    refine hfin.subset ?_
    rintro γ ⟨hγμ, hne'⟩
    have hγ : γ < a := hγμ.trans hμ
    have hj : enumIdx a γ ≤ J := enumIdx_le (hJ ▸ hγμ.le)
    refine mem_biUnion (x := enumIdx a γ) hj ?_
    rw [coherentSeq_of_lt hγ] at hne'
    rcases (le_enumIio_enumIdx hγ).lt_or_eq with hlt | heq
    · by_cases hsm : coherentSeq (c (enumIdx a γ)) γ < enumIdx a γ
      · exact Or.inl (Or.inr ⟨hlt, hsm⟩)
      · rw [max_eq_right (not_lt.1 hsm)] at hne'
        exact Or.inr ⟨hlt, hγμ, hne'⟩
    · exact Or.inl (Or.inl heq)

On this site: First uncountable ordinal: A coherent sequence of finite-to-one functions

theorem finite_coherentSeq_le

TopologyByExample.OmegaOne.finite_coherentSeq_le

Each function of the coherent sequence takes each value only finitely often.

theorem finite_coherentSeq_le (a : OmegaOne) (n : ℕ) :
    {γ | γ < a ∧ coherentSeq a γ ≤ n}.Finite
Proof
:=
  (coherentSeq_spec a).1 n

theorem finite_coherentSeq_ne

TopologyByExample.OmegaOne.finite_coherentSeq_ne

Two functions of the coherent sequence differ at only finitely many points.

theorem finite_coherentSeq_ne {a μ : OmegaOne} (h : μ < a) :
    {γ | γ < μ ∧ coherentSeq a γ ≠ coherentSeq μ γ}.Finite
Proof
:=
  (coherentSeq_spec a).2 μ h

theorem exists_lt_forall_lt_coherentSeq

TopologyByExample.OmegaOne.exists_lt_forall_lt_coherentSeq

Below a nonzero μ ≤ a, coherentSeq a exceeds any given n on a final segment.

theorem exists_lt_forall_lt_coherentSeq {a μ : OmegaOne} (hμ : ⊥ < μ) (hμa : μ ≤ a) (n : ℕ) :
    ∃ β < μ, ∀ γ, β < γ → γ < μ → n < coherentSeq a γ
Proof
:= by
  obtain ⟨β, hβ, hs⟩ := exists_lt_forall_le_of_finite hμ (s := {γ | γ < μ ∧ coherentSeq a γ ≤ n})
    ((finite_coherentSeq_le a n).subset fun γ hγ ↦ ⟨hγ.1.trans_le hμa, hγ.2⟩) fun _ h ↦ h.1
  exact ⟨β, hβ, fun γ hβγ hγμ ↦ not_le.1 fun hle ↦ (hs γ ⟨hγμ, hle⟩).not_gt hβγ⟩

theorem exists_lt_forall_coherentSeq_eq

TopologyByExample.OmegaOne.exists_lt_forall_coherentSeq_eq

Below a nonzero μ < a, coherentSeq a and coherentSeq μ agree on a final segment.

theorem exists_lt_forall_coherentSeq_eq {a μ : OmegaOne} (hμ : ⊥ < μ) (hμa : μ < a) :
    ∃ β < μ, ∀ γ, β < γ → γ < μ → coherentSeq a γ = coherentSeq μ γ
Proof
:= by
  obtain ⟨β, hβ, hs⟩ := exists_lt_forall_le_of_finite hμ (finite_coherentSeq_ne hμa)
    fun _ h ↦ h.1
  exact ⟨β, hβ, fun γ hβγ hγμ ↦ not_not.1 fun hne ↦ (hs γ ⟨hγμ, hne⟩).not_gt hβγ⟩

Parity and alternating sequences

theorem toOrd_succ

TopologyByExample.OmegaOne.toOrd_succ

theorem toOrd_succ (x : OmegaOne) : toOrd (succ x) = toOrd x + 1
Proof
:= by
  have hlt : toOrd x + 1 < ω₁ := by
    rw [← Order.succ_eq_add_one]
    exact (Cardinal.isSuccLimit_omega 1).succ_lt (toOrd_lt_omega_one x)
  have hx : x < mk ⟨toOrd x + 1, hlt⟩ := by
    rw [← toOrd_lt_toOrd, toOrd_mk]
    change toOrd x < toOrd x + 1
    rw [← Order.succ_eq_add_one]
    exact lt_succ _
  refine le_antisymm ?_ ?_
  · have := toOrd_le_toOrd.2 (succ_le_of_lt hx)
    rwa [toOrd_mk] at this
  · rw [← Order.succ_eq_add_one]
    exact succ_le_of_lt (toOrd_lt_toOrd.2 (lt_succ x))

theorem mod_two_eq_zero_or_one

Ordinal.mod_two_eq_zero_or_one

theorem _root_.Ordinal.mod_two_eq_zero_or_one (o : Ordinal) : o % 2 = 0 ∨ o % 2 = 1
Proof
:= by
  rcases eq_or_ne (o % 2) 0 with h | h
  · exact Or.inl h
  · refine Or.inr (le_antisymm ?_ (Order.one_le_iff_ne_zero.2 h))
    have : o % 2 < succ 1 := by
      rw [Order.succ_eq_add_one, one_add_one_eq_two]
      exact Ordinal.mod_lt o two_ne_zero
    exact lt_succ_iff.1 this

theorem add_one_mod_two

Ordinal.add_one_mod_two

theorem _root_.Ordinal.add_one_mod_two (o : Ordinal) : (o + 1) % 2 = (o % 2 + 1) % 2
Proof
:= by
  conv_lhs => rw [← Ordinal.div_add_mod o 2]
  rw [add_assoc, Ordinal.mul_add_mod_self]

theorem exists_isSuccLimit_of_not_bddAbove

TopologyByExample.OmegaOne.exists_isSuccLimit_of_not_bddAbove

Two unbounded sets of countable ordinals interleave below some limit: there is a limit μ such that both sets have points in every interval (β, μ), β < μ.

theorem exists_isSuccLimit_of_not_bddAbove {A B : Set OmegaOne} (hA : ¬BddAbove A)
    (hB : ¬BddAbove B) :
    ∃ μ, IsSuccLimit μ ∧ ∀ β < μ, (∃ a ∈ A, β < a ∧ a < μ) ∧ ∃ b ∈ B, β < b ∧ b < μ
Proof
:= by
  rw [not_bddAbove_iff] at hA hB
  choose fA hfA using hA
  choose fB hfB using hB
  let t : ℕ → OmegaOne := fun n ↦ Nat.rec ⊥ (fun _ y ↦ fB (fA y)) n
  have ht : ∀ n, t (n + 1) = fB (fA (t n)) := fun _ ↦ rfl
  have hlt : ∀ n, t n < fA (t n) ∧ fA (t n) < t (n + 1) := fun n ↦
    ⟨(hfA (t n)).2, (ht n).symm ▸ (hfB _).2⟩
  have hmono : StrictMono t := strictMono_nat_of_lt_succ fun n ↦ (hlt n).1.trans (hlt n).2
  have hbdd : BddAbove (range t) := bddAbove_of_countable (countable_range t)
  set μ := ⨆ n, t n
  have hle : ∀ n, t n ≤ μ := le_ciSup hbdd
  have hlt' : ∀ n, t n < μ := fun n ↦ (hmono n.lt_succ_self).trans_le (hle (n + 1))
  have hex : ∀ β < μ, ∃ n, β < t n := fun β hβ ↦ exists_lt_of_lt_ciSup hβ
  refine ⟨μ, ⟨not_isMin_of_lt (hlt' 0), isSuccPrelimit_iff_succ_lt.2 fun a ha ↦ ?_⟩,
    fun β hβ ↦ ?_⟩
  · obtain ⟨n, hn⟩ := hex a ha
    exact (succ_le_of_lt hn).trans_lt (hlt' n)
  · obtain ⟨n, hn⟩ := hex β hβ
    refine ⟨⟨fA (t n), (hfA _).1, hn.trans (hlt n).1, (hlt n).2.trans (hlt' (n + 1))⟩,
      t (n + 1), ?_, hn.trans (hmono n.lt_succ_self), hlt' (n + 1)⟩
    rw [ht]
    exact (hfB _).1

On this site: First uncountable ordinal: Two unbounded sets interleave below a limit

Further properties

theorem scatteredSpace

TopologyByExample.OmegaOne.scatteredSpace

ω₁ is scattered: the least element of a nonempty set is isolated in it.

theorem scatteredSpace : ScatteredSpace OmegaOne
Proof
:=
  scatteredSpace_of_isOpen_Iic isOpen_Iic

On this site: The first uncountable ordinal is scattered

theorem not_countableChainCondition

TopologyByExample.OmegaOne.not_countableChainCondition

ω₁ does not satisfy the countable chain condition: the successor ordinals are uncountably many isolated points.

theorem not_countableChainCondition :
    ¬∀ S : Set (Set OmegaOne), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id →
      S.Countable
Proof
:= by
  intro h
  have hsucc (a : OmegaOne) : ({Order.succ a} : Set OmegaOne) = Ioi a ∩ Iic (Order.succ a) := by
    ext x
    simp only [mem_singleton_iff, mem_inter_iff, mem_Ioi, mem_Iic, ← Order.succ_le_iff]
    exact ⟨fun hx ↦ ⟨hx.ge, hx.le⟩, fun hx ↦ le_antisymm hx.2 hx.1⟩
  have hinj : Function.Injective fun a : OmegaOne ↦ ({Order.succ a} : Set OmegaOne) :=
    fun a b hab ↦ Order.succ_injective (singleton_injective hab)
  refine not_countable_univ (α := OmegaOne)
    (countable_of_injective_of_countable_image hinj.injOn ?_)
  rw [image_univ]
  refine h _ ?_ ?_
  · rintro _ ⟨a, rfl⟩
    refine ⟨?_, singleton_nonempty _⟩
    simp only
    rw [hsucc]
    exact isOpen_Ioi.inter (isOpen_Iic _)
  rintro _ ⟨a, rfl⟩ _ ⟨b, rfl⟩ hab
  exact disjoint_singleton.2 fun h ↦ hab (congrArg _ h)

On this site: The first uncountable ordinal does not satisfy the countable chain condition