Lean library · module TopologyByExample.Spaces.Mysior

Mysior's space

Source file

In this file we define TopologyByExample.Mysior, Mysior's example of a regular space that is not completely regular.

The points are those of the closed upper half-plane ℝ × [0, ∞) (Mysior.mk x y), together with one further point Mysior.infty. For x : ℝ, the wedge Mysior.wedge x is the union of two segments of height 2 based at (x, 0): the vertical one {(x, t) | 0 ≤ t < 2} and the slanted one {(x + t, t) | 0 ≤ t < 2}. The topology is as follows.

  • Every point (x, y) with y > 0 is isolated.
  • A neighbourhood of a point (x, 0) of the base line is a set containing it and all but finitely many points of its wedge.
  • A neighbourhood of infty is a set containing infty and every point (x, y) with x > n, for some n (Mysior.tail n).

The wedges are clopen, which gives regularity at the points of the base line, and the closure of tail (n + 2) lies in tail n, since a wedge reaches only 2 to the right of its base; this gives regularity at infty.

The space is not completely regular. Let f be a continuous real function. At a point (x, 0), f agrees with f (x, 0) at all but countably many points of the wedge at x. So if f maps infinitely many points (k, 0), m < k < m + 1, into a closed set C, then for all but countably many y with m + 1 < y < m + 2 the points (y, y - k), which lie on the slanted segments based at the (k, 0) and on the vertical segment based at (y, 0), are mapped into C, and so is their limit (y, 0). Moving to the right in steps of 1, f infty ∈ C. Consequently f takes the value f infty at all but countably many points of the base line, and infty cannot be separated from the closed set of points (x, 0) with x ≤ 0.

The space is nevertheless totally separated. It is not first countable (a neighbourhood of (x, 0) may omit any point of the uncountable wedge), not separable (it has uncountably many isolated points), and the points (x, 0) with 0 < x < 1 form an uncountable closed discrete set, so it is not Lindelöf and not countably compact. The point infty has no compact neighbourhood, while each wedge is compact.

Main definitions

Main statements

References

  • A. Mysior, A regular space which is not completely regular, Proc. Amer. Math. Soc. 81 (1981), no. 4, 652–653, doi:10.1090/S0002-9939-1981-0601748-4. The space here is the one constructed there (with infty for the extra point), and the proofs of regularity and of the failure of complete regularity follow the paper's argument.

Tags

Mysior's space, regular space, completely regular space, 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

inductive type Mysior

TopologyByExample.Mysior

Mysior's space: the points (x, y) of the closed upper half-plane, and one further point infty. Points with y > 0 are isolated; a neighbourhood of (x, 0) contains all but finitely many points of the two segments {(x, t) | t < 2} and {(x + t, t) | t < 2}; and a neighbourhood of infty contains every point (x, y) with x > n, for some n.

inductive Mysior : Type
  /-- The point `(x, y)` of the closed upper half-plane. -/
  | mk (x : ℝ) (y : ℝ≥0) : Mysior
  /-- The extra point. -/
  | infty : Mysior

On this site: Space: Mysior's space

definition fst

TopologyByExample.Mysior.fst

The first coordinate of a point of the half-plane (and 0 for infty).

def fst : Mysior → ℝ
  | mk x _ => x
  | infty => 0

theorem fst_mk

TopologyByExample.Mysior.fst_mk

The first coordinate of (x, y) is x.

@[simp]
theorem fst_mk (x : ℝ) (y : ℝ≥0) : fst (mk x y) = x
Proof
:= rfl

theorem mk_zero_injective

TopologyByExample.Mysior.mk_zero_injective

Distinct reals give distinct points of the base line.

theorem mk_zero_injective : Injective fun x : ℝ ↦ mk x 0
Proof
:= fun _ _ h ↦ by
  simpa using h

Wedges and tails

definition wedge

TopologyByExample.Mysior.wedge

The wedge at x: the union of the vertical segment {(x, t) | 0 ≤ t < 2} and the slanted segment {(x + t, t) | 0 ≤ t < 2}, both based at (x, 0).

def wedge (x : ℝ) : Set Mysior
:= {p | ∃ t : ℝ≥0, t < 2 ∧ (p = mk x t ∨ p = mk (x + t) t)}

theorem mk_mem_wedge

TopologyByExample.Mysior.mk_mem_wedge

(a, s) lies in the wedge at x iff s < 2 and a = x or a = x + s.

@[simp]
theorem mk_mem_wedge {a x : ℝ} {s : ℝ≥0} : mk a s ∈ wedge x ↔ s < 2 ∧ (a = x ∨ a = x + s)
Proof
:= by
  constructor
  · rintro ⟨t, ht, h | h⟩ <;> simp only [mk.injEq] at h <;> obtain ⟨rfl, rfl⟩ := h <;> simp [ht]
  · rintro ⟨hs, rfl | rfl⟩
    · exact ⟨s, hs, Or.inl rfl⟩
    · exact ⟨s, hs, Or.inr rfl⟩

theorem infty_notMem_wedge

TopologyByExample.Mysior.infty_notMem_wedge

The point infty lies in no wedge.

@[simp]
theorem infty_notMem_wedge (x : ℝ) : infty ∉ wedge x
Proof
:= by
  rintro ⟨t, -, h | h⟩ <;> cases h

theorem mk_zero_mem_wedge

TopologyByExample.Mysior.mk_zero_mem_wedge

The only point of the base line in the wedge at x is (x, 0).

theorem mk_zero_mem_wedge {a x : ℝ} : mk a 0 ∈ wedge x ↔ a = x
Proof
:= by
  simp

theorem mk_mem_wedge_self

TopologyByExample.Mysior.mk_mem_wedge_self

The wedge at x contains (x, 0).

theorem mk_mem_wedge_self (x : ℝ) : mk x 0 ∈ wedge x
Proof
:= mk_zero_mem_wedge.2 rfl

theorem le_fst_of_mem_wedge

TopologyByExample.Mysior.le_fst_of_mem_wedge

A point of the wedge at x has first coordinate in [x, x + 2).

theorem le_fst_of_mem_wedge {x : ℝ} {p : Mysior} (hp : p ∈ wedge x) :
    x ≤ fst p ∧ fst p < x + 2
Proof
:= by
  obtain ⟨t, ht, rfl | rfl⟩ := hp
  · simp
  · have : (t : ℝ) < 2 := by exact_mod_cast ht
    simp [this]

theorem eq_of_mem_wedge

TopologyByExample.Mysior.eq_of_mem_wedge

The only point of the base line in the wedge at x is (x, 0).

theorem eq_of_mem_wedge {x : ℝ} {p : Mysior} (hp : p ∈ wedge x) (hne : p ≠ mk x 0) :
    ∃ a y, y ≠ 0 ∧ p = mk a y
Proof
:= by
  obtain ⟨t, ht, rfl | rfl⟩ := hp
  · exact ⟨x, t, fun h ↦ hne (h ▸ rfl), rfl⟩
  · exact ⟨x + t, t, fun h ↦ hne (by simp [h]), rfl⟩

definition tail

TopologyByExample.Mysior.tail

The basic neighbourhood tail n of infty: the point infty and the points (x, y) with x > n.

def tail (n : ℝ) : Set Mysior
:= {p | ∀ x y, p = mk x y → n < x}

theorem mk_mem_tail

TopologyByExample.Mysior.mk_mem_tail

(x, y) lies in tail n iff n < x.

