Lean library · module TopologyByExample.Spaces.CompleteErdosSpace
A complete Erdős-type space
The allowed coordinates are zero and the nonnegative powers of one half.
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.
definition dyadicValues
TopologyByExample.dyadicValues
The convergent sequence of positive dyadic values, together with its limit.
def dyadicValues : Set ℝ
:= insert 0 (range fun n : ℕ ↦ (1 / 2 : ℝ) ^ n)
theorem isClosed_dyadicValues
TopologyByExample.isClosed_dyadicValues
The permitted coordinate values form a closed subset of the real line.
theorem isClosed_dyadicValues : IsClosed dyadicValues
Proof
:=
(tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0 : ℝ) ≤ 1 / 2)
(by norm_num : (1 / 2 : ℝ) < 1)).isCompact_insert_range.isClosed
definition CompleteErdosSpace
TopologyByExample.CompleteErdosSpace
Square-summable sequences with zero or positive dyadic coordinates.
def CompleteErdosSpace
:= {x : ℓ²(ℕ, ℝ) // ∀ n, x n ∈ dyadicValues}
instance
instance : MetricSpace CompleteErdosSpace
Proof
:= inferInstanceAs (MetricSpace (Subtype _))
theorem isClosed_carrier
TopologyByExample.CompleteErdosSpace.isClosed_carrier
The defining coordinate conditions are closed in Hilbert space.
theorem isClosed_carrier : IsClosed {x : ℓ²(ℕ, ℝ) | ∀ n, x n ∈ dyadicValues}
Proof
:= by
simp only [ofPred_forall]
exact isClosed_iInter fun n ↦ isClosed_dyadicValues.preimage
(lp.evalCLM ℝ (fun _ : ℕ ↦ ℝ) 2 n).continuous
instance
instance : CompleteSpace CompleteErdosSpace
Proof
:= by
have : IsClosed {x : ℓ²(ℕ, ℝ) | ∀ n, x n ∈ dyadicValues} := isClosed_carrier
exact this.isComplete.completeSpace_coe
instance
instance : Zero CompleteErdosSpace
Proof
:= ⟨⟨0, fun _ ↦ by simp [dyadicValues]⟩⟩
definition inclusion
TopologyByExample.CompleteErdosSpace.inclusion
Inclusion into the rational-coordinate Erdős space.
def inclusion (x : CompleteErdosSpace) : ErdosSpace
Definition
:= ⟨x.val, fun n ↦ by
rcases x.property n with h | ⟨m, hm⟩
· exact ⟨0, by simpa using h⟩
· exact ⟨(1 / 2 : ℚ) ^ m, by simpa using hm.symm⟩⟩
theorem isometry_inclusion
TopologyByExample.CompleteErdosSpace.isometry_inclusion
Inclusion preserves the Hilbert metric.
theorem isometry_inclusion : Isometry inclusion
Proof
:= fun _ _ ↦ rfl
instance
instance : SecondCountableTopology CompleteErdosSpace
Proof
:=
isometry_inclusion.isEmbedding.isInducing.secondCountableTopology
theorem inclusion_zero
TopologyByExample.CompleteErdosSpace.inclusion_zero
@[simp] theorem inclusion_zero : inclusion 0 = 0
Proof
:= rfl
instance
instance : TotallySeparatedSpace CompleteErdosSpace
Proof
:= by
apply totallySeparatedSpace_iff_exists_isClopen.mpr
intro x y hxy
obtain ⟨U, hU, hx, hy⟩ := exists_isClopen_of_totally_separated
(isometry_inclusion.injective.ne hxy)
exact ⟨inclusion ⁻¹' U, hU.preimage isometry_inclusion.continuous, hx, hy⟩
definition append
TopologyByExample.CompleteErdosSpace.append
Append a dyadic value in a coordinate that is currently zero.
def append (x : CompleteErdosSpace) (n m : ℕ) (hx : x.val n = 0) : CompleteErdosSpace
theorem inclusion_append
TopologyByExample.CompleteErdosSpace.inclusion_append
@[simp] theorem inclusion_append (x : CompleteErdosSpace) (n m : ℕ) (hx : x.val n = 0) :
inclusion (append x n m hx) = inclusion x + ErdosSpace.single n ((1 / 2 : ℚ) ^ m)
Proof
:= by
apply Subtype.ext
simp [inclusion, append, ErdosSpace.single]
theorem tendsto_append
TopologyByExample.CompleteErdosSpace.tendsto_append
Dyadic appends tend to the original point.
theorem tendsto_append (x : CompleteErdosSpace) (n : ℕ) (hx : x.val n = 0) :
Tendsto (fun m ↦ append x n m hx) atTop (𝓝 x)
Proof
:= by
apply isometry_inclusion.isEmbedding.tendsto_nhds_iff.mpr
have hpow : Tendsto (fun m : ℕ ↦ (1 / 2 : ℚ) ^ m) atTop (𝓝 0) :=
tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num)
simpa only [Function.comp_def, inclusion_append, ErdosSpace.single_zero, add_zero] using
(ErdosSpace.continuous_line (inclusion x) n).continuousAt.tendsto.comp hpow
theorem exists_dyadic_append
TopologyByExample.CompleteErdosSpace.exists_dyadic_append
An open neighbourhood contains a dyadic append in any currently zero coordinate.
theorem exists_dyadic_append {U : Set CompleteErdosSpace} (hU : IsOpen U)
{x : CompleteErdosSpace} (hxU : x ∈ U) (n : ℕ) (hx : x.val n = 0) :
∃ m : ℕ, append x n m hx ∈ U
Proof
:=
((tendsto_append x n hx).eventually (hU.mem_nhds hxU)).exists
definition binaryPoint
TopologyByExample.CompleteErdosSpace.binaryPoint
Binary sequences give points with geometrically decreasing coordinates.
def binaryPoint (b : ℕ → Bool) : CompleteErdosSpace
Definition
:=
⟨ErdosSpace.inclusion (ErdosSpace.binaryPoint b), fun n ↦ by
rw [ErdosSpace.binaryPoint_apply]
cases h : b n
· exact Or.inl rfl
· exact Or.inr ⟨n, rfl⟩⟩
theorem inclusion_binaryPoint
TopologyByExample.CompleteErdosSpace.inclusion_binaryPoint
@[simp] theorem inclusion_binaryPoint (b : ℕ → Bool) :
inclusion (binaryPoint b) = ErdosSpace.binaryPoint b
Proof
:= rfl
theorem binaryPoint_injective
TopologyByExample.CompleteErdosSpace.binaryPoint_injective
Distinct binary sequences determine distinct points.
theorem binaryPoint_injective : Function.Injective binaryPoint
Proof
:= by
intro b c h
apply ErdosSpace.binaryPoint_injective
simpa only [inclusion_binaryPoint] using congrArg inclusion h
theorem cardinalityContinuum
TopologyByExample.CompleteErdosSpace.cardinalityContinuum
The complete Erdős-type space has cardinality continuum.
theorem cardinalityContinuum : CardinalityContinuum CompleteErdosSpace
Proof
:= by
apply le_antisymm cardinal_mk_le_continuum_of_secondCountable_t0
have h := Cardinal.mk_le_of_injective binaryPoint_injective
simpa only [Cardinal.mk_arrow, Cardinal.mk_bool, Cardinal.mk_nat,
Cardinal.lift_ofNat, Cardinal.lift_aleph0, Cardinal.two_power_aleph0] using h