Lean library · module TopologyByExample.Spaces.PosetTwoZeros
A poset with two zeros
The set {-1, 0₀, 0₁} ∪ {1/n : n ≥ 1}, partially ordered so that -1 is the least element, the
two zeros 0₀ and 0₁ are incomparable and lie below every 1/n, and the points 1/n are
ordered as real numbers, with the upper set topology: the open sets are the upper sets.
Choice of type
TopologyByExample.PosetTwoZeros is an inductive type with constructors neg (the point -1),
zero₀, zero₁ and frac n (the point 1/(n + 1)), carrying the order above and the topology
Topology.upperSet, with the instance Topology.IsUpperSet.
The values
instAlexandrovDiscrete(by instance),instCountable;compactSpace: the only open set containing-1is the whole space;preirreducibleSpace: every nonempty open set contains1;scatteredSpace: there is no infinite strictly increasing sequence;normalSpace: every nonempty closed set contains-1;not_completelyNormalSpace: the two zeros are separated, but every neighbourhood of either contains1.
References
The space is π-Base's S000152 (CC BY 4.0).
Tags
Alexandrov topology, upper set topology, partial order
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
inductive type PosetTwoZeros
TopologyByExample.PosetTwoZeros
The poset {-1, 0₀, 0₁} ∪ {1/n : n ≥ 1} with its upper set topology: -1 is least, the two
zeros are incomparable and lie below every 1/n, and the points 1/n have the order of the
reals.
inductive PosetTwoZeros : Type
/-- The least point `-1`. -/
| neg
/-- The first zero. -/
| zero₀
/-- The second zero. -/
| zero₁
/-- The point `1/(n + 1)`. -/
| frac (n : ℕ)
deriving DecidableEq
On this site: Space: Poset with two zeros
definition Le
TopologyByExample.PosetTwoZeros.Le
The order relation.
def Le : PosetTwoZeros → PosetTwoZeros → Prop
Definition
| neg, _ => True
| zero₀, zero₀ => True
| zero₀, frac _ => True
| zero₁, zero₁ => True
| zero₁, frac _ => True
| frac m, frac n => n ≤ m
| _, _ => False
instance
The partial order: -1 least, the zeros incomparable below every 1/n, and
1/(m + 1) ≤ 1/(n + 1) iff n ≤ m.
instance : PartialOrder PosetTwoZeros
theorem neg_le
TopologyByExample.PosetTwoZeros.neg_le
-1 is the least point.
theorem neg_le (x : PosetTwoZeros) : neg ≤ x
Proof
:= trivial
theorem le_def
TopologyByExample.PosetTwoZeros.le_def
The order, unfolded.
theorem le_def {x y : PosetTwoZeros} : x ≤ y ↔ Le x y
Proof
:= Iff.rfl
theorem le_frac_zero
TopologyByExample.PosetTwoZeros.le_frac_zero
1 is the greatest point.
theorem le_frac_zero (x : PosetTwoZeros) : x ≤ frac 0
instance
The topology whose open sets are the upper sets.
instance : TopologicalSpace PosetTwoZeros
Proof
:= Topology.upperSet PosetTwoZeros
instance
The topology is the upper set topology.
instance : Topology.IsUpperSet PosetTwoZeros
Proof
:= ⟨rfl⟩
instance
The space is nonempty.
instance : Nonempty PosetTwoZeros
Proof
:= ⟨neg⟩
definition encode
TopologyByExample.PosetTwoZeros.encode
An injection into ℕ.
def encode : PosetTwoZeros → ℕ
Definition
| neg => 0
| zero₀ => 1
| zero₁ => 2
| frac n => n + 3
theorem encode_injective
TopologyByExample.PosetTwoZeros.encode_injective
The encoding into ℕ is injective.
theorem encode_injective : Function.Injective encode
Proof
:= by
intro x y h
cases x <;> cases y <;> simp_all [encode]
instance instCountable
TopologyByExample.PosetTwoZeros.instCountable
The space is countable.
instance instCountable : Countable PosetTwoZeros
Proof
:= encode_injective.countable
instance instAlexandrovDiscrete
TopologyByExample.PosetTwoZeros.instAlexandrovDiscrete
The space is Alexandrov: its open sets are the upper sets.
instance instAlexandrovDiscrete : AlexandrovDiscrete PosetTwoZeros
Proof
:= inferInstance
theorem compactSpace
TopologyByExample.PosetTwoZeros.compactSpace
The only open set containing -1 is the whole space, so the space is compact.
theorem compactSpace : CompactSpace PosetTwoZeros
Proof
:= by
refine ⟨isCompact_iff_ultrafilter_le_nhds.2 fun f _ ↦ ⟨neg, mem_univ _, ?_⟩⟩
rw [Topology.IsUpperSet.nhds_eq_principal_Ici,
show Ici neg = univ from eq_univ_of_forall neg_le, principal_univ]
exact le_top
On this site: The poset with two zeros is compact
theorem preirreducibleSpace
TopologyByExample.PosetTwoZeros.preirreducibleSpace
The space is hyperconnected: every nonempty open set contains the greatest point 1.
theorem preirreducibleSpace : PreirreducibleSpace PosetTwoZeros
Proof
:= by
refine ⟨fun u v hu hv ⟨x, _, hx⟩ ⟨y, _, hy⟩ ↦ ⟨frac 0, trivial, ?_, ?_⟩⟩
· exact Topology.IsUpperSet.isOpen_iff_isUpperSet.1 hu (le_frac_zero x) hx
· exact Topology.IsUpperSet.isOpen_iff_isUpperSet.1 hv (le_frac_zero y) hy
On this site: The poset with two zeros is hyperconnected
theorem acc_frac
TopologyByExample.PosetTwoZeros.acc_frac
Every point 1/(n + 1) is accessible for the reversed order.
theorem acc_frac (n : ℕ) : Acc (· > ·) (frac n)
instance
The order has no infinite strictly increasing sequence.
instance : WellFoundedGT PosetTwoZeros
Proof
:= by
have hz : ∀ y : PosetTwoZeros, (y = zero₀ ∨ y = zero₁) → Acc (· > ·) y := by
rintro y hy
refine Acc.intro _ fun z hlt ↦ ?_
obtain ⟨hle, hne⟩ := lt_iff_le_and_ne.1 hlt
cases z with
| frac m => exact acc_frac m
| _ => rcases hy with rfl | rfl <;> simp_all [LE.le, Le]
refine ⟨fun x ↦ ?_⟩
cases x with
| neg =>
refine Acc.intro _ fun z hlt ↦ ?_
obtain ⟨-, hne⟩ := lt_iff_le_and_ne.1 hlt
cases z with
| neg => exact absurd rfl hne
| zero₀ => exact hz zero₀ (Or.inl rfl)
| zero₁ => exact hz zero₁ (Or.inr rfl)
| frac m => exact acc_frac m
| zero₀ => exact hz _ (Or.inl rfl)
| zero₁ => exact hz _ (Or.inr rfl)
| frac n => exact acc_frac n
theorem scatteredSpace
TopologyByExample.PosetTwoZeros.scatteredSpace
The space is scattered: a maximal element of a nonempty set is isolated in it.
theorem scatteredSpace : ScatteredSpace PosetTwoZeros
Proof
:= Topology.IsUpperSet.scatteredSpace
On this site: The poset with two zeros is scattered
theorem normalSpace
TopologyByExample.PosetTwoZeros.normalSpace
The space is normal: every nonempty closed set is a lower set and so contains -1, so of two
disjoint closed sets one is empty.
theorem normalSpace : NormalSpace PosetTwoZeros
Proof
:= by
refine ⟨fun s t hs ht hst ↦ ?_⟩
have hneg : ∀ u : Set PosetTwoZeros, IsClosed u → u.Nonempty → neg ∈ u := fun u hu ⟨x, hx⟩ ↦
Topology.IsUpperSet.isClosed_iff_isLower.1 hu (neg_le x) hx
rcases s.eq_empty_or_nonempty with rfl | hs'
· exact SeparatedNhds.empty_left t
rcases t.eq_empty_or_nonempty with rfl | ht'
· exact SeparatedNhds.empty_right s
exact absurd hst (not_disjoint_iff.2 ⟨neg, hneg s hs hs', hneg t ht ht'⟩)
On this site: The poset with two zeros is normal
theorem not_completelyNormalSpace
TopologyByExample.PosetTwoZeros.not_completelyNormalSpace
The space is not completely normal: the two zeros are separated, but every neighbourhood of
either contains 1.
theorem not_completelyNormalSpace : ¬CompletelyNormalSpace PosetTwoZeros
Proof
:= fun h ↦ by
have h₀₁ : ¬zero₀ ≤ zero₁ := by simp [le_def, Le]
have h₁₀ : ¬zero₁ ≤ zero₀ := by simp [le_def, Le]
have := h.completely_normal (s := {zero₀}) (t := {zero₁})
(by rw [Topology.IsUpperSet.closure_singleton, disjoint_singleton_right]; exact h₁₀)
(by rw [Topology.IsUpperSet.closure_singleton, disjoint_singleton_left]; exact h₀₁)
rw [nhdsSet_singleton, nhdsSet_singleton, Topology.IsUpperSet.nhds_eq_principal_Ici,
Topology.IsUpperSet.nhds_eq_principal_Ici, disjoint_principal_principal] at this
exact this.ne_of_mem (mem_Ici.2 (le_frac_zero zero₀)) (mem_Ici.2 (le_frac_zero zero₁)) rfl
On this site: The poset with two zeros is not completely normal