@[simp]
theorem mk_mem_tail {n x : ℝ} {y : ℝ≥0} : mk x y ∈ tail n ↔ n < x
Proof
:= by
  simp [tail]

theorem infty_mem_tail

TopologyByExample.Mysior.infty_mem_tail

Every tail n contains infty.

@[simp]
theorem infty_mem_tail (n : ℝ) : infty ∈ tail n
Proof
:= by
  simp [tail]

theorem tail_anti

TopologyByExample.Mysior.tail_anti

The sets tail n decrease as n increases.

theorem tail_anti {m n : ℝ} (h : m ≤ n) : tail n ⊆ tail m
Proof
:= fun _ hp x y hxy ↦
  h.trans_lt (hp x y hxy)

The topology

instance

A set is open if, with each point (x, 0) of the base line, it contains all but finitely many points of the wedge at x, and, if it contains infty, it contains tail n for some n.

instance : TopologicalSpace Mysior
Proof
where
  IsOpen s := (∀ x, mk x 0 ∈ s → (wedge x \ s).Finite) ∧ (infty ∈ s → ∃ n : ℕ, tail n ⊆ s)
  isOpen_univ := ⟨fun _ _ ↦ by simp, fun _ ↦ ⟨0, subset_univ _⟩⟩
  isOpen_inter s t hs ht := by
    refine ⟨fun x hx ↦ ((hs.1 x hx.1).union (ht.1 x hx.2)).subset ?_, fun h ↦ ?_⟩
    · rintro p ⟨hp, hst⟩
      by_cases hps : p ∈ s
      · exact Or.inr ⟨hp, fun hpt ↦ hst ⟨hps, hpt⟩⟩
      · exact Or.inl ⟨hp, hps⟩
    · obtain ⟨m, hm⟩ := hs.2 h.1
      obtain ⟨n, hn⟩ := ht.2 h.2
      refine ⟨m + n, fun p hp ↦ ⟨hm ?_, hn ?_⟩⟩ <;> refine tail_anti ?_ hp <;> push_cast <;>
        linarith [(m.cast_nonneg : (0 : ℝ) ≤ m), (n.cast_nonneg : (0 : ℝ) ≤ n)]
  isOpen_sUnion S hS := by
    refine ⟨fun x hx ↦ ?_, fun h ↦ ?_⟩
    · obtain ⟨s, hsS, hxs⟩ := mem_sUnion.1 hx
      exact ((hS s hsS).1 x hxs).subset (sdiff_subset_sdiff_right (subset_sUnion_of_mem hsS))
    · obtain ⟨s, hsS, hs⟩ := mem_sUnion.1 h
      obtain ⟨n, hn⟩ := (hS s hsS).2 hs
      exact ⟨n, hn.trans (subset_sUnion_of_mem hsS)⟩

theorem isOpen_iff

TopologyByExample.Mysior.isOpen_iff

The open sets of Mysior's space.

theorem isOpen_iff {s : Set Mysior} :
    IsOpen s ↔ (∀ x, mk x 0 ∈ s → (wedge x \ s).Finite) ∧ (infty ∈ s → ∃ n : ℕ, tail n ⊆ s)
Proof
:=
  Iff.rfl

theorem isOpen_of_forall_notMem

TopologyByExample.Mysior.isOpen_of_forall_notMem

A set containing neither infty nor any point of the base line is open.

theorem isOpen_of_forall_notMem {s : Set Mysior} (hs : ∀ x, mk x 0 ∉ s) (hi : infty ∉ s) :
    IsOpen s
Proof
:=
  ⟨fun x hx ↦ absurd hx (hs x), fun h ↦ absurd h hi⟩

theorem isOpen_singleton_mk

TopologyByExample.Mysior.isOpen_singleton_mk

A point (x, y) with y ≠ 0 is isolated.

theorem isOpen_singleton_mk {x : ℝ} {y : ℝ≥0} (hy : y ≠ 0) : IsOpen {mk x y}
Proof
:=
  isOpen_of_forall_notMem (fun a h ↦ hy (by simp_all)) (by simp)

theorem nhds_mk_of_ne_zero

TopologyByExample.Mysior.nhds_mk_of_ne_zero

The neighbourhood filter of an isolated point (x, y), y ≠ 0.

theorem nhds_mk_of_ne_zero {x : ℝ} {y : ℝ≥0} (hy : y ≠ 0) : 𝓝 (mk x y) = pure (mk x y)
Proof
:=
  isOpen_singleton_iff_nhds_eq_pure _ |>.1 (isOpen_singleton_mk hy)

theorem isOpen_wedge

TopologyByExample.Mysior.isOpen_wedge

Every wedge is open.

theorem isOpen_wedge (x : ℝ) : IsOpen (wedge x)
Proof
:=
  ⟨fun _ ha ↦ by rw [mk_zero_mem_wedge.1 ha, sdiff_self]; exact finite_empty,
    fun h ↦ absurd h (infty_notMem_wedge x)⟩

theorem isOpen_tail

TopologyByExample.Mysior.isOpen_tail

Every tail n is open.

theorem isOpen_tail (n : ℝ) : IsOpen (tail n)
Proof
:= by
  refine ⟨fun x hx ↦ ?_, fun _ ↦ ⟨⌈n⌉₊, tail_anti (Nat.le_ceil n)⟩⟩
  convert finite_empty
  refine eq_empty_of_forall_notMem fun p ⟨hp, hpn⟩ ↦ hpn ?_
  obtain ⟨t, -, rfl | rfl⟩ := hp
  · exact mk_mem_tail.2 (mk_mem_tail.1 hx)
  · simp only [mk_mem_tail] at hx ⊢
    linarith [t.coe_nonneg]

theorem tail_mem_nhds

TopologyByExample.Mysior.tail_mem_nhds

Every tail n is a neighbourhood of infty.

theorem tail_mem_nhds (n : ℝ) : tail n ∈ 𝓝 infty
Proof
:= (isOpen_tail n).mem_nhds (infty_mem_tail n)

theorem mem_nhds_mk_zero_iff

TopologyByExample.Mysior.mem_nhds_mk_zero_iff

A set is a neighbourhood of (x, 0) if and only if it contains (x, 0) and all but finitely many points of the wedge at x.

theorem mem_nhds_mk_zero_iff {x : ℝ} {s : Set Mysior} :
    s ∈ 𝓝 (mk x 0) ↔ mk x 0 ∈ s ∧ (wedge x \ s).Finite
Proof
:= by
  constructor
  · intro hs
    obtain ⟨t, hts, ht, hxt⟩ := mem_nhds_iff.1 hs
    exact ⟨hts hxt, (ht.1 x hxt).subset (sdiff_subset_sdiff_right hts)⟩
  · rintro ⟨hxs, hfin⟩
    refine mem_of_superset ((?_ : IsOpen (wedge x ∩ s)).mem_nhds ⟨mk_mem_wedge_self x, hxs⟩)
      inter_subset_right
    refine ⟨fun a ha ↦ ?_, fun h ↦ absurd h.1 (infty_notMem_wedge x)⟩
    obtain rfl := mk_zero_mem_wedge.1 ha.1
    simpa using hfin

theorem hasBasis_nhds_infty

TopologyByExample.Mysior.hasBasis_nhds_infty

The sets tail n, n : ℕ, form a basis of neighbourhoods of infty.

