Lean library · module TopologyByExample.Spaces.MisraSparseUnbounded

An unbounded real function on the sparse Misra limit

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 continuous_of_countable_cell_support

TopologyByExample.MisraSparse.continuous_of_countable_cell_support

Functions supported on countably many isolated cells of E₀ are continuous.

theorem continuous_of_countable_cell_support (g : MisraE0 → ℝ)
    {S : Set MisraE0} (hS : S.Countable)
    (hcell : ∀ x ∈ S, ∃ s α β, x = MisraE0.cell s α β)
    (hg : ∀ x ∉ S, g x = 0) : Continuous g
Proof
:= by
  apply continuous_iff_continuousAt.2
  intro x
  by_cases hx : x ∈ S
  · obtain ⟨s, α, β, rfl⟩ := hcell x hx
    apply Filter.EventuallyEq.continuousAt (y := g (MisraE0.cell s α β))
    filter_upwards [(MisraE0.isOpen_singleton_cell s α β).mem_nhds (mem_singleton _)] with y hy
    exact congrArg g (mem_singleton_iff.1 hy)
  · apply Filter.EventuallyEq.continuousAt (y := (0 : ℝ))
    filter_upwards [(PSpace.isClosed_of_countable hS).isOpen_compl.mem_nhds hx] with y hy
    exact hg y hy

theorem exists_unbounded_initial_section

TopologyByExample.MisraSparse.exists_unbounded_initial_section

An initial continuous section takes arbitrarily large natural-number values.

theorem exists_unbounded_initial_section (e : OmegaOne → OmegaOne) (he : Function.Injective e) :
    ∃ f : MapSection ℝ e initial, ∀ n : ℕ, ∃ x : MisraE0, f.value x = n
Proof
:= by
  classical
  let r := Infinite.natEmbedding OmegaOne
  let edges : Bool → OmegaOne → OmegaOne := fun b ↦ if b then Order.succ else e
  have hedges : ∀ b, Function.Injective (edges b) := by
    intro b
    cases b
    · exact he
    · exact Order.succ_injective
  obtain ⟨C, hC, h₀, hCf⟩ := exists_countable_invariant_of_injective edges hedges ⊥
  let S : Set MisraE0 := (fun p : OmegaOne × OmegaOne ↦ MisraE0.cell false p.1 p.2) ''
    (range r ×ˢ C)
  let g : MisraE0 → ℝ
    | .cell s α β => if s = false ∧ α ∈ range r ∧ β ∈ C then (Function.invFun r α : ℕ) else 0
    | _ => 0
  have hg : Continuous g := by
    apply continuous_of_countable_cell_support g
      (((countable_range r).prod hC).image _) (S := S)
    · rintro x ⟨⟨α, β⟩, _, rfl⟩
      exact ⟨false, α, β, rfl⟩
    · intro x hx
      cases x with
      | apex s => rfl
      | row α => rfl
      | cell s α β =>
        have hh : ¬(s = false ∧ α ∈ range r ∧ β ∈ C) := by
          rintro ⟨rfl, hα, hβ⟩
          exact hx ⟨(α, β), ⟨hα, hβ⟩, rfl⟩
        simp only [g, ite_eq_right hh]
  have hp (i : Edge) : g (targets e i false) = g (targets e i true) := by
    rcases i with ⟨d, b, β⟩
    have hc := hCf b β
    cases d with
    | none => rfl
    | some p =>
      rcases p with ⟨s, α⟩
      cases b <;> simp_all [targets, strand, g, edges]
  let f : MapSection ℝ e initial := {
    value := g
    continuous_value := hg
    agrees := by
      intro i
      change g (printedTargets e i.2 false) = g (printedTargets e i.2 true)
      cases h : i.2.2.1
      · simpa [printedTargets, h] using (hp i.2).symm
      · simpa [printedTargets, h] using hp i.2 }
  refine ⟨f, fun n ↦ ⟨MisraE0.cell false (r n) ⊥, ?_⟩⟩
  change g (MisraE0.cell false (r n) ⊥) = n
  simp [g, h₀, Function.leftInverse_invFun r.injective n]

theorem exists_unbounded_map

TopologyByExample.MisraSparse.exists_unbounded_map

A continuous real function on the sparse limit takes every natural-number value.

theorem exists_unbounded_map (e : OmegaOne → OmegaOne) (he : Function.Injective e) :
    ∃ g : Limit e → ℝ, Continuous g ∧ ∀ n : ℕ, ∃ x, g x = n
Proof
:= by
  obtain ⟨f, hf⟩ := exists_unbounded_initial_section e he
  refine ⟨limitMap f, continuous_limitMap f, fun n ↦ ?_⟩
  obtain ⟨x, hx⟩ := hf n
  exact ⟨toLimit e 0 x, hx⟩

theorem not_pseudocompactSpace

TopologyByExample.MisraSparse.not_pseudocompactSpace

The sparse limit is not pseudocompact.

theorem not_pseudocompactSpace (e : OmegaOne → OmegaOne) (he : Function.Injective e) :
    ¬PseudocompactSpace (Limit e)
Proof
:= by
  intro h
  let := h
  obtain ⟨g, hg, hvalues⟩ := exists_unbounded_map e he
  obtain ⟨b, hb⟩ := (PseudocompactSpace.bddAbove_and_bddBelow_range ⟨g, hg⟩).1
  obtain ⟨n, hn⟩ := exists_nat_gt b
  obtain ⟨x, hx⟩ := hvalues n
  exact hn.not_ge (hb ⟨x, hx⟩)