Lean library · module TopologyByExample.Theorems.ProdLex

Lexicographic products of linear orders

Source file

General results about the lexicographic product α ×ₗ β of two linear orders, with the order topology.

Main statements

Tags

lexicographic order, order topology, complete linear order, first countable, separable

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

Lexicographic products

variable {α β : Type*} [CompleteLinearOrder α] [CompleteLinearOrder β]

instance instSupSet

TopologyByExample.ProdLex.instSupSet

The supremum of a set s in a lexicographic product: its first coordinate is the supremum a of the first coordinates of s, and its second coordinate is the supremum of the second coordinates of the points of s with first coordinate a (which is ⊥ if there are none).

noncomputable instance instSupSet : SupSet (α ×ₗ β)
Proof
where
  sSup s :=
    let a := sSup ((fun p ↦ (ofLex p).1) '' s)
    toLex (a, sSup {b | toLex (a, b) ∈ s})

instance instInfSet

TopologyByExample.ProdLex.instInfSet

The infimum of a set s in a lexicographic product: its first coordinate is the infimum a of the first coordinates of s, and its second coordinate is the infimum of the second coordinates of the points of s with first coordinate a (which is ⊤ if there are none).

noncomputable instance instInfSet : InfSet (α ×ₗ β)
Proof
where
  sInf s :=
    let a := sInf ((fun p ↦ (ofLex p).1) '' s)
    toLex (a, sInf {b | toLex (a, b) ∈ s})

theorem sSup_def

TopologyByExample.ProdLex.sSup_def

Unfolding lemma for the supremum in a lexicographic product.

theorem sSup_def (s : Set (α ×ₗ β)) :
    sSup s = toLex (sSup ((fun p ↦ (ofLex p).1) '' s),
      sSup {b | toLex (sSup ((fun p ↦ (ofLex p).1) '' s), b) ∈ s})
Proof
:=
  rfl

theorem sInf_def

TopologyByExample.ProdLex.sInf_def

Unfolding lemma for the infimum in a lexicographic product.

theorem sInf_def (s : Set (α ×ₗ β)) :
    sInf s = toLex (sInf ((fun p ↦ (ofLex p).1) '' s),
      sInf {b | toLex (sInf ((fun p ↦ (ofLex p).1) '' s), b) ∈ s})
Proof
:=
  rfl

theorem isLUB_sSup'

TopologyByExample.ProdLex.isLUB_sSup'

private theorem isLUB_sSup' (s : Set (α ×ₗ β)) : IsLUB s (sSup s)
Proof
:= by
  set a := sSup ((fun p ↦ (ofLex p).1) '' s) with ha
  rw [sSup_def, ← ha]
  refine ⟨fun e he ↦ ?_, fun u hu ↦ ?_⟩
  · obtain ⟨⟨x, y⟩, rfl⟩ := toLex.surjective e
    have hxa : x ≤ a := le_sSup ⟨_, he, rfl⟩
    rcases hxa.lt_or_eq with hxa | rfl
    · exact toLex_le_toLex.2 (Or.inl hxa)
    · exact toLex_le_toLex.2 (Or.inr ⟨rfl, le_sSup he⟩)
  · obtain ⟨⟨x, y⟩, rfl⟩ := toLex.surjective u
    have hax : a ≤ x := sSup_le <| by
      rintro _ ⟨e, he, rfl⟩
      exact monotone_fst _ _ (hu he)
    rcases hax.lt_or_eq with hax | rfl
    · exact toLex_le_toLex.2 (Or.inl hax)
    · refine toLex_le_toLex.2 (Or.inr ⟨rfl, sSup_le fun b hb ↦ ?_⟩)
      rcases toLex_le_toLex.1 (hu hb) with h | ⟨-, h⟩
      · exact absurd h (lt_irrefl _)
      · exact h

theorem isGLB_sInf'

TopologyByExample.ProdLex.isGLB_sInf'