theorem hasBasis_nhds_infty : (𝓝 infty).HasBasis (fun _ : ℕ ↦ True) fun n ↦ tail n
Proof
:= by
  refine ⟨fun s ↦ ⟨fun hs ↦ ?_, fun ⟨n, _, hn⟩ ↦ mem_of_superset (tail_mem_nhds n) hn⟩⟩
  obtain ⟨t, hts, ht, hxt⟩ := mem_nhds_iff.1 hs
  obtain ⟨n, hn⟩ := ht.2 hxt
  exact ⟨n, trivial, hn.trans hts⟩

Separation

instance instT1Space

TopologyByExample.Mysior.instT1Space

Mysior's space is T₁.

instance instT1Space : T1Space Mysior
Proof
:= by
  refine ⟨fun p ↦ isOpen_compl_iff.1 ⟨fun x _ ↦ (finite_singleton p).subset ?_, fun h ↦ ?_⟩⟩
  · rintro q ⟨-, hq⟩
    simpa using hq
  · cases p with
    | infty => exact absurd rfl h
    | mk x y =>
      refine ⟨⌈x⌉₊, fun q hq (hqe : q = mk x y) ↦ ?_⟩
      subst hqe
      exact (Nat.le_ceil x).not_gt (mk_mem_tail.1 hq)

On this site: Mysior's space is T₁

theorem isClopen_of_finite

TopologyByExample.Mysior.isClopen_of_finite

A set of points off the base line, not containing infty, is clopen if it is finite.

theorem isClopen_of_finite {s : Set Mysior} (hs : s.Finite) (h0 : ∀ x, mk x 0 ∉ s)
    (hi : infty ∉ s) : IsClopen s
Proof
:=
  ⟨hs.isClosed, isOpen_of_forall_notMem h0 hi⟩

theorem isClosed_wedge

TopologyByExample.Mysior.isClosed_wedge

Every wedge is closed: two wedges meet in at most two points.

theorem isClosed_wedge (x : ℝ) : IsClosed (wedge x)
Proof
:= by
  refine isOpen_compl_iff.1 ⟨fun z hz ↦ ?_, fun _ ↦ ⟨⌈x + 2⌉₊, fun p hp hpw ↦ ?_⟩⟩
  · have hzx : z ≠ x := fun h ↦ hz (h ▸ mk_mem_wedge_self z)
    refine ((finite_singleton (mk z (z - x).toNNReal)).insert (mk x (x - z).toNNReal)).subset ?_
    rintro p ⟨hpz, hpx⟩
    simp only [mem_compl_iff, not_not] at hpx
    obtain ⟨t, -, rfl | rfl⟩ := hpz <;> simp only [mk_mem_wedge] at hpx <;>
      obtain ⟨-, h | h⟩ := hpx
    · exact absurd h hzx
    · right
      rw [mem_singleton_iff, mk.injEq]
      exact ⟨rfl, by rw [h, add_sub_cancel_left, Real.toNNReal_coe]⟩
    · left
      rw [mk.injEq]
      exact ⟨h, by rw [← h, add_sub_cancel_left, Real.toNNReal_coe]⟩
    · exact absurd (by linarith : z = x) hzx
  · cases p with
    | infty => exact infty_notMem_wedge x hpw
    | mk a s =>
      have h1 := (le_fst_of_mem_wedge hpw).2
      have h2 := mk_mem_tail.1 hp
      simp only [fst_mk] at h1
      linarith [Nat.le_ceil (x + 2)]

theorem isClopen_wedge

TopologyByExample.Mysior.isClopen_wedge

Every wedge is clopen.

theorem isClopen_wedge (x : ℝ) : IsClopen (wedge x)
Proof
:= ⟨isClosed_wedge x, isOpen_wedge x⟩

theorem closure_tail_subset

TopologyByExample.Mysior.closure_tail_subset

The closure of tail (n + 2) lies in tail n.

theorem closure_tail_subset (n : ℝ) : closure (tail (n + 2)) ⊆ tail n
Proof
:= by
  intro p hp
  by_contra hpn
  cases p with
  | infty => exact hpn (infty_mem_tail n)
  | mk x y =>
    have hx : x ≤ n := not_lt.1 fun h ↦ hpn (mk_mem_tail.2 h)
    by_cases hy : y = 0
    · subst hy
      obtain ⟨q, hqw, hqt⟩ :=
        mem_closure_iff.1 hp _ (isOpen_wedge x) (mk_mem_wedge_self x)
      cases q with
      | infty => exact infty_notMem_wedge x hqw
      | mk a s =>
        have h1 := (le_fst_of_mem_wedge hqw).2
        have h2 := mk_mem_tail.1 hqt
        simp only [fst_mk] at h1
        linarith
    · obtain ⟨q, rfl, hqt⟩ :=
        mem_closure_iff.1 hp _ (isOpen_singleton_mk (x := x) hy) rfl
      exact hpn (tail_anti (by linarith) hqt)

instance instRegularSpace

TopologyByExample.Mysior.instRegularSpace

Mysior's space is regular. At a point off the base line the singleton is a closed neighbourhood; at (x, 0), a neighbourhood contains its wedge minus a finite set of isolated points, which is closed; at infty, the closure of tail (n + 2) lies in tail n.

instance instRegularSpace : RegularSpace Mysior
Proof
:= by
  refine .of_exists_mem_nhds_isClosed_subset fun p s hs ↦ ?_
  cases p with
  | infty =>
    obtain ⟨n, -, hn⟩ := hasBasis_nhds_infty.mem_iff.1 hs
    exact ⟨closure (tail (n + 2)), mem_of_superset (tail_mem_nhds _) subset_closure,
      isClosed_closure, (closure_tail_subset n).trans hn⟩
  | mk x y =>
    by_cases hy : y = 0
    · subst hy
      obtain ⟨hxs, hfin⟩ := mem_nhds_mk_zero_iff.1 hs
      have hF : IsOpen (wedge x \ s) := isOpen_of_forall_notMem
        (fun a ⟨ha, has⟩ ↦ has (mk_zero_mem_wedge.1 ha ▸ hxs)) fun h ↦ infty_notMem_wedge x h.1
      refine ⟨wedge x \ (wedge x \ s), mem_nhds_mk_zero_iff.2 ⟨⟨mk_mem_wedge_self x,
        fun h ↦ h.2 hxs⟩, hfin.subset ?_⟩, (isClosed_wedge x).sdiff hF, ?_⟩
      · rintro q ⟨hq, hq'⟩
        exact ⟨hq, fun hqs ↦ hq' ⟨hq, fun h ↦ h.2 hqs⟩⟩
      · rintro q ⟨hq, hq'⟩
        by_contra hqs
        exact hq' ⟨hq, hqs⟩
    · exact ⟨{mk x y}, (isOpen_singleton_mk hy).mem_nhds rfl, isClosed_singleton,
        singleton_subset_iff.2 (mem_of_mem_nhds hs)⟩

On this site: Mysior's space is regular

Subsets of the base line

definition base

TopologyByExample.Mysior.base

The points (x, 0) with x ∈ s.

def base (s : Set ℝ) : Set Mysior
:= (fun x ↦ mk x 0) '' s

theorem mk_mem_base

TopologyByExample.Mysior.mk_mem_base

(x, 0) lies in base s iff x ∈ s.

theorem mk_mem_base {s : Set ℝ} {x : ℝ} : mk x 0 ∈ base s ↔ x ∈ s
Proof
:=
  mk_zero_injective.mem_set_image

theorem infty_notMem_base

TopologyByExample.Mysior.infty_notMem_base

The point infty is not on the base line.

theorem infty_notMem_base (s : Set ℝ) : infty ∉ base s
Proof
:= by
  rintro ⟨x, -, h⟩
  cases h

