Lean library · module TopologyByExample.Spaces.CompleteErdosTruncation

Finite-coordinate approximations in complete Erdős space

Source file

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 truncate

TopologyByExample.CompleteErdosSpace.truncate

Retain the first coordinates and replace the rest by zero.

def truncate (n : ℕ) (x : CompleteErdosSpace) : CompleteErdosSpace
Definition
:=
  ⟨∑ i ∈ Finset.range n, lp.single 2 i (x.val i), fun k ↦ by
    have he : (∑ i ∈ Finset.range n, lp.single 2 i (x.val i)) k =
        if k < n then x.val k else 0 := by
      change (∑ i ∈ Finset.range n, (lp.single 2 i (x.val i) : ℓ²(ℕ, ℝ))) k = _
      simp only [lp.coeFn_sum, Finset.sum_apply, lp.single_apply]
      simp
    rw [he]
    split_ifs
    · exact x.property k
    · exact Or.inl rfl⟩

theorem truncate_apply

TopologyByExample.CompleteErdosSpace.truncate_apply

@[simp] theorem truncate_apply (n : ℕ) (x : CompleteErdosSpace) (k : ℕ) :
    (truncate n x).val k = if k < n then x.val k else 0
Proof
:= by
  change (∑ i ∈ Finset.range n, (lp.single 2 i (x.val i) : ℓ²(ℕ, ℝ))) k = _
  simp only [lp.coeFn_sum, Finset.sum_apply, lp.single_apply]
  simp

theorem continuous_truncate

TopologyByExample.CompleteErdosSpace.continuous_truncate

Finite-coordinate truncation is continuous.

theorem continuous_truncate (n : ℕ) : Continuous (truncate n)
Proof
:= by
  apply Continuous.subtype_mk
  apply continuous_finsetSum
  intro i _
  exact (lp.isometry_single (p := 2) i).continuous.comp
    ((lp.evalCLM ℝ (fun _ : ℕ ↦ ℝ) 2 i).continuous.comp continuous_subtypeVal)

theorem tendsto_truncate

TopologyByExample.CompleteErdosSpace.tendsto_truncate

Truncations converge in the Hilbert metric.

theorem tendsto_truncate (x : CompleteErdosSpace) :
    Tendsto (fun n ↦ truncate n x) atTop (𝓝 x)
Proof
:= by
  apply tendsto_subtype_rng.mpr
  exact (lp.hasSum_single (p := 2) (by norm_num) x.val).tendsto_sum_nat

theorem norm_coordinate_le_one

TopologyByExample.CompleteErdosSpace.norm_coordinate_le_one

Each allowed coordinate has norm at most one.

theorem norm_coordinate_le_one (x : CompleteErdosSpace) (k : ℕ) : ‖x.val k‖ ≤ 1
Proof
:= by
  rcases x.property k with h | ⟨m, hm⟩
  · rw [h, norm_zero]
    norm_num
  · rw [← hm, norm_pow]
    exact pow_le_one₀ (norm_nonneg _) (by norm_num)

theorem norm_truncate_le

TopologyByExample.CompleteErdosSpace.norm_truncate_le

Truncated points have a norm bound depending only on the number of coordinates.

theorem norm_truncate_le (n : ℕ) (x : CompleteErdosSpace) : ‖(truncate n x).val‖ ≤ n
Proof
:= by
  calc
    _ ≤ ∑ i ∈ Finset.range n, ‖lp.single (E := fun _ : ℕ ↦ ℝ) 2 i (x.val i)‖ :=
      norm_sum_le _ _
    _ ≤ ∑ _i ∈ Finset.range n, (1 : ℝ) := by
      apply Finset.sum_le_sum
      intro i _
      rw [lp.norm_single (by norm_num)]
      exact norm_coordinate_le_one x i
    _ = n := by simp

definition replacePrefix

TopologyByExample.CompleteErdosSpace.replacePrefix

Replace an initial coordinate segment by that of a fixed point.

