Lean library · module TopologyByExample.Spaces.BoxRealFibres

Fibres of the real nabla quotient

Source file

Replacing a finite prefix is continuous jointly in the new finite prefix and the old box sequence. Each eventual-equality class is a countable union of continuous images of finite-dimensional real spaces, and is Lindelof.

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 replacePrefix

TopologyByExample.BoxRealPower.replacePrefix

Replace the first N coordinates and retain the remaining coordinates.

def replacePrefix (N : ℕ) (v : Fin N → ℝ) (x : Space) : Space
:=
  ⟨fun n ↦ if h : n < N then v ⟨n, h⟩ else x.coord n⟩

theorem continuous_replacePrefix

TopologyByExample.BoxRealPower.continuous_replacePrefix

Finite-prefix replacement is jointly continuous for the box topology.

theorem continuous_replacePrefix (N : ℕ) :
    Continuous (fun p : (Fin N → ℝ) × Space ↦ replacePrefix N p.1 p.2)
Proof
:= by
  apply basis.continuous_iff.mpr
  rintro B ⟨U, hU, rfl⟩
  let V : ℕ → Set ℝ := fun n ↦ if n < N then univ else U n
  have he : (fun p : (Fin N → ℝ) × Space ↦ replacePrefix N p.1 p.2) ⁻¹' box U =
      (Set.pi univ fun i : Fin N ↦ U i) ×ˢ box V := by
    ext p
    constructor
    · intro hp
      constructor
      · intro i _
        simpa [replacePrefix, i.isLt] using hp i
      · intro n
        dsimp [V]
        split_ifs with hn
        · trivial
        · simpa [replacePrefix, hn] using hp n
    · rintro ⟨hv, hx⟩ n
      change (if h : n < N then p.1 ⟨n, h⟩ else p.2.coord n) ∈ U n
      split_ifs with hn
      · exact hv ⟨n, hn⟩ (mem_univ _)
      · simpa [V, hn] using hx n
  rw [he]
  apply (isOpen_set_pi finite_univ fun (i : Fin N) _ ↦ hU i).prod
  apply isOpen_box
  intro n
  dsimp [V]
  split_ifs
  · exact isOpen_univ
  · exact hU n

theorem eventuallyEqual_replacePrefix

TopologyByExample.BoxRealPower.eventuallyEqual_replacePrefix

A finite-prefix replacement stays in the same eventual-equality class.

theorem eventuallyEqual_replacePrefix (N : ℕ) (v : Fin N → ℝ) (x : Space) :
    EventuallyEqual x (replacePrefix N v x)
Proof
:= by
  exact ⟨N, fun n hn ↦ by simp [replacePrefix, Nat.not_lt.mpr hn]⟩

theorem eventualClass_eq_iUnion_range

TopologyByExample.BoxRealPower.eventualClass_eq_iUnion_range

The class of a sequence is the union of all its finite-prefix replacement images.

theorem eventualClass_eq_iUnion_range (x : Space) :
    {y | EventuallyEqual x y} = ⋃ N, range (fun v ↦ replacePrefix N v x)
Proof
:= by
  ext y
  constructor
  · rintro ⟨N, hN⟩
    refine mem_iUnion.mpr ⟨N, (fun i : Fin N ↦ y.coord i), ?_⟩
    apply Space.ext
    funext n
    dsimp [replacePrefix]
    split_ifs with hn
    · rfl
    · exact hN n (Nat.le_of_not_gt hn)
  · intro hy
    obtain ⟨N, v, rfl⟩ := mem_iUnion.mp hy
    exact eventuallyEqual_replacePrefix N v x

theorem isLindelof_eventualClass

TopologyByExample.BoxRealPower.isLindelof_eventualClass

Eventual-equality classes are Lindelof in the box topology.

theorem isLindelof_eventualClass (x : Space) : IsLindelof {y | EventuallyEqual x y}
Proof
:= by
  rw [eventualClass_eq_iUnion_range]
  apply isLindelof_iUnion
  intro N
  exact isLindelof_range ((continuous_replacePrefix N).comp
    (continuous_id.prodMk continuous_const))

theorem isLindelof_fibre_toNabla

TopologyByExample.BoxRealPower.isLindelof_fibre_toNabla

Every fibre of the quotient projection is Lindelof.

theorem isLindelof_fibre_toNabla (q : Nabla) : IsLindelof (toNabla ⁻¹' {q})
Proof
:= by
  obtain ⟨x, rfl⟩ := isQuotientMap_toNabla.surjective q
  have he : toNabla ⁻¹' {toNabla x} = {y | EventuallyEqual x y} := by
    ext y
    change toNabla y = toNabla x ↔ EventuallyEqual x y
    rw [eq_comm]
    exact Quotient.eq
  rw [he]
  exact isLindelof_eventualClass x