theorem isDiscrete_base

TopologyByExample.Mysior.isDiscrete_base

A set of points of the base line is discrete: the wedge at x meets the base line only in (x, 0).

theorem isDiscrete_base (s : Set ℝ) : IsDiscrete (base s)
Proof
:= by
  refine isDiscrete_iff_forall_mem_exists_isOpen.2 ?_
  rintro _ ⟨x, hx, rfl⟩
  refine ⟨wedge x, isOpen_wedge x, subset_antisymm ?_
    (singleton_subset_iff.2 ⟨mk_mem_wedge_self x, x, hx, rfl⟩)⟩
  rintro _ ⟨hw, a, -, rfl⟩
  rw [mk_zero_mem_wedge.1 hw]
  rfl

theorem isClosed_base

TopologyByExample.Mysior.isClosed_base

A set of points of the base line whose first coordinates are bounded above is closed.

theorem isClosed_base {s : Set ℝ} (hs : BddAbove s) : IsClosed (base s)
Proof
:= by
  obtain ⟨b, hb⟩ := hs
  refine isOpen_compl_iff.1 ⟨fun z hz ↦ ?_, fun _ ↦ ⟨⌈b⌉₊, ?_⟩⟩
  · convert finite_empty
    refine eq_empty_of_forall_notMem fun p ⟨hp, hps⟩ ↦ ?_
    rw [mem_compl_iff, not_not] at hps
    obtain ⟨a, ha, rfl⟩ := hps
    have haz : a = z := mk_zero_mem_wedge.1 hp
    exact hz (haz ▸ mk_mem_base.2 ha)
  · rintro p hp ⟨a, ha, rfl⟩
    exact (hb ha).not_gt ((Nat.le_ceil b).trans_lt (mk_mem_tail.1 hp))

theorem not_countable_base_Ioo

TopologyByExample.Mysior.not_countable_base_Ioo

For a < b, there are uncountably many points (x, 0) with a < x < b.

theorem not_countable_base_Ioo {a b : ℝ} (h : a < b) : ¬(base (Ioo a b)).Countable
Proof
:= by
  intro hc
  have := hc.preimage mk_zero_injective
  rw [base, preimage_image_eq _ mk_zero_injective, Cardinal.Real.Ioo_countable_iff] at this
  exact this.not_gt h

Continuous real functions

theorem tendsto_cofinite_of_injective

TopologyByExample.Mysior.tendsto_cofinite_of_injective

A sequence of distinct points of the wedge at x converges to (x, 0).

theorem tendsto_cofinite_of_injective {ι : Type*} {x : ℝ} {q : ι → Mysior} (hq : Injective q)
    (hqw : ∀ i, q i ∈ wedge x) : Tendsto q cofinite (𝓝 (mk x 0))
Proof
:= fun s hs ↦ by
  refine mem_cofinite.2 (((mem_nhds_mk_zero_iff.1 hs).2.preimage hq.injOn).subset ?_)
  exact fun i hi ↦ ⟨hqw i, hi⟩

theorem countable_wedge_inter_ne

TopologyByExample.Mysior.countable_wedge_inter_ne

A function continuous at (x, 0) agrees with its value there at all but countably many points of the wedge at x.

theorem countable_wedge_inter_ne {x : ℝ} {f : Mysior → ℝ} (hf : ContinuousAt f (mk x 0)) :
    (wedge x ∩ {p | f p ≠ f (mk x 0)}).Countable
Proof
:= by
  have ht : Tendsto (f ∘ ((↑) : wedge x → Mysior)) cofinite (𝓝 (f (mk x 0))) :=
    hf.tendsto.comp (tendsto_cofinite_of_injective Subtype.val_injective Subtype.prop)
  have hc := ht.countable_compl_preimage_ker
  rw [ker_nhds] at hc
  refine (hc.image (↑)).mono ?_
  rintro p ⟨hp, hne⟩
  exact ⟨⟨p, hp⟩, hne, rfl⟩

theorem infinite_of_infinite

TopologyByExample.Mysior.infinite_of_infinite

The key step. Let f be a continuous real function and C a closed set of reals. If f maps infinitely many points (x, 0) with m < x < m + 1 into C, then it maps uncountably many points (y, 0) with m + 1 < y < m + 2 into C. Indeed, take distinct such x = k j; for all but countably many y, the points (y, y - k j) of the slanted segments of the wedges at the k j take the same values as the (k j, 0), and they converge to (y, 0).

theorem infinite_of_infinite {f : Mysior → ℝ} (hf : Continuous f) {C : Set ℝ} (hC : IsClosed C)
    {m : ℝ} (h : {x ∈ Ioo m (m + 1) | f (mk x 0) ∈ C}.Infinite) :
    {x ∈ Ioo (m + 1) (m + 1 + 1) | f (mk x 0) ∈ C}.Infinite
Proof
:= by
  have := h.to_subtype
  set e := Infinite.natEmbedding {x ∈ Ioo m (m + 1) | f (mk x 0) ∈ C}
  set k : ℕ → ℝ := fun j ↦ e j
  have hk j : k j ∈ Ioo m (m + 1) ∧ f (mk (k j) 0) ∈ C := (e j).property
  have hkinj : Injective k := Subtype.val_injective.comp e.injective
  set E : Set ℝ := ⋃ j, fst '' (wedge (k j) ∩ {p | f p ≠ f (mk (k j) 0)})
  have hE : E.Countable :=
    countable_iUnion fun j ↦ (countable_wedge_inter_ne hf.continuousAt).image _
  have hsub : Ioo (m + 1) (m + 1 + 1) \ E ⊆ {x ∈ Ioo (m + 1) (m + 1 + 1) | f (mk x 0) ∈ C} := by
    rintro y ⟨hy, hyE⟩
    refine ⟨hy, ?_⟩
    have hpos j : 0 ≤ y - k j := by linarith [(hk j).1.2, hy.1]
    set q : ℕ → Mysior := fun j ↦ mk y (y - k j).toNNReal
    have hq2 j : (y - k j).toNNReal < 2 := by
      rw [← NNReal.coe_lt_coe, Real.coe_toNNReal _ (hpos j)]
      push_cast
      linarith [(hk j).1.1, hy.2]
    have hqw j : q j ∈ wedge y := mk_mem_wedge.2 ⟨hq2 j, Or.inl rfl⟩
    have hqk j : q j ∈ wedge (k j) := mk_mem_wedge.2 ⟨hq2 j, Or.inr (by
      rw [Real.coe_toNNReal _ (hpos j)]
      ring)⟩
    have hfq j : f (q j) ∈ C := by
      by_cases hfe : f (q j) = f (mk (k j) 0)
      · exact hfe ▸ (hk j).2
      · exact absurd (mem_iUnion.2 ⟨j, mem_image_of_mem fst
          (show q j ∈ wedge (k j) ∩ {p | f p ≠ f (mk (k j) 0)} from ⟨hqk j, hfe⟩)⟩) hyE
    have hqinj : Injective q := fun i j hij ↦ by
      have h' := congrArg ((↑) : ℝ≥0 → ℝ) (mk.inj hij).2
      rw [Real.coe_toNNReal _ (hpos i), Real.coe_toNNReal _ (hpos j)] at h'
      exact hkinj (by linarith)
    exact hC.mem_of_tendsto ((hf.tendsto _).comp (tendsto_cofinite_of_injective hqinj hqw))
      (.of_forall hfq)
  intro hfin
  rw [sdiff_subset_iff] at hsub
  exact (Cardinal.Real.Ioo_countable_iff.1 ((hE.union hfin.countable).mono hsub)).not_gt
    (by linarith)

