Lean library · module TopologyByExample.Spaces.ClosureComplementChart

Chart properties of the fourteen-set example and its complement

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 sigma_union

TopologyByExample.ClosureComplementSubsets.sigma_union

private theorem sigma_union {s t : Set ℝ} (hs : IsSigmaCompact s)
    (ht : IsSigmaCompact t) : IsSigmaCompact (s ∪ t)
Proof
:= by
  obtain ⟨K, hK, rfl⟩ := hs
  obtain ⟨L, hL, rfl⟩ := ht
  exact ⟨fun n ↦ K n ∪ L n, fun n ↦ (hK n).union (hL n), iUnion_union_distrib K L⟩

theorem sigma_open

TopologyByExample.ClosureComplementSubsets.sigma_open

private theorem sigma_open {s : Set ℝ} (hs : IsOpen s) : IsSigmaCompact s
Proof
:= by
  let := hs.locallyCompactSpace
  exact isSigmaCompact_iff_sigmaCompactSpace.mpr inferInstance

theorem sigmaCompact_original

TopologyByExample.ClosureComplementSubsets.sigmaCompact_original

The original real subset is a countable union of compact sets.

theorem sigmaCompact_original : SigmaCompactSpace OriginalSpace
Proof
:= by
  apply isSigmaCompact_iff_sigmaCompactSpace.mp
  have he : IsSigmaCompact exceptional := by
    simpa using isSigmaCompact_biUnion countable_exceptional
      (fun x _ ↦ (isCompact_singleton (x := x)).isSigmaCompact)
  exact sigma_union he (sigma_union
    (sigma_union (sigma_open isOpen_Ioo) (sigma_open isOpen_Ioo))
    isCompact_Icc.isSigmaCompact)

On this site: The original fourteen-set example is σ-compact

theorem positive_of_mem_original

TopologyByExample.ClosureComplementSubsets.positive_of_mem_original

Every point of the original set is positive.

theorem positive_of_mem_original {x : ℝ} (hx : x ∈ original) : 0 < x
Proof
:= by
  rcases hx with (((⟨n, rfl⟩ | hx) | hx) | ((hx | hx) | hx))
  · exact div_pos (by norm_num) (by positivity)
  · norm_num at hx
    linarith
  · linarith [hx.2.1]
  · linarith [hx.1]
  · linarith [hx.1]
  · linarith [hx.1]

definition originalInterval

TopologyByExample.ClosureComplementSubsets.originalInterval

A nonconstant interval in the original set.

def originalInterval (t : unitInterval) : OriginalSpace
:=
  ⟨(t : ℝ) + 5, Or.inr (Or.inr ⟨by linarith [t.property.1], by linarith [t.property.2]⟩)⟩

definition complementInterval

TopologyByExample.ClosureComplementSubsets.complementInterval

A nonconstant interval in the complement.

def complementInterval (t : unitInterval) : ComplementSpace
Definition
:=
  ⟨(t : ℝ) - 2, fun h ↦ by
    have hp := positive_of_mem_original h
    linarith [t.property.2]⟩

theorem continuous_originalInterval

TopologyByExample.ClosureComplementSubsets.continuous_originalInterval

The original interval parametrization is continuous.

theorem continuous_originalInterval : Continuous originalInterval
Proof
:=
  (continuous_subtypeVal.add_const 5).subtype_mk _

theorem not_preconnected_original

TopologyByExample.ClosureComplementSubsets.not_preconnected_original

The original set is disconnected across the missing point three.

theorem not_preconnected_original : ¬PreconnectedSpace OriginalSpace
Proof
:= by
  intro h
  have hp : IsPreconnected original := by
    simpa only [Subtype.range_coe] using
      (isPreconnected_range (continuous_subtypeVal : Continuous (Subtype.val : OriginalSpace → ℝ)))
  have hleft : (5 / 2 : ℝ) ∈ original := Or.inr (Or.inl (Or.inl (by norm_num)))
  have hright : (7 / 2 : ℝ) ∈ original := Or.inr (Or.inl (Or.inr (by norm_num)))
  exact three_not_mem_original (hp.ordConnected.out hleft hright (by norm_num))

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

theorem not_preconnected_complement

TopologyByExample.ClosureComplementSubsets.not_preconnected_complement

The complementary set is disconnected between its negative ray and three.

theorem not_preconnected_complement : ¬PreconnectedSpace ComplementSpace
Proof
:= by
  intro h
  have hp : IsPreconnected originalᶜ := by
    simpa only [Subtype.range_coe] using
      (isPreconnected_range (continuous_subtypeVal :
        Continuous (Subtype.val : ComplementSpace → ℝ)))
  have hleft : (-1 : ℝ) ∈ originalᶜ := fun hx ↦ by
    have := positive_of_mem_original hx
    norm_num at this
  have hone : (1 : ℝ) ∈ original := by
    exact Or.inl (Or.inl (Or.inl ⟨0, by norm_num [ReciprocalSubsets.reciprocal]⟩))
  exact hp.ordConnected.out hleft three_not_mem_original (by norm_num : (1 : ℝ) ∈ Icc (-1) 3) hone

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

