Lean library · module TopologyByExample.Theorems.PerfectSecondCountableProduct

Closed G-delta sets in products with a second countable factor

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 isGδ_closed_prod_of_secondCountable_right

TopologyByExample.isGδ_closed_prod_of_secondCountable_right

If closed sets in both factors are G-delta and the second factor is second countable, every closed set in the product is G-delta.

theorem isGδ_closed_prod_of_secondCountable_right
    {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] [SecondCountableTopology Y]
    (hX : ∀ F : Set X, IsClosed F → IsGδ F)
    (hY : ∀ F : Set Y, IsClosed F → IsGδ F)
    {F : Set (X × Y)} (hF : IsClosed F) : IsGδ F
Proof
:= by
  classical
  let U := Fᶜ
  have hU : IsOpen U := hF.isOpen_compl
  obtain ⟨B, hBc, _, hB⟩ := exists_countable_basis Y
  let : Countable B := hBc.to_subtype
  let V (b : B) : Set X := ⋃₀ {a : Set X | IsOpen a ∧ a ×ˢ b.val ⊆ U}
  have hVo (b : B) : IsOpen (V b) := isOpen_sUnion fun _ ha ↦ ha.1
  have hVU (b : B) : V b ×ˢ b.val ⊆ U := by
    rintro ⟨x, y⟩ ⟨hx, hy⟩
    obtain ⟨a, ha, hxa⟩ := mem_sUnion.mp hx
    exact ha.2 ⟨hxa, hy⟩
  have he : U = ⋃ b : B, V b ×ˢ b.val := by
    apply Subset.antisymm
    · rintro ⟨x, y⟩ hxy
      obtain ⟨a, c, ha, hc, hxa, hyc, hac⟩ := isOpen_prod_iff.mp hU x y hxy
      obtain ⟨b, hb, hyb, hbc⟩ := hB.exists_subset_of_mem_open hyc hc
      refine mem_iUnion.mpr ⟨⟨b, hb⟩, ?_, hyb⟩
      exact mem_sUnion.mpr ⟨a, ⟨ha, (prod_mono subset_rfl hbc).trans hac⟩, hxa⟩
    · exact iUnion_subset hVU
  have hg (b : B) : IsGδ (V b ×ˢ b.val)ᶜ := by
    have he' : (V b ×ˢ b.val)ᶜ =
        Prod.fst ⁻¹' (V b)ᶜ ∪ Prod.snd ⁻¹' b.valᶜ := by ext p; simp; tauto
    rw [he']
    exact ((hX _ (hVo b).isClosed_compl).preimage continuous_fst).union
      ((hY _ (hB.isOpen b.property).isClosed_compl).preimage continuous_snd)
  have he' : F = ⋂ b : B, (V b ×ˢ b.val)ᶜ := by
    rw [← compl_iUnion, ← he]
    exact (compl_compl F).symm
  rw [he']
  exact IsGδ.iInter hg

On this site: Theorem: Closed G-delta sets in a product with a second countable factor