Lean library · module TopologyByExample.Theorems.SorgenfreyPerfectPlane

Closed G-delta sets in the Sorgenfrey plane

Source file

The proof follows the finite-product argument of R. W. Heath and E. A. Michael, A property of the Sorgenfrey line, Compositio Mathematica 23 (1971), 185–188, Lemma 2.3.

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 square

TopologyByExample.SorgenfreyLine.square

A square basic neighbourhood.

def square (x : ℝₗ × ℝₗ) (r : ℝₗ) : Set (ℝₗ × ℝₗ)
:=
  Ico x.1 (x.1 + r) ×ˢ Ico x.2 (x.2 + r)

theorem square_mem_nhds

TopologyByExample.SorgenfreyLine.square_mem_nhds

A square of positive radius is an open neighbourhood.

theorem square_mem_nhds (x : ℝₗ × ℝₗ) {r : ℝₗ} (hr : 0 < r) : square x r ∈ 𝓝 x
Proof
:=
  ((isOpen_Ico _ _).prod (isOpen_Ico _ _)).mem_nhds
    ⟨⟨le_rfl, lt_add_of_pos_right _ hr⟩, ⟨le_rfl, lt_add_of_pos_right _ hr⟩⟩

definition rightCore

TopologyByExample.SorgenfreyLine.rightCore

Interior after replacing the second factor by its ordinary real topology.

