Lean library · module TopologyByExample.Spaces.DeletedSequenceOfIntervals

The deleted sequence of intervals topology

Source file

Let A = ⋃ₙ [1 / (2n + 1), 1 / (2n)] (n ≥ 1), a union of closed intervals accumulating only at 0. The deleted sequence of intervals topology on ℝ is generated by the usual open sets together with ℝ \ A. It agrees with the usual topology away from 0, while the neighbourhoods of 0 are the sets containing some (-ε, ε) \ A. It is the analogue of the K-topology in which the points 1 / n are replaced by intervals.

Indexing by aₖ = 1 / (k + 1) (so that the n-th interval is [a_{2n+2}, a_{2n+1}] for n : ℕ), the gaps between consecutive intervals are (a_{2n+1}, a_{2n}).

The topology is finer than the usual one, second countable and σ-compact; it is connected but not locally connected at 0, and not path connected: a path cannot leave 0 to the right, since every interval [0, p] with p > 0 meets A. Its regular open sets form a base (the sets (-δ, δ) \ A are regular open), so it is semiregular, while the closed sets A ∩ [0, a_{2n+1}] show that it is not countably paracompact.

Main definitions

Main statements

  • TopologyByExample.DeletedSequenceOfIntervals.continuousAt_toReal_symm: away from 0 the topology agrees with the usual one.
  • The values of the grid: instSecondCountableTopology, submetrizableSpace, instSigmaCompactSpace, baireSpace, preconnectedSpace, semiregularSpace, not_pathPreconnectedSpace, not_locallyConnectedSpace, not_countablyParacompactSpace, not_pseudocompactSpace, not_totallyPathDisconnectedSpace.

References

  • D. Gao, answer to "Are submetrizable semiregular spaces regular?", Mathematics Stack Exchange question 4996886.

Tags

deleted sequence of intervals, K-topology, semiregular, countably paracompact, counterexample

This file was written by Claude (Anthropic's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.

Imports

definition DeletedSequenceOfIntervals

TopologyByExample.DeletedSequenceOfIntervals

The real line with the deleted sequence of intervals topology: the topology generated by the usual open sets together with ℝ \ A, where A = ⋃ₙ [1 / (2n + 1), 1 / (2n)] (n ≥ 1) is TopologyByExample.DeletedSequenceOfIntervals.aSet.

def DeletedSequenceOfIntervals : Type
:= ℝ

On this site: Space: Deleted sequence of intervals topology

The set A

definition pt

TopologyByExample.DeletedSequenceOfIntervals.pt

The points aₖ = 1 / (k + 1).

def pt (k : ℕ) : ℝ
:= ((k : ℝ) + 1)⁻¹

theorem pt_pos

TopologyByExample.DeletedSequenceOfIntervals.pt_pos

theorem pt_pos (k : ℕ) : 0 < pt k
Proof
:= inv_pos.2 k.cast_add_one_pos

theorem pt_strictAnti

TopologyByExample.DeletedSequenceOfIntervals.pt_strictAnti

theorem pt_strictAnti : StrictAnti pt
Proof
:= fun m n hmn ↦ by
  unfold pt
  gcongr

theorem tendsto_pt

TopologyByExample.DeletedSequenceOfIntervals.tendsto_pt

theorem tendsto_pt : Tendsto pt atTop (𝓝 0)
Proof
:= by
  change Tendsto (fun n : ℕ ↦ ((n : ℝ) + 1)⁻¹) atTop (𝓝 0)
  simpa only [one_div] using tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)

theorem exists_pt_lt

TopologyByExample.DeletedSequenceOfIntervals.exists_pt_lt

For every ε > 0 there are arbitrarily late indices k with aₖ < ε.

theorem exists_pt_lt {ε : ℝ} (hε : 0 < ε) (N : ℕ) : ∃ k ≥ N, pt k < ε
Proof
:=
  ((tendsto_pt.eventually (gt_mem_nhds hε)).and (eventually_ge_atTop N)).exists.imp
    fun _ h ↦ ⟨h.2, h.1⟩

definition interval

TopologyByExample.DeletedSequenceOfIntervals.interval

The n-th interval [a_{2n+2}, a_{2n+1}].

def interval (n : ℕ) : Set ℝ
:= Icc (pt (2 * n + 2)) (pt (2 * n + 1))

definition aSet

TopologyByExample.DeletedSequenceOfIntervals.aSet

The set A = ⋃ₙ [a_{2n+2}, a_{2n+1}] = ⋃_{n ≥ 1} [1 / (2n + 1), 1 / (2n)].

def aSet : Set ℝ
:= ⋃ n, interval n

theorem pos_of_mem_aSet

TopologyByExample.DeletedSequenceOfIntervals.pos_of_mem_aSet

theorem pos_of_mem_aSet {x : ℝ} (hx : x ∈ aSet) : 0 < x
Proof
:= by
  obtain ⟨n, hn⟩ := mem_iUnion.1 hx
  exact (pt_pos _).trans_le hn.1

theorem zero_notMem_aSet

TopologyByExample.DeletedSequenceOfIntervals.zero_notMem_aSet

theorem zero_notMem_aSet : (0 : ℝ) ∉ aSet
Proof
:= fun h ↦ (pos_of_mem_aSet h).false

theorem pt_odd_mem_aSet

TopologyByExample.DeletedSequenceOfIntervals.pt_odd_mem_aSet

theorem pt_odd_mem_aSet (n : ℕ) : pt (2 * n + 1) ∈ aSet
Proof
:=
  mem_iUnion.2 ⟨n, (pt_strictAnti (by omega : 2 * n + 1 < 2 * n + 2)).le, le_rfl⟩

