Lean library · module TopologyByExample.Spaces.ClosureComplementOriginal

The open rational obstruction in the fourteen-set example

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

definition RationalOpen

TopologyByExample.ClosureComplementSubsets.RationalOpen

The open rational interval in the final component.

abbrev RationalOpen
:= Ioo (7 : ℚ) 8

definition rationalOpenInclusion

TopologyByExample.ClosureComplementSubsets.rationalOpenInclusion

Inclusion of the rational interval into the original real subset.

def rationalOpenInclusion (q : RationalOpen) : OriginalSpace
:=
  ⟨(q.val : ℝ), Or.inl (Or.inr ⟨⟨q.val, rfl⟩,
    by exact_mod_cast q.property.1.le, by exact_mod_cast q.property.2⟩)⟩

theorem isEmbedding_rationalOpenInclusion

TopologyByExample.ClosureComplementSubsets.isEmbedding_rationalOpenInclusion

The rational interval is embedded with its usual topology.

theorem isEmbedding_rationalOpenInclusion : IsEmbedding rationalOpenInclusion
Proof
:=
  IsEmbedding.subtypeVal.of_comp_iff.mp
    (Rat.isEmbedding_coe_real.comp IsEmbedding.subtypeVal)

theorem range_rationalOpenInclusion

TopologyByExample.ClosureComplementSubsets.range_rationalOpenInclusion

The embedded interval is relatively open in the original set.