theorem continuous_complementInterval

TopologyByExample.ClosureComplementSubsets.continuous_complementInterval

The complementary interval parametrization is continuous.

theorem continuous_complementInterval : Continuous complementInterval
Proof
:=
  (continuous_subtypeVal.sub continuous_const).subtype_mk _

theorem interval_obstruction

TopologyByExample.ClosureComplementSubsets.interval_obstruction

private theorem interval_obstruction {X : Type*} [TopologicalSpace X]
    (f : unitInterval → X) (hf : Continuous f) (hne : f 0 ≠ f 1) :
    ¬TotallyPathDisconnectedSpace X
Proof
:= by
  intro h
  exact hne (h.eq_of_joined _ _ ((UnitInterval.joined 0 1).map hf))

theorem not_totallyPathDisconnected_original

TopologyByExample.ClosureComplementSubsets.not_totallyPathDisconnected_original

The original set contains a nonconstant path.

theorem not_totallyPathDisconnected_original : ¬TotallyPathDisconnectedSpace OriginalSpace
Proof
:=
  interval_obstruction originalInterval continuous_originalInterval (by
    intro h
    have := congrArg Subtype.val h
    norm_num [originalInterval] at this)

On this site: The original fourteen-set example is not totally path disconnected

theorem not_totallyPathDisconnected_complement

TopologyByExample.ClosureComplementSubsets.not_totallyPathDisconnected_complement

The complement contains a nonconstant path.

theorem not_totallyPathDisconnected_complement : ¬TotallyPathDisconnectedSpace ComplementSpace
Proof
:=
  interval_obstruction complementInterval continuous_complementInterval (by
    intro h
    have := congrArg Subtype.val h
    norm_num [complementInterval] at this)

On this site: The complement of the fourteen-set example is not totally path disconnected

theorem cardinality_of_interval

TopologyByExample.ClosureComplementSubsets.cardinality_of_interval

private theorem cardinality_of_interval {s : Set ℝ} (f : unitInterval → s)
    (hf : Function.Injective f) : CardinalityContinuum s
Proof
:= by
  apply le_antisymm
  · simpa only [Cardinal.mk_real] using Cardinal.mk_subtype_le (fun x : ℝ ↦ x ∈ s)
  · simpa only [Cardinal.mk_unitInterval] using Cardinal.mk_le_of_injective hf

theorem cardinality_original

TopologyByExample.ClosureComplementSubsets.cardinality_original

The original set has continuum many points.

theorem cardinality_original : CardinalityContinuum OriginalSpace
Proof
:=
  cardinality_of_interval originalInterval (fun _ _ h ↦ Subtype.ext
    (add_right_cancel (congrArg Subtype.val h)))

On this site: The original fourteen-set example has cardinality equal to \(\mathfrak{c}\)

theorem cardinality_complement

TopologyByExample.ClosureComplementSubsets.cardinality_complement

The complementary set has continuum many points.

theorem cardinality_complement : CardinalityContinuum ComplementSpace
Proof
:=
  cardinality_of_interval complementInterval (fun _ _ h ↦ Subtype.ext
    (sub_left_injective (congrArg Subtype.val h)))

On this site: The complement of the fourteen-set example has cardinality equal to \(\mathfrak{c}\)

theorem isGdelta_complement

TopologyByExample.ClosureComplementSubsets.isGdelta_complement

The complement of the original real subset is a G-delta set.

theorem isGdelta_complement : IsGδ originalᶜ
Proof
:= by
  unfold original
  rw [compl_union, compl_union, compl_union]
  exact countable_exceptional.isGδ_compl.inter
    (((isOpen_Ioo.isClosed_compl.isGδ).inter
      (isOpen_Ioo.isClosed_compl.isGδ)).inter isClosed_Icc.isOpen_compl.isGδ)

theorem completelyMetrizable_complement

TopologyByExample.ClosureComplementSubsets.completelyMetrizable_complement

The exact complementary subspace admits a complete compatible metric.

theorem completelyMetrizable_complement : IsCompletelyMetrizableSpace ComplementSpace
Proof
:=
  isGdelta_complement.isCompletelyMetrizableSpace

On this site: The complement of the fourteen-set example is completely metrizable

theorem secondCountable_original

TopologyByExample.ClosureComplementSubsets.secondCountable_original

The original subspace has a countable basis.

theorem secondCountable_original : SecondCountableTopology OriginalSpace
Proof
:= inferInstance

theorem secondCountable_complement

TopologyByExample.ClosureComplementSubsets.secondCountable_complement

The complementary subspace has a countable basis.

theorem secondCountable_complement : SecondCountableTopology ComplementSpace
Proof
:= inferInstance

On this site: The complement of the fourteen-set example is second countable