Lean library · module TopologyByExample.Spaces.OpcRationals

The one-point compactification of the rationals

Source file

The one-point compactification OnePoint ℚ of the rationals is compact and T₁ but not Hausdorff, since ℚ is not weakly locally compact. Its distinctive feature is that every neighbourhood of the point at infinity is dense, because every compact subset of ℚ has empty interior. From this:

The space is not first countable (Mathlib's Rat.not_firstCountableTopology_opc), but it is sequentially compact, as is the one-point compactification of every first countable space.

The general statements used here (dense neighbourhoods, connectedness and sequential compactness of one-point compactifications) are in TopologyByExample/Theorems/OnePointCompactification.lean.

Tags

one-point compactification, rational numbers, strongly connected, dispersion point, semiregular

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

The one-point compactification of the rationals

theorem dense_of_mem_nhds_infty

TopologyByExample.OpcRationals.dense_of_mem_nhds_infty

Every neighbourhood of the point at infinity of OnePoint ℚ is dense, since every compact subset of ℚ has empty interior.

theorem dense_of_mem_nhds_infty {s : Set (OnePoint ℚ)} (hs : s ∈ 𝓝 (∞ : OnePoint ℚ)) :
    Dense s
Proof
:=
  forall_mem_nhds_infty_dense_iff.2 (fun _ _ hK ↦ Rat.interior_compact_eq_empty hK) s hs

On this site: One-point compactification of the rationals: Every neighbourhood of \(\infty\) is dense

theorem apply_eq_apply

TopologyByExample.OpcRationals.apply_eq_apply

Every continuous map from OnePoint ℚ to a Hausdorff space is constant.

theorem apply_eq_apply {Y : Type*} [TopologicalSpace Y] [T2Space Y] {f : OnePoint ℚ → Y}
    (hf : Continuous f) (x y : OnePoint ℚ) : f x = f y
Proof
:=
  (apply_eq_of_forall_mem_nhds_dense (fun _ ↦ dense_of_mem_nhds_infty) hf x).trans
    (apply_eq_of_forall_mem_nhds_dense (fun _ ↦ dense_of_mem_nhds_infty) hf y).symm

On this site: One-point compactification of the rationals: Continuous maps to Hausdorff spaces are constant

instance stronglyConnectedSpace

TopologyByExample.OpcRationals.stronglyConnectedSpace

OnePoint ℚ is strongly connected: every continuous real function on it is constant.

instance stronglyConnectedSpace : StronglyConnectedSpace (OnePoint ℚ)
Proof
:=
  ⟨fun f x y ↦ apply_eq_apply f.continuous x y⟩

On this site: The one-point compactification of the rationals is strongly connected

theorem not_semiregularSpace

TopologyByExample.OpcRationals.not_semiregularSpace

OnePoint ℚ is not semiregular: the only regular open set containing the point at infinity is the whole space, which does not lie in the neighbourhood that omits 0.

theorem not_semiregularSpace : ¬SemiregularSpace (OnePoint ℚ)
Proof
:=
  not_semiregularSpace_of_forall_mem_nhds_dense (x := ∞) (fun _ ↦ dense_of_mem_nhds_infty)
    (isOpen_compl_singleton.mem_nhds (infty_ne_coe (0 : ℚ)))
    (compl_ne_univ.2 (singleton_nonempty _))

On this site: The one-point compactification of the rationals is not semiregular

theorem not_firstCountableTopology

TopologyByExample.OpcRationals.not_firstCountableTopology

OnePoint ℚ is not first countable (Mathlib's Rat.not_firstCountableTopology_opc).

theorem not_firstCountableTopology : ¬FirstCountableTopology (OnePoint ℚ)
Proof
:=
  Rat.not_firstCountableTopology_opc

On this site: The one-point compactification of the rationals is not first countable

instance seqCompactSpace

TopologyByExample.OpcRationals.seqCompactSpace

OnePoint ℚ is sequentially compact, as the one-point compactification of a first countable space.

instance seqCompactSpace : SeqCompactSpace (OnePoint ℚ)
Proof
:=
  seqCompactSpace_onePoint_of_firstCountableTopology

instance nontrivial

TopologyByExample.OpcRationals.nontrivial

OnePoint ℚ has at least two points.

instance nontrivial : Nontrivial (OnePoint ℚ)
Proof
:=
  inferInstanceAs (Nontrivial (Option ℚ))

instance countable

TopologyByExample.OpcRationals.countable

OnePoint ℚ is countable.

instance countable : Countable (OnePoint ℚ)
Proof
:=
  inferInstanceAs (Countable (Option ℚ))

On this site: The one-point compactification of the rationals is countable

theorem not_hasIsolatedPoint

TopologyByExample.OpcRationals.not_hasIsolatedPoint

OnePoint ℚ has no isolated point: a rational is not isolated in ℚ, and the point at infinity is not isolated since its neighbourhoods are dense.

theorem not_hasIsolatedPoint : ¬HasIsolatedPoint (OnePoint ℚ)
Proof
:= by
  rintro ⟨x, hx⟩
  cases x with
  | infty =>
    obtain ⟨z, ⟨q, rfl⟩, hz⟩ := (dense_of_mem_nhds_infty (hx.mem_nhds rfl)).inter_open_nonempty
      (range ((↑) : ℚ → OnePoint ℚ)) isOpen_range_coe ⟨_, 0, rfl⟩
    exact coe_ne_infty q hz
  | coe q =>
    refine Rationals.not_hasIsolatedPoint ⟨q, isOpen_image_coe.1 ?_⟩
    rwa [image_singleton]

On this site: The one-point compactification of the rationals has no isolated point

theorem dispersion_point

TopologyByExample.OpcRationals.dispersion_point

The point at infinity is a dispersion point of OnePoint ℚ: the space is connected, and every connected subset that does not contain the point at infinity has at most one point.

theorem dispersion_point : PreconnectedSpace (OnePoint ℚ) ∧
    ∀ s : Set (OnePoint ℚ), ∞ ∉ s → IsPreconnected s → s.Subsingleton
Proof
:= by
  refine ⟨preconnectedSpace_onePoint_iff.2 fun K hK hKc ↦ ?_, fun s hs hpre ↦ ?_⟩
  · rw [← hK.isOpen.interior_eq]
    exact Rat.interior_compact_eq_empty hKc
  · have hrange : s ⊆ range ((↑) : ℚ → OnePoint ℚ) := fun z hz ↦ by
      cases z with
      | infty => exact absurd hz hs
      | coe q => exact ⟨q, rfl⟩
    rw [← image_preimage_eq_of_subset hrange] at hpre ⊢
    exact ((isOpenEmbedding_coe.isInducing.isPreconnected_image.1 hpre).subsingleton).image _

On this site: One-point compactification of the rationals: The point \(\infty\) is a dispersion point

On this site: Space: One-point compactification of the rationals