Lean library · module TopologyByExample.Spaces.LexicographicSquare
The lexicographically ordered unit square
The lexicographically ordered unit square is [0, 1] × [0, 1] with the lexicographic order,
(a, b) < (c, d) iff a < c, or a = c and b < d, and the order topology. It is compact,
connected, first countable and Hausdorff, but not separable: the vertical open segments
{x} × (0, 1) are uncountably many pairwise disjoint nonempty open sets. In particular it is
not second countable and not metrizable.
We represent it as unitInterval ×ₗ unitInterval, Mathlib's lexicographic product of two copies
of unitInterval, with the topology Preorder.topology and an OrderTopology instance (the same
setup as Mathlib's Counterexamples/SeparableNotSecondCountable.lean uses for ℝ ×ₗ Bool).
Mathlib already gives Lex (unitInterval × unitInterval) its linear order and bounded order, and
no topology, so the order topology can be put on it without a diamond; every topological fact is
then a fact about the order topology, and Mathlib's results on order topologies apply directly.
(The factors carry their usual subspace topology, which is their order topology; it is used only
to obtain countable cofinal sequences in unitInterval.)
Compactness comes from Mathlib's instance compactSpace_of_completeLinearOrder once we show that
a lexicographic product of complete linear orders is a complete linear order. That, and the other
general facts about lexicographic products used here, are in TopologyByExample.Theorems.ProdLex.
Main definitions
TopologyByExample.LexicographicSquare: the typeunitInterval ×ₗ unitInterval, with the order topology.
Main statements
TopologyByExample.LexicographicSquare.exists_completeLinearOrder_orderTopologyTopologyByExample.LexicographicSquare.instFirstCountableTopologyTopologyByExample.LexicographicSquare.not_countableChainConditionTopologyByExample.LexicographicSquare.not_separableSpaceTopologyByExample.LexicographicSquare.instCompactSpaceTopologyByExample.LexicographicSquare.instLindelofSpaceTopologyByExample.LexicographicSquare.instT2SpaceTopologyByExample.LexicographicSquare.instConnectedSpaceTopologyByExample.LexicographicSquare.not_secondCountableTopologyTopologyByExample.LexicographicSquare.not_metrizableSpace
Separation axioms
TopologyByExample.LexicographicSquare.not_perfectlyNormalSpace: the lexicographic square is not perfectly normal.
Connectedness and paths
The lexicographic square is locally connected, as every densely ordered conditionally complete
linear order is (TopologyByExample.LexicographicSquare.instLocallyConnectedSpace). Paths never
leave a vertical fibre {x} × [0, 1]: if a path joined two points with first coordinates x < y,
its image would be connected, hence would contain every point between them, and in particular the
open vertical segments {z} × (0, 1) for x < z < y; their preimages would be uncountably many
pairwise disjoint nonempty open subsets of [0, 1], which is impossible since [0, 1] is
separable. Conversely each fibre is a copy of [0, 1], so two points are joined by a path exactly
when they lie in the same fibre (TopologyByExample.LexicographicSquare.joined_iff). Hence the
lexicographic square, although connected, is neither path connected nor locally path connected
(TopologyByExample.LexicographicSquare.not_pathPreconnectedSpace,
TopologyByExample.LexicographicSquare.not_locallyPathConnectedSpace).
References
- L. A. Steen and J. A. Seebach, Counterexamples in Topology, Example 48.
Tags
lexicographic order, order topology, unit square, separable, first countable, 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
- Mathlib.Analysis.Real.Cardinality
- Mathlib.Topology.Compactness.Lindelof
- Mathlib.Topology.Metrizable.Basic
- Mathlib.Topology.Order.Compact
- Mathlib.Topology.Order.IntermediateValue
- Mathlib.Topology.Order.IsLUB
- Mathlib.Topology.Order.T5
- Mathlib.Topology.UnitInterval
- TopologyByExample.Spaces.UnitInterval
- TopologyByExample.Theorems.Category
- TopologyByExample.Theorems.CompactnessVariants
- TopologyByExample.Theorems.Connectedness
- TopologyByExample.Theorems.ConnectednessExtremes
- TopologyByExample.Theorems.CountableChainCondition
- TopologyByExample.Theorems.Disconnectedness
- TopologyByExample.Theorems.GridProperties
- TopologyByExample.Theorems.Paracompactness
- TopologyByExample.Theorems.ProdLex
- TopologyByExample.Theorems.Separation
- TopologyByExample.Theorems.SeparationVariants
The lexicographically ordered unit square
instance instUncountableUnitInterval
TopologyByExample.instUncountableUnitInterval
The unit interval is uncountable.
instance instUncountableUnitInterval : Uncountable unitInterval
Proof
:= by
rw [← Cardinal.aleph0_lt_mk_iff, Cardinal.mk_Icc_real zero_lt_one]
exact Cardinal.aleph0_lt_continuum
definition LexicographicSquare
TopologyByExample.LexicographicSquare
The lexicographically ordered unit square: [0, 1] × [0, 1] with the lexicographic order
and (via TopologyByExample.LexicographicSquare.instTopologicalSpace) its order topology.
abbrev LexicographicSquare : Type
:= unitInterval ×ₗ unitInterval
On this site: Space: Lexicographically ordered unit square
instance instTopologicalSpace
TopologyByExample.LexicographicSquare.instTopologicalSpace
The lexicographic square carries the order topology.
instance instTopologicalSpace : TopologicalSpace LexicographicSquare
Proof
:= Preorder.topology _
instance instOrderTopology
TopologyByExample.LexicographicSquare.instOrderTopology
The topology of the lexicographic square is its order topology.
instance instOrderTopology : OrderTopology LexicographicSquare
Proof
:= ⟨rfl⟩
instance instFirstCountableTopology
TopologyByExample.LexicographicSquare.instFirstCountableTopology
The lexicographic square is first countable.
instance instFirstCountableTopology : FirstCountableTopology LexicographicSquare
Proof
:=
ProdLex.firstCountableTopology
On this site: The lexicographically ordered unit square is first countable
theorem exists_completeLinearOrder_orderTopology
TopologyByExample.LexicographicSquare.exists_completeLinearOrder_orderTopology
The lexicographic square is the order topology of a complete linear order.
theorem exists_completeLinearOrder_orderTopology :
∃ o : CompleteLinearOrder LexicographicSquare, letI := o; OrderTopology LexicographicSquare
Proof
:=
⟨ProdLex.instCompleteLinearOrder, instOrderTopology⟩
On this site: The lexicographically ordered unit square is the order topology of a complete linear order
theorem not_countableChainCondition
TopologyByExample.LexicographicSquare.not_countableChainCondition
The lexicographic square does not satisfy the countable chain condition: the vertical open
segments {x} × (0, 1) are uncountably many pairwise disjoint nonempty open sets.
theorem not_countableChainCondition :
¬∀ S : Set (Set LexicographicSquare), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) →
S.PairwiseDisjoint id → S.Countable
Proof
:= by
obtain ⟨b, hb₀, hb₁⟩ := exists_between (show (0 : unitInterval) < 1 from zero_lt_one)
exact ProdLex.not_countableChainCondition hb₀ hb₁
On this site: The lexicographically ordered unit square does not satisfy the countable chain condition
theorem not_separableSpace
TopologyByExample.LexicographicSquare.not_separableSpace
The lexicographic square is not separable: the vertical open segments {x} × (0, 1) are
uncountably many pairwise disjoint nonempty open sets.
theorem not_separableSpace : ¬SeparableSpace LexicographicSquare
Proof
:= fun _ ↦
not_countableChainCondition countableChainCondition_of_separableSpace
instance instCompactSpace
TopologyByExample.LexicographicSquare.instCompactSpace
The lexicographic square is compact, being a complete linear order with the order topology.
instance instCompactSpace : CompactSpace LexicographicSquare
Proof
:= inferInstance
instance instLindelofSpace
TopologyByExample.LexicographicSquare.instLindelofSpace
The lexicographic square is Lindelöf, being compact.
instance instLindelofSpace : LindelofSpace LexicographicSquare
Proof
:= inferInstance
instance instT2Space
TopologyByExample.LexicographicSquare.instT2Space
The lexicographic square is Hausdorff, as is every order topology.
instance instT2Space : T2Space LexicographicSquare
Proof
:= inferInstance
instance instConnectedSpace
TopologyByExample.LexicographicSquare.instConnectedSpace
The lexicographic square is connected, being a densely ordered complete linear order with the order topology.
instance instConnectedSpace : ConnectedSpace LexicographicSquare
Proof
where
toNonempty := inferInstance
On this site: The lexicographically ordered unit square is connected
theorem not_secondCountableTopology
TopologyByExample.LexicographicSquare.not_secondCountableTopology
The lexicographic square is not second countable, since it is not separable.
theorem not_secondCountableTopology : ¬SecondCountableTopology LexicographicSquare
Proof
:=
fun _ ↦ not_separableSpace inferInstance
theorem not_metrizableSpace
TopologyByExample.LexicographicSquare.not_metrizableSpace
The lexicographic square is not metrizable: a compact metrizable space is second countable.
theorem not_metrizableSpace : ¬MetrizableSpace LexicographicSquare
Proof
:=
fun _ ↦ not_secondCountableTopology inferInstance
Perfect normality
theorem not_perfectlyNormalSpace
TopologyByExample.LexicographicSquare.not_perfectlyNormalSpace
The lexicographic square is not perfectly normal: a Lindelöf perfectly normal space is hereditarily Lindelöf, hence satisfies the countable chain condition, which the lexicographic square does not.
theorem not_perfectlyNormalSpace : ¬PerfectlyNormalSpace LexicographicSquare
Connectedness and paths
instance instLocallyConnectedSpace
TopologyByExample.LexicographicSquare.instLocallyConnectedSpace
The lexicographic square is locally connected.
instance instLocallyConnectedSpace : LocallyConnectedSpace LexicographicSquare
On this site: The lexicographically ordered unit square is locally connected
theorem not_joined_of_fst_lt
TopologyByExample.LexicographicSquare.not_joined_of_fst_lt
If the first coordinate of a is smaller than that of b, then no path joins a to b:
the preimages of the vertical open segments between them would be uncountably many pairwise
disjoint nonempty open subsets of [0, 1].
theorem not_joined_of_fst_lt {a b : LexicographicSquare} (h : (ofLex a).1 < (ofLex b).1) :
¬Joined a b
Proof
:= by
rintro ⟨γ⟩
have hsub : Icc a b ⊆ range γ :=
(isPreconnected_range γ.continuous).Icc_subset ⟨0, γ.source⟩ ⟨1, γ.target⟩
let f : unitInterval → Set unitInterval := fun z ↦ γ ⁻¹' Ioo (toLex (z, 0)) (toLex (z, 1))
have hhalf : (0 : unitInterval) < ⟨1 / 2, by norm_num, by norm_num⟩ ∧
(⟨1 / 2, by norm_num, by norm_num⟩ : unitInterval) < 1 :=
⟨show (0 : ℝ) < 1 / 2 by norm_num, show (1 / 2 : ℝ) < 1 by norm_num⟩
refine UnitInterval.not_countable_Ioo h (PairwiseDisjoint.countable_of_isOpen (s := f) ?_
(fun z _ ↦ isOpen_Ioo.preimage γ.continuous) fun z hz ↦ ?_)
· intro z _ w _ hzw
exact (Set.disjoint_left.2 fun p hpz hpw ↦ hzw
((ProdLex.fst_eq_of_mem_Ioo hpz).symm.trans (ProdLex.fst_eq_of_mem_Ioo hpw))).preimage γ
· set m : LexicographicSquare := toLex (z, ⟨1 / 2, by norm_num, by norm_num⟩)
have hm : m ∈ Icc a b :=
⟨(Prod.Lex.lt_iff.2 (Or.inl hz.1)).le, (Prod.Lex.lt_iff.2 (Or.inl hz.2)).le⟩
obtain ⟨s, hs⟩ := hsub hm
refine ⟨s, ?_⟩
simp only [f, mem_preimage, hs]
exact ⟨Prod.Lex.toLex_lt_toLex.2 (Or.inr ⟨rfl, hhalf.1⟩),
Prod.Lex.toLex_lt_toLex.2 (Or.inr ⟨rfl, hhalf.2⟩)⟩
theorem fst_eq_of_joined
TopologyByExample.LexicographicSquare.fst_eq_of_joined
Two points of the lexicographic square joined by a path have the same first coordinate: every path stays in one vertical fibre.
theorem fst_eq_of_joined {a b : LexicographicSquare} (h : Joined a b) :
(ofLex a).1 = (ofLex b).1
Proof
:= by
rcases lt_trichotomy (ofLex a).1 (ofLex b).1 with hab | hab | hab
· exact absurd h (not_joined_of_fst_lt hab)
· exact hab
· exact absurd h.symm (not_joined_of_fst_lt hab)
theorem continuous_toLex_mk
TopologyByExample.LexicographicSquare.continuous_toLex_mk
The map t ↦ (x, t) from [0, 1] onto the vertical fibre over x is continuous.
theorem continuous_toLex_mk (x : unitInterval) :
Continuous fun t : unitInterval ↦ (toLex (x, t) : LexicographicSquare)
Proof
:= by
let J : Set LexicographicSquare := Icc (toLex (x, 0)) (toLex (x, 1))
have hmem (t : unitInterval) : toLex (x, t) ∈ J :=
⟨Prod.Lex.toLex_le_toLex.2 (Or.inr ⟨rfl, unitInterval.nonneg'⟩),
Prod.Lex.toLex_le_toLex.2 (Or.inr ⟨rfl, unitInterval.le_one'⟩)⟩
let g : unitInterval → J := fun t ↦ ⟨toLex (x, t), hmem t⟩
have hmono : Monotone g := fun s t hst ↦
Subtype.mk_le_mk.2 (Prod.Lex.toLex_le_toLex.2 (Or.inr ⟨rfl, hst⟩))
have hsurj : Function.Surjective g := by
rintro ⟨p, hp1, hp2⟩
have hfst : (ofLex p).1 = x :=
le_antisymm (Prod.Lex.monotone_fst _ _ hp2) (Prod.Lex.monotone_fst _ _ hp1)
refine ⟨(ofLex p).2, Subtype.ext ?_⟩
change toLex (x, (ofLex p).2) = p
rw [← hfst]
rfl
exact continuous_subtypeVal.comp (hmono.continuous_of_surjective hsurj)
theorem joined_iff
TopologyByExample.LexicographicSquare.joined_iff
Two points of the lexicographic square are joined by a path if and only if they have the same first coordinate: the path components are the vertical fibres.
theorem joined_iff {a b : LexicographicSquare} : Joined a b ↔ (ofLex a).1 = (ofLex b).1
Proof
:= by
refine ⟨fst_eq_of_joined, fun h ↦ ?_⟩
obtain ⟨γ⟩ : Joined (ofLex a).2 (ofLex b).2 := UnitInterval.joined _ _
refine ⟨⟨⟨fun t ↦ toLex ((ofLex a).1, γ t),
(continuous_toLex_mk _).comp γ.continuous⟩, ?_, ?_⟩⟩
· simp
· simp only [Path.target]
rw [h]
rfl
On this site: Lexicographically ordered unit square: Paths stay in vertical segments
theorem not_pathPreconnectedSpace
TopologyByExample.LexicographicSquare.not_pathPreconnectedSpace
The lexicographic square is not path connected: no path joins its least element (0, 0) to
its greatest element (1, 1).
theorem not_pathPreconnectedSpace : ¬PathPreconnectedSpace LexicographicSquare
Proof
:= fun h ↦
zero_ne_one (α := unitInterval)
(fst_eq_of_joined (h.joined (toLex (0, 0)) (toLex (1, 1))))
On this site: The lexicographically ordered unit square is not path connected
theorem not_locallyPathConnectedSpace
TopologyByExample.LexicographicSquare.not_locallyPathConnectedSpace
The lexicographic square is not locally path connected: a connected, locally path connected space is path connected.
theorem not_locallyPathConnectedSpace : ¬LocallyPathConnectedSpace LexicographicSquare
Further properties
theorem not_totallyPathDisconnectedSpace
TopologyByExample.LexicographicSquare.not_totallyPathDisconnectedSpace
The lexicographic square is not totally path disconnected: a vertical segment is a path joining two distinct points.
theorem not_totallyPathDisconnectedSpace : ¬TotallyPathDisconnectedSpace LexicographicSquare
Proof
:=
fun ⟨h⟩ ↦ by
have := h (toLex (0, 0)) (toLex (0, 1)) (joined_iff.2 rfl)
simp at this
On this site: The lexicographically ordered unit square is not totally path disconnected