theorem notMem_aSet_of_mem_gap

TopologyByExample.DeletedSequenceOfIntervals.notMem_aSet_of_mem_gap

The gaps (a_{2n+1}, a_{2n}) miss A.

theorem notMem_aSet_of_mem_gap {n : ℕ} {x : ℝ} (h₁ : pt (2 * n + 1) < x) (h₂ : x < pt (2 * n)) :
    x ∉ aSet
Proof
:= fun hx ↦ by
  obtain ⟨m, hm₁, hm₂⟩ := mem_iUnion.1 hx
  have h₃ : 2 * n < 2 * m + 2 := pt_strictAnti.lt_iff_gt.1 (hm₁.trans_lt h₂)
  have h₄ : 2 * m + 1 < 2 * n + 1 := pt_strictAnti.lt_iff_gt.1 (h₁.trans_le hm₂)
  omega

theorem Ioo_subset_aSet

TopologyByExample.DeletedSequenceOfIntervals.Ioo_subset_aSet

The interior of each interval is a usual open set inside A.

theorem Ioo_subset_aSet (n : ℕ) : Ioo (pt (2 * n + 2)) (pt (2 * n + 1)) ⊆ aSet
Proof
:=
  fun _ hx ↦ mem_iUnion.2 ⟨n, Ioo_subset_Icc_self hx⟩

theorem isClosed_insert_zero_aSet

TopologyByExample.DeletedSequenceOfIntervals.isClosed_insert_zero_aSet

A ∪ {0} is closed in ℝ: it is the intersection over N of the closed sets [a_2, a_1] ∪ ⋯ ∪ [a_{2N}, a_{2N-1}] ∪ [0, a_{2N+1}].

