Lean library · module TopologyByExample.Spaces.CompleteErdosBoundedClopen

Bounded clopen obstructions 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

theorem not_clopen_bounded_zero

TopologyByExample.CompleteErdosSpace.not_clopen_bounded_zero

A clopen neighbourhood of zero cannot be bounded.

theorem not_clopen_bounded_zero {U : Set CompleteErdosSpace} (hU : IsClopen U) (h0 : 0 ∈ U)
    (R : ℝ) (hb : ∀ x ∈ U, ‖inclusion x‖ ≤ R) : False
Proof
:= by
  classical
  let State (n : ℕ) := {x : U // ∀ k, n ≤ k → x.val.val k = 0}
  let pick (n : ℕ) (x : State n) := Nat.find
    (exists_dyadic_append hU.isOpen x.val.property n (x.property n le_rfl))
  let next (n : ℕ) (x : State n) : State (n + 1) :=
    ⟨⟨append x.val.val n (pick n x) (x.property n le_rfl), Nat.find_spec
      (exists_dyadic_append hU.isOpen x.val.property n (x.property n le_rfl))⟩, by
      intro k hk
      have hkn : k ≠ n := by omega
      change x.val.val.val k +
        Pi.single (M := fun _ : ℕ ↦ ℝ) n ((1 / 2 : ℝ) ^ pick n x) k = 0
      simp [hkn, x.property k (by omega)]⟩
  let u : (n : ℕ) → State n := Nat.rec ⟨⟨0, h0⟩, fun _ _ ↦ rfl⟩ next
  let m : ℕ → ℕ := fun n ↦ pick n (u n)
  let q : ℕ → ℚ := fun n ↦ (1 / 2 : ℚ) ^ m n
  have hu : ∀ n, inclusion (u n).val.val = initialSum q n := by
    intro n
    induction n with
    | zero => simp [u]
    | succ n ih =>
      change inclusion (append (u n).val.val n (m n) ((u n).property n le_rfl)) =
        initialSum q (n + 1)
      rw [inclusion_append, ih, partial_succ]
  obtain ⟨x, _, hlim⟩ := ErdosSpace.exists_limit_of_bounded_partial q R
    (fun n ↦ hu n ▸ hb (u n).val.val (u n).val.property)
  have hshift : Tendsto (fun n ↦ initialSum q (n + 1)) atTop (𝓝 x) :=
    hlim.comp (tendsto_add_atTop_nat 1)
  have hterm : Tendsto (fun n ↦ single n (q n)) atTop (𝓝 0) := by
    simpa only [partial_succ, add_sub_cancel_left, sub_self] using hshift.sub hlim
  have hm : ∀ᶠ n in atTop, m n ≠ 0 := by
    have hn := (tendsto_order.mp hterm.norm).2 1 (by simp)
    filter_upwards [hn] with n hn
    intro he
    change ‖single n (q n)‖ < 1 at hn
    rw [ErdosSpace.norm_single] at hn
    simp [q, he] at hn
  have hout : ∀ᶠ n in atTop, initialSum q n + single n (2 * q n) ∈ inclusion '' Uᶜ := by
    filter_upwards [hm] with n hmn
    obtain ⟨k, hk⟩ := Nat.exists_eq_succ_of_ne_zero hmn
    have hp : (1 / 2 : ℚ) ^ k = 2 * q n := by
      dsimp [q]
      rw [hk, pow_succ]
      ring
    have hf := Nat.find_min
      (exists_dyadic_append hU.isOpen (u n).val.property n ((u n).property n le_rfl))
      (show k < pick n (u n) by change k < m n; omega)
    refine ⟨append (u n).val.val n k ((u n).property n le_rfl), hf, ?_⟩
    rw [inclusion_append, hu, hp]
  have hx : x ∈ inclusion '' U :=
    (isometry_inclusion.isClosedEmbedding.isClosedMap U hU.isClosed).mem_of_tendsto hlim
      (Eventually.of_forall fun n ↦ ⟨(u n).val.val, (u n).val.property, hu n⟩)
  have hlim' : Tendsto (fun n ↦ initialSum q n + single n (2 * q n)) atTop (𝓝 x) := by
    have he : ∀ n, initialSum q n + single n (2 * q n) =
        initialSum q (n + 1) + single n (q n) := by
      intro n
      rw [two_mul, ErdosSpace.single_add, partial_succ, add_assoc]
    simpa only [he, add_zero] using hshift.add hterm
  have hx' : x ∈ inclusion '' Uᶜ :=
    (isometry_inclusion.isClosedEmbedding.isClosedMap Uᶜ hU.compl.isClosed).mem_of_tendsto
      hlim' hout
  obtain ⟨y, hy, hye⟩ := hx
  obtain ⟨z, hz, hze⟩ := hx'
  exact hz (isometry_inclusion.injective (hye.trans hze.symm) ▸ hy)