private theorem isGLB_sInf' (s : Set (α ×ₗ β)) : IsGLB s (sInf s)
Proof
:= by
  set a := sInf ((fun p ↦ (ofLex p).1) '' s) with ha
  rw [sInf_def, ← ha]
  refine ⟨fun e he ↦ ?_, fun u hu ↦ ?_⟩
  · obtain ⟨⟨x, y⟩, rfl⟩ := toLex.surjective e
    have hax : a ≤ x := sInf_le ⟨_, he, rfl⟩
    rcases hax.lt_or_eq with hax | rfl
    · exact toLex_le_toLex.2 (Or.inl hax)
    · exact toLex_le_toLex.2 (Or.inr ⟨rfl, sInf_le he⟩)
  · obtain ⟨⟨x, y⟩, rfl⟩ := toLex.surjective u
    have hxa : x ≤ a := le_sInf <| by
      rintro _ ⟨e, he, rfl⟩
      exact monotone_fst _ _ (hu he)
    rcases hxa.lt_or_eq with hxa | rfl
    · exact toLex_le_toLex.2 (Or.inl hxa)
    · refine toLex_le_toLex.2 (Or.inr ⟨rfl, le_sInf fun b hb ↦ ?_⟩)
      rcases toLex_le_toLex.1 (hu hb) with h | ⟨-, h⟩
      · exact absurd h (lt_irrefl _)
      · exact h

theorem exists_isLUB_and_exists_isGLB

TopologyByExample.ProdLex.exists_isLUB_and_exists_isGLB

In the lexicographic product of two complete linear orders, every set has a least upper bound and a greatest lower bound for the lexicographic order.

theorem exists_isLUB_and_exists_isGLB (s : Set (α ×ₗ β)) :
    (∃ x, IsLUB s x) ∧ ∃ x, IsGLB s x
Proof
:=
  ⟨⟨_, isLUB_sSup' s⟩, ⟨_, isGLB_sInf' s⟩⟩

On this site: Theorem: A lexicographic product of two complete linear orders is complete

instance instCompleteLattice

TopologyByExample.ProdLex.instCompleteLattice

The lexicographic product of two complete linear orders is a complete lattice.

noncomputable instance instCompleteLattice : CompleteLattice (α ×ₗ β)
Proof
where
  isLUB_sSup s := by exact isLUB_sSup' s
  isGLB_sInf s := by exact isGLB_sInf' s

instance instCompleteLinearOrder

TopologyByExample.ProdLex.instCompleteLinearOrder

The lexicographic product of two complete linear orders is a complete linear order.

noncomputable instance instCompleteLinearOrder : CompleteLinearOrder (α ×ₗ β)
Proof
where
  __ := Prod.Lex.instLinearOrder α β
  __ := instCompleteLattice
  __ := LinearOrder.toBiheytingAlgebra _
variable {α β : Type*} [LinearOrder α] [LinearOrder β]

theorem exists_countable_cofinal_Iio

TopologyByExample.ProdLex.exists_countable_cofinal_Iio

If every Set.Iio a in α and every Set.Iio b in β has a countable cofinal subset, and β has a top element, then every Set.Iio p in α ×ₗ β has a countable cofinal subset.

theorem exists_countable_cofinal_Iio [OrderTop β]
    (hα : ∀ a : α, ∃ s ⊆ Iio a, s.Countable ∧ ∀ b < a, ∃ c ∈ s, b ≤ c)
    (hβ : ∀ a : β, ∃ s ⊆ Iio a, s.Countable ∧ ∀ b < a, ∃ c ∈ s, b ≤ c) (p : α ×ₗ β) :
    ∃ s ⊆ Iio p, s.Countable ∧ ∀ q < p, ∃ c ∈ s, q ≤ c