theorem apply_infty_mem_of_infinite

TopologyByExample.Mysior.apply_infty_mem_of_infinite

Mysior's lemma. Let f be a continuous real function and C a closed set of reals. If f maps infinitely many points (x, 0) with m < x < m + 1 into C, then f infty ∈ C.

theorem apply_infty_mem_of_infinite {f : Mysior → ℝ} (hf : Continuous f) {C : Set ℝ}
    (hC : IsClosed C) {m : ℝ} (h : {x ∈ Ioo m (m + 1) | f (mk x 0) ∈ C}.Infinite) :
    f infty ∈ C
Proof
:= by
  have hall (j : ℕ) : {x ∈ Ioo (m + j) (m + j + 1) | f (mk x 0) ∈ C}.Infinite := by
    induction j with
    | zero => simpa using h
    | succ j ih =>
      have e : m + ((j + 1 : ℕ) : ℝ) = m + j + 1 := by push_cast; ring
      rw [e]
      exact infinite_of_infinite hf hC ih
  by_contra hne
  obtain ⟨n, -, hn⟩ := hasBasis_nhds_infty.mem_iff.1
    ((hC.isOpen_compl.preimage hf).mem_nhds hne)
  obtain ⟨j, hj⟩ := exists_nat_gt (n - m)
  obtain ⟨x, hx, hxC⟩ := (hall j).nonempty
  exact hn (mk_mem_tail.2 (by linarith [hx.1])) hxC

On this site: Mysior's space: Values on the base line propagate to \(\infty\)

theorem countable_setOf_apply_ne

TopologyByExample.Mysior.countable_setOf_apply_ne

Every continuous real function on Mysior's space takes the value f infty at all but countably many points of the base line.

theorem countable_setOf_apply_ne {f : Mysior → ℝ} (hf : Continuous f) :
    {x | f (mk x 0) ≠ f infty}.Countable
Proof
:= by
  have key (q : ℚ) (j : ℕ) :
      {x ∈ Ioo (q : ℝ) (q + 1) |
        f (mk x 0) ∈ {z | 1 / (j + 1 : ℝ) ≤ dist z (f infty)}}.Finite := by
    by_contra h
    have := apply_infty_mem_of_infinite hf
      (isClosed_le continuous_const (continuous_id.dist continuous_const)) h
    have h2 : (1 : ℝ) / (j + 1) ≤ 0 := by simpa using this
    exact h2.not_gt (by positivity)
  refine (countable_iUnion fun q : ℚ ↦ countable_iUnion fun j : ℕ ↦ (key q j).countable).mono ?_
  intro x hx
  obtain ⟨q, hq1, hq2⟩ := exists_rat_btwn (show x - 1 < x by linarith)
  obtain ⟨j, hj⟩ := exists_nat_one_div_lt (dist_pos.2 hx)
  exact mem_iUnion₂.2 ⟨q, j, ⟨⟨hq2, by linarith⟩, hj.le⟩⟩

On this site: Mysior's space: Continuous real functions are constant on the base line off a countable set

theorem apply_infty_eq_of_eqOn

TopologyByExample.Mysior.apply_infty_eq_of_eqOn

A continuous real function that is constant, equal to c, on the points (x, 0) with x ≤ 0 takes the value c at infty.

theorem apply_infty_eq_of_eqOn {f : Mysior → ℝ} (hf : Continuous f) {c : ℝ}
    (h : ∀ x ≤ 0, f (mk x 0) = c) : f infty = c
Proof
:= by
  refine apply_infty_mem_of_infinite hf isClosed_singleton (m := -1) ?_
  refine (Ioo_infinite (by norm_num : (-1 : ℝ) < -1 + 1)).mono fun x hx ↦ ⟨hx, h x ?_⟩
  linarith [hx.2]

theorem not_completelyRegularSpace

TopologyByExample.Mysior.not_completelyRegularSpace

Mysior's space is not completely regular: infty cannot be separated by a continuous function from the closed set of points (x, 0) with x ≤ 0.

theorem not_completelyRegularSpace : ¬CompletelyRegularSpace Mysior
Proof
:= by
  intro h
  obtain ⟨g, hg, hg0, hg1⟩ := h.completely_regular infty (base (Iic 0))
    (isClosed_base bddAbove_Iic) (infty_notMem_base _)
  have := apply_infty_eq_of_eqOn (c := 1) (continuous_subtypeVal.comp hg) fun x hx ↦ by
    simp [hg1 (mk_mem_base.2 hx)]
  simp [hg0] at this

On this site: Mysior's space is not completely regular

theorem not_normalSpace

TopologyByExample.Mysior.not_normalSpace

Mysior's space is not normal: a normal T₁ space is completely regular.

theorem not_normalSpace : ¬NormalSpace Mysior
Proof
:= fun _ ↦
  not_completelyRegularSpace inferInstance

theorem not_completelyNormalSpace

TopologyByExample.Mysior.not_completelyNormalSpace

Mysior's space is not completely normal.

theorem not_completelyNormalSpace : ¬CompletelyNormalSpace Mysior
Proof
:= fun _ ↦
  not_normalSpace inferInstance

theorem not_perfectlyNormalSpace

TopologyByExample.Mysior.not_perfectlyNormalSpace

Mysior's space is not perfectly normal.

theorem not_perfectlyNormalSpace : ¬PerfectlyNormalSpace Mysior
Proof
:= fun _ ↦
  not_normalSpace inferInstance

theorem not_zeroDimensionalSpace

TopologyByExample.Mysior.not_zeroDimensionalSpace

Mysior's space is not zero-dimensional: a space with a basis of clopen sets is completely regular.

theorem not_zeroDimensionalSpace : ¬ZeroDimensionalSpace Mysior
Proof
:= fun _ ↦
  not_completelyRegularSpace inferInstance

theorem countable_setOf_mk_notMem_of_isClopen

TopologyByExample.Mysior.countable_setOf_mk_notMem_of_isClopen

A clopen set containing infty contains all but countably many points of the base line.

theorem countable_setOf_mk_notMem_of_isClopen {U : Set Mysior} (hU : IsClopen U)
    (h : infty ∈ U) : {x | mk x 0 ∉ U}.Countable
Proof
:= by
  classical
  have hf : Continuous (U.indicator fun _ ↦ (1 : ℝ)) :=
    continuous_indicator (by simp [hU.frontier_eq]) continuousOn_const
  refine (countable_setOf_apply_ne hf).mono fun x hx ↦ ?_
  simpa [indicator_of_mem h] using hx

On this site: Mysior's space: A clopen set containing \(\infty\) contains all but countably many points of the base line

Clopen sets and compact sets

theorem exists_isClopen_mem_notMem

TopologyByExample.Mysior.exists_isClopen_mem_notMem

A point other than infty lies in a clopen set that does not contain a given other point.

theorem exists_isClopen_mem_notMem {p q : Mysior} (hp : p ≠ infty) (hpq : p ≠ q) :
    ∃ U, IsClopen U ∧ p ∈ U ∧ q ∉ U
