Lean library · module TopologyByExample.Spaces.CompleteErdos
The reciprocal-coordinate model of complete Erdős space
We take the closed subspace of real ℓ² whose coordinates are zero or reciprocals of
positive integers. ErdosClosure identifies it with the closure of the strictly
positive reciprocal-coordinate subspace.
This file was written by Codex (OpenAI's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.
Imports
definition coordinates
TopologyByExample.CompleteErdos.coordinates
The allowed coordinates, including their limit zero.
def coordinates : Set ℝ
:= insert 0 (range fun n : ℕ ↦ 1 / ((n : ℝ) + 1))
theorem isCompact_coordinates
TopologyByExample.CompleteErdos.isCompact_coordinates
The coordinate alphabet is compact.
theorem isCompact_coordinates : IsCompact coordinates
Proof
:=
tendsto_one_div_add_atTop_nhds_zero_nat.isCompact_insert_range
theorem countable_coordinates
TopologyByExample.CompleteErdos.countable_coordinates
The coordinate alphabet is countable.
theorem countable_coordinates : coordinates.Countable
Proof
:=
(countable_range _).insert _
definition Ambient
TopologyByExample.CompleteErdos.Ambient
The ambient real Hilbert sequence space.
abbrev Ambient : Type
:= lp (fun _ : ℕ ↦ ℝ) (2 : ℝ≥0∞)
definition carrier
TopologyByExample.CompleteErdos.carrier
The reciprocal-coordinate subset of the Hilbert sequence space.
def carrier : Set Ambient
:= {x | ∀ n, x n ∈ coordinates}
theorem isClosed_carrier
TopologyByExample.CompleteErdos.isClosed_carrier
Coordinate restrictions define a closed subset in the norm topology.
theorem isClosed_carrier : IsClosed carrier
Proof
:= by
simpa only [carrier, ofPred_forall, preimage, Function.comp_def] using
isClosed_iInter fun n ↦ isCompact_coordinates.isClosed.preimage
((continuous_apply n).comp
(lp.uniformContinuous_coe (E := fun _ : ℕ ↦ ℝ) (p := 2)).continuous)
definition CompleteErdos
TopologyByExample.CompleteErdos
The reciprocal-coordinate model of complete Erdős space.
def CompleteErdos
:= CompleteErdos.carrier
On this site: Space: Complete Erdős space
instance
noncomputable instance : MetricSpace CompleteErdos
Proof
:=
inferInstanceAs (MetricSpace carrier)
instance
instance : CompleteSpace CompleteErdos
Proof
:=
isClosed_carrier.completeSpace_coe
definition origin
TopologyByExample.CompleteErdos.origin
Zero belongs to the reciprocal-coordinate model.
def origin : CompleteErdos
:= ⟨0, fun _ ↦ Or.inl rfl⟩
instance
instance : Nonempty CompleteErdos
Proof
:= ⟨origin⟩
theorem continuous_coordinate
TopologyByExample.CompleteErdos.continuous_coordinate
Evaluation on complete Erdős space is continuous for every coordinate.
theorem continuous_coordinate (n : ℕ) :
Continuous (fun x : CompleteErdos ↦ (x.val : Ambient) n)
Proof
:=
((continuous_apply n).comp
(lp.uniformContinuous_coe (E := fun _ : ℕ ↦ ℝ) (p := 2)).continuous).comp
continuous_subtypeVal
instance
Distinct points can be separated by their coordinates.
instance : TotallyDisconnectedSpace CompleteErdos
Proof
:= by
rw [totallyDisconnectedSpace_iff]
intro s _ hs x hx y hy
apply Subtype.ext
apply lp.ext
funext n
exact countable_coordinates.isTotallyDisconnected _
(by rintro _ ⟨z, _, rfl⟩; exact z.property n)
(hs.image _ (continuous_coordinate n).continuousOn)
(mem_image_of_mem _ hx) (mem_image_of_mem _ hy)
definition finiteStage
TopologyByExample.CompleteErdos.finiteStage
Points supported in the first n coordinates.
def finiteStage (n : ℕ) : Set CompleteErdos
:= {x | ∀ i, n ≤ i → x.val i = 0}
theorem countable_finiteStage
TopologyByExample.CompleteErdos.countable_finiteStage
Each finite-coordinate stage is countable.
theorem countable_finiteStage (n : ℕ) : (finiteStage n).Countable
Proof
:= by
have : Countable coordinates := countable_coordinates.to_subtype
let f : finiteStage n → (Fin n → coordinates) :=
fun x i ↦ ⟨x.val.val i, x.val.property i⟩
have hf : Function.Injective f := by
intro x y h
apply Subtype.ext
apply Subtype.ext
apply lp.ext
funext i
by_cases hi : i < n
· exact congrArg Subtype.val (congrFun h ⟨i, hi⟩)
· exact (x.property i (Nat.le_of_not_gt hi)).trans
(y.property i (Nat.le_of_not_gt hi)).symm
have : Countable (finiteStage n) := hf.countable
exact to_countable _
definition truncate
TopologyByExample.CompleteErdos.truncate
The truncation of a point to its first n coordinates.
def truncate (x : CompleteErdos) (n : ℕ) : CompleteErdos
theorem truncate_mem_finiteStage
TopologyByExample.CompleteErdos.truncate_mem_finiteStage
Truncations have the prescribed finite support.
theorem truncate_mem_finiteStage (x : CompleteErdos) (n : ℕ) :
truncate x n ∈ finiteStage n
theorem tendsto_truncate
TopologyByExample.CompleteErdos.tendsto_truncate
Finite truncations converge in the norm topology.
theorem tendsto_truncate (x : CompleteErdos) :
Tendsto (truncate x) atTop (𝓝 x)
Proof
:= by
apply tendsto_subtype_rng.mpr
exact (lp.hasSum_single (by norm_num : (2 : ℝ≥0∞) ≠ ⊤) x.val).tendsto_sum_nat
theorem dense_finiteStages
TopologyByExample.CompleteErdos.dense_finiteStages
The union of the finite-coordinate stages is dense.
theorem dense_finiteStages : Dense (⋃ n, finiteStage n)
Proof
:= by
intro x
exact mem_closure_of_tendsto (tendsto_truncate x) (.of_forall fun n ↦
mem_iUnion.mpr ⟨n, truncate_mem_finiteStage x n⟩)
instance
instance : SeparableSpace CompleteErdos
Proof
:=
⟨⟨_, countable_iUnion countable_finiteStage, dense_finiteStages⟩⟩