theorem isClosed_insert_zero_aSet : IsClosed (insert 0 aSet)
Proof
:= by
  have : insert 0 aSet =
      ⋂ N : ℕ, ((⋃ n ∈ Finset.range N, interval n) ∪ Icc 0 (pt (2 * N + 1))) := by
    ext x
    simp only [mem_insert_iff, mem_iInter, mem_union, mem_iUnion, Finset.mem_range, exists_prop]
    constructor
    · rintro (rfl | hx) N
      · exact .inr ⟨le_rfl, (pt_pos _).le⟩
      · obtain ⟨n, hn⟩ := mem_iUnion.1 hx
        by_cases hnN : n < N
        · exact .inl ⟨n, hnN, hn⟩
        · exact .inr ⟨(pt_pos _).le.trans hn.1,
            hn.2.trans (pt_strictAnti.antitone (by omega))⟩
    · intro h
      by_cases hx : x ∈ aSet
      · exact .inr hx
      refine .inl (le_antisymm (le_of_forall_pos_le_add fun ε hε ↦ ?_) ?_)
      · obtain ⟨k, -, hk⟩ := exists_pt_lt hε 0
        rcases h k with ⟨n, -, hn⟩ | hk'
        · exact absurd (mem_iUnion.2 ⟨n, hn⟩) hx
        · linarith [hk'.2, pt_strictAnti.antitone (show k ≤ 2 * k + 1 by omega)]
      · rcases h 0 with ⟨n, hn, -⟩ | hk'
        · simp at hn
        · exact hk'.1
  rw [this]
  exact isClosed_iInter fun N ↦ (isClosed_biUnion_finset fun n _ ↦ isClosed_Icc).union isClosed_Icc

The topology

definition toReal

TopologyByExample.DeletedSequenceOfIntervals.toReal

The identity map from the space to ℝ.

def toReal : DeletedSequenceOfIntervals ≃ ℝ
:= Equiv.refl ℝ

instance

The space is nonempty.

instance : Nonempty DeletedSequenceOfIntervals
Proof
:= ⟨toReal.symm 0⟩

instance

The deleted sequence of intervals topology: the coarsest topology finer than the usual one in which ℝ \ A is open.

instance : TopologicalSpace DeletedSequenceOfIntervals
Proof
:=
  induced toReal inferInstance ⊓ generateFrom {toReal ⁻¹' aSetᶜ}

theorem continuous_toReal

TopologyByExample.DeletedSequenceOfIntervals.continuous_toReal

The topology is finer than the usual topology.

theorem continuous_toReal : Continuous toReal
Proof
:=
  continuous_iff_le_induced.2 inf_le_left

theorem isOpen_preimage_toReal

TopologyByExample.DeletedSequenceOfIntervals.isOpen_preimage_toReal

theorem isOpen_preimage_toReal {U : Set ℝ} (hU : IsOpen U) : IsOpen (toReal ⁻¹' U)
Proof
:=
  hU.preimage continuous_toReal

theorem isOpen_compl_aSet

TopologyByExample.DeletedSequenceOfIntervals.isOpen_compl_aSet

theorem isOpen_compl_aSet : IsOpen (toReal ⁻¹' aSetᶜ)
Proof
:=
  (inf_le_right : (inferInstance : TopologicalSpace DeletedSequenceOfIntervals) ≤ _) _
    (isOpen_generateFrom_of_mem rfl)

theorem isClosed_aSet

TopologyByExample.DeletedSequenceOfIntervals.isClosed_aSet

A is closed.

theorem isClosed_aSet : IsClosed (toReal ⁻¹' aSet)
Proof
:=
  isOpen_compl_iff.1 isOpen_compl_aSet

theorem nhds_eq_of_mem

TopologyByExample.DeletedSequenceOfIntervals.nhds_eq_of_mem

theorem nhds_eq_of_mem {x : DeletedSequenceOfIntervals} (hx : toReal x ∈ aSet) :
    𝓝 x = comap toReal (𝓝 (toReal x))
Proof
:= by
  refine (nhds_inf (t₁ := induced toReal inferInstance) (t₂ := generateFrom _)).trans ?_
  rw [nhds_induced, nhds_generateFrom]
  simp [hx]

theorem nhds_eq_of_notMem

TopologyByExample.DeletedSequenceOfIntervals.nhds_eq_of_notMem

theorem nhds_eq_of_notMem {x : DeletedSequenceOfIntervals} (hx : toReal x ∉ aSet) :
    𝓝 x = comap toReal (𝓝[aSetᶜ] (toReal x))
Proof
:= by
  refine (nhds_inf (t₁ := induced toReal inferInstance) (t₂ := generateFrom _)).trans ?_
  rw [nhds_induced, nhds_generateFrom, nhdsWithin, comap_inf, comap_principal]
  simp only [mem_ofPred_eq, mem_singleton_iff, and_comm (a := x ∈ _), iInf_and, iInf_iInf_eq_left]
  exact congrArg _ (iInf_pos hx)

theorem nhds_basis_of_notMem

TopologyByExample.DeletedSequenceOfIntervals.nhds_basis_of_notMem

At a point outside A, a basic neighbourhood is a usual one minus A.

theorem nhds_basis_of_notMem {x : DeletedSequenceOfIntervals} (hx : toReal x ∉ aSet) :
    (𝓝 x).HasBasis (0 < ·) fun ε ↦ toReal ⁻¹' (Ioo (toReal x - ε) (toReal x + ε) \ aSet)
Proof
:= by
  rw [nhds_eq_of_notMem hx]
  exact (nhdsWithin_hasBasis (nhds_basis_Ioo_pos _) _).comap _

theorem toReal_symm_zero_notMem

TopologyByExample.DeletedSequenceOfIntervals.toReal_symm_zero_notMem

theorem toReal_symm_zero_notMem : toReal (toReal.symm 0) ∉ aSet
Proof
:= by
  simpa using zero_notMem_aSet

theorem nhds_zero_basis

TopologyByExample.DeletedSequenceOfIntervals.nhds_zero_basis

The neighbourhoods of 0 are the sets containing some (-ε, ε) \ A.

theorem nhds_zero_basis :
    (𝓝 (toReal.symm 0)).HasBasis (0 < ·) fun ε ↦ toReal ⁻¹' (Ioo (-ε) ε \ aSet)
Proof
:= by
  simpa using nhds_basis_of_notMem toReal_symm_zero_notMem

theorem continuousAt_toReal_symm

TopologyByExample.DeletedSequenceOfIntervals.continuousAt_toReal_symm

Away from 0, the topology agrees with the usual topology: the identity from ℝ is continuous at every x ≠ 0.

theorem continuousAt_toReal_symm {x : ℝ} (hx : x ≠ 0) : ContinuousAt toReal.symm x
Proof
:= by
  by_cases hA : x ∈ aSet
  · rw [ContinuousAt, nhds_eq_of_mem (by simpa using hA), tendsto_comap_iff]
    simp only [Function.comp_def, Equiv.apply_symm_apply]
    exact tendsto_id
  · rw [ContinuousAt, nhds_eq_of_notMem (by simpa using hA), tendsto_comap_iff]
    simp only [Function.comp_def, Equiv.apply_symm_apply]
    refine tendsto_nhdsWithin_iff.2 ⟨tendsto_id, ?_⟩
    filter_upwards [isClosed_insert_zero_aSet.isOpen_compl.mem_nhds (by simp [hx, hA])] with y hy
    exact fun h ↦ hy (.inr h)

On this site: Deleted sequence of intervals topology: Away from \(0\) the topology agrees with the Euclidean topology

theorem preimage_mem_nhds

TopologyByExample.DeletedSequenceOfIntervals.preimage_mem_nhds

At a point y ≠ 0, every neighbourhood contains a usual neighbourhood.

theorem preimage_mem_nhds {y : ℝ} (hy : y ≠ 0) {s : Set DeletedSequenceOfIntervals}
    (hs : s ∈ 𝓝 (toReal.symm y)) : toReal.symm ⁻¹' s ∈ 𝓝 y
Proof
:=
  continuousAt_toReal_symm hy hs

theorem exists_pos_mem_of_mem_nhds

TopologyByExample.DeletedSequenceOfIntervals.exists_pos_mem_of_mem_nhds

Every neighbourhood of 0 contains a positive point outside A.

theorem exists_pos_mem_of_mem_nhds {V : Set DeletedSequenceOfIntervals}
    (hV : V ∈ 𝓝 (toReal.symm 0)) : ∃ p : ℝ, 0 < p ∧ p ∉ aSet ∧ toReal.symm p ∈ V
Proof
:= by
  obtain ⟨ε, hε, hεV⟩ := nhds_zero_basis.mem_iff.1 hV
  obtain ⟨k, -, hk⟩ := exists_pt_lt hε 0
  set p := (pt (2 * k + 1) + pt (2 * k)) / 2
  have h₁ : pt (2 * k + 1) < pt (2 * k) := pt_strictAnti (by omega)
  have h₂ : pt (2 * k) ≤ pt k := pt_strictAnti.antitone (by omega)
  have hp : p ∉ aSet :=
    notMem_aSet_of_mem_gap (n := k) (by simp only [p]; linarith) (by simp only [p]; linarith)
  have hp0 : 0 < p := by have := pt_pos (2 * k + 1); simp only [p]; linarith
  refine ⟨p, hp0, hp, hεV ?_⟩
  simp only [mem_preimage, Equiv.apply_symm_apply, Set.mem_sdiff, mem_Ioo]
  exact ⟨⟨by linarith, by simp only [p]; linarith⟩, hp⟩

Values

instance instSecondCountableTopology

TopologyByExample.DeletedSequenceOfIntervals.instSecondCountableTopology

The space is second countable.

instance instSecondCountableTopology : SecondCountableTopology DeletedSequenceOfIntervals
Proof
:=
  secondCountableTopology_inf (secondCountableTopology_induced _ ℝ toReal)
    (@SecondCountableTopology.mk _ (generateFrom _) ⟨_, countable_singleton _, rfl⟩)

On this site: The deleted sequence of intervals topology is second countable

instance instT2Space

TopologyByExample.DeletedSequenceOfIntervals.instT2Space

The space is Hausdorff, its topology being finer than the usual one.

instance instT2Space : T2Space DeletedSequenceOfIntervals
Proof
:=
  .of_injective_continuous toReal.injective continuous_toReal

theorem submetrizableSpace

TopologyByExample.DeletedSequenceOfIntervals.submetrizableSpace

The space is submetrizable: the usual topology of ℝ, carried over by the identity, is a coarser metrizable topology.

theorem submetrizableSpace : SubmetrizableSpace DeletedSequenceOfIntervals
Proof
:= by
  refine ⟨⟨induced toReal inferInstance, continuous_iff_le_induced.1 continuous_toReal, ?_⟩⟩
  let _ : TopologicalSpace DeletedSequenceOfIntervals := induced toReal inferInstance
  exact (Topology.IsEmbedding.mk ⟨rfl⟩ toReal.injective).metrizableSpace

On this site: The deleted sequence of intervals topology is submetrizable

theorem isCompact_image_toReal_symm

TopologyByExample.DeletedSequenceOfIntervals.isCompact_image_toReal_symm

A set that is compact in the usual topology and does not contain 0 is compact.

theorem isCompact_image_toReal_symm {C : Set ℝ} (hC : IsCompact C) (h0 : (0 : ℝ) ∉ C) :
    IsCompact (toReal.symm '' C)
Proof
:=
  hC.image_of_continuousOn fun _ hx ↦
    (continuousAt_toReal_symm fun h ↦ h0 (h ▸ hx)).continuousWithinAt

instance instSigmaCompactSpace

TopologyByExample.DeletedSequenceOfIntervals.instSigmaCompactSpace

The space is σ-compact: it is the union of {0} and the sets {x | 1 / (m + 1) ≤ |x| ≤ n}, which are compact.

instance instSigmaCompactSpace : SigmaCompactSpace DeletedSequenceOfIntervals
Proof
:= by
  refine .of_countable (insert {toReal.symm 0} (range fun p : ℕ × ℕ ↦
    toReal.symm '' {x : ℝ | ((p.1 : ℝ) + 1)⁻¹ ≤ |x| ∧ |x| ≤ p.2})) ((countable_range _).insert _)
    ?_ ?_
  · simp only [forall_mem_insert, isCompact_singleton, forall_mem_range, true_and]
    rintro ⟨m, n⟩
    refine isCompact_image_toReal_symm (isCompact_Icc.of_isClosed_subset
      ((isClosed_le continuous_const continuous_abs).inter
        (isClosed_le continuous_abs continuous_const)) fun x hx ↦ abs_le.1 hx.2) fun h ↦ ?_
    have := h.1
    rw [abs_zero] at this
    exact (inv_pos.2 m.cast_add_one_pos).not_ge this
  · refine eq_univ_of_forall fun x ↦ ?_
    by_cases hx : toReal x = 0
    · exact mem_sUnion_of_mem (by simp [← hx]) (mem_insert _ _)
    · obtain ⟨m, hm⟩ := exists_nat_one_div_lt (abs_pos.2 hx)
      obtain ⟨n, hn⟩ := exists_nat_ge |toReal x|
      refine mem_sUnion.2 ⟨_, mem_insert_of_mem _ ⟨(m, n), rfl⟩, toReal x, ⟨?_, hn⟩,
        toReal.symm_apply_apply x⟩
      rw [← one_div]
      exact hm.le

On this site: The deleted sequence of intervals topology is σ-compact

theorem baireSpace

TopologyByExample.DeletedSequenceOfIntervals.baireSpace

The space is a Baire space: it is finer than the usual topology, and every nonempty open set contains a nonempty usual open set (around a point other than 0).

theorem baireSpace : BaireSpace DeletedSequenceOfIntervals
Proof
:= by
  refine baireSpace_of_continuous_of_surjective continuous_toReal toReal.surjective
    fun U hU ⟨x, hx⟩ ↦ ?_
  obtain ⟨y, hy0, hyU⟩ : ∃ y : ℝ, y ≠ 0 ∧ toReal.symm y ∈ U := by
    by_cases hx0 : toReal x = 0
    · obtain ⟨p, hp, -, hpU⟩ := exists_pos_mem_of_mem_nhds
        (by rw [← hx0, Equiv.symm_apply_apply]; exact hU.mem_nhds hx)
      exact ⟨p, hp.ne', hpU⟩
    · exact ⟨toReal x, hx0, by simpa using hx⟩
  have hnhds : toReal.symm ⁻¹' U ∈ 𝓝 y := continuousAt_toReal_symm hy0 (hU.mem_nhds hyU)
  refine ⟨interior (toReal.symm ⁻¹' U), isOpen_interior,
    ⟨y, mem_interior_iff_mem_nhds.2 hnhds⟩, fun z hz ↦ ?_⟩
  have hz' : toReal z ∈ toReal.symm ⁻¹' U := interior_subset (mem_preimage.1 hz)
  rwa [mem_preimage, Equiv.symm_apply_apply] at hz'

On this site: The deleted sequence of intervals topology is a Baire space

theorem preconnectedSpace

TopologyByExample.DeletedSequenceOfIntervals.preconnectedSpace

The space is connected. The sets (-∞, 0) and (0, ∞) are connected, the topology agreeing with the usual one away from 0, and 0 lies in the closure of each.

theorem preconnectedSpace : PreconnectedSpace DeletedSequenceOfIntervals
Proof
:= by
  have hcont (s : Set ℝ) (hs : (0 : ℝ) ∉ s) : ContinuousOn toReal.symm s := fun x hx ↦
    (continuousAt_toReal_symm fun h ↦ hs (h ▸ hx)).continuousWithinAt
  have hpos : IsPreconnected (toReal.symm '' Ioi 0) :=
    isPreconnected_Ioi.image _ (hcont _ fun h ↦ lt_irrefl _ h)
  have hneg : IsPreconnected (toReal.symm '' Iio 0) :=
    isPreconnected_Iio.image _ (hcont _ fun h ↦ lt_irrefl _ h)
  have hpos' : toReal.symm 0 ∈ closure (toReal.symm '' Ioi 0) :=
    mem_closure_iff_nhds.2 fun V hV ↦ by
      obtain ⟨p, hp, -, hpV⟩ := exists_pos_mem_of_mem_nhds hV
      exact ⟨_, hpV, p, hp, rfl⟩
  have hneg' : toReal.symm 0 ∈ closure (toReal.symm '' Iio 0) := by
    refine (mem_closure_iff_nhds_basis nhds_zero_basis).2
      fun ε hε ↦ ⟨toReal.symm (-(ε / 2)), ⟨-(ε / 2), by simp only [mem_Iio]; linarith, rfl⟩, ?_⟩
    simp only [mem_preimage, Equiv.apply_symm_apply, Set.mem_sdiff]
    exact ⟨⟨by linarith, by linarith⟩, fun h ↦ by linarith [pos_of_mem_aSet h]⟩
  have h := (hneg.subset_closure (subset_insert _ _) (insert_subset hneg' subset_closure)).union
    (toReal.symm 0) (mem_insert _ _) (mem_insert _ _)
    (hpos.subset_closure (subset_insert _ _) (insert_subset hpos' subset_closure))
  refine ⟨?_⟩
  convert h using 1
  refine (eq_univ_of_forall fun x ↦ ?_).symm
  rcases lt_trichotomy (toReal x) 0 with hx | hx | hx
  · exact .inl (.inr ⟨toReal x, hx, by simp⟩)
  · exact .inl (.inl (by rw [← hx]; simp))
  · exact .inr (.inr ⟨toReal x, hx, by simp⟩)

On this site: The deleted sequence of intervals topology is connected

theorem not_locallyConnectedSpace

TopologyByExample.DeletedSequenceOfIntervals.not_locallyConnectedSpace

The space is not locally connected at 0. A connected open set containing 0 and missing A contains a positive point p; choosing a_{2n+1} < p in A, the open sets (-∞, a_{2n+1}) and (a_{2n+1}, ∞) would split it.

theorem not_locallyConnectedSpace : ¬LocallyConnectedSpace DeletedSequenceOfIntervals
Proof
:= fun h ↦ by
  obtain ⟨V, hVU, hVo, h0V, hVc⟩ := locallyConnectedSpace_iff_subsets_isOpen_isConnected.1 h
    (toReal.symm 0) _ (isOpen_compl_aSet.mem_nhds toReal_symm_zero_notMem)
  obtain ⟨p, hp, -, hpV⟩ := exists_pos_mem_of_mem_nhds (hVo.mem_nhds h0V)
  obtain ⟨k, -, hk⟩ := exists_pt_lt hp 0
  have hkn : pt (2 * k + 1) < p := (pt_strictAnti.antitone (by omega)).trans_lt hk
  have hA := pt_odd_mem_aSet k
  obtain ⟨z, -, hz₁, hz₂⟩ := hVc.isPreconnected _ _ (isOpen_preimage_toReal isOpen_Iio)
    (isOpen_preimage_toReal isOpen_Ioi) (fun x hx ↦ by
      rcases lt_trichotomy (toReal x) (pt (2 * k + 1)) with h | h | h
      · exact .inl h
      · exact absurd (h ▸ hA) (hVU hx)
      · exact .inr h)
    ⟨_, h0V, by simpa using pt_pos (2 * k + 1)⟩ ⟨toReal.symm p, hpV, by simpa using hkn⟩
  exact lt_asymm (show toReal z < _ from hz₁) hz₂

On this site: The deleted sequence of intervals topology is not locally connected

theorem not_pathPreconnectedSpace

TopologyByExample.DeletedSequenceOfIntervals.not_pathPreconnectedSpace

The space is not path connected: no path joins 0 to 1. Along a path, the set of times at which the path is at a point ≤ 0 is closed, and it is open: near a time at which the path is at 0 it stays in the neighbourhood ℝ \ A of 0, and a connected set of reals containing 0 and a positive point p contains [0, p], which meets A.

theorem not_pathPreconnectedSpace : ¬PathPreconnectedSpace DeletedSequenceOfIntervals
Proof
:= fun h ↦ by
  obtain ⟨γ⟩ := h.joined (toReal.symm 0) (toReal.symm 1)
  set g : ℝ → ℝ := fun t ↦ toReal (γ.extend t)
  have hg : Continuous g := continuous_toReal.comp γ.continuous_extend
  have hopen : IsOpen {t | g t ≤ 0} := by
    refine isOpen_iff_mem_nhds.2 fun t ht ↦ ?_
    rcases (show g t ≤ 0 from ht).lt_or_eq with hlt | heq
    · exact mem_of_superset ((isOpen_lt hg continuous_const).mem_nhds hlt) fun s hs ↦ le_of_lt hs
    · have hO : toReal ⁻¹' aSetᶜ ∈ 𝓝 (γ.extend t) :=
        isOpen_compl_aSet.mem_nhds (show g t ∉ aSet by rw [heq]; exact zero_notMem_aSet)
      obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.1 (γ.continuous_extend.continuousAt hO)
      refine Metric.mem_nhds_iff.2 ⟨ε, hε, fun s hs ↦ ?_⟩
      by_contra hpos
      have hpos : 0 < g s := lt_of_not_ge hpos
      obtain ⟨k, -, hk⟩ := exists_pt_lt hpos 0
      have hkn : pt (2 * k + 1) < g s := (pt_strictAnti.antitone (by omega)).trans_lt hk
      obtain ⟨u, hu, hgu⟩ := (isPreconnected_uIcc.image g hg.continuousOn).Icc_subset
        (mem_image_of_mem g left_mem_uIcc) (mem_image_of_mem g right_mem_uIcc)
        ⟨by rw [heq]; exact (pt_pos _).le, hkn.le⟩
      have hut : u ∈ Metric.ball t ε := by
        rw [Metric.mem_ball, Real.dist_eq]
        exact (abs_sub_left_of_mem_uIcc hu).trans_lt (by rwa [← Real.dist_eq])
      exact hball hut (show g u ∈ aSet from hgu ▸ pt_odd_mem_aSet k)
  have hclosed : IsClosed {t | g t ≤ 0} := isClosed_le hg continuous_const
  have huniv := IsClopen.eq_univ ⟨hclosed, hopen⟩ ⟨0, by simp [g]⟩
  have h1 : g 1 ≤ 0 := show 1 ∈ {t | g t ≤ 0} from huniv ▸ mem_univ 1
  have h1' : g 1 = 1 := by simp [g]
  linarith

On this site: The deleted sequence of intervals topology is not path connected

theorem not_countablyParacompactSpace

TopologyByExample.DeletedSequenceOfIntervals.not_countablyParacompactSpace

The space is not countably paracompact. The closed sets Fₙ = A ∩ [0, a_{2n+1}] decrease and have empty intersection, but every open set containing Fₙ contains, just to the right of each a_{2m+1} with m ≥ n, points of the gap (a_{2m+1}, a_{2m}), which accumulate at 0.

theorem not_countablyParacompactSpace :
    ¬CountablyParacompactSpace DeletedSequenceOfIntervals
Proof
:= fun _ ↦ by
  set F : ℕ → Set DeletedSequenceOfIntervals :=
    fun n ↦ toReal ⁻¹' (aSet ∩ Iic (pt (2 * n + 1)))
  have hFc (n : ℕ) : IsClosed (F n) :=
    isClosed_aSet.inter (isClosed_Iic.preimage continuous_toReal)
  have hFa : Antitone F := fun m n hmn x hx ↦
    ⟨hx.1, (show toReal x ≤ _ from hx.2).trans (pt_strictAnti.antitone (by omega))⟩
  have hF : ⋂ n, F n = ∅ := by
    refine eq_empty_of_forall_notMem fun x hx ↦ ?_
    have hpos := pos_of_mem_aSet (mem_iInter.1 hx 0).1
    obtain ⟨k, -, hk⟩ := exists_pt_lt hpos 0
    have := (mem_iInter.1 hx k).2
    have : pt (2 * k + 1) ≤ pt k := pt_strictAnti.antitone (by omega)
    simp only [mem_Iic] at *
    linarith
  obtain ⟨G, hGo, hFG, -, hG⟩ :=
    CountablyParacompactSpace.exists_open_iInter_closure_eq_empty hFc hFa hF
  have hmem : toReal.symm 0 ∈ ⋂ n, closure (G n) := mem_iInter.2 fun n ↦ by
    refine (mem_closure_iff_nhds_basis nhds_zero_basis).2 fun ε hε ↦ ?_
    obtain ⟨m, hmn, hm⟩ := exists_pt_lt hε (2 * n + 1)
    -- the point `a_{2m+1}`, with `m ≥ n` and `a_{2m+1} < ε`
    have hm' : pt (2 * m + 1) < ε := (pt_strictAnti.antitone (by omega)).trans_lt hm
    have hmF : toReal.symm (pt (2 * m + 1)) ∈ G n := hFG n
      ⟨by simpa using pt_odd_mem_aSet m, by simpa using pt_strictAnti.antitone (by omega)⟩
    obtain ⟨η, hη, hηG⟩ := Metric.mem_nhds_iff.1
      (preimage_mem_nhds (pt_pos _).ne' ((hGo n).mem_nhds hmF))
    set z := min (pt (2 * m + 1) + η / 2) ((pt (2 * m + 1) + min (pt (2 * m)) ε) / 2)
    have h₁ : pt (2 * m + 1) < pt (2 * m) := pt_strictAnti (by omega)
    have hz₁ : pt (2 * m + 1) < z := lt_min (by linarith) (by
      have := lt_min h₁ hm'; linarith)
    have hz₂ : z < pt (2 * m) := (min_le_right _ _).trans_lt (by
      have := min_le_left (pt (2 * m)) ε; have := lt_min h₁ hm'; linarith)
    have hz₃ : z < ε := (min_le_right _ _).trans_lt (by
      have := min_le_right (pt (2 * m)) ε; have := lt_min h₁ hm'; linarith)
    have hzA : z ∉ aSet := notMem_aSet_of_mem_gap hz₁ hz₂
    refine ⟨toReal.symm z, show z ∈ toReal.symm ⁻¹' G n from hηG ?_, ?_⟩
    rotate_left
    · simp only [mem_preimage, Equiv.apply_symm_apply, Set.mem_sdiff, mem_Ioo]
      exact ⟨⟨by linarith [pt_pos (2 * m + 1)], hz₃⟩, hzA⟩
    · rw [Metric.mem_ball, Real.dist_eq, abs_lt]
      constructor <;> linarith [min_le_left (pt (2 * m + 1) + η / 2)
        ((pt (2 * m + 1) + min (pt (2 * m)) ε) / 2)]
  rw [hG] at hmem
  exact hmem

On this site: The deleted sequence of intervals topology is not countably paracompact

theorem not_pseudocompactSpace

TopologyByExample.DeletedSequenceOfIntervals.not_pseudocompactSpace

The space is not pseudocompact: the identity to ℝ is an unbounded continuous real function.

theorem not_pseudocompactSpace : ¬PseudocompactSpace DeletedSequenceOfIntervals
Proof
:= by
  intro ⟨h⟩
  obtain ⟨⟨b, hb⟩, -⟩ := h ⟨toReal, continuous_toReal⟩
  obtain ⟨x, hx⟩ := exists_gt b
  exact (hb ⟨toReal.symm x, by simp⟩).not_gt hx

On this site: The deleted sequence of intervals topology is not pseudocompact

theorem not_totallyPathDisconnectedSpace

TopologyByExample.DeletedSequenceOfIntervals.not_totallyPathDisconnectedSpace

The space is not totally path disconnected: t ↦ 1 + t is a path from 1 to 2, the topology agreeing with the usual one away from 0.

theorem not_totallyPathDisconnectedSpace :
    ¬TotallyPathDisconnectedSpace DeletedSequenceOfIntervals
Proof
:= by
  intro ⟨h⟩
  have hcont : Continuous fun t : unitInterval ↦ toReal.symm (1 + (t : ℝ)) := by
    refine continuous_iff_continuousAt.2 fun t ↦ ?_
    have hne : (1 : ℝ) + t ≠ 0 := by have := t.property.1; linarith
    exact (continuousAt_toReal_symm hne).comp (f := fun t : unitInterval ↦ 1 + (t : ℝ))
      (continuous_const.add continuous_subtypeVal).continuousAt
  have hj : Joined (toReal.symm 1) (toReal.symm 2) :=
    ⟨{ toFun := fun t ↦ toReal.symm (1 + (t : ℝ))
       continuous_toFun := hcont
       source' := by simp
       target' := by norm_num }⟩
  have := congrArg toReal (h _ _ hj)
  norm_num at this

On this site: The deleted sequence of intervals topology is not totally path disconnected

Semiregularity

theorem interior_closure_Ioo_subset

TopologyByExample.DeletedSequenceOfIntervals.interior_closure_Ioo_subset

If b, c ≠ 0, the interior of the closure of (b, c) lies in (b, c): the closure lies in [b, c], and the endpoints have their usual neighbourhoods.

theorem interior_closure_Ioo_subset {b c : ℝ} (hb : b ≠ 0) (hc : c ≠ 0) :
    interior (closure (toReal ⁻¹' Ioo b c)) ⊆ toReal ⁻¹' Ioo b c
Proof
:= by
  have hcl : closure (toReal ⁻¹' Ioo b c) ⊆ toReal ⁻¹' Icc b c :=
    closure_minimal (preimage_mono Ioo_subset_Icc_self) (isClosed_Icc.preimage continuous_toReal)
  intro y hy
  have hy' := interior_mono hcl hy
  have hyIcc : toReal y ∈ Icc b c := mem_preimage.1 (interior_subset hy')
  have hmem : toReal ⁻¹' Icc b c ∈ 𝓝 (toReal.symm (toReal y)) := by
    rw [Equiv.symm_apply_apply]
    exact mem_interior_iff_mem_nhds.1 hy'
  refine ⟨lt_of_le_of_ne hyIcc.1 fun hby ↦ ?_, lt_of_le_of_ne hyIcc.2 fun hyc ↦ ?_⟩
  · rw [← hby] at hmem
    obtain ⟨ε, hε, hεs⟩ := Metric.mem_nhds_iff.1 (preimage_mem_nhds hb hmem)
    have := (hεs (show b - ε / 2 ∈ Metric.ball b ε by
      rw [Metric.mem_ball, Real.dist_eq, abs_lt]; constructor <;> linarith)).1
    simp only [Equiv.apply_symm_apply] at this
    linarith
  · rw [hyc] at hmem
    obtain ⟨ε, hε, hεs⟩ := Metric.mem_nhds_iff.1 (preimage_mem_nhds hc hmem)
    have := (hεs (show c + ε / 2 ∈ Metric.ball c ε by
      rw [Metric.mem_ball, Real.dist_eq, abs_lt]; constructor <;> linarith)).2
    simp only [Equiv.apply_symm_apply] at this
    linarith

theorem interior_closure_Ioo

TopologyByExample.DeletedSequenceOfIntervals.interior_closure_Ioo

For b, c ≠ 0, the interval (b, c) is regular open.

theorem interior_closure_Ioo {b c : ℝ} (hb : b ≠ 0) (hc : c ≠ 0) :
    interior (closure (toReal ⁻¹' Ioo b c)) = toReal ⁻¹' Ioo b c
Proof
:=
  (interior_closure_Ioo_subset hb hc).antisymm
    (interior_maximal subset_closure (isOpen_preimage_toReal isOpen_Ioo))

theorem exists_Ioo_of_mem_aSet

TopologyByExample.DeletedSequenceOfIntervals.exists_Ioo_of_mem_aSet

Every point of A lies in the closure of the interior of one of its intervals.

theorem exists_Ioo_of_mem_aSet {x : ℝ} (hx : x ∈ aSet) :
    ∃ n, x ∈ closure (Ioo (pt (2 * n + 2)) (pt (2 * n + 1)))
Proof
:= by
  obtain ⟨n, hn⟩ := mem_iUnion.1 hx
  exact ⟨n, by rwa [closure_Ioo (pt_strictAnti (by omega : 2 * n + 1 < 2 * n + 2)).ne]⟩

theorem interior_closure_Ioo_diff

TopologyByExample.DeletedSequenceOfIntervals.interior_closure_Ioo_diff

For δ > 0, the set (-δ, δ) \ A is regular open.

theorem interior_closure_Ioo_diff {δ : ℝ} (hδ : 0 < δ) :
    interior (closure (toReal ⁻¹' (Ioo (-δ) δ \ aSet))) = toReal ⁻¹' (Ioo (-δ) δ \ aSet)
Proof
:= by
  set V := toReal ⁻¹' (Ioo (-δ) δ \ aSet)
  have hVo : IsOpen V := (isOpen_preimage_toReal isOpen_Ioo).inter isOpen_compl_aSet
  refine Subset.antisymm (fun y hy ↦ ?_) (interior_maximal subset_closure hVo)
  have hI : y ∈ toReal ⁻¹' Ioo (-δ) δ := interior_closure_Ioo_subset (by linarith) hδ.ne'
    (interior_mono (closure_mono (preimage_mono sdiff_subset)) hy)
  refine ⟨hI, fun hyA ↦ ?_⟩
  have hy0 : toReal y ≠ 0 := (pos_of_mem_aSet hyA).ne'
  obtain ⟨n, hn⟩ := exists_Ioo_of_mem_aSet hyA
  have hW : toReal.symm ⁻¹' interior (closure V) ∈ 𝓝 (toReal y) :=
    preimage_mem_nhds hy0 (by simpa using isOpen_interior.mem_nhds hy)
  obtain ⟨z, hzW, hzI⟩ := mem_closure_iff_nhds.1 hn _ hW
  have hz' : toReal.symm z ∈ closure V :=
    interior_subset (show toReal.symm z ∈ interior (closure V) from hzW)
  obtain ⟨w, hwO, hwV⟩ := mem_closure_iff.1 hz'
    (toReal ⁻¹' Ioo (pt (2 * n + 2)) (pt (2 * n + 1))) (isOpen_preimage_toReal isOpen_Ioo)
    (show toReal (toReal.symm z) ∈ _ by rw [Equiv.apply_symm_apply]; exact hzI)
  exact hwV.2 (Ioo_subset_aSet n hwO)

On this site: Deleted sequence of intervals topology: The sets \((-\delta, \delta) \setminus A\) are regular open

theorem semiregularSpace

TopologyByExample.DeletedSequenceOfIntervals.semiregularSpace

The space is semiregular: the intervals (b, c) with b, c ≠ 0 and the sets (-δ, δ) \ A are regular open, and they form a base.

theorem semiregularSpace : SemiregularSpace DeletedSequenceOfIntervals
Proof
:= by
  refine ⟨isTopologicalBasis_of_isOpen_of_nhds (fun u (hu : interior (closure u) = u) ↦
    hu ▸ isOpen_interior) fun a u hau hu ↦ ?_⟩
  by_cases ha : toReal a = 0
  · have ha' : a = toReal.symm 0 := by rw [← ha]; simp
    subst ha'
    obtain ⟨ε, hε, hεu⟩ := nhds_zero_basis.mem_iff.1 (hu.mem_nhds hau)
    refine ⟨_, interior_closure_Ioo_diff hε, ?_, hεu⟩
    simp only [mem_preimage, Equiv.apply_symm_apply, Set.mem_sdiff, mem_Ioo]
    exact ⟨⟨by linarith, hε⟩, zero_notMem_aSet⟩
  · have hu' : toReal.symm ⁻¹' u ∈ 𝓝 (toReal a) :=
      preimage_mem_nhds ha (by rw [Equiv.symm_apply_apply]; exact hu.mem_nhds hau)
    obtain ⟨ε, hε, hεu⟩ := Metric.mem_nhds_iff.1 hu'
    set δ := min ε (|toReal a| / 2)
    have hpos : 0 < |toReal a| := abs_pos.2 ha
    have hδ : 0 < δ := lt_min hε (by linarith)
    have hδa : δ < |toReal a| := (min_le_right _ _).trans_lt (by linarith)
    have hb : toReal a - δ ≠ 0 := fun h ↦ by
      rcases abs_cases (toReal a) with ⟨h₁, -⟩ | ⟨h₁, -⟩ <;> linarith
    have hc : toReal a + δ ≠ 0 := fun h ↦ by
      rcases abs_cases (toReal a) with ⟨h₁, -⟩ | ⟨h₁, -⟩ <;> linarith
    refine ⟨_, interior_closure_Ioo hb hc, ⟨by linarith, by linarith⟩, fun y hy ↦ ?_⟩
    have : toReal y ∈ Metric.ball (toReal a) ε := by
      rw [Metric.mem_ball, Real.dist_eq, abs_lt]
      have := min_le_left ε (|toReal a| / 2)
      exact ⟨by linarith [hy.1], by linarith [hy.2]⟩
    simpa using hεu this

On this site: The deleted sequence of intervals topology is semiregular