Lean library · module TopologyByExample.Spaces.DivisorTopology
The divisor topology
The divisor topology is the set {2, 3, 4, …} of natural numbers at least 2 whose open sets
are the sets closed under taking divisors (at least 2): a set U is open if m ∣ n and
n ∈ U imply m ∈ U. These are the lower sets of the divisibility order, so the space is
Mathlib's lower set topology of that partial order, and the smallest neighbourhood of n is the
set of its divisors.
Choice of type
TopologyByExample.DivisorTopology is a structure wrapping a natural number val with
2 ≤ val, so that the usual order of ℕ does not leak in. It carries the divisibility order
(TopologyByExample.DivisorTopology.le_def) and the topology Topology.lowerSet, with the
instance Topology.IsLowerSet.
The values
TopologyByExample.DivisorTopology.instAlexandrovDiscrete(Alexandrov, by instance),instCountable,anticompactSpace(compact sets are finite);ultraconnectedSpace: the closures ofmandnmeet atm * n;scatteredSpace: a divisibility-minimal element of a set is isolated in it;not_preirreducibleSpace:{2}and{3}are disjoint open sets;not_completelyNormalSpace:4and6are separated but every neighbourhood of either contains2;not_semiregularSpace: the interior of the closure of{2, 4}contains8;not_countablyParacompactSpace: the cover by the sets of divisors has no locally finite open refinement;not_locallyRelativelyCompactSpace: the closure of every neighbourhood of2contains the even numbers, which form an infinite closed set.
Results
TopologyByExample.DivisorTopology.closure_singleton: the closure ofnis the set of its multiples;TopologyByExample.DivisorTopology.isOpen_singleton_iff: the isolated points are the primes.
References
The space is π-Base's S000049 (CC BY 4.0) and Example 57 of Counterexamples in Topology.
Tags
divisor topology, Alexandrov topology, lower set topology
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
structure DivisorTopology
TopologyByExample.DivisorTopology
The divisor topology: the natural numbers at least 2, ordered by divisibility, whose open
sets are the sets closed under taking divisors (the lower set topology).
@[ext]
structure DivisorTopology : Type where
/-- The natural number. -/
val : ℕ
/-- It is at least `2`. -/
two_le : 2 ≤ val
On this site: Space: Divisor topology
theorem val_injective
TopologyByExample.DivisorTopology.val_injective
An element is determined by its number.
theorem val_injective : Function.Injective val
Proof
:= fun _ _ ↦ DivisorTopology.ext
theorem val_pos
TopologyByExample.DivisorTopology.val_pos
Every element is positive.
theorem val_pos (a : DivisorTopology) : 0 < a.val
Proof
:= by have := a.two_le; omega
instance
The divisibility order.
instance : PartialOrder DivisorTopology
Proof
where
le a b := a.val ∣ b.val
le_refl _ := dvd_refl _
le_trans _ _ _ := dvd_trans
le_antisymm _ _ h h' := DivisorTopology.ext (Nat.dvd_antisymm h h')
theorem le_def
TopologyByExample.DivisorTopology.le_def
The order is divisibility.
theorem le_def {a b : DivisorTopology} : a ≤ b ↔ a.val ∣ b.val
Proof
:= Iff.rfl
instance
The topology whose open sets are the sets closed under taking divisors.
instance : TopologicalSpace DivisorTopology
Proof
:= Topology.lowerSet DivisorTopology
instance
The topology is the lower set topology of divisibility.
instance : Topology.IsLowerSet DivisorTopology
Proof
:= ⟨rfl⟩
instance
The divisor topology is nonempty: it contains 2.
instance : Nonempty DivisorTopology
Proof
:= ⟨⟨2, le_rfl⟩⟩
instance instCountable
TopologyByExample.DivisorTopology.instCountable
The divisor topology is countable.
instance instCountable : Countable DivisorTopology
Proof
:= val_injective.countable
instance instAlexandrovDiscrete
TopologyByExample.DivisorTopology.instAlexandrovDiscrete
The divisor topology is Alexandrov: open sets are the lower sets.
instance instAlexandrovDiscrete : AlexandrovDiscrete DivisorTopology
Proof
:= inferInstance
definition two
TopologyByExample.DivisorTopology.two
The point 2.
def two : DivisorTopology
:= ⟨2, le_rfl⟩
theorem isOpen_iff
TopologyByExample.DivisorTopology.isOpen_iff
The open sets are the sets closed under taking divisors.
theorem isOpen_iff {s : Set DivisorTopology} :
IsOpen s ↔ ∀ a b : DivisorTopology, a.val ∣ b.val → b ∈ s → a ∈ s
Proof
:=
Topology.IsLowerSet.isOpen_iff_isLowerSet.trans
⟨fun h _ _ hab hb ↦ h hab hb, fun h _ _ hab hb ↦ h _ _ hab hb⟩
theorem isOpen_Iic
TopologyByExample.DivisorTopology.isOpen_Iic
The set of divisors of a (the closed initial ray Iic a) is open.
theorem isOpen_Iic (a : DivisorTopology) : IsOpen (Iic a)
Proof
:=
Topology.IsLowerSet.isOpen_iff_isLowerSet.2 (_root_.IsLowerSet.Iic a)
theorem finite_Iic
TopologyByExample.DivisorTopology.finite_Iic
The set of divisors of a is finite.
theorem finite_Iic (a : DivisorTopology) : (Iic a).Finite
Proof
:=
((a.val.divisors.finite_toSet).preimage val_injective.injOn).subset fun _ hx ↦
Nat.mem_divisors.2 ⟨le_def.1 hx, a.val_pos.ne'⟩
theorem closure_singleton
TopologyByExample.DivisorTopology.closure_singleton
The closure of a point a is the set of its multiples.
theorem closure_singleton (a : DivisorTopology) :
closure {a} = {b : DivisorTopology | a.val ∣ b.val}
Proof
:=
Topology.IsLowerSet.closure_singleton
On this site: Divisor topology: The closure of a point is the set of its multiples
theorem isOpen_singleton_iff
TopologyByExample.DivisorTopology.isOpen_singleton_iff
The isolated points of the divisor topology are exactly the primes.
theorem isOpen_singleton_iff (a : DivisorTopology) : IsOpen ({a} : Set DivisorTopology) ↔
a.val.Prime
Proof
:= by
rw [isOpen_iff, Nat.prime_def]
refine ⟨fun h ↦ ⟨a.two_le, fun m hm ↦ ?_⟩, fun h b c hbc hc ↦ ?_⟩
· rcases Nat.lt_or_ge m 2 with hm2 | hm2
· obtain rfl | rfl : m = 0 ∨ m = 1 := by omega
· exact absurd (Nat.eq_zero_of_zero_dvd hm) a.val_pos.ne'
· exact Or.inl rfl
· exact Or.inr (congrArg val (h ⟨m, hm2⟩ a hm rfl))
· rw [mem_singleton_iff] at hc ⊢
subst hc
rcases h.2 b.val hbc with h1 | h1
· exact absurd b.two_le (by omega)
· exact DivisorTopology.ext h1
On this site: Divisor topology: The isolated points are the primes
theorem anticompactSpace
TopologyByExample.DivisorTopology.anticompactSpace
Every compact subset of the divisor topology is finite.
theorem anticompactSpace : AnticompactSpace DivisorTopology
Proof
:=
⟨fun _ hs ↦ Topology.IsLowerSet.finite_of_isCompact finite_Iic hs⟩
On this site: The divisor topology is anticompact
theorem ultraconnectedSpace
TopologyByExample.DivisorTopology.ultraconnectedSpace
The divisor topology is ultraconnected: the closures of a and b meet at a * b.
theorem ultraconnectedSpace : UltraconnectedSpace DivisorTopology
Proof
:= by
refine ⟨fun a b ↦ ⟨⟨a.val * b.val, ?_⟩, ?_, ?_⟩⟩
· have := a.two_le; have := b.two_le; nlinarith
· rw [closure_singleton]; exact Dvd.intro _ rfl
· rw [closure_singleton]; exact Dvd.intro_left _ rfl
On this site: The divisor topology is ultraconnected
instance
Divisibility is well-founded on the divisor topology: a proper divisor is smaller.
instance : WellFoundedLT DivisorTopology
Proof
:=
StrictMono.wellFoundedLT (f := val) fun _ b h ↦
lt_of_le_of_ne (Nat.le_of_dvd b.val_pos (le_def.1 h.le)) fun he ↦ h.ne (DivisorTopology.ext he)
theorem scatteredSpace
TopologyByExample.DivisorTopology.scatteredSpace
The divisor topology is scattered: a divisibility-minimal element of a nonempty set is isolated in it.
theorem scatteredSpace : ScatteredSpace DivisorTopology
Proof
:= Topology.IsLowerSet.scatteredSpace
On this site: The divisor topology is scattered
theorem not_preirreducibleSpace
TopologyByExample.DivisorTopology.not_preirreducibleSpace
The divisor topology is not hyperconnected: {2} and {3} are disjoint nonempty open
sets.
theorem not_preirreducibleSpace : ¬PreirreducibleSpace DivisorTopology
Proof
:= fun h ↦ by
let three : DivisorTopology := ⟨3, by norm_num⟩
obtain ⟨z, -, hz2, hz3⟩ := h.isPreirreducible_univ (Iic two) (Iic three) (isOpen_Iic _)
(isOpen_Iic _) ⟨two, trivial, mem_Iic.2 le_rfl⟩ ⟨three, trivial, mem_Iic.2 le_rfl⟩
have h2 : z.val ∣ 2 := hz2
have h3 : z.val ∣ 3 := hz3
have := Nat.le_of_dvd (by norm_num) h2
have hz : z.val = 2 := by have := z.two_le; omega
rw [hz] at h3
norm_num at h3
On this site: The divisor topology is not hyperconnected
theorem not_completelyNormalSpace
TopologyByExample.DivisorTopology.not_completelyNormalSpace
The divisor topology is not completely normal: {4} and {6} are separated, but every
neighbourhood of either contains 2.
theorem not_completelyNormalSpace : ¬CompletelyNormalSpace DivisorTopology
Proof
:= fun h ↦ by
let a : DivisorTopology := ⟨4, by norm_num⟩
let b : DivisorTopology := ⟨6, by norm_num⟩
have hab : Disjoint (closure {a}) {b} := by
rw [closure_singleton, disjoint_singleton_right]
change ¬(4 ∣ 6)
decide
have hba : Disjoint ({a} : Set DivisorTopology) (closure {b}) := by
rw [closure_singleton, disjoint_singleton_left]
change ¬(6 ∣ 4)
decide
have := h.completely_normal hab hba
rw [nhdsSet_singleton, nhdsSet_singleton, Topology.IsLowerSet.nhds_eq_principal_Iic,
Topology.IsLowerSet.nhds_eq_principal_Iic, disjoint_principal_principal] at this
exact this.ne_of_mem (show two ≤ a from (by decide : (2 : ℕ) ∣ 4))
(show two ≤ b from (by decide : (2 : ℕ) ∣ 6)) rfl
On this site: The divisor topology is not completely normal
theorem not_semiregularSpace
TopologyByExample.DivisorTopology.not_semiregularSpace
The divisor topology is not semiregular: the only open set containing 4 inside the set
{2, 4} of its divisors is that set, and the interior of its closure contains 8.
theorem not_semiregularSpace : ¬SemiregularSpace DivisorTopology
Proof
:= fun h ↦ by
let a : DivisorTopology := ⟨4, by norm_num⟩
let e : DivisorTopology := ⟨8, by norm_num⟩
obtain ⟨t, ht, hat, hts⟩ :=
h.isTopologicalBasis.mem_nhds_iff.1 ((isOpen_Iic a).mem_nhds (mem_Iic.2 le_rfl))
have ht' : interior (closure t) = t := ht
have hto : IsOpen t := ht' ▸ isOpen_interior
have htwo : two ∈ t :=
Topology.IsLowerSet.isOpen_iff_isLowerSet.1 hto
(show two ≤ a from (by decide : (2 : ℕ) ∣ 4)) hat
have he : e ∈ interior (closure t) := by
rw [mem_interior_iff_mem_nhds, Topology.IsLowerSet.nhds_eq_principal_Iic, mem_principal,
Topology.IsLowerSet.closure_eq_upperClosure]
intro x hx
have hx8 : x.val ∣ 8 := hx
refine mem_upperClosure.2 ⟨two, htwo, ?_⟩
change 2 ∣ x.val
obtain ⟨k, -, hk⟩ := (Nat.dvd_prime_pow Nat.prime_two).1 (show x.val ∣ 2 ^ 3 from hx8)
have hk0 : k ≠ 0 := by
rintro rfl
have := x.two_le
rw [hk, pow_zero] at this
omega
rw [hk]
exact dvd_pow_self 2 hk0
rw [ht'] at he
have : (8 : ℕ) ∣ 4 := hts he
norm_num at this
On this site: The divisor topology is not semiregular
theorem infinite_Ici_two
TopologyByExample.DivisorTopology.infinite_Ici_two
The even numbers, the multiples of 2, form an infinite set.
theorem infinite_Ici_two : (Ici two).Infinite
Proof
:=
infinite_of_injective_forall_mem (f := fun n : ℕ ↦ (⟨2 * (n + 1), by omega⟩ : DivisorTopology))
(fun m n h ↦ by have := congrArg val h; simp at this; omega)
fun n ↦ show (2 : ℕ) ∣ 2 * (n + 1) from Dvd.intro _ rfl
theorem not_countablyParacompactSpace
TopologyByExample.DivisorTopology.not_countablyParacompactSpace
The divisor topology is not countably paracompact: in a locally finite open refinement of
the countable cover by the sets of divisors every member is finite, and every member containing
an even number contains 2, so finitely many finite members would cover the even numbers.
theorem not_countablyParacompactSpace : ¬CountablyParacompactSpace DivisorTopology
Proof
:= fun h ↦ by
obtain ⟨V, hVo, hVU, hlf, hVref⟩ := h.locallyFinite_refinement (range Iic) (countable_range _)
(by rintro _ ⟨a, rfl⟩; exact isOpen_Iic a)
(eq_univ_of_forall fun x ↦ mem_sUnion.2 ⟨Iic x, mem_range_self x, mem_Iic.2 le_rfl⟩)
have hfin : ∀ v ∈ V, v.Finite := fun v hv ↦ by
obtain ⟨_, ⟨a, rfl⟩, hva⟩ := hVref v hv
exact (finite_Iic a).subset hva
obtain ⟨s, hs, hsfin⟩ := hlf two
have h2s : two ∈ s := mem_of_mem_nhds hs
refine infinite_Ici_two ((hsfin.biUnion fun i _ ↦ hfin i i.property).subset fun x hx ↦ ?_)
obtain ⟨v, hvV, hxv⟩ := mem_sUnion.1 (hVU ▸ mem_univ x)
refine mem_iUnion₂.2 ⟨⟨v, hvV⟩, ⟨two, ?_, h2s⟩, hxv⟩
exact Topology.IsLowerSet.isOpen_iff_isLowerSet.1 (hVo v hvV) hx hxv
theorem not_locallyRelativelyCompactSpace
TopologyByExample.DivisorTopology.not_locallyRelativelyCompactSpace
The divisor topology is not locally relatively compact: the closure of a neighbourhood of
2 contains the even numbers, a closed infinite set, and compact sets are finite.
theorem not_locallyRelativelyCompactSpace : ¬LocallyRelativelyCompactSpace DivisorTopology
Proof
:=
fun h ↦ by
obtain ⟨U, -, hU2, hU⟩ := h.exists_isOpen_isCompact_closure two
have hsub : Ici two ⊆ closure U := by
rw [← Topology.IsLowerSet.closure_singleton]
exact closure_mono (singleton_subset_iff.2 hU2)
have hK : IsCompact (Ici two) := hU.of_isClosed_subset
(Topology.IsLowerSet.closure_singleton (a := two) ▸ isClosed_closure) hsub
exact infinite_Ici_two (anticompactSpace.finite_of_isCompact _ hK)
On this site: The divisor topology is not locally relatively compact