def rightCore (U : Set (ℝₗ × ℝₗ)) : Set (ℝₗ × ℝₗ)
:=
  (fun x ↦ (x.1, toReal x.2)) ⁻¹'
    interior ((fun p : ℝₗ × ℝ ↦ (p.1, toReal.symm p.2)) ⁻¹' U)

theorem rightCore_subset

TopologyByExample.SorgenfreyLine.rightCore_subset

The mixed-topology interior stays inside the set.

theorem rightCore_subset (U : Set (ℝₗ × ℝₗ)) : rightCore U ⊆ U
Proof
:= by
  intro x hx
  have h := @interior_subset (ℝₗ × ℝ) _
    ((fun p : ℝₗ × ℝ ↦ (p.1, toReal.symm p.2)) ⁻¹' U) (x.1, toReal x.2) hx
  simpa only [mem_preimage, RingEquiv.symm_apply_apply] using h

theorem isGδ_compl_rightCore

TopologyByExample.SorgenfreyLine.isGδ_compl_rightCore

The complement of the mixed-topology interior is G-delta.

theorem isGδ_compl_rightCore (U : Set (ℝₗ × ℝₗ)) : IsGδ (rightCore U)ᶜ
Proof
:= by
  have h := isGδ_closed_prod_of_secondCountable_right
    (X := ℝₗ) (Y := ℝ) (fun _ h ↦ h.isGδ) (fun _ h ↦ h.isGδ)
    (F := (interior ((fun p : ℝₗ × ℝ ↦ (p.1, toReal.symm p.2)) ⁻¹' U))ᶜ)
    isOpen_interior.isClosed_compl
  exact h.preimage (continuous_fst.prodMk (continuous_toReal.comp continuous_snd))

theorem mem_rightCore_of_square

TopologyByExample.SorgenfreyLine.mem_rightCore_of_square

A square with its lower horizontal edge removed lies in the mixed interior.

theorem mem_rightCore_of_square {U : Set (ℝₗ × ℝₗ)} {y z : ℝₗ × ℝₗ} {r : ℝₗ}
    (hsub : square y r ⊆ U) (hz : z ∈ square y r) (hyz : y.2 < z.2) : z ∈ rightCore U
Proof
:= by
  apply (@mem_interior_iff_mem_nhds (ℝₗ × ℝ) _ (z.1, toReal z.2)
    ((fun p : ℝₗ × ℝ ↦ (p.1, toReal.symm p.2)) ⁻¹' U)).mpr
  have ho : IsOpen (Ico y.1 (y.1 + r) ×ˢ Ioo (toReal y.2) (toReal (y.2 + r))) :=
    (isOpen_Ico _ _).prod isOpen_Ioo
  apply Filter.mem_of_superset (ho.mem_nhds
    ⟨hz.1, toReal_lt_toReal.mpr hyz, toReal_lt_toReal.mpr hz.2.2⟩)
  rintro ⟨a, b⟩ ⟨ha, hb⟩
  change (a, toReal.symm b) ∈ U
  apply hsub
  exact ⟨ha, (toReal_lt_toReal.mp (by simpa using hb.1)).le,
    toReal_lt_toReal.mp (by simpa using hb.2)⟩

definition leftCore

TopologyByExample.SorgenfreyLine.leftCore

Interior after replacing the first factor by its ordinary real topology.

def leftCore (U : Set (ℝₗ × ℝₗ)) : Set (ℝₗ × ℝₗ)
:=
  Prod.swap ⁻¹' rightCore (Prod.swap ⁻¹' U)

theorem isGδ_compl_leftCore

TopologyByExample.SorgenfreyLine.isGδ_compl_leftCore

The complement of the other mixed-topology interior is G-delta.

theorem isGδ_compl_leftCore (U : Set (ℝₗ × ℝₗ)) : IsGδ (leftCore U)ᶜ
Proof
:=
  (isGδ_compl_rightCore _).preimage continuous_swap

theorem mem_leftCore_of_square

TopologyByExample.SorgenfreyLine.mem_leftCore_of_square

A square with its left vertical edge removed lies in the other mixed interior.

theorem mem_leftCore_of_square {U : Set (ℝₗ × ℝₗ)} {y z : ℝₗ × ℝₗ} {r : ℝₗ}
    (hsub : square y r ⊆ U) (hz : z ∈ square y r) (hyz : y.1 < z.1) : z ∈ leftCore U
Proof
:= by
  apply mem_rightCore_of_square (y := y.swap) (r := r) (z := z.swap)
  · intro p hp
    exact hsub ⟨hp.2, hp.1⟩
  · exact ⟨hz.2, hz.1⟩
  · exact hyz

definition boundaryLayer

TopologyByExample.SorgenfreyLine.boundaryLayer

A fixed-radius layer outside both mixed interiors.

def boundaryLayer (U : Set (ℝₗ × ℝₗ)) (r : ℝₗ) : Set (ℝₗ × ℝₗ)
:=
  {x | x ∉ leftCore U ∪ rightCore U ∧ square x r ⊆ U}

theorem isClosed_boundaryLayer

TopologyByExample.SorgenfreyLine.isClosed_boundaryLayer

Fixed-radius boundary layers are closed.

theorem isClosed_boundaryLayer (U : Set (ℝₗ × ℝₗ)) {r : ℝₗ} (hr : 0 < r) :
    IsClosed (boundaryLayer U r)
Proof
:= by
  classical
  apply isOpen_compl_iff.mp
  apply isOpen_iff_mem_nhds.mpr
  intro x hx
  let A := boundaryLayer U r
  let C (b : Bool × Bool) : Set (ℝₗ × ℝₗ) :=
    {y | y ∈ A ∧ (y.1 = x.1 ↔ b.1 = true) ∧ (y.2 = x.2 ↔ b.2 = true)}
  have hlocal (b : Bool × Bool) : ∃ V ∈ 𝓝 x, Disjoint V (C b) := by
    by_cases hex : ∃ z ∈ square x r, z ∈ C b
    · obtain ⟨z, hzx, hzC⟩ := hex
      let W₁ : Set ℝₗ := if z.1 = x.1 then univ else Iio z.1
      let W₂ : Set ℝₗ := if z.2 = x.2 then univ else Iio z.2
      have hw₁ : W₁ ∈ 𝓝 x.1 := by
        by_cases he : z.1 = x.1
        · simp only [W₁, he, ite_true]; exact Filter.univ_mem
        · simp only [W₁, he, ite_false]
          exact isOpen_Iio.mem_nhds (lt_of_le_of_ne hzx.1.1 (Ne.symm he))
      have hw₂ : W₂ ∈ 𝓝 x.2 := by
        by_cases he : z.2 = x.2
        · simp only [W₂, he, ite_true]; exact Filter.univ_mem
        · simp only [W₂, he, ite_false]
          exact isOpen_Iio.mem_nhds (lt_of_le_of_ne hzx.2.1 (Ne.symm he))
      refine ⟨square x r ∩ (W₁ ×ˢ W₂), inter_mem (square_mem_nhds x hr)
        (prod_mem_nhds hw₁ hw₂), Set.disjoint_left.mpr ?_⟩
      intro y hy hyC
      have hz₁ : y.1 ≤ z.1 := by
        by_cases he : z.1 = x.1
        · have hyx : y.1 = x.1 := hyC.2.1.mpr (hzC.2.1.mp he)
          exact (hyx.trans he.symm).le
        · exact (show y.1 < z.1 by simpa only [W₁, he, ite_false, mem_Iio] using hy.2.1).le
      have hz₂ : y.2 ≤ z.2 := by
        by_cases he : z.2 = x.2
        · have hyx : y.2 = x.2 := hyC.2.2.mpr (hzC.2.2.mp he)
          exact (hyx.trans he.symm).le
        · exact (show y.2 < z.2 by simpa only [W₂, he, ite_false, mem_Iio] using hy.2.2).le
      have hzy : z ∈ square y r :=
        ⟨⟨hz₁, hzx.1.2.trans_le (by linarith [hy.1.1.1])⟩,
          ⟨hz₂, hzx.2.2.trans_le (by linarith [hy.1.2.1])⟩⟩
      have hne : y.1 ≠ x.1 ∨ y.2 ≠ x.2 := by
        by_contra h
        push Not at h
        exact hx (Prod.ext h.1 h.2 ▸ hyC.1)
      apply hzC.1.1
      rcases hne with hn | hn
      · have he : z.1 ≠ x.1 := fun he ↦ hn (hyC.2.1.mpr (hzC.2.1.mp he))
        exact Or.inl (mem_leftCore_of_square hyC.1.2 hzy
          (by simpa only [W₁, he, ite_false, mem_Iio] using hy.2.1))
      · have he : z.2 ≠ x.2 := fun he ↦ hn (hyC.2.2.mpr (hzC.2.2.mp he))
        exact Or.inr (mem_rightCore_of_square hyC.1.2 hzy
          (by simpa only [W₂, he, ite_false, mem_Iio] using hy.2.2))
    · refine ⟨square x r, square_mem_nhds x hr, Set.disjoint_left.mpr ?_⟩
      intro z hz hzc
      exact hex ⟨z, hz, hzc⟩
  choose V hV hd using hlocal
  apply Filter.mem_of_superset (Filter.iInter_mem.mpr hV)
  intro y hy hyA
  let b : Bool × Bool := (decide (y.1 = x.1), decide (y.2 = x.2))
  exact Set.disjoint_left.mp (hd b) (mem_iInter.mp hy b) ⟨hyA, by simp [b], by simp [b]⟩

theorem exists_nat_square_subset

TopologyByExample.SorgenfreyLine.exists_nat_square_subset

Every neighbourhood contains a square from a countable fixed-radius family.

theorem exists_nat_square_subset {U : Set (ℝₗ × ℝₗ)} (hU : IsOpen U)
    {x : ℝₗ × ℝₗ} (hx : x ∈ U) :
    ∃ n : ℕ, square x (1 / ((n : ℝₗ) + 1)) ⊆ U
Proof
:= by
  obtain ⟨⟨a, b⟩, ⟨ha, hb⟩, hsub⟩ :=
    ((nhds_basis_Ico x.1).prod_nhds (nhds_basis_Ico x.2)).mem_iff.mp (hU.mem_nhds hx)
  obtain ⟨n, hn⟩ := exists_nat_one_div_lt (lt_min (sub_pos.mpr ha) (sub_pos.mpr hb))
  refine ⟨n, fun y hy ↦ hsub ?_⟩
  have hn₁ := hn.trans_le (min_le_left _ _)
  have hn₂ := hn.trans_le (min_le_right _ _)
  exact ⟨⟨hy.1.1, by linarith [hy.1.2]⟩, ⟨hy.2.1, by linarith [hy.2.2]⟩⟩

theorem isGδ_of_isClosed_prod

TopologyByExample.SorgenfreyLine.isGδ_of_isClosed_prod

Every closed subset of the Sorgenfrey plane is G-delta.

theorem isGδ_of_isClosed_prod {F : Set (ℝₗ × ℝₗ)} (hF : IsClosed F) : IsGδ F
Proof
:= by
  let U := Fᶜ
  let A (n : ℕ) := boundaryLayer U (1 / ((n : ℝₗ) + 1))
  have hAc (n : ℕ) : IsClosed (A n) := isClosed_boundaryLayer U (by positivity)
  have he : U = (leftCore U ∪ rightCore U) ∪ ⋃ n, A n := by
    ext x
    constructor
    · intro hx
      by_cases hc : x ∈ leftCore U ∪ rightCore U
      · exact Or.inl hc
      · obtain ⟨n, hn⟩ := exists_nat_square_subset hF.isOpen_compl hx
        exact Or.inr (mem_iUnion.mpr ⟨n, hc, hn⟩)
    · rintro ((hx | hx) | hx)
      · have h := rightCore_subset (Prod.swap ⁻¹' U) hx
        exact h
      · exact rightCore_subset U hx
      · obtain ⟨n, hn⟩ := mem_iUnion.mp hx
        exact hn.2 ⟨⟨le_rfl, lt_add_of_pos_right _ (by positivity)⟩,
          ⟨le_rfl, lt_add_of_pos_right _ (by positivity)⟩⟩
  have hg : IsGδ ((leftCore U)ᶜ ∩ (rightCore U)ᶜ ∩ ⋂ n, (A n)ᶜ) :=
    ((isGδ_compl_leftCore U).inter (isGδ_compl_rightCore U)).inter
      (IsGδ.iInter_of_isOpen fun n ↦ (hAc n).isOpen_compl)
  rw [← compl_union, ← compl_iUnion, ← compl_union, ← he] at hg
  simpa only [U, compl_compl] using hg

On this site: Sorgenfrey plane: Closed subsets are G-delta

theorem countablyMetacompactSpace_prod

TopologyByExample.SorgenfreyLine.countablyMetacompactSpace_prod

The Sorgenfrey plane is countably metacompact.

theorem countablyMetacompactSpace_prod : CountablyMetacompactSpace (ℝₗ × ℝₗ)
Proof
:=
  countablyMetacompactSpace_of_closed_gdelta fun _ h ↦ isGδ_of_isClosed_prod h

On this site: The Sorgenfrey plane is countably metacompact