Lean library · module TopologyByExample.Spaces.HartModifiedSubspaces

The two pieces of Hart's modified cocountable topology

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 cocountableInclusion

TopologyByExample.HartModifiedCocountable.cocountableInclusion

Inclusion of the real line with its cocountable topology.

def cocountableInclusion : CocountableTopology ℝ → HartModifiedCocountable
:=
  left ∘ CocountableTopology.of.symm

theorem cocountableInclusion_injective

TopologyByExample.HartModifiedCocountable.cocountableInclusion_injective

The real-part inclusion is injective.

theorem cocountableInclusion_injective : Function.Injective cocountableInclusion
Proof
:=
  Sum.inl_injective.comp CocountableTopology.of.symm.injective

theorem continuous_cocountableInclusion

TopologyByExample.HartModifiedCocountable.continuous_cocountableInclusion

The real-part inclusion is continuous.

theorem continuous_cocountableInclusion : Continuous cocountableInclusion
Proof
:=
  continuous_def.mpr fun s hs ↦ CocountableTopology.isOpen_iff.mpr fun hne ↦ by
    have hsn : s.Nonempty := by
      obtain ⟨x, hx⟩ := hne
      exact ⟨cocountableInclusion x, hx⟩
    exact ((hs hsn).1).preimage cocountableInclusion_injective

theorem isOpenMap_cocountableInclusion

TopologyByExample.HartModifiedCocountable.isOpenMap_cocountableInclusion

The real-part inclusion is open.

theorem isOpenMap_cocountableInclusion : IsOpenMap cocountableInclusion
Proof
:= by
  intro s hs hne
  have hsn : s.Nonempty := by
    obtain ⟨_, a, ha, _⟩ := hne
    exact ⟨a, ha⟩
  have hc := CocountableTopology.isOpen_iff.mp hs hsn
  let : Countable (OnePoint ℕ) := inferInstanceAs (Countable (Option ℕ))
  refine ⟨((hc.image cocountableInclusion).union (countable_range right)).mono ?_, ?_⟩
  · intro x hx
    cases x with
    | inl a =>
      apply Or.inl
      refine ⟨CocountableTopology.of a, ?_, rfl⟩
      intro ha
      exact hx ⟨CocountableTopology.of a, ha, rfl⟩
    | inr b => exact Or.inr ⟨b, rfl⟩
  · have he : right ⁻¹' (cocountableInclusion '' s) = ∅ := by
      apply eq_empty_iff_forall_notMem.mpr
      rintro x ⟨a, _, ha⟩
      exact Sum.inl_ne_inr ha
    rw [he]
    exact isOpen_empty

theorem isOpenEmbedding_cocountableInclusion

TopologyByExample.HartModifiedCocountable.isOpenEmbedding_cocountableInclusion

The cocountable real part is an open subspace with exactly its original topology.

theorem isOpenEmbedding_cocountableInclusion : IsOpenEmbedding cocountableInclusion
Proof
:=
  .of_continuous_injective_isOpenMap continuous_cocountableInclusion
    cocountableInclusion_injective isOpenMap_cocountableInclusion

On this site: Hart's modified cocountable topology: The cocountable part is an open subspace

theorem isClosedMap_right

TopologyByExample.HartModifiedCocountable.isClosedMap_right

Closed subsets of the attached sequence remain closed in the whole space.

theorem isClosedMap_right : IsClosedMap right
Proof
:= by
  intro s hs
  apply isOpen_compl_iff.mp
  intro _
  let : Countable (OnePoint ℕ) := inferInstanceAs (Countable (Option ℕ))
  refine ⟨by simpa using (countable_univ.mono (subset_univ s)).image right, ?_⟩
  have he : right ⁻¹' (right '' s)ᶜ = sᶜ := by
    rw [preimage_compl, preimage_image_eq _ (show Function.Injective right from Sum.inr_injective)]
  rw [he]
  exact hs.isOpen_compl

theorem isClosedEmbedding_right

TopologyByExample.HartModifiedCocountable.isClosedEmbedding_right

The attached sequence is a closed subspace with exactly its original topology.

theorem isClosedEmbedding_right : IsClosedEmbedding right
Proof
:=
  .of_continuous_injective_isClosedMap continuous_right Sum.inr_injective isClosedMap_right

On this site: Hart's modified cocountable topology: The attached convergent sequence is a closed subspace