Proof
:= by
  cases p with
  | infty => exact absurd rfl hp
  | mk x y =>
    by_cases hy : y = 0
    · subst hy
      by_cases hq : q ∈ wedge x
      · obtain ⟨a, s, hs, rfl⟩ := eq_of_mem_wedge hq (Ne.symm hpq)
        exact ⟨{mk a s}ᶜ,
          ⟨(isOpen_singleton_mk hs).isClosed_compl, isClosed_singleton.isOpen_compl⟩,
          hpq, fun h ↦ h rfl⟩
      · exact ⟨wedge x, isClopen_wedge x, mk_mem_wedge_self x, hq⟩
    · exact ⟨{mk x y}, ⟨isClosed_singleton, isOpen_singleton_mk hy⟩, rfl, Ne.symm hpq⟩

instance instTotallySeparatedSpace

TopologyByExample.Mysior.instTotallySeparatedSpace

Mysior's space is totally separated: two distinct points are separated by a clopen set (a wedge, a singleton, or the complement of one of these). Nevertheless it is not completely regular.

instance instTotallySeparatedSpace : TotallySeparatedSpace Mysior
Proof
:= by
  refine totallySeparatedSpace_iff_exists_isClopen.2 fun p q hpq ↦ ?_
  by_cases hp : p = infty
  · subst hp
    obtain ⟨U, hU, hqU, hpU⟩ := exists_isClopen_mem_notMem (p := q) (q := infty)
      (Ne.symm hpq) (Ne.symm hpq)
    exact ⟨Uᶜ, hU.compl, hpU, by simpa using hqU⟩
  · obtain ⟨U, hU, hpU, hqU⟩ := exists_isClopen_mem_notMem hp hpq
    exact ⟨U, hU, hpU, hqU⟩

On this site: Mysior's space is totally separated

theorem isCompact_wedge

TopologyByExample.Mysior.isCompact_wedge

Every wedge is compact: it is a set of isolated points together with (x, 0), to which it converges along the cofinite filter.

theorem isCompact_wedge (x : ℝ) : IsCompact (wedge x)
Proof
:= by
  have ht : Tendsto ((↑) : ↥(wedge x \ {mk x 0}) → Mysior) cofinite (𝓝 (mk x 0)) :=
    tendsto_cofinite_of_injective Subtype.val_injective fun i ↦ i.property.1
  convert ht.isCompact_insert_range_of_cofinite using 1
  rw [Subtype.range_coe, insert_sdiff_singleton, insert_eq_of_mem (mk_mem_wedge_self x)]

On this site: Mysior's space: Every wedge is compact

Countability and compactness

theorem not_isCountablyGenerated_nhds_mk_zero

TopologyByExample.Mysior.not_isCountablyGenerated_nhds_mk_zero

The point (x, 0) does not have a countable basis of neighbourhoods: a neighbourhood may omit any point of the uncountable wedge at x other than (x, 0).

