Lean library · module TopologyByExample.Spaces.MichaelLine

The Michael line

Source file

The Michael line TopologyByExample.MichaelLine is the real line with the topology generated by the Euclidean open sets together with all sets of irrational numbers. Each irrational number is an isolated point, while each rational number keeps its Euclidean neighbourhoods.

Main definitions

Main statements

References

  • E. Michael, The product of a normal space and a metric space need not be normal, Bull. Amer. Math. Soc. 69 (1963), 375–376.
  • L. A. Steen and J. A. Seebach, Counterexamples in Topology, Example 71.

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 MichaelLine

TopologyByExample.MichaelLine

The Michael line: the real line with the topology generated by the Euclidean open sets and all sets of irrational numbers.

def MichaelLine : Type
:= ℝ

On this site: Space: Michael line

definition toReal

TopologyByExample.MichaelLine.toReal

The identity map from the Michael line to the real line.

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

instance

The topology of the Michael line: the coarsest topology finer than the Euclidean topology in which every set of irrational numbers is open.

instance : TopologicalSpace MichaelLine
Proof
:=
  induced toReal inferInstance ⊓ generateFrom {s | ∀ x ∈ s, Irrational (toReal x)}

theorem nhds_eq_inf

TopologyByExample.MichaelLine.nhds_eq_inf

The neighbourhood filter as the infimum of the Euclidean one and the generated one.

theorem nhds_eq_inf (x : MichaelLine) :
    𝓝 x = comap toReal (𝓝 (toReal x)) ⊓
      ⨅ s ∈ {s | x ∈ s ∧ s ∈ {s | ∀ y ∈ s, Irrational (toReal y)}}, 𝓟 s
Proof
:= by
  have : 𝓝 x = @nhds _ (induced toReal inferInstance) x ⊓
      @nhds _ (generateFrom {s | ∀ y ∈ s, Irrational (toReal y)}) x :=
    nhds_inf (t₁ := induced toReal inferInstance)
      (t₂ := generateFrom {s | ∀ y ∈ s, Irrational (toReal y)})
  rw [this, nhds_induced, nhds_generateFrom]

theorem nhds_of_irrational

TopologyByExample.MichaelLine.nhds_of_irrational

The neighbourhoods of an irrational point: it is isolated.

theorem nhds_of_irrational {x : MichaelLine} (hx : Irrational (toReal x)) : 𝓝 x = pure x
Proof
:= by
  refine le_antisymm ?_ (pure_le_nhds x)
  rw [nhds_eq_inf, ← principal_singleton]
  refine inf_le_of_right_le (iInf₂_le {x} ⟨rfl, ?_⟩)
  rintro y rfl
  exact hx

theorem nhds_of_not_irrational

TopologyByExample.MichaelLine.nhds_of_not_irrational

The neighbourhoods of a rational point are its Euclidean neighbourhoods.

theorem nhds_of_not_irrational {x : MichaelLine} (hx : ¬Irrational (toReal x)) :
    𝓝 x = comap toReal (𝓝 (toReal x))
Proof
:= by
  rw [nhds_eq_inf]
  refine inf_eq_left.2 (le_iInf₂ fun s hs ↦ ?_)
  exact absurd (hs.2 _ hs.1) hx

theorem continuous_toReal

TopologyByExample.MichaelLine.continuous_toReal

The identity map to the real line is continuous.

@[fun_prop]
theorem continuous_toReal : Continuous toReal
Proof
:= by
  refine continuous_iff_continuousAt.2 fun x ↦ ?_
  by_cases hx : Irrational (toReal x)
  · rw [ContinuousAt, nhds_of_irrational hx, tendsto_pure_left]
    exact fun s hs ↦ mem_of_mem_nhds hs
  · rw [ContinuousAt, nhds_of_not_irrational hx]
    exact tendsto_comap

theorem isOpen_preimage

TopologyByExample.MichaelLine.isOpen_preimage

The preimage of a Euclidean open set is open.

