Lean library · module TopologyByExample.Spaces.LambdaNaturalGDelta

The open real subspace and the natural-number Gδ in Λ

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 isOpen_range_of_real_embedding

TopologyByExample.GillmanJerisonLambda.isOpen_range_of_real_embedding

A dense embedded real line is open in any Hausdorff space.

theorem isOpen_range_of_real_embedding {Y : Type*} [TopologicalSpace Y] [T2Space Y]
    {e : ℝ → Y} (he : IsEmbedding e) (hd : DenseRange e) : IsOpen (range e)
Proof
:= by
  apply isOpen_iff_mem_nhds.2
  rintro _ ⟨x, rfl⟩
  obtain ⟨V, hV, htrace⟩ := he.isInducing.isOpen_iff.1
    (isOpen_Ioo : IsOpen (Ioo (x - 1) (x + 1)))
  let K := e '' Icc (x - 1) (x + 1)
  have hK : IsClosed K := (isCompact_Icc.image he.continuous).isClosed
  have hcover : ∀ p ∈ V, p ∈ K := by
    intro p hp
    have hclosed : IsClosed {p | p ∈ V → p ∈ K} := by
      convert hV.isClosed_compl.union hK using 1
      ext z
      simp only [mem_ofPred_eq, mem_union, mem_compl_iff, imp_iff_not_or]
    have hbase (y : ℝ) : e y ∈ V → e y ∈ K := by
      intro hy
      have hy' : y ∈ e ⁻¹' V := hy
      rw [htrace] at hy'
      exact ⟨y, ⟨hy'.1.le, hy'.2.le⟩, rfl⟩
    have hwhole : p ∈ V → p ∈ K := hd.induction_on p hclosed hbase
    exact hwhole hp
  have hx : e x ∈ V := by
    have h : x ∈ Ioo (x - 1) (x + 1) := ⟨by linarith, by linarith⟩
    change x ∈ e ⁻¹' V
    rwa [htrace]
  exact Filter.mem_of_superset (hV.mem_nhds hx) (fun p hp ↦
    let ⟨y, _, he⟩ := hcover p hp
    ⟨y, he⟩)

theorem isOpen_range_real

TopologyByExample.GillmanJerisonLambda.isOpen_range_real

The dense real subspace of Λ is open.

theorem isOpen_range_real : IsOpen (range real)
Proof
:=
  isOpen_range_of_real_embedding isEmbedding_real denseRange_real

theorem isOpenEmbedding_real

TopologyByExample.GillmanJerisonLambda.isOpenEmbedding_real

The real inclusion is an open embedding.

theorem isOpenEmbedding_real : IsOpenEmbedding real
Proof
:= ⟨isEmbedding_real, isOpen_range_real⟩

theorem isGδ_range_natural

TopologyByExample.GillmanJerisonLambda.isGδ_range_natural

The closed natural-number subspace of Λ is a Gδ set.

theorem isGδ_range_natural : IsGδ (range natural)
Proof
:= by
  obtain ⟨U, hU, he⟩ := Nat.isClosedEmbedding_coe_real.isClosed_range.isGδ.eq_iInter_nat
  have hnat : range natural = real '' range (Nat.cast : ℕ → ℝ) := range_comp real Nat.cast
  rw [hnat, he, isEmbedding_real.injective.injOn.image_iInter_eq]
  exact IsGδ.iInter_of_isOpen (fun n ↦ isOpenEmbedding_real.isOpenMap (U n) (hU n))

On this site: Gillman–Jerison’s Λ: The natural numbers form a \(G_\delta\)

theorem not_zeroSet_range_natural

TopologyByExample.GillmanJerisonLambda.not_zeroSet_range_natural

The natural-number subspace is not a zero-set in Λ.

theorem not_zeroSet_range_natural :
    ¬∃ f : GillmanJerisonLambda → ℝ, Continuous f ∧ f ⁻¹' {0} = range natural
Proof
:= by
  rintro ⟨f, hf, hzero⟩
  let a : ℕ → I := fun n ↦ ⟨1 / ((n : ℝ) + 1), by
    constructor
    · positivity
    · apply (div_le_one (by positivity : (0 : ℝ) < n + 1)).2
      nlinarith [Nat.cast_nonneg (α := ℝ) n]⟩
  obtain ⟨h, hh, he⟩ := exists_natural_interval_extension a
  have hfzero (n : ℕ) : f (natural n) = 0 := by
    have hm : natural n ∈ f ⁻¹' {0} := hzero.symm ▸ mem_range_self n
    exact hm
  have hpos (x : GillmanJerisonLambda) : 0 < |f x| + (h x : ℝ) := by
    have hn := (h x).property.1
    have ha := abs_nonneg (f x)
    by_contra hnot
    have hsum : |f x| + (h x : ℝ) = 0 := le_antisymm (not_lt.1 hnot) (add_nonneg ha hn)
    have hfx : f x = 0 := abs_eq_zero.1 (by linarith)
    have hx : x ∈ range natural := hzero ▸ (show x ∈ f ⁻¹' {0} from hfx)
    obtain ⟨n, rfl⟩ := hx
    rw [hfzero, abs_zero, zero_add, he] at hsum
    have hp : 0 < (a n : ℝ) := by dsimp [a]; positivity
    exact hp.ne' hsum
  apply not_exists_natural_unbounded_extension
  refine ⟨fun x ↦ (|f x| + (h x : ℝ))⁻¹ - 1, ?_, ?_⟩
  · exact ((hf.abs.add (continuous_subtypeVal.comp hh)).inv₀
      (fun x ↦ (hpos x).ne')).sub continuous_const
  · intro n
    change (|f (natural n)| + (h (natural n) : ℝ))⁻¹ - 1 = n
    rw [hfzero, abs_zero, zero_add, he]
    change (1 / ((n : ℝ) + 1))⁻¹ - 1 = n
    simp

On this site: Gillman–Jerison’s Λ: The naturals are not a zero-set