theorem not_isCountablyGenerated_nhds_mk_zero (x : ℝ) : ¬(𝓝 (mk x 0)).IsCountablyGenerated
Proof
:= by
  intro _
  obtain ⟨s, hs⟩ := (𝓝 (mk x 0)).exists_antitone_basis
  have hc : (⋃ j, wedge x \ s j).Countable :=
    countable_iUnion fun j ↦ (mem_nhds_mk_zero_iff.1 (hs.mem j)).2.countable
  obtain ⟨t, ht, htU⟩ : ∃ t ∈ Ioo (0 : ℝ) 2, mk x t.toNNReal ∉ ⋃ j, wedge x \ s j := by
    by_contra! hall
    refine (Cardinal.Real.Ioo_countable_iff.1
      ((?_ : MapsTo (fun t : ℝ ↦ mk x t.toNNReal) _ _).countable_of_injOn ?_ hc)).not_gt two_pos
    · exact fun t ht ↦ hall t ht
    · intro a ha b hb hab
      have h' := congrArg ((↑) : ℝ≥0 → ℝ) (mk.inj hab).2
      rwa [Real.coe_toNNReal _ ha.1.le, Real.coe_toNNReal _ hb.1.le] at h'
  have ht0 : t.toNNReal ≠ 0 := by simpa using ht.1
  have hw : mk x t.toNNReal ∈ wedge x := mk_mem_wedge.2 ⟨by
    rw [← NNReal.coe_lt_coe, Real.coe_toNNReal _ ht.1.le]
    exact_mod_cast ht.2, Or.inl rfl⟩
  have hn : {mk x t.toNNReal}ᶜ ∈ 𝓝 (mk x 0) :=
    isClosed_singleton.isOpen_compl.mem_nhds fun h ↦ ht0 (mk.inj h).2.symm
  obtain ⟨j, -, hj⟩ := hs.toHasBasis.mem_iff.1 hn
  refine hj ?_ rfl
  by_contra hj'
  exact htU (mem_iUnion.2 ⟨j, hw, hj'⟩)

theorem not_firstCountableTopology

TopologyByExample.Mysior.not_firstCountableTopology

Mysior's space is not first countable.

theorem not_firstCountableTopology : ¬FirstCountableTopology Mysior
Proof
:= fun _ ↦
  not_isCountablyGenerated_nhds_mk_zero 0 inferInstance

On this site: Mysior's space is not first countable

theorem not_secondCountableTopology

TopologyByExample.Mysior.not_secondCountableTopology

Mysior's space is not second countable.

theorem not_secondCountableTopology : ¬SecondCountableTopology Mysior
Proof
:= fun _ ↦
  not_firstCountableTopology inferInstance

theorem not_metrizableSpace

TopologyByExample.Mysior.not_metrizableSpace

Mysior's space is not metrizable.

theorem not_metrizableSpace : ¬MetrizableSpace Mysior
Proof
:= fun _ ↦
  letI := metrizableSpaceMetric Mysior
  not_firstCountableTopology inferInstance

theorem not_separableSpace

TopologyByExample.Mysior.not_separableSpace

Mysior's space is not separable: a dense set contains every isolated point, and the points (x, 1) are isolated and uncountably many.

theorem not_separableSpace : ¬SeparableSpace Mysior
Proof
:= by
  rintro ⟨D, hD, hDd⟩
  have hsub : range (fun x : ℝ ↦ mk x 1) ⊆ D := by
    rintro _ ⟨x, rfl⟩
    obtain ⟨_, rfl, h⟩ := hDd.inter_open_nonempty {mk x 1} (isOpen_singleton_mk one_ne_zero)
      (singleton_nonempty _)
    exact h
  have := (hD.mono hsub).preimage (f := fun x : ℝ ↦ mk x 1) fun a b h ↦ by simpa using h
  rw [preimage_range] at this
  exact Cardinal.not_countable_real this

On this site: Mysior's space is not separable

theorem isClosed_isDiscrete_not_countable_base_Ioo

TopologyByExample.Mysior.isClosed_isDiscrete_not_countable_base_Ioo

The points (x, 0) with 0 < x < 1 form an uncountable closed discrete set.

theorem isClosed_isDiscrete_not_countable_base_Ioo :
    IsClosed (base (Ioo 0 1)) ∧ IsDiscrete (base (Ioo 0 1)) ∧ ¬(base (Ioo 0 1)).Countable
Proof
:=
  ⟨isClosed_base bddAbove_Ioo, isDiscrete_base _, not_countable_base_Ioo zero_lt_one⟩

theorem not_countableExtent

TopologyByExample.Mysior.not_countableExtent

Mysior's space does not have countable extent.

theorem not_countableExtent : ¬∀ s : Set Mysior, ¬s.Countable → ∃ p, AccPt p (𝓟 s)
Proof
:= fun h ↦
  not_countable_base_Ioo zero_lt_one <|
    countableExtent_iff.1 h _ (isClosed_base bddAbove_Ioo) (isDiscrete_base _)

On this site: Mysior's space does not have countable extent

theorem not_lindelofSpace

TopologyByExample.Mysior.not_lindelofSpace

Mysior's space is not Lindelöf.

theorem not_lindelofSpace : ¬LindelofSpace Mysior
Proof
:= fun _ ↦
  not_countableExtent countableExtent_of_lindelofSpace

theorem not_sigmaCompactSpace

TopologyByExample.Mysior.not_sigmaCompactSpace

Mysior's space is not σ-compact.

theorem not_sigmaCompactSpace : ¬SigmaCompactSpace Mysior
Proof
:= fun _ ↦
  not_lindelofSpace inferInstance

theorem not_compactSpace

TopologyByExample.Mysior.not_compactSpace

Mysior's space is not compact.

theorem not_compactSpace : ¬CompactSpace Mysior
Proof
:= fun _ ↦
  not_lindelofSpace inferInstance

theorem not_countablyCompactSpace

TopologyByExample.Mysior.not_countablyCompactSpace

Mysior's space is not countably compact.

theorem not_countablyCompactSpace : ¬CountablyCompactSpace Mysior
Proof
:= fun _ ↦
  not_countableExtent <|
    countableExtent_of_limitPointCompact limitPointCompact_of_countablyCompactSpace

theorem not_seqCompactSpace

TopologyByExample.Mysior.not_seqCompactSpace

Mysior's space is not sequentially compact.

theorem not_seqCompactSpace : ¬SeqCompactSpace Mysior
Proof
:= fun _ ↦
  not_countablyCompactSpace inferInstance

theorem not_weaklyLocallyCompactSpace

TopologyByExample.Mysior.not_weaklyLocallyCompactSpace

The point infty has no compact neighbourhood: a neighbourhood contains tail n, and so the infinite closed discrete set of points (x, 0) with n < x < n + 1. Every other point has a compact open neighbourhood, a wedge or a singleton.

theorem not_weaklyLocallyCompactSpace : ¬WeaklyLocallyCompactSpace Mysior
Proof
:= by
  intro _
  obtain ⟨K, hK, hKn⟩ := exists_compact_mem_nhds infty
  obtain ⟨n, -, hn⟩ := hasBasis_nhds_infty.mem_iff.1 hKn
  have hsub : base (Ioo (n : ℝ) (n + 1)) ⊆ K :=
    image_subset_iff.2 fun x hx ↦ hn (mk_mem_tail.2 hx.1)
  have hfin := (hK.of_isClosed_subset (isClosed_base bddAbove_Ioo) hsub).finite (isDiscrete_base _)
  have := hfin.preimage mk_zero_injective.injOn
  rw [base, preimage_image_eq _ mk_zero_injective] at this
  exact Ioo_infinite (lt_add_one (n : ℝ)) this

On this site: Mysior's space is not weakly locally compact

Mysior's space

theorem not_countableChainCondition

TopologyByExample.Mysior.not_countableChainCondition

Mysior's space does not satisfy the countable chain condition: the singletons {(x, 1)} are uncountably many disjoint nonempty open sets.

theorem not_countableChainCondition :
    ¬∀ S : Set (Set Mysior), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id →
      S.Countable
Proof
:= by
  intro h
  have hc := h (range fun x : ℝ ↦ ({mk x 1} : Set Mysior))
    (forall_mem_range.2 fun x ↦ ⟨isOpen_singleton_mk one_ne_zero, singleton_nonempty _⟩) (by
      rintro _ ⟨x, rfl⟩ _ ⟨y, rfl⟩ hne
      exact disjoint_singleton.2 fun h ↦ hne (by simp only [h]))
  refine Cardinal.not_countable_real
    (MapsTo.countable_of_injOn (f := fun x : ℝ ↦ ({mk x 1} : Set Mysior))
      (fun x _ ↦ mem_range_self x) (fun a _ b _ hab ↦ ?_) hc)
  simpa using hab

On this site: Mysior's space does not satisfy the countable chain condition

instance instScatteredSpace

TopologyByExample.Mysior.instScatteredSpace

Mysior's space is scattered: a nonempty set has an isolated point off the base line, or a point of the base line, isolated in it by its wedge, or else it is {infty}.

instance instScatteredSpace : ScatteredSpace Mysior
Proof
:= by
  refine scatteredSpace_iff_exists_isolated.2 fun s hs ↦ ?_
  by_cases hup : ∃ x y, y ≠ 0 ∧ mk x y ∈ s
  · obtain ⟨x, y, hy, hxy⟩ := hup
    exact ⟨mk x y, hxy, {mk x y}, (isOpen_singleton_mk hy).mem_nhds rfl, inter_subset_left⟩
  push Not at hup
  by_cases hb : ∃ x, mk x 0 ∈ s
  · obtain ⟨x, hx⟩ := hb
    refine ⟨mk x 0, hx, wedge x, (isOpen_wedge x).mem_nhds (mk_mem_wedge_self x), ?_⟩
    rintro p ⟨hpw, hps⟩
    cases p with
    | infty => exact absurd hpw (infty_notMem_wedge x)
    | mk a t =>
      by_cases ht : t = 0
      · subst ht
        rw [mk_zero_mem_wedge.1 hpw]
        rfl
      · exact absurd hps (hup a t ht)
  push Not at hb
  obtain ⟨p, hp⟩ := hs
  cases p with
  | infty => exact ⟨infty, hp, univ, univ_mem, fun q ⟨_, hq⟩ ↦ by
      cases q with
      | infty => rfl
      | mk a t =>
        by_cases ht : t = 0
        · subst ht
          exact absurd hq (hb a)
        · exact absurd hq (hup a t ht)⟩
  | mk a t =>
    by_cases ht : t = 0
    · subst ht
      exact absurd hp (hb a)
    · exact absurd hp (hup a t ht)

On this site: Mysior's space is scattered

theorem isClosed_range_mk_neg_one

TopologyByExample.Mysior.isClosed_range_mk_neg_one

The points (-n, 1), n : ℕ, form a closed set: a wedge contains at most two of them, and tail 0 contains none.

theorem isClosed_range_mk_neg_one : IsClosed (range fun n : ℕ ↦ mk (-n) 1)
Proof
:= by
  refine isOpen_compl_iff.1 ⟨fun x _ ↦ ?_, fun _ ↦ ⟨0, ?_⟩⟩
  · refine ((finite_singleton (mk (x + 1) 1)).insert (mk x 1)).subset ?_
    rintro p ⟨hpw, hp⟩
    rw [mem_compl_iff, not_not] at hp
    obtain ⟨n, rfl⟩ := hp
    obtain ⟨-, h | h⟩ := mk_mem_wedge.1 hpw
    · exact .inl (by simp [h])
    · exact .inr (by simp [h])
  · rintro p hp ⟨n, rfl⟩
    have := mk_mem_tail.1 hp
    push_cast at this
    linarith [(n.cast_nonneg : (0 : ℝ) ≤ n)]

theorem not_pseudocompactSpace

TopologyByExample.Mysior.not_pseudocompactSpace

Mysior's space is not pseudocompact: the points (-n, 1) form an infinite closed set of isolated points.

theorem not_pseudocompactSpace : ¬PseudocompactSpace Mysior
Proof
:= by
  refine not_pseudocompactSpace_of_isClosed_of_isOpen_singleton
    (infinite_range_of_injective fun m n h ↦ ?_) isClosed_range_mk_neg_one ?_
  · simpa using h
  · rintro _ ⟨n, rfl⟩
    exact isOpen_singleton_mk one_ne_zero

On this site: Mysior's space is not pseudocompact

definition abscissa

TopologyByExample.Mysior.abscissa

The abscissae 1 / (k + 1) used in the proof that Mysior's space is not countably paracompact.

noncomputable def abscissa (k : ℕ) : ℝ
:= 1 / (k + 1)

theorem abscissa_pos

TopologyByExample.Mysior.abscissa_pos

The abscissae are positive.

theorem abscissa_pos (k : ℕ) : 0 < abscissa k
Proof
:= by
  unfold abscissa
  positivity

theorem abscissa_le_one

TopologyByExample.Mysior.abscissa_le_one

The abscissae are at most 1.

theorem abscissa_le_one (k : ℕ) : abscissa k ≤ 1
Proof
:= by
  unfold abscissa
  rw [div_le_one (by positivity)]
  linarith [(k.cast_nonneg : (0 : ℝ) ≤ k)]

theorem abscissa_injective

TopologyByExample.Mysior.abscissa_injective

The abscissae are distinct.

theorem abscissa_injective : Injective abscissa
Proof
:= fun j k h ↦ by
  unfold abscissa at h
  rw [one_div, one_div, inv_inj, add_left_inj] at h
  exact_mod_cast h

definition crossing

TopologyByExample.Mysior.crossing

The point (z, z - 1 / (k + 1)), which for 1 < z < 2 lies on the vertical segment of the wedge at z and on the slanted segment of the wedge at 1 / (k + 1).

noncomputable def crossing (k : ℕ) (z : ℝ) : Mysior
:= mk z (z - abscissa k).toNNReal

theorem crossing_mem_wedge

TopologyByExample.Mysior.crossing_mem_wedge

For 1 < z < 2, the crossing point lies in the wedge at z.

theorem crossing_mem_wedge {k : ℕ} {z : ℝ} (hz : z ∈ Ioo 1 2) : crossing k z ∈ wedge z
Proof
:= by
  refine mk_mem_wedge.2 ⟨?_, Or.inl rfl⟩
  rw [← NNReal.coe_lt_coe, Real.coe_toNNReal _ (by linarith [abscissa_le_one k, hz.1])]
  push_cast
  linarith [abscissa_pos k, hz.2]

theorem crossing_mem_wedge_abscissa

TopologyByExample.Mysior.crossing_mem_wedge_abscissa

For 1 < z < 2, the crossing point lies in the wedge at 1 / (k + 1).

theorem crossing_mem_wedge_abscissa {k : ℕ} {z : ℝ} (hz : z ∈ Ioo 1 2) :
    crossing k z ∈ wedge (abscissa k)
Proof
:= by
  have h0 : 0 ≤ z - abscissa k := by linarith [abscissa_le_one k, hz.1]
  refine mk_mem_wedge.2 ⟨(crossing_mem_wedge (k := k) hz |> mk_mem_wedge.1).1, Or.inr ?_⟩
  rw [Real.coe_toNNReal _ h0]
  ring

theorem crossing_injective

TopologyByExample.Mysior.crossing_injective

For fixed z with 1 < z < 2, the crossing points are distinct.

theorem crossing_injective {z : ℝ} (hz : z ∈ Ioo 1 2) : Injective fun k ↦ crossing k z
Proof
:=
  fun j k h ↦ by
    have h' := congrArg ((↑) : ℝ≥0 → ℝ) (mk.inj h).2
    rw [Real.coe_toNNReal _ (by linarith [abscissa_le_one j, hz.1]),
      Real.coe_toNNReal _ (by linarith [abscissa_le_one k, hz.1])] at h'
    exact abscissa_injective (by linarith)

theorem not_countablyParacompactSpace

TopologyByExample.Mysior.not_countablyParacompactSpace

Mysior's space is not countably paracompact. The closed sets Fₙ of points of the base line at the abscissae 1 / (k + 1), k ≥ n, decrease to the empty set. If Gₙ ⊇ Fₙ are open, then for all but countably many z with 1 < z < 2, every Gₙ contains the points (z, z - 1 / (k + 1)), k ≥ n, which converge to (z, 0); so (z, 0) lies in the closure of every Gₙ.

theorem not_countablyParacompactSpace : ¬CountablyParacompactSpace Mysior
Proof
:= by
  intro hX
  set F : ℕ → Set Mysior := fun n ↦ base {y | ∃ k, n ≤ k ∧ y = abscissa k}
  have hFc n : IsClosed (F n) := isClosed_base ⟨1, by
    rintro _ ⟨k, -, rfl⟩
    exact abscissa_le_one k⟩
  have hFa : Antitone F := fun m n hmn ↦
    image_mono fun y ⟨k, hk, hy⟩ ↦ ⟨k, hmn.trans hk, hy⟩
  have hF : ⋂ n, F n = ∅ := by
    refine eq_empty_of_forall_notMem fun p hp ↦ ?_
    rw [mem_iInter] at hp
    obtain ⟨_, ⟨k, -, rfl⟩, rfl⟩ := hp 0
    obtain ⟨_, ⟨j, hj, rfl⟩, h⟩ := hp (k + 1)
    have := abscissa_injective (mk_zero_injective h)
    omega
  obtain ⟨G, hGo, hFG, -, hG⟩ := hX.exists_open_iInter_closure_eq_empty hFc hFa hF
  -- The bad values of `z`: those for which some crossing point is missing from some `Gₙ`.
  set E : ℕ → ℕ → Set ℝ := fun n k ↦ {z | z ∈ Ioo 1 2 ∧ n ≤ k ∧ crossing k z ∉ G n}
  have hE n k : (E n k).Countable := by
    by_cases hnk : n ≤ k
    · have hfin : (wedge (abscissa k) \ G n).Finite :=
        (hGo n).1 _ (hFG n ⟨abscissa k, ⟨k, hnk, rfl⟩, rfl⟩)
      refine MapsTo.countable_of_injOn (f := fun z ↦ crossing k z) (t := wedge (abscissa k) \ G n)
        (fun z hz ↦ ⟨crossing_mem_wedge_abscissa hz.1, hz.2.2⟩) ?_ hfin.countable
      exact fun a _ b _ h ↦ (mk.inj h).1
    · exact countable_empty.mono fun z hz ↦ absurd hz.2.1 hnk
  obtain ⟨z, hz, hzE⟩ : ∃ z ∈ Ioo (1 : ℝ) 2, z ∉ ⋃ n, ⋃ k, E n k := by
    by_contra! h
    exact (Cardinal.Real.Ioo_countable_iff.1
      ((countable_iUnion fun n ↦ countable_iUnion fun k ↦ hE n k).mono h)).not_gt
      (by norm_num)
  refine (eq_empty_iff_forall_notMem.1 hG) (mk z 0) (mem_iInter.2 fun n ↦ ?_)
  have hmem k : crossing (k + n) z ∈ G n := by
    by_contra hk
    exact hzE (mem_iUnion₂.2 ⟨n, k + n, hz, Nat.le_add_left n k, hk⟩)
  have hinj : Injective fun k ↦ crossing (k + n) z :=
    (crossing_injective hz).comp fun a b h ↦ by simpa using h
  exact mem_closure_of_tendsto
    (tendsto_cofinite_of_injective hinj fun k ↦ crossing_mem_wedge hz)
    (Eventually.of_forall hmem)

On this site: Mysior's space is not countably paracompact