Lean library · module TopologyByExample.Spaces.BaireMetricC

The Baire space of weight continuum

Source file

The countable power ℕ → WithDiscreteTopology ℝ of the real numbers with the discrete topology. Its row of properties follows from the transfer theorems of the countable power; this file proves the results about its metric shown on its page:

Both come from Mathlib's PiNat metric on countable products of discrete spaces.

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

definition Space

TopologyByExample.BaireMetricC.Space

The space: sequences of reals, each coordinate carrying the discrete topology.

abbrev Space : Type
:= ℕ → WithDiscreteTopology ℝ

definition baireDist

TopologyByExample.BaireMetricC.baireDist

The Baire metric: the distance between distinct sequences is (1/2)^n, where n is the first index at which they differ, and the distance from a sequence to itself is 0.

noncomputable def baireDist (x y : Space) : ℝ
:=
  if x = y then 0 else (1 / 2 : ℝ) ^ PiNat.firstDiff x y
attribute [local instance] PiNat.dist in

theorem baireDist_eq_dist

TopologyByExample.BaireMetricC.baireDist_eq_dist

baireDist is the distance PiNat.dist of Mathlib's metric on countable products of discrete spaces.

theorem baireDist_eq_dist (x y : Space) : baireDist x y = dist x y
Proof
:= by
  by_cases h : x = y
  · subst h
    simp [baireDist, PiNat.dist_self]
  · simp [baireDist, h, PiNat.dist_eq_of_ne h]

theorem exists_metricSpace_baireDist

TopologyByExample.BaireMetricC.exists_metricSpace_baireDist

The Baire metric is a metric whose open sets are exactly those of the product topology: there is a metric space structure on the sequences whose distance is baireDist and whose topology is the product topology.

theorem exists_metricSpace_baireDist :
    ∃ m : MetricSpace Space, (∀ x y, m.dist x y = baireDist x y) ∧
      m.toUniformSpace.toTopologicalSpace = (inferInstance : TopologicalSpace Space)
Proof
:=
  ⟨PiNat.metricSpace, fun x y ↦ (baireDist_eq_dist x y).symm, rfl⟩

On this site: Countable power of an uncountable discrete space: The Baire metric induces the topology

theorem baireDist_le_max

TopologyByExample.BaireMetricC.baireDist_le_max

The Baire metric is an ultrametric: d(x, z) ≤ max (d(x, y)) (d(y, z)).

theorem baireDist_le_max (x y z : Space) :
    baireDist x z ≤ max (baireDist x y) (baireDist y z)
Proof
:= by
  simp only [baireDist_eq_dist]
  exact PiNat.dist_triangle_nonarch x y z

On this site: Countable power of an uncountable discrete space: The Baire metric is an ultrametric

On this site: Space: Countable power of an uncountable discrete space