Proof
:= by
  obtain ⟨⟨x, t⟩, rfl⟩ := toLex.surjective p
  by_cases ht : ∃ t', t' < t
  · obtain ⟨t', ht'⟩ := ht
    obtain ⟨s, hst, hsc, hs⟩ := hβ t
    obtain ⟨c₀, hc₀, -⟩ := hs t' ht'
    refine ⟨(fun u ↦ toLex (x, u)) '' s, ?_, hsc.image _, fun q hq ↦ ?_⟩
    · rintro _ ⟨u, hu, rfl⟩
      exact toLex_lt_toLex.2 (Or.inr ⟨rfl, hst hu⟩)
    · obtain ⟨⟨y, v⟩, rfl⟩ := toLex.surjective q
      rcases toLex_lt_toLex.1 hq with hyx | ⟨rfl, hvt⟩
      · exact ⟨_, mem_image_of_mem _ hc₀, toLex_le_toLex.2 (Or.inl hyx)⟩
      · obtain ⟨c, hc, hvc⟩ := hs v hvt
        exact ⟨_, mem_image_of_mem _ hc, toLex_le_toLex.2 (Or.inr ⟨rfl, hvc⟩)⟩
  · push Not at ht
    obtain ⟨s, hsx, hsc, hs⟩ := hα x
    refine ⟨(fun y ↦ toLex (y, ⊤)) '' s, ?_, hsc.image _, fun q hq ↦ ?_⟩
    · rintro _ ⟨y, hy, rfl⟩
      exact toLex_lt_toLex.2 (Or.inl (hsx hy))
    · obtain ⟨⟨y, v⟩, rfl⟩ := toLex.surjective q
      rcases toLex_lt_toLex.1 hq with hyx | ⟨-, hvt⟩
      · obtain ⟨c, hc, hyc⟩ := hs y hyx
        exact ⟨_, mem_image_of_mem _ hc, toLex_le_toLex'.2 ⟨hyc, fun _ ↦ le_top⟩⟩
      · exact absurd hvt (not_lt.2 (ht v))

theorem exists_countable_coinitial_Ioi

TopologyByExample.ProdLex.exists_countable_coinitial_Ioi

If every Set.Ioi a in α and every Set.Ioi b in β has a countable coinitial subset, and β has a bottom element, then every Set.Ioi p in α ×ₗ β has a countable coinitial subset.

theorem exists_countable_coinitial_Ioi [OrderBot β]
    (hα : ∀ a : α, ∃ s ⊆ Ioi a, s.Countable ∧ ∀ b > a, ∃ c ∈ s, c ≤ b)
    (hβ : ∀ a : β, ∃ s ⊆ Ioi a, s.Countable ∧ ∀ b > a, ∃ c ∈ s, c ≤ b) (p : α ×ₗ β) :
    ∃ s ⊆ Ioi p, s.Countable ∧ ∀ q > p, ∃ c ∈ s, c ≤ q
Proof
:= by
  obtain ⟨⟨x, t⟩, rfl⟩ := toLex.surjective p
  by_cases ht : ∃ t', t < t'
  · obtain ⟨t', ht'⟩ := ht
    obtain ⟨s, hst, hsc, hs⟩ := hβ t
    obtain ⟨c₀, hc₀, -⟩ := hs t' ht'
    refine ⟨(fun u ↦ toLex (x, u)) '' s, ?_, hsc.image _, fun q hq ↦ ?_⟩
    · rintro _ ⟨u, hu, rfl⟩
      exact toLex_lt_toLex.2 (Or.inr ⟨rfl, hst hu⟩)
    · obtain ⟨⟨y, v⟩, rfl⟩ := toLex.surjective q
      rcases toLex_lt_toLex.1 hq with hxy | ⟨rfl, htv⟩
      · exact ⟨_, mem_image_of_mem _ hc₀, toLex_le_toLex.2 (Or.inl hxy)⟩
      · obtain ⟨c, hc, hcv⟩ := hs v htv
        exact ⟨_, mem_image_of_mem _ hc, toLex_le_toLex.2 (Or.inr ⟨rfl, hcv⟩)⟩
  · push Not at ht
    obtain ⟨s, hsx, hsc, hs⟩ := hα x
    refine ⟨(fun y ↦ toLex (y, ⊥)) '' s, ?_, hsc.image _, fun q hq ↦ ?_⟩
    · rintro _ ⟨y, hy, rfl⟩
      exact toLex_lt_toLex.2 (Or.inl (hsx hy))
    · obtain ⟨⟨y, v⟩, rfl⟩ := toLex.surjective q
      rcases toLex_lt_toLex.1 hq with hxy | ⟨-, htv⟩
      · obtain ⟨c, hc, hcy⟩ := hs y hxy
        exact ⟨_, mem_image_of_mem _ hc, toLex_le_toLex'.2 ⟨hcy, fun _ ↦ bot_le⟩⟩
      · exact absurd htv (not_lt.2 (ht v))
variable {α β : Type*} [LinearOrder α] [LinearOrder β]

theorem firstCountableTopology

TopologyByExample.ProdLex.firstCountableTopology

The lexicographic product α ×ₗ β of two densely ordered first-countable linear orders, with β bounded, is first countable in its order topology.