def replacePrefix (n : ℕ) (a x : CompleteErdosSpace) : CompleteErdosSpace
Definition
:=
  ⟨(truncate n a).val + x.val - (truncate n x).val, fun k ↦ by
    change (truncate n a).val k + x.val k - (truncate n x).val k ∈ dyadicValues
    by_cases hk : k < n
    · simpa [truncate_apply, hk] using a.property k
    · simpa [truncate_apply, hk] using x.property k⟩

theorem continuous_replacePrefix

TopologyByExample.CompleteErdosSpace.continuous_replacePrefix

Replacing finitely many coordinates is continuous.

theorem continuous_replacePrefix (n : ℕ) (a : CompleteErdosSpace) :
    Continuous (replacePrefix n a)
Proof
:= by
  apply Continuous.subtype_mk
  exact (continuous_const.add continuous_subtypeVal).sub
    (continuous_subtypeVal.comp (continuous_truncate n))

theorem replacePrefix_zero

TopologyByExample.CompleteErdosSpace.replacePrefix_zero

@[simp] theorem replacePrefix_zero (n : ℕ) (a : CompleteErdosSpace) :
    replacePrefix n a 0 = truncate n a
Proof
:= by
  apply Subtype.ext
  apply lp.ext
  funext k
  have hz : (0 : CompleteErdosSpace).val k = 0 := rfl
  simp [replacePrefix, truncate_apply, hz]

theorem norm_le_replacePrefix

TopologyByExample.CompleteErdosSpace.norm_le_replacePrefix

The original norm is bounded by the replaced norm and two finite-coordinate bounds.

theorem norm_le_replacePrefix (n : ℕ) (a x : CompleteErdosSpace) :
    ‖x.val‖ ≤ ‖(replacePrefix n a x).val‖ + ‖(truncate n a).val‖ + n
Proof
:= by
  calc
    ‖x.val‖ = ‖((replacePrefix n a x).val - (truncate n a).val) +
        (truncate n x).val‖ := by congr 1; dsimp [replacePrefix]; abel
    _ ≤ ‖(replacePrefix n a x).val - (truncate n a).val‖ + ‖(truncate n x).val‖ :=
      norm_add_le _ _
    _ ≤ (‖(replacePrefix n a x).val‖ + ‖(truncate n a).val‖) + n :=
      add_le_add (norm_sub_le _ _) (norm_truncate_le n x)

theorem not_clopen_bounded

TopologyByExample.CompleteErdosSpace.not_clopen_bounded

Every nonempty clopen set in complete dyadic Erdős space is unbounded.

theorem not_clopen_bounded {U : Set CompleteErdosSpace} (hU : IsClopen U)
    (hne : U.Nonempty) (R : ℝ) (hb : ∀ x ∈ U, ‖inclusion x‖ ≤ R) : False
Proof
:= by
  obtain ⟨a, ha⟩ := hne
  obtain ⟨n, hn⟩ := ((tendsto_truncate a).eventually (hU.isOpen.mem_nhds ha)).exists
  let V : Set CompleteErdosSpace := replacePrefix n a ⁻¹' U
  have hV : IsClopen V := hU.preimage (continuous_replacePrefix n a)
  have hzero : (0 : CompleteErdosSpace) ∈ V := by simpa [V] using hn
  apply not_clopen_bounded_zero hV hzero (R + ‖(truncate n a).val‖ + n)
  intro x hx
  have hbound := hb (replacePrefix n a x) hx
  change ‖(replacePrefix n a x).val‖ ≤ R at hbound
  change ‖x.val‖ ≤ _
  exact (norm_le_replacePrefix n a x).trans (by gcongr)

theorem exists_norm_gt_of_isClopen

TopologyByExample.CompleteErdosSpace.exists_norm_gt_of_isClopen

A nonempty clopen set contains points of arbitrarily large norm.

theorem exists_norm_gt_of_isClopen {U : Set CompleteErdosSpace} (hU : IsClopen U)
    (hne : U.Nonempty) (R : ℝ) : ∃ x ∈ U, R < ‖inclusion x‖
Proof
:= by
  by_contra h
  push Not at h
  exact not_clopen_bounded hU hne R h

On this site: Complete Erdős space: Nonempty clopen sets are unbounded