Lean library · module TopologyByExample.Theorems.OrderTopology
Linearly orderable spaces
A topological space X is linearly orderable if its topology is the order topology of some
linear order on X, and completely linearly orderable if that linear order can be taken to be
complete (every subset has a supremum and an infimum, so in particular there is a least and a
greatest element). We state these as ∃ o : LinearOrder X, letI := o; OrderTopology X and
∃ o : CompleteLinearOrder X, letI := o; OrderTopology X.
Main statements
TopologyByExample.exists_linearOrder_of_exists_completeLinearOrder: a completely linearly orderable space is linearly orderable.TopologyByExample.compactSpace_of_exists_completeLinearOrder: a completely linearly orderable space is compact.TopologyByExample.exists_completeLinearOrder_of_compactSpace: conversely, a nonempty compact linearly orderable space is completely linearly orderable (indeed the given order is complete:TopologyByExample.exists_isLUB_of_compactSpace,TopologyByExample.exists_isGLB_of_compactSpace).TopologyByExample.t2Space_of_exists_linearOrder: a linearly orderable space is Hausdorff.TopologyByExample.firstCountableTopology_of_countable_cofinal: a linear order with the order topology is first countable if everySet.Iio ahas a countable cofinal subset and everySet.Ioi ahas a countable coinitial subset;TopologyByExample.exists_countable_cofinal_IioandTopologyByExample.exists_countable_coinitial_Ioigive such subsets in a densely ordered first-countable linear order.TopologyByExample.firstCountableTopology_of_countable_Iio: the special case of a linear order with a successor function in which everySet.Iio ais countable (such asω₁).TopologyByExample.exists_countable_forall_mem_Ico: in a second countable linear order with the order topology, any family of nonempty intervals[x, b x)has a countable subfamily covering the whole space.
Tags
order topology, linearly ordered topological space, LOTS, compact, Hausdorff, first countable
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
variable {X : Type*} [TopologicalSpace X]
theorem exists_linearOrder_of_exists_completeLinearOrder
TopologyByExample.exists_linearOrder_of_exists_completeLinearOrder
A space whose topology is the order topology of a complete linear order has a linear order whose order topology is its topology.
theorem exists_linearOrder_of_exists_completeLinearOrder
(h : ∃ o : CompleteLinearOrder X, letI := o; OrderTopology X) :
∃ o : LinearOrder X, letI := o; OrderTopology X
Proof
:= by
obtain ⟨o, h⟩ := h
exact ⟨o.toLinearOrder, h⟩
On this site: Theorem: Completely linearly orderable spaces are linearly orderable
theorem compactSpace_of_exists_completeLinearOrder
TopologyByExample.compactSpace_of_exists_completeLinearOrder
A space whose topology is the order topology of a complete linear order is compact.
theorem compactSpace_of_exists_completeLinearOrder
(h : ∃ o : CompleteLinearOrder X, letI := o; OrderTopology X) : CompactSpace X
Proof
:= by
obtain ⟨o, h⟩ := h
have : OrderTopology X := h
exact compactSpace_of_completeLinearOrder
On this site: Theorem: Completely linearly orderable spaces are compact
theorem t2Space_of_exists_linearOrder
TopologyByExample.t2Space_of_exists_linearOrder
A space whose topology is the order topology of a linear order is Hausdorff.
theorem t2Space_of_exists_linearOrder (h : ∃ o : LinearOrder X, letI := o; OrderTopology X) :
T2Space X
Proof
:= by
obtain ⟨o, h⟩ := h
have : OrderTopology X := h
infer_instance
On this site: Theorem: Linearly orderable spaces are Hausdorff
Compact linear orders are complete
variable {α : Type*} [LinearOrder α] [TopologicalSpace α] [OrderTopology α] [CompactSpace α]
[Nonempty α]
theorem exists_isLUB_of_compactSpace
TopologyByExample.exists_isLUB_of_compactSpace
In a nonempty compact linear order with the order topology, every set has a least upper bound: the greatest element of its closure if it is nonempty, and the least element of the space if it is empty.
theorem exists_isLUB_of_compactSpace (s : Set α) : ∃ x, IsLUB s x
Proof
:= by
rcases s.eq_empty_or_nonempty with rfl | hs
· obtain ⟨m, hm⟩ := isCompact_univ.exists_isLeast (univ_nonempty (α := α))
exact ⟨m, isLUB_empty_iff.2 fun x ↦ hm.2 (mem_univ x)⟩
· obtain ⟨x, -, hx⟩ := isClosed_closure.isCompact.exists_isLUB hs.closure
exact ⟨x, by rwa [IsLUB, upperBounds_closure] at hx⟩
theorem exists_isGLB_of_compactSpace
TopologyByExample.exists_isGLB_of_compactSpace
In a nonempty compact linear order with the order topology, every set has a greatest lower bound.
theorem exists_isGLB_of_compactSpace (s : Set α) : ∃ x, IsGLB s x
Proof
:= by
rcases s.eq_empty_or_nonempty with rfl | hs
· obtain ⟨m, hm⟩ := isCompact_univ.exists_isGreatest (univ_nonempty (α := α))
exact ⟨m, isGLB_empty_iff.2 fun x ↦ hm.2 (mem_univ x)⟩
· obtain ⟨x, -, hx⟩ := isClosed_closure.isCompact.exists_isGLB hs.closure
exact ⟨x, by rwa [IsGLB, lowerBounds_closure] at hx⟩
theorem exists_completeLinearOrder_of_compactSpace
TopologyByExample.exists_completeLinearOrder_of_compactSpace
A nonempty compact space whose topology is the order topology of a linear order is the order topology of a complete linear order (indeed, the given order is complete).
theorem exists_completeLinearOrder_of_compactSpace {X : Type*} [TopologicalSpace X]
[CompactSpace X] (h : ∃ o : LinearOrder X, letI := o; OrderTopology X) [Nonempty X] :
∃ o : CompleteLinearOrder X, letI := o; OrderTopology X
Proof
:= by
obtain ⟨o, h⟩ := h
have : OrderTopology X := h
choose u hu using exists_isLUB_of_compactSpace (α := X)
choose l hl using exists_isGLB_of_compactSpace (α := X)
let : CompleteLattice X :=
{ (inferInstance : Lattice X) with
sSup := u
sInf := l
isLUB_sSup := hu
isGLB_sInf := hl
top := u univ
le_top := fun x ↦ (hu univ).1 (mem_univ x)
bot := l univ
bot_le := fun x ↦ (hl univ).1 (mem_univ x) }
exact ⟨{ o, this, LinearOrder.toBiheytingAlgebra X with }, h⟩
On this site: Theorem: Nonempty compact linearly orderable spaces are completely linearly orderable
Countable cofinal sets and first countability of order topologies
variable {α : Type*} [LinearOrder α] [TopologicalSpace α] [OrderTopology α]
theorem firstCountableTopology_of_countable_cofinal
TopologyByExample.firstCountableTopology_of_countable_cofinal
A linear order with the order topology is first countable if each Set.Iio a has a
countable cofinal subset and each Set.Ioi a has a countable coinitial subset.
theorem firstCountableTopology_of_countable_cofinal
(hl : ∀ a : α, ∃ s ⊆ Iio a, s.Countable ∧ ∀ b < a, ∃ c ∈ s, b ≤ c)
(hr : ∀ a : α, ∃ s ⊆ Ioi a, s.Countable ∧ ∀ b > a, ∃ c ∈ s, c ≤ b) :
FirstCountableTopology α
Proof
where
nhds_generated_countable a := by
obtain ⟨s, hsa, hsc, hs⟩ := hl a
obtain ⟨t, hta, htc, ht⟩ := hr a
have h₁ : ⨅ b ∈ Iio a, 𝓟 (Ioi b) = ⨅ c ∈ Ioi '' s, 𝓟 c := by
rw [iInf_image]
refine le_antisymm (le_iInf₂ fun c hc ↦ iInf₂_le c (hsa hc)) (le_iInf₂ fun b hb ↦ ?_)
obtain ⟨c, hc, hbc⟩ := hs b hb
exact iInf₂_le_of_le c hc (principal_mono.2 (Ioi_subset_Ioi hbc))
have h₂ : ⨅ b ∈ Ioi a, 𝓟 (Iio b) = ⨅ c ∈ Iio '' t, 𝓟 c := by
rw [iInf_image]
refine le_antisymm (le_iInf₂ fun c hc ↦ iInf₂_le c (hta hc)) (le_iInf₂ fun b hb ↦ ?_)
obtain ⟨c, hc, hcb⟩ := ht b hb
exact iInf₂_le_of_le c hc (principal_mono.2 (Iio_subset_Iio hcb))
have := isCountablyGenerated_biInf_principal (hsc.image Ioi)
have := isCountablyGenerated_biInf_principal (htc.image Iio)
rw [nhds_eq_order, h₁, h₂]
infer_instance
On this site: Theorem: A criterion for first countability of linearly ordered spaces
theorem firstCountableTopology_of_countable_Iio
TopologyByExample.firstCountableTopology_of_countable_Iio
A linear order with the order topology, in which every element that is not maximal has a
successor (a SuccOrder, as in any well order), is first countable as soon as every initial
segment Set.Iio a is countable: Set.Iio a is a countable cofinal subset of itself, and
{Order.succ a} is a coinitial subset of Set.Ioi a.
theorem firstCountableTopology_of_countable_Iio [SuccOrder α] (h : ∀ a : α, (Iio a).Countable) :
FirstCountableTopology α
Proof
:=
firstCountableTopology_of_countable_cofinal
(fun a ↦ ⟨Iio a, subset_rfl, h a, fun b hb ↦ ⟨b, hb, le_rfl⟩⟩)
fun a ↦ ⟨{Order.succ a} ∩ Ioi a, inter_subset_right,
(countable_singleton _).mono inter_subset_left, fun _ hb ↦
⟨Order.succ a, ⟨rfl, Order.lt_succ_of_not_isMax (not_isMax_of_lt hb)⟩,
Order.succ_le_of_lt hb⟩⟩
On this site: Theorem: Linear orders with successors and countable initial segments are first countable
theorem exists_countable_forall_mem_Ico
TopologyByExample.exists_countable_forall_mem_Ico
In a second countable linear order with the order topology, if x < b x for every x, then
countably many of the intervals [x, b x) cover the space.
The intervals (x, b x) have a countable subfamily with the same union W. The points x outside
W have pairwise disjoint intervals (x, b x), so there are countably many of them, and each lies
in its own [x, b x).
theorem exists_countable_forall_mem_Ico [SecondCountableTopology α] {b : α → α}
(hb : ∀ x, x < b x) : ∃ t : Set α, t.Countable ∧ ∀ y, ∃ x ∈ t, y ∈ Ico x (b x)
Proof
:= by
obtain ⟨T, hTc, hT⟩ := isOpen_iUnion_countable (fun x ↦ Ioo x (b x)) fun _ ↦ isOpen_Ioo
set R := (⋃ x, Ioo x (b x))ᶜ
have key : ∀ x ∈ R, ∀ y ∈ R, x < y → Disjoint (Ioo x (b x)) (Ioo y (b y)) := by
intro x _ y hy hxy
have hby : b x ≤ y := not_lt.1 fun h ↦ hy (mem_iUnion.2 ⟨x, hxy, h⟩)
exact disjoint_left.2 fun z hz hz' ↦ (hz.2.trans_le hby).not_gt hz'.1
have hR : R.Countable := by
refine PairwiseDisjoint.countable_of_Ioo (fun x hx y hy hne ↦ ?_) fun x _ ↦ hb x
rcases hne.lt_or_gt with h | h
exacts [key x hx y hy h, (key y hy x hx h).symm]
refine ⟨T ∪ R, hTc.union hR, fun y ↦ ?_⟩
by_cases hy : y ∈ ⋃ x, Ioo x (b x)
· rw [← hT, mem_iUnion₂] at hy
obtain ⟨x, hx, hyx⟩ := hy
exact ⟨x, .inl hx, Ioo_subset_Ico_self hyx⟩
· exact ⟨y, .inr hy, left_mem_Ico.2 (hb y)⟩
On this site: Theorem: Countably many half-open intervals cover a second countable linear order
variable [DenselyOrdered α] [FirstCountableTopology α]
theorem exists_countable_cofinal_Iio
TopologyByExample.exists_countable_cofinal_Iio
In a densely ordered first-countable linear order, each Set.Iio a has a countable cofinal
subset.
theorem exists_countable_cofinal_Iio (a : α) :
∃ s ⊆ Iio a, s.Countable ∧ ∀ b < a, ∃ c ∈ s, b ≤ c
Proof
:= by
by_cases h : ∃ y, y < a
· obtain ⟨y, hy⟩ := h
obtain ⟨u, -, hu, hlim⟩ := exists_seq_strictMono_tendsto' hy
refine ⟨range u, range_subset_iff.2 fun n ↦ (hu n).2, countable_range u, fun b hb ↦ ?_⟩
obtain ⟨n, hn⟩ := (hlim.eventually (Ioi_mem_nhds hb)).exists
exact ⟨u n, mem_range_self n, hn.le⟩
· push Not at h
exact ⟨∅, empty_subset _, countable_empty, fun b hb ↦ absurd hb (not_lt.2 (h b))⟩
theorem exists_countable_coinitial_Ioi
TopologyByExample.exists_countable_coinitial_Ioi
In a densely ordered first-countable linear order, each Set.Ioi a has a countable coinitial
subset.
theorem exists_countable_coinitial_Ioi (a : α) :
∃ s ⊆ Ioi a, s.Countable ∧ ∀ b > a, ∃ c ∈ s, c ≤ b
Proof
:= by
by_cases h : ∃ y, a < y
· obtain ⟨y, hy⟩ := h
obtain ⟨u, -, hu, hlim⟩ := exists_seq_strictAnti_tendsto' hy
refine ⟨range u, range_subset_iff.2 fun n ↦ (hu n).1, countable_range u, fun b hb ↦ ?_⟩
obtain ⟨n, hn⟩ := (hlim.eventually (Iio_mem_nhds hb)).exists
exact ⟨u n, mem_range_self n, hn.le⟩
· push Not at h
exact ⟨∅, empty_subset _, countable_empty, fun b hb ↦ absurd hb (not_lt.2 (h b))⟩