theorem firstCountableTopology [TopologicalSpace α] [OrderTopology α] [DenselyOrdered α]
    [FirstCountableTopology α] [TopologicalSpace β] [OrderTopology β] [DenselyOrdered β]
    [FirstCountableTopology β] [BoundedOrder β] [TopologicalSpace (α ×ₗ β)]
    [OrderTopology (α ×ₗ β)] : FirstCountableTopology (α ×ₗ β)
Proof
:=
  firstCountableTopology_of_countable_cofinal
    (exists_countable_cofinal_Iio TopologyByExample.exists_countable_cofinal_Iio
      TopologyByExample.exists_countable_cofinal_Iio)
    (exists_countable_coinitial_Ioi TopologyByExample.exists_countable_coinitial_Ioi
      TopologyByExample.exists_countable_coinitial_Ioi)

On this site: Theorem: A lexicographic product of densely ordered first countable linear orders, the second with least and greatest elements, is first countable

theorem fst_eq_of_mem_Ioo

TopologyByExample.ProdLex.fst_eq_of_mem_Ioo

The open interval from (x, a) to (x, c) in α ×ₗ β lies in the fibre over x.

theorem fst_eq_of_mem_Ioo {x : α} {a c : β} {z : α ×ₗ β}
    (hz : z ∈ Ioo (toLex (x, a)) (toLex (x, c))) : (ofLex z).1 = x
Proof
:=
  le_antisymm (monotone_fst _ _ hz.2.le) (monotone_fst _ _ hz.1.le)

theorem not_countableChainCondition

TopologyByExample.ProdLex.not_countableChainCondition

If α is uncountable and β has a nonempty open interval (a, c), then the lexicographic product α ×ₗ β does not satisfy the countable chain condition in its order topology: the open intervals from (x, a) to (x, c), x : α, are uncountably many pairwise disjoint nonempty open sets.

theorem not_countableChainCondition [Uncountable α] [TopologicalSpace (α ×ₗ β)]
    [OrderTopology (α ×ₗ β)] {a b c : β} (hab : a < b) (hbc : b < c) :
    ¬∀ S : Set (Set (α ×ₗ β)), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id →
      S.Countable
Proof
:= by
  intro h
  set f : α → Set (α ×ₗ β) := fun x ↦ Ioo (toLex (x, a)) (toLex (x, c))
  have hne (x : α) : (f x).Nonempty :=
    ⟨toLex (x, b), toLex_lt_toLex.2 (Or.inr ⟨rfl, hab⟩), toLex_lt_toLex.2 (Or.inr ⟨rfl, hbc⟩)⟩
  have hdisj {x y : α} (hxy : x ≠ y) : Disjoint (f x) (f y) :=
    Set.disjoint_left.2 fun z hzx hzy ↦
      hxy ((fst_eq_of_mem_Ioo hzx).symm.trans (fst_eq_of_mem_Ioo hzy))
  have hinj : Function.Injective f := fun x y hxy ↦ by
    by_contra hxy'
    obtain ⟨z, hz⟩ := hne x
    exact Set.disjoint_left.1 (hdisj hxy') hz (hxy ▸ hz)
  have hc := h (range f) (by rintro _ ⟨x, rfl⟩; exact ⟨isOpen_Ioo, hne x⟩) <| by
    rintro _ ⟨x, rfl⟩ _ ⟨y, rfl⟩ hxy
    exact hdisj fun h ↦ hxy (h ▸ rfl)
  have := hc.preimage_of_injOn hinj.injOn
  rw [preimage_range] at this
  exact not_countable_univ this

theorem not_separableSpace

TopologyByExample.ProdLex.not_separableSpace

If α is uncountable and β has a nonempty open interval (a, c), then the lexicographic product α ×ₗ β is not separable in its order topology, since it does not satisfy the countable chain condition.

theorem not_separableSpace [Uncountable α] [TopologicalSpace (α ×ₗ β)] [OrderTopology (α ×ₗ β)]
    {a b c : β} (hab : a < b) (hbc : b < c) : ¬SeparableSpace (α ×ₗ β)
Proof
:= fun _ ↦
  not_countableChainCondition hab hbc (countableChainCondition_of_separableSpace (X := α ×ₗ β))