theorem isOpen_preimage {s : Set ℝ} (hs : IsOpen s) : IsOpen (toReal ⁻¹' s)
Proof
:=
  hs.preimage continuous_toReal

theorem isOpen_singleton

TopologyByExample.MichaelLine.isOpen_singleton

An irrational point is isolated.

theorem isOpen_singleton {x : MichaelLine} (hx : Irrational (toReal x)) : IsOpen ({x} : Set _)
Proof
:=
  isOpen_singleton_iff_nhds_eq_pure x |>.2 (nhds_of_irrational hx)

theorem isOpen_of_forall_irrational

TopologyByExample.MichaelLine.isOpen_of_forall_irrational

A set of irrational points is open.

theorem isOpen_of_forall_irrational {s : Set MichaelLine} (hs : ∀ x ∈ s, Irrational (toReal x)) :
    IsOpen s
Proof
:= by
  rw [← biUnion_of_singleton s]
  exact isOpen_biUnion fun x hx ↦ isOpen_singleton (hs x hx)

theorem mem_nhds_of_not_irrational

TopologyByExample.MichaelLine.mem_nhds_of_not_irrational

A set is a neighbourhood of a rational point exactly when it contains the trace of a Euclidean neighbourhood.

theorem mem_nhds_of_not_irrational {x : MichaelLine} (hx : ¬Irrational (toReal x))
    {s : Set MichaelLine} : s ∈ 𝓝 x ↔ ∃ t ∈ 𝓝 (toReal x), toReal ⁻¹' t ⊆ s
Proof
:= by
  rw [nhds_of_not_irrational hx, mem_comap]

instance

The Michael line is Hausdorff, its topology being finer than the Euclidean one.

instance : T2Space MichaelLine
Proof
:= T2Space.of_injective_continuous toReal.injective continuous_toReal

instance

The Michael line is nonempty.

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

theorem isClosed_rationals

TopologyByExample.MichaelLine.isClosed_rationals

The rational points form a closed set.

theorem isClosed_rationals : IsClosed {x : MichaelLine | ¬Irrational (toReal x)}
Proof
:= by
  rw [← isOpen_compl_iff]
  exact isOpen_of_forall_irrational fun x hx ↦ not_not.1 hx

theorem toReal_symm_apply

TopologyByExample.MichaelLine.toReal_symm_apply

A point of the real line whose image is the given real number.

theorem toReal_symm_apply (r : ℝ) : toReal (toReal.symm r) = r
Proof
:= toReal.apply_symm_apply r

theorem dense_irrationals

TopologyByExample.MichaelLine.dense_irrationals

The irrational points are dense.

theorem dense_irrationals : Dense {x : MichaelLine | Irrational (toReal x)}
Proof
:= by
  refine fun x ↦ mem_closure_iff_nhds.2 fun t ht ↦ ?_
  by_cases hx : Irrational (toReal x)
  · exact ⟨x, mem_of_mem_nhds ht, hx⟩
  · obtain ⟨u, hu, hut⟩ := (mem_nhds_of_not_irrational hx).1 ht
    obtain ⟨r, hr, hru⟩ := dense_irrational.inter_nhds_nonempty hu
    exact ⟨toReal.symm r, hut (by simpa [toReal_symm_apply] using hru), by
      simpa [toReal_symm_apply] using hr⟩

First countability

instance instFirstCountableTopology

TopologyByExample.MichaelLine.instFirstCountableTopology

The Michael line is first countable.

instance instFirstCountableTopology : FirstCountableTopology MichaelLine
Proof
:= ⟨fun x ↦ by
  by_cases hx : Irrational (toReal x)
  · rw [nhds_of_irrational hx]; infer_instance
  · rw [nhds_of_not_irrational hx]; infer_instance⟩

On this site: The Michael line is first countable

Zero-dimensionality

theorem isClopen_preimage_Ioo

TopologyByExample.MichaelLine.isClopen_preimage_Ioo

An interval with irrational endpoints is open and closed.

theorem isClopen_preimage_Ioo {a b : ℝ} (ha : Irrational a) (hb : Irrational b) :
    IsClopen (toReal ⁻¹' Ioo a b)
Proof
:= by
  refine ⟨?_, isOpen_preimage isOpen_Ioo⟩
  have : (toReal ⁻¹' Ioo a b)ᶜ =
      toReal ⁻¹' (Iio a ∪ Ioi b) ∪ {x | toReal x = a ∨ toReal x = b} := by
    ext x
    simp only [mem_compl_iff, mem_preimage, mem_Ioo, mem_union, mem_Iio, mem_Ioi, mem_ofPred_eq]
    constructor
    · intro h
      rcases lt_trichotomy (toReal x) a with h1 | h1 | h1
      · exact .inl (.inl h1)
      · exact .inr (.inl h1)
      · rcases lt_trichotomy (toReal x) b with h2 | h2 | h2
        · exact absurd ⟨h1, h2⟩ h
        · exact .inr (.inr h2)
        · exact .inl (.inr h2)
    · rintro (h | h | h) ⟨h1, h2⟩
      · exact h.elim (fun h ↦ h.not_gt h1) fun h ↦ h.not_gt h2
      · exact h1.ne' h
      · exact h2.ne h
  rw [← isOpen_compl_iff, this]
  refine (isOpen_preimage (isOpen_Iio.union isOpen_Ioi)).union
    (isOpen_of_forall_irrational ?_)
  rintro x (h | h) <;> rw [h] <;> assumption

theorem nhds_basis_Ioo_irrational

TopologyByExample.nhds_basis_Ioo_irrational

The intervals with irrational endpoints around a real number form a neighbourhood base.

theorem _root_.TopologyByExample.nhds_basis_Ioo_irrational (r : ℝ) :
    (𝓝 r).HasBasis (fun p : ℝ × ℝ ↦ Irrational p.1 ∧ Irrational p.2 ∧ p.1 < r ∧ r < p.2)
      fun p ↦ Ioo p.1 p.2
Proof
:= by
  refine (nhds_basis_Ioo r).to_hasBasis (fun p hp ↦ ?_) fun p hp ↦ ⟨p, hp.2.2, subset_rfl⟩
  obtain ⟨a, ha, h1, h2⟩ := exists_irrational_btwn hp.1
  obtain ⟨b, hb, h3, h4⟩ := exists_irrational_btwn hp.2
  exact ⟨(a, b), ⟨ha, hb, h2, h3⟩, Ioo_subset_Ioo h1.le h4.le⟩

instance instZeroDimensionalSpace

TopologyByExample.MichaelLine.instZeroDimensionalSpace

The Michael line is zero-dimensional: the singletons of irrational points and the intervals with irrational endpoints are open and closed and form a base.

instance instZeroDimensionalSpace : ZeroDimensionalSpace MichaelLine
Proof
:= by
  refine ZeroDimensionalSpace.of_hasBasis fun x ↦ ?_
  by_cases hx : Irrational (toReal x)
  · refine ⟨Unit, fun _ ↦ True, fun _ ↦ {x}, fun _ _ ↦ ⟨isClosed_singleton, isOpen_singleton hx⟩,
      ?_⟩
    rw [nhds_of_irrational hx]
    exact hasBasis_pure x
  · refine ⟨ℝ × ℝ,
      fun p ↦ Irrational p.1 ∧ Irrational p.2 ∧ p.1 < toReal x ∧ toReal x < p.2,
      fun p ↦ toReal ⁻¹' Ioo p.1 p.2, fun p hp ↦ isClopen_preimage_Ioo hp.1 hp.2.1, ?_⟩
    rw [nhds_of_not_irrational hx]
    exact (nhds_basis_Ioo_irrational _).comap _

On this site: The Michael line is zero-dimensional

instance instTotallySeparatedSpace

TopologyByExample.MichaelLine.instTotallySeparatedSpace

The Michael line is totally separated.

instance instTotallySeparatedSpace : TotallySeparatedSpace MichaelLine
Proof
:= inferInstance

On this site: The Michael line is totally separated

The Baire property

instance instBaireSpace

TopologyByExample.MichaelLine.instBaireSpace

The Michael line is a Baire space: a dense set contains every isolated point, so a countable intersection of dense open sets contains the dense set of irrational points.

instance instBaireSpace : BaireSpace MichaelLine
Proof
:= ⟨fun f _ hd ↦ by
  refine dense_irrationals.mono fun x hx ↦ mem_iInter.2 fun n ↦ ?_
  obtain ⟨y, hy, hyf⟩ := (hd n).inter_open_nonempty {x} (isOpen_singleton hx) ⟨x, rfl⟩
  rwa [mem_singleton_iff.1 hy] at hyf⟩

On this site: The Michael line is a Baire space

Perfect normality

theorem not_isGδ_rationals

TopologyByExample.MichaelLine.not_isGδ_rationals

The rational points form a closed set that is not a G_δ set: otherwise the rationals would be a dense G_δ subset of the real line, disjoint from the dense G_δ set of irrationals.

theorem not_isGδ_rationals : ¬IsGδ {x : MichaelLine | ¬Irrational (toReal x)}
Proof
:= by
  rintro ⟨T, hTo, hT, hR⟩
  set W : Set ℝ := ⋂ t ∈ T, interior (toReal.symm ⁻¹' t)
  have hW : IsGδ W := IsGδ.biInter_of_isOpen hT fun _ _ ↦ isOpen_interior
  have hWeq : W = {r | ¬Irrational r} := by
    ext r
    simp only [W, mem_iInter, mem_ofPred_eq]
    constructor
    · intro h
      have : toReal.symm r ∈ ⋂₀ T := mem_sInter.2 fun t ht ↦
        (interior_subset (h t ht) : r ∈ toReal.symm ⁻¹' t)
      rw [← hR] at this
      simpa [toReal_symm_apply] using this
    · intro hr t ht
      have hxR : toReal.symm r ∈ ⋂₀ T := by rw [← hR]; simpa [toReal_symm_apply] using hr
      have hxt : t ∈ 𝓝 (toReal.symm r) := (hTo t ht).mem_nhds (mem_sInter.1 hxR t ht)
      obtain ⟨u, hu, hut⟩ := (mem_nhds_of_not_irrational (by simpa [toReal_symm_apply])).1 hxt
      rw [toReal_symm_apply] at hu
      refine mem_interior_iff_mem_nhds.2 (mem_of_superset hu fun y hy ↦ ?_)
      exact hut (show toReal (toReal.symm y) ∈ u by rw [toReal_symm_apply]; exact hy)
  have hd : Dense W := by
    rw [hWeq]
    exact (Rat.denseRange_cast (𝕜 := ℝ)).mono (by rintro _ ⟨q, rfl⟩; exact q.not_irrational)
  obtain ⟨r, hr1, hr2⟩ := (hd.inter_of_Gδ hW IsGδ.setOfPred_irrational dense_irrational).nonempty
  rw [hWeq] at hr1
  exact hr1 hr2

theorem isClosed_rationals_and_not_isGδ

TopologyByExample.MichaelLine.isClosed_rationals_and_not_isGδ

The rational points form a closed set that is not a G_δ set.

theorem isClosed_rationals_and_not_isGδ :
    IsClosed {x : MichaelLine | ¬Irrational (toReal x)} ∧
      ¬IsGδ {x : MichaelLine | ¬Irrational (toReal x)}
Proof
:=
  ⟨isClosed_rationals, not_isGδ_rationals⟩

On this site: Michael line: The rationals are closed but not a \(G_\delta\) set

theorem not_perfectlyNormalSpace

TopologyByExample.MichaelLine.not_perfectlyNormalSpace

The Michael line is not perfectly normal.

theorem not_perfectlyNormalSpace : ¬PerfectlyNormalSpace MichaelLine
Proof
:=
  not_perfectlyNormalSpace_of_isClosed isClosed_rationals not_isGδ_rationals

On this site: The Michael line is not perfectly normal

Scatteredness

theorem preperfect_rationals

TopologyByExample.MichaelLine.preperfect_rationals

The set of rational points has no isolated point.

theorem preperfect_rationals : Preperfect {x : MichaelLine | ¬Irrational (toReal x)}
Proof
:= by
  intro x hx
  refine accPt_iff_nhds.2 fun U hU ↦ ?_
  obtain ⟨u, hu, huU⟩ := (mem_nhds_of_not_irrational hx).1 hU
  obtain ⟨ε, hε, hεu⟩ := Metric.mem_nhds_iff.1 hu
  obtain ⟨q, hq1, hq2⟩ := exists_rat_btwn (lt_add_of_pos_right (toReal x) hε)
  refine ⟨toReal.symm q, ⟨huU ?_, ?_⟩, ?_⟩
  · rw [mem_preimage, toReal_symm_apply]
    refine hεu ?_
    rw [Metric.mem_ball, Real.dist_eq, abs_lt]
    constructor <;> linarith
  · simp
  · intro h
    have := congrArg toReal h
    rw [toReal_symm_apply] at this
    exact hq1.ne' this

theorem not_scatteredSpace

TopologyByExample.MichaelLine.not_scatteredSpace

The Michael line is not scattered: the rational points form a nonempty set without isolated points.

theorem not_scatteredSpace : ¬ScatteredSpace MichaelLine
Proof
:= fun h ↦ by
  have := h.eq_empty_of_preperfect _ preperfect_rationals
  have h0 : toReal.symm 0 ∈ {x : MichaelLine | ¬Irrational (toReal x)} := by
    simp
  rw [this] at h0
  exact h0

On this site: The Michael line is not scattered

Weak local compactness

theorem not_weaklyLocallyCompactSpace

TopologyByExample.MichaelLine.not_weaklyLocallyCompactSpace

The Michael line is not weakly locally compact: a compact neighbourhood of a rational point would contain an infinite set of irrational points that is closed in the real line, which would be compact and discrete.

theorem not_weaklyLocallyCompactSpace : ¬WeaklyLocallyCompactSpace MichaelLine
Proof
:= fun h ↦ by
  obtain ⟨K, hK, hKn⟩ := h.exists_compact_mem_nhds (toReal.symm 0)
  obtain ⟨u, hu, huK⟩ := (mem_nhds_of_not_irrational (x := toReal.symm 0)
    (by simp)).1 hKn
  have hu' : u ∈ 𝓝 (0 : ℝ) := by rwa [toReal_symm_apply] at hu
  obtain ⟨ε, hε, hεu⟩ := Metric.mem_nhds_iff.1 hu'
  obtain ⟨a, ha, ha0, haε⟩ := exists_irrational_btwn (half_pos hε)
  obtain ⟨M, hM⟩ := exists_nat_one_div_lt (half_pos hε)
  set c : ℕ → ℝ := fun n ↦ a + 1 / ((n + M : ℕ) + 1 : ℝ)
  have hc : Tendsto c atTop (𝓝 a) := by
    simpa [c] using tendsto_const_nhds.add
      ((tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)).comp (tendsto_add_atTop_nat M))
  have hcinj : Function.Injective c := by
    intro n m hnm
    simp only [c, add_right_inj, one_div, inv_inj, add_left_inj, Nat.cast_inj] at hnm
    omega
  set C : Set ℝ := insert a (range c)
  have hCirr : ∀ y ∈ C, Irrational y := by
    rintro y (rfl | ⟨n, rfl⟩)
    · exact ha
    · have : (1 / ((n + M : ℕ) + 1 : ℝ)) = ((1 / ((n + M : ℕ) + 1 : ℚ) : ℚ) : ℝ) := by
        push_cast; ring
      simp only [c]
      rw [this]
      exact Irrational.add_ratCast _ ha
  have hCu : C ⊆ u := by
    rintro y (rfl | ⟨n, rfl⟩) <;> refine hεu ?_ <;>
      rw [Metric.mem_ball, Real.dist_eq, sub_zero, abs_lt]
    · constructor <;> linarith
    · have h1 : 0 < 1 / ((n + M : ℕ) + 1 : ℝ) := by positivity
      have h2 : 1 / ((n + M : ℕ) + 1 : ℝ) ≤ 1 / ((M : ℝ) + 1) :=
        one_div_le_one_div_of_le (by positivity) (by push_cast; linarith [n.cast_nonneg (α := ℝ)])
      simp only [c]
      constructor <;> linarith
  set S : Set MichaelLine := toReal ⁻¹' C
  have hSc : IsCompact S := hK.of_isClosed_subset
    (hc.isCompact_insert_range.isClosed.preimage continuous_toReal)
    fun y hy ↦ huK (hCu hy)
  have hSd : IsDiscrete S := isDiscrete_iff_nhdsWithin.2 fun y hy ↦
    le_antisymm (nhdsWithin_le_nhds.trans (nhds_of_irrational (hCirr _ hy)).le)
      (pure_le_nhdsWithin hy)
  have hCfin : C.Finite := (hSc.finite hSd).of_preimage toReal.surjective
  exact Set.infinite_range_of_injective hcinj (hCfin.subset (subset_insert _ _))

On this site: The Michael line is not weakly locally compact

Countable extent

theorem exists_isClosed_not_countable_forall_irrational

TopologyByExample.exists_isClosed_not_countable_forall_irrational

There is an uncountable closed set of irrational numbers: the points of [0, 1] outside an open set of measure less than 1 containing every rational number.

theorem _root_.TopologyByExample.exists_isClosed_not_countable_forall_irrational :
    ∃ K : Set ℝ, IsClosed K ∧ ¬K.Countable ∧ ∀ x ∈ K, Irrational x
Proof
:= by
  open MeasureTheory in
  have hQ : volume {x : ℝ | ¬Irrational x} < 1 := by
    rw [(countable_range ((↑) : ℚ → ℝ)).mono (fun x hx ↦ by simpa [Irrational] using hx)
      |>.measure_zero volume]
    exact zero_lt_one
  obtain ⟨U, hQU, hUo, hU⟩ := Set.exists_isOpen_lt_of_lt _ _ hQ
  refine ⟨Icc 0 1 \ U, isClosed_Icc.sdiff hUo, fun hc ↦ ?_, fun x hx ↦ ?_⟩
  · have h1 : MeasureTheory.volume (Icc (0 : ℝ) 1) ≤
        MeasureTheory.volume (Icc (0 : ℝ) 1 \ U) + MeasureTheory.volume U :=
      (MeasureTheory.measure_mono (by simp)).trans (MeasureTheory.measure_union_le _ _)
    rw [hc.measure_zero, zero_add, Real.volume_Icc, sub_zero, ENNReal.ofReal_one] at h1
    exact h1.not_gt hU
  · by_contra h
    exact hx.2 (hQU h)

theorem not_countableExtent

TopologyByExample.MichaelLine.not_countableExtent

The Michael line does not have countable extent: an uncountable closed set of irrational numbers is closed and discrete.

theorem not_countableExtent :
    ¬∀ s : Set MichaelLine, ¬s.Countable → ∃ x, AccPt x (𝓟 s)
Proof
:= fun h ↦ by
  obtain ⟨K, hKc, hKu, hKi⟩ := exists_isClosed_not_countable_forall_irrational
  obtain ⟨x, hx⟩ := h (toReal ⁻¹' K) fun hc ↦ hKu <| by
    simpa using hc.image toReal
  by_cases hxi : Irrational (toReal x)
  · obtain ⟨y, ⟨hyU, -⟩, hyx⟩ := accPt_iff_nhds.1 hx {x} (by
      rw [nhds_of_irrational hxi]; exact mem_pure.2 rfl)
    exact hyx hyU
  · obtain ⟨y, ⟨hyU, hyK⟩, -⟩ := accPt_iff_nhds.1 hx (toReal ⁻¹' Kᶜ)
      ((isOpen_preimage hKc.isOpen_compl).mem_nhds fun hxK ↦ hxi (hKi _ hxK))
    exact hyU hyK

On this site: The Michael line does not have countable extent

Paracompactness

theorem paracompactSpace_subtype

TopologyByExample.MichaelLine.paracompactSpace_subtype

Every subspace of the Michael line is paracompact. Given an open cover of a subspace s, the Euclidean open sets whose traces on s lie in a member of the cover have a union G containing every rational point of s; a locally finite refinement of this cover of the metrizable space G, together with the singletons of the (irrational) points of s outside G, is a locally finite open refinement.

theorem paracompactSpace_subtype (s : Set MichaelLine) : ParacompactSpace s
Proof
:= by
  refine ⟨fun α u hu hcov ↦ ?_⟩
  set E : α → Set ℝ := fun a ↦ ⋃₀ {v : Set ℝ | IsOpen v ∧ ∀ y : s, toReal y.val ∈ v → y ∈ u a}
  have hEo : ∀ a, IsOpen (E a) := fun a ↦ isOpen_sUnion fun v hv ↦ hv.1
  have hEu : ∀ a (y : s), toReal y.val ∈ E a → y ∈ u a := by
    rintro a y ⟨v, hv, hy⟩
    exact hv.2 y hy
  set G : Set ℝ := ⋃ a, E a
  have hGo : IsOpen G := isOpen_iUnion hEo
  have hrat : ∀ y : s, ¬Irrational (toReal y.val) → toReal y.val ∈ G := by
    intro y hy
    obtain ⟨a, ha⟩ := mem_iUnion.1 (hcov ▸ mem_univ y)
    obtain ⟨t, ht, hts⟩ := mem_comap.1 (nhds_subtype s y ▸ (hu a).mem_nhds ha)
    obtain ⟨v, hv, hvt⟩ := (mem_nhds_of_not_irrational hy).1 ht
    obtain ⟨w, hwv, hwo, hyw⟩ := mem_nhds_iff.1 hv
    exact mem_iUnion.2 ⟨a, w, ⟨hwo, fun z hz ↦ hts (hvt (hwv hz))⟩, hyw⟩
  -- a locally finite refinement of the cover of `G`
  obtain ⟨v, hvo, hvcov, hvlf, hvE⟩ := precise_refinement
    (fun a ↦ (Subtype.val ⁻¹' E a : Set G)) (fun a ↦ (hEo a).preimage continuous_subtypeVal)
    (eq_univ_of_forall fun x ↦ by
      obtain ⟨a, ha⟩ := mem_iUnion.1 x.property
      exact mem_iUnion.2 ⟨a, ha⟩)
  set W : α → Set ℝ := fun a ↦ Subtype.val '' v a
  have hWo : ∀ a, IsOpen (W a) := fun a ↦ hGo.isOpenMap_subtypeVal _ (hvo a)
  have hWE : ∀ a, W a ⊆ E a := by
    rintro a _ ⟨z, hz, rfl⟩
    exact hvE a hz
  have hWG : ∀ a, W a ⊆ G := by
    rintro a _ ⟨z, -, rfl⟩
    exact z.property
  -- the two families
  set t₁ : α → Set s := fun a ↦ {y | toReal y.val ∈ W a}
  set t₂ : {y : s // toReal y.val ∉ G} → Set s := fun p ↦ {p.val}
  have hcts : Continuous fun y : s ↦ toReal y.val := continuous_toReal.comp continuous_subtypeVal
  have hsing : ∀ y : s, toReal y.val ∉ G → IsOpen ({y} : Set s) := by
    intro y hy
    have : ({y} : Set s) = Subtype.val ⁻¹' {y.val} := by ext; simp [Subtype.ext_iff]
    rw [this]
    exact (isOpen_singleton (not_not.1 (mt (hrat y) hy))).preimage continuous_subtypeVal
  refine ⟨α ⊕ {y : s // toReal y.val ∉ G}, Sum.elim t₁ t₂, ?_, ?_, ?_, ?_⟩
  · rintro (a | p)
    · exact (hWo a).preimage hcts
    · exact hsing p.val p.property
  · refine eq_univ_of_forall fun y ↦ ?_
    by_cases hy : toReal y.val ∈ G
    · obtain ⟨a, ha⟩ := mem_iUnion.1 (hvcov ▸ mem_univ (⟨toReal y.val, hy⟩ : G))
      exact mem_iUnion.2 ⟨Sum.inl a, ⟨_, ha, rfl⟩⟩
    · exact mem_iUnion.2 ⟨Sum.inr ⟨y, hy⟩, rfl⟩
  · refine LocallyFinite.sumElim (fun y ↦ ?_) fun y ↦ ?_
    · by_cases hy : toReal y.val ∈ G
      · obtain ⟨N, hN, hNf⟩ := hvlf ⟨toReal y.val, hy⟩
        have hN' : Subtype.val '' N ∈ 𝓝 (toReal y.val) := by
          have h : Subtype.val '' N ∈ map Subtype.val (𝓝 (⟨toReal y.val, hy⟩ : G)) :=
            image_mem_map hN
          rwa [hGo.isOpenEmbedding_subtypeVal.map_nhds_eq] at h
        refine ⟨_, hcts.continuousAt.preimage_mem_nhds hN', hNf.subset ?_⟩
        rintro a ⟨z, hz1, hz2⟩
        obtain ⟨w, hw, hwz⟩ := hz1
        obtain ⟨w', hw', hw'z⟩ := hz2
        refine ⟨w, hw, ?_⟩
        rwa [Subtype.val_injective (hwz.trans hw'z.symm)]
      · refine ⟨{y}, (hsing y hy).mem_nhds rfl, (finite_empty).subset ?_⟩
        rintro a ⟨z, hz1, rfl⟩
        exact hy (hWG a hz1)
    · by_cases hy : toReal y.val ∈ G
      · refine ⟨_, hcts.continuousAt.preimage_mem_nhds (hGo.mem_nhds hy),
          (finite_empty).subset ?_⟩
        rintro p ⟨z, rfl, hz⟩
        exact p.property hz
      · refine ⟨{y}, (hsing y hy).mem_nhds rfl, (finite_singleton ⟨y, hy⟩).subset ?_⟩
        rintro p ⟨z, rfl, hz⟩
        exact Subtype.ext (mem_singleton_iff.1 hz)
  · rintro (a | p)
    · exact ⟨a, fun y hy ↦ hEu a y (hWE a hy)⟩
    · obtain ⟨a, ha⟩ := mem_iUnion.1 (hcov ▸ mem_univ p.val)
      exact ⟨a, singleton_subset_iff.2 ha⟩

On this site: Michael line: Every subspace is paracompact

instance instParacompactSpace

TopologyByExample.MichaelLine.instParacompactSpace

The Michael line is paracompact.

instance instParacompactSpace : ParacompactSpace MichaelLine
Proof
:=
  (Homeomorph.Set.univ MichaelLine).paracompactSpace_iff.1 (paracompactSpace_subtype univ)

On this site: The Michael line is paracompact

instance instCompletelyNormalSpace

TopologyByExample.MichaelLine.instCompletelyNormalSpace

The Michael line is completely normal: every subspace is paracompact and Hausdorff, hence normal.

instance instCompletelyNormalSpace : CompletelyNormalSpace MichaelLine
Proof
:=
  completelyNormalSpace_iff_forall_normalSpace.2 fun s ↦
    have := paracompactSpace_subtype s
    inferInstance

On this site: The Michael line is completely normal