theorem range_rationalOpenInclusion : range rationalOpenInclusion =
    (Subtype.val ⁻¹' Ioo (7 : ℝ) 8 : Set OriginalSpace)
Proof
:= by
  ext x
  constructor
  · rintro ⟨q, rfl⟩
    change 7 < (q.val : ℝ) ∧ (q.val : ℝ) < 8
    exact_mod_cast q.property
  · intro hx
    change 7 < x.val ∧ x.val < 8 at hx
    have hr : x.val ∈ range (fun q : ℚ ↦ (q : ℝ)) := by
      rcases x.property with (((hrec | hp) | hrat) | ((h23 | h34) | h56))
      · obtain ⟨n, hn⟩ := hrec
        have hb := ReciprocalSubsets.reciprocal_le_one n
        rw [hn] at hb
        exfalso
        linarith [hx.1]
      · have hp' : x.val = 9 / 2 := hp
        exfalso
        linarith [hx.1]
      · exact hrat.1
      · exfalso; linarith [hx.1, h23.2]
      · exfalso; linarith [hx.1, h34.2]
      · exfalso; linarith [hx.1, h56.2]
    obtain ⟨q, hq⟩ := hr
    have hqq : (7 : ℚ) < q ∧ q < 8 := by
      have hh : (7 : ℝ) < (q : ℝ) ∧ (q : ℝ) < 8 := by simpa only [hq] using hx
      exact_mod_cast hh
    exact ⟨⟨q, hqq⟩, Subtype.ext hq⟩

theorem isOpenEmbedding_rationalOpenInclusion

TopologyByExample.ClosureComplementSubsets.isOpenEmbedding_rationalOpenInclusion

The rational interval is an open subspace of the original set.

theorem isOpenEmbedding_rationalOpenInclusion : IsOpenEmbedding rationalOpenInclusion
Proof
:=
  ⟨isEmbedding_rationalOpenInclusion, by
    rw [range_rationalOpenInclusion]
    exact isOpen_Ioo.preimage continuous_subtypeVal⟩

instance

The open rational interval is nonempty.

instance : Nonempty RationalOpen
Proof
:= ⟨⟨15 / 2, by norm_num⟩⟩

theorem rationalOpen_not_hasIsolatedPoint

TopologyByExample.ClosureComplementSubsets.rationalOpen_not_hasIsolatedPoint

No point of the open rational interval is isolated.

theorem rationalOpen_not_hasIsolatedPoint : ¬HasIsolatedPoint RationalOpen
Proof
:= by
  rintro ⟨q, hq⟩
  apply Rationals.not_hasIsolatedPoint
  refine ⟨q.val, ?_⟩
  simpa only [image_singleton] using
    isOpen_Ioo.isOpenEmbedding_subtypeVal.isOpenMap {q} hq

theorem not_baire_original

TopologyByExample.ClosureComplementSubsets.not_baire_original

The original set is not Baire because it has an open countable crowded subspace.

theorem not_baire_original : ¬BaireSpace OriginalSpace
Proof
:= by
  intro h
  have : BaireSpace RationalOpen := isOpenEmbedding_rationalOpenInclusion.baireSpace
  exact rationalOpen_not_hasIsolatedPoint
    (hasIsolatedPoint_of_countable_of_not_isMeagre_univ not_isMeagre_univ_of_baireSpace)

On this site: The original fourteen-set example is not a Baire space

theorem not_locallyConnected_original

TopologyByExample.ClosureComplementSubsets.not_locallyConnected_original

The original set is not locally connected because its rational interval is not discrete.

theorem not_locallyConnected_original : ¬LocallyConnectedSpace OriginalSpace
Proof
:= by
  intro h
  have : LocallyConnectedSpace RationalOpen :=
    isOpenEmbedding_rationalOpenInclusion.locallyConnectedSpace
  have : DiscreteTopology RationalOpen := discreteTopology_of_locallyConnectedSpace
  exact rationalOpen_not_hasIsolatedPoint ⟨Classical.choice inferInstance, isOpen_discrete _⟩

On this site: The original fourteen-set example is not locally connected

definition isolatedOriginal

TopologyByExample.ClosureComplementSubsets.isolatedOriginal

The isolated point in the original subset.

def isolatedOriginal : OriginalSpace
:= ⟨9 / 2, Or.inl (Or.inl (Or.inr rfl))⟩

theorem nonempty_original

TopologyByExample.ClosureComplementSubsets.nonempty_original

The original set is nonempty.

theorem nonempty_original : Nonempty OriginalSpace
Proof
:= ⟨isolatedOriginal⟩

theorem metrizable_original

TopologyByExample.ClosureComplementSubsets.metrizable_original

The original set inherits a metric from the real line.

theorem metrizable_original : MetrizableSpace OriginalSpace
Proof
:= inferInstance

On this site: The original fourteen-set example is metrizable

theorem hasIsolatedPoint_original

TopologyByExample.ClosureComplementSubsets.hasIsolatedPoint_original

The isolated point makes the original space of second category in itself.

theorem hasIsolatedPoint_original : HasIsolatedPoint OriginalSpace
Proof
:= by
  refine ⟨isolatedOriginal, ?_⟩
  have he : ({isolatedOriginal} : Set OriginalSpace) = Subtype.val ⁻¹' Ioo (4 : ℝ) 5 := by
    ext x
    constructor
    · intro hx
      have hx' : x = isolatedOriginal := hx
      subst x
      norm_num [isolatedOriginal]
    · intro hx
      change 4 < x.val ∧ x.val < 5 at hx
      change x = isolatedOriginal
      apply Subtype.ext
      change x.val = 9 / 2
      rcases x.property with (((hr | hp) | hq) | ((h23 | h34) | h56))
      · obtain ⟨n, hn⟩ := hr
        have hb := ReciprocalSubsets.reciprocal_le_one n
        rw [hn] at hb
        linarith [hx.1]
      · exact hp
      · linarith [hx.2, hq.2.1]
      · linarith [hx.1, h23.2]
      · linarith [hx.1, h34.2]
      · linarith [hx.2, h56.1]
  rw [he]
  exact isOpen_Ioo.preimage continuous_subtypeVal

On this site: The original fourteen-set example has an isolated point

theorem not_sigmaCompact_complement

TopologyByExample.ClosureComplementSubsets.not_sigmaCompact_complement

The complement cannot be sigma-compact, since that would make the original set G-delta.

theorem not_sigmaCompact_complement : ¬SigmaCompactSpace ComplementSpace
Proof
:= by
  intro h
  obtain ⟨K, hK, hcover⟩ := isSigmaCompact_iff_sigmaCompactSpace.mpr h
  have he : original = ⋂ n, (K n)ᶜ := by
    rw [← compl_iUnion, hcover, compl_compl]
  have hg : IsGδ original := by
    rw [he]
    exact IsGδ.iInter (fun n ↦ (hK n).isClosed.isOpen_compl.isGδ)
  have : IsCompletelyMetrizableSpace OriginalSpace := hg.isCompletelyMetrizableSpace
  exact not_baire_original baireSpace_of_isCompletelyMetrizableSpace

On this site: The complement of the fourteen-set example is not σ-compact