Lean library · module TopologyByExample.Spaces.RoyLattice

Roy's lattice space and its punctured subspace

Source file

The lines have positive numbers. Their indices below start at zero, so the neighbourhoods at index zero meet indices zero and one.

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

Imports

theorem exists_dense_levels

TopologyByExample.RoyLattice.exists_dense_levels

A disjoint sequence of dense subsets of the rational line exists.

theorem exists_dense_levels :
    ∃ C : ℕ → Set ℚ, (∀ n a b, a < b → ∃ r ∈ C n, r ∈ Ioo a b) ∧
      ∀ i j r, r ∈ C i → r ∈ C j → i = j
Proof
:= by
  classical
  let B := ℕ × {v : ℚ × ℚ // v.1 < v.2}
  have : Nonempty B := ⟨0, ⟨(0, 1), by norm_num⟩⟩
  obtain ⟨b, hb⟩ := exists_surjective_nat B
  obtain ⟨u, hu⟩ := Set.seq_of_forall_finite_exists
    (P := fun (r : ℚ) s ↦ r ∈ Ioo (b s.ncard).2.val.1 (b s.ncard).2.val.2 ∧ r ∉ s)
    (fun s hs ↦ (Ioo_infinite (b s.ncard).2.property).exists_notMem_finite hs)
  have hinj : Function.Injective u := by
    intro i j h
    rcases lt_trichotomy i j with h' | h' | h'
    · exact False.elim ((hu j).2 ⟨i, h', h⟩)
    · exact h'
    · exact False.elim ((hu i).2 ⟨j, h', h.symm⟩)
  refine ⟨fun i ↦ u '' {n | (b n).1 = i}, ?_, ?_⟩
  · intro n a c hac
    obtain ⟨k, hk⟩ := hb (n, ⟨(a, c), hac⟩)
    refine ⟨u k, ⟨k, congrArg Prod.fst hk, rfl⟩, ?_⟩
    have hn : (u '' Iio k).ncard = k := by rw [ncard_image_of_injective _ hinj]; simp
    simpa only [hn, hk] using (hu k).1
  · rintro i j _ ⟨n, hn, rfl⟩ ⟨m, hm, h⟩
    exact hn.symm.trans (hinj h ▸ hm)

definition levels

TopologyByExample.RoyLattice.levels

Fix a disjoint family of dense rational levels. Index zero denotes line one.

noncomputable def levels : ℕ → Set ℚ
:= exists_dense_levels.choose

theorem level_meets

TopologyByExample.RoyLattice.level_meets

Every nonempty rational interval meets each level.

theorem level_meets (i : ℕ) {a b : ℚ} (h : a < b) : ∃ r ∈ levels i, r ∈ Ioo a b
Proof
:=
  exists_dense_levels.choose_spec.1 i a b h

theorem unique_level

TopologyByExample.RoyLattice.unique_level

A horizontal coordinate occurs on only one level.

theorem unique_level {i j : ℕ} {r : ℚ} (hi : r ∈ levels i) (hj : r ∈ levels j) : i = j
Proof
:=
  exists_dense_levels.choose_spec.2 i j r hi hj

definition Point

TopologyByExample.RoyLattice.Point

A point of Roy's ordinary lattice.

def Point
:= {p : ℕ × ℚ // p.2 ∈ levels p.1}

On this site: Space: Roy's lattice subspace

definition idx

TopologyByExample.RoyLattice.idx

Index of a line, one less than its printed positive number.

def idx (p : Point) : ℕ
:= p.val.1

definition coord

TopologyByExample.RoyLattice.coord

Rational horizontal coordinate.

def coord (p : Point) : ℚ
:= p.val.2

theorem coord_injective

TopologyByExample.RoyLattice.coord_injective

Distinct ordinary points have distinct horizontal coordinates.

theorem coord_injective : Function.Injective coord
Proof
:= by
  intro p q h
  apply Subtype.ext
  have hq : coord q ∈ levels (idx q) := q.property
  rw [← h] at hq
  exact Prod.ext (unique_level p.property hq) h

definition Near

TopologyByExample.RoyLattice.Near

Indices occurring in a neighbourhood centered at index i.

def Near (i j : ℕ) : Prop
:=
  i = j ∨ (i % 2 = 0 ∧ j % 2 = 1 ∧ i ≤ j + 1 ∧ j ≤ i + 1)

theorem near_trans

TopologyByExample.RoyLattice.near_trans

private theorem near_trans {i j k : ℕ} (h : Near i j) (h' : Near j k) : Near i k
Proof
:= by
  unfold Near at *
  omega

definition strip

TopologyByExample.RoyLattice.strip

A rational interval on the indicated neighbouring lines.

def strip (i : ℕ) (a b : ℚ) : Set Point
:= {p | Near i (idx p) ∧ coord p ∈ Ioo a b}

definition Space

TopologyByExample.RoyLattice.Space

The ideal point together with the ordinary points.

def Space
:= Option Point

On this site: Space: Roy's lattice space

definition ordinary

TopologyByExample.RoyLattice.ordinary

Ordinary points in the full space.

def ordinary (p : Point) : Space
:= some p

definition infinity

TopologyByExample.RoyLattice.infinity

The ideal point.

def infinity : Space
:= none

definition tail

TopologyByExample.RoyLattice.tail

The ideal point and all lines from the even-numbered line 2n+2 upwards.

def tail (n : ℕ) : Set Space
:= {x | ∀ p, x = ordinary p → 2*n+1 ≤ idx p}

theorem mem_tail

TopologyByExample.RoyLattice.mem_tail

private theorem mem_tail (n : ℕ) (p : Point) : ordinary p ∈ tail n ↔ 2*n+1 ≤ idx p
Proof
:= by
  change (∀ q, some p = some q → _) ↔ _
  simp

theorem infinity_mem_tail

TopologyByExample.RoyLattice.infinity_mem_tail

private theorem infinity_mem_tail (n : ℕ) : infinity ∈ tail n
Proof
:= by
  rintro p ⟨⟩

instance

instance : TopologicalSpace Space
Proof
where
  IsOpen U := (∀ p, ordinary p ∈ U → ∃ a b, coord p ∈ Ioo a b ∧
    ordinary '' strip (idx p) a b ⊆ U) ∧ (infinity ∈ U → ∃ n, tail n ⊆ U)
  isOpen_univ := ⟨fun p _ ↦ ⟨coord p - 1, coord p + 1, by constructor <;> linarith,
    subset_univ _⟩, fun _ ↦ ⟨0, subset_univ _⟩⟩
  isOpen_inter := by
    rintro U V ⟨hU, hUi⟩ ⟨hV, hVi⟩
    constructor
    · intro p hp
      obtain ⟨a, b, hab, hu⟩ := hU p hp.1
      obtain ⟨c, d, hcd, hv⟩ := hV p hp.2
      refine ⟨max a c, min b d, ⟨max_lt hab.1 hcd.1, lt_min hab.2 hcd.2⟩, ?_⟩
      rintro _ ⟨q, hq, rfl⟩
      exact ⟨hu ⟨q, ⟨hq.1, (max_lt_iff.mp hq.2.1).1, (lt_min_iff.mp hq.2.2).1⟩, rfl⟩,
        hv ⟨q, ⟨hq.1, (max_lt_iff.mp hq.2.1).2, (lt_min_iff.mp hq.2.2).2⟩, rfl⟩⟩
    · intro h
      obtain ⟨n, hn⟩ := hUi h.1
      obtain ⟨m, hm⟩ := hVi h.2
      exact ⟨max n m, fun x hx ↦ ⟨hn (fun p hp ↦ by have := hx p hp; omega),
        hm (fun p hp ↦ by have := hx p hp; omega)⟩⟩
  isOpen_sUnion := by
    intro S hS
    constructor
    · intro p hp
      obtain ⟨U, hU, hpU⟩ := mem_sUnion.mp hp
      obtain ⟨a, b, hab, hs⟩ := (hS U hU).1 p hpU
      exact ⟨a, b, hab, hs.trans (subset_sUnion_of_mem hU)⟩
    · intro h
      obtain ⟨U, hU, hiU⟩ := mem_sUnion.mp h
      obtain ⟨n, hn⟩ := (hS U hU).2 hiU
      exact ⟨n, hn.trans (subset_sUnion_of_mem hU)⟩

theorem isOpen_strip

TopologyByExample.RoyLattice.isOpen_strip

Open strips about ordinary points.

theorem isOpen_strip (i : ℕ) (a b : ℚ) : IsOpen (ordinary '' strip i a b)
Proof
:= by
  constructor
  · rintro p ⟨q, hq, hqp⟩
    have h : q = p := Option.some.inj hqp
    subst q
    exact ⟨a, b, hq.2, image_mono (fun r hr ↦ ⟨near_trans hq.1 hr.1, hr.2⟩)⟩
  · rintro ⟨q, _, hq⟩
    contradiction

theorem isOpen_tail

TopologyByExample.RoyLattice.isOpen_tail

Open tails about the ideal point.

theorem isOpen_tail (n : ℕ) : IsOpen (tail n)
Proof
:= by
  constructor
  · intro p hp
    have h := (mem_tail n p).mp hp
    refine ⟨coord p - 1, coord p + 1, ⟨by linarith, by linarith⟩, ?_⟩
    rintro _ ⟨q, hq, rfl⟩
    apply (mem_tail n q).mpr
    have hn := hq.1
    unfold Near at hn
    omega
  · exact fun _ ↦ ⟨n, subset_rfl⟩

theorem hasBasis_ordinary

TopologyByExample.RoyLattice.hasBasis_ordinary

The strips form a countably indexed neighbourhood base at ordinary points.

theorem hasBasis_ordinary (p : Point) :
    (𝓝 (ordinary p)).HasBasis (fun v : ℚ × ℚ ↦ coord p ∈ Ioo v.1 v.2)
      (fun v ↦ ordinary '' strip (idx p) v.1 v.2)
Proof
:= by
  constructor
  intro U
  constructor
  · rintro h
    obtain ⟨V, hVU, hV, hp⟩ := mem_nhds_iff.mp h
    obtain ⟨a, b, hab, hsub⟩ := hV.1 p hp
    exact ⟨(a,b), hab, hsub.trans hVU⟩
  · rintro ⟨v, hv, h⟩
    exact mem_of_superset ((isOpen_strip _ _ _).mem_nhds ⟨p, ⟨Or.inl rfl,hv⟩, rfl⟩) h

theorem hasBasis_infinity

TopologyByExample.RoyLattice.hasBasis_infinity

The tails form a countable neighbourhood base at the ideal point.

theorem hasBasis_infinity : (𝓝 infinity).HasBasis (fun _ : ℕ ↦ True) tail
Proof
:= by
  constructor
  intro U
  constructor
  · intro h
    obtain ⟨V, hVU, hV, hp⟩ := mem_nhds_iff.mp h
    obtain ⟨n, hn⟩ := hV.2 hp
    exact ⟨n,trivial,hn.trans hVU⟩
  · rintro ⟨n, _, hn⟩
    exact mem_of_superset ((isOpen_tail n).mem_nhds (infinity_mem_tail n)) hn

instance

instance : FirstCountableTopology Space
Proof
:= ⟨fun x ↦ by
  cases x with
  | none => exact hasBasis_infinity.isCountablyGenerated
  | some p => exact (hasBasis_ordinary p).isCountablyGenerated⟩

instance

instance : Countable Point
Proof
:= inferInstanceAs (Countable {p : ℕ × ℚ // p.2 ∈ levels p.1})

instance

instance : Countable Space
Proof
:= inferInstanceAs (Countable (Option Point))

instance

instance : Nontrivial Point
Proof
:= by
  obtain ⟨r, hr, _⟩ := level_meets 0 (show (0 : ℚ) < 1 by norm_num)
  obtain ⟨s, hs, _⟩ := level_meets 1 (show (0 : ℚ) < 1 by norm_num)
  exact ⟨⟨⟨(0, r), hr⟩, ⟨(1, s), hs⟩, fun h ↦ Nat.zero_ne_one (congrArg idx h)⟩⟩

instance

instance : Nontrivial Space
Proof
:= inferInstanceAs (Nontrivial (Option Point))

instance

Roy's lattice subspace carries the topology inherited from the full space.

instance : TopologicalSpace Point
Proof
:= .induced ordinary inferInstance

theorem isEmbedding_ordinary

TopologyByExample.RoyLattice.isEmbedding_ordinary

Ordinary points are embedded with their subspace topology.

theorem isEmbedding_ordinary : IsEmbedding ordinary
Proof
:= ⟨⟨rfl⟩, Option.some_injective _⟩

instance

instance : FirstCountableTopology Point
Proof
:= isEmbedding_ordinary.firstCountableTopology

theorem range_ordinary

TopologyByExample.RoyLattice.range_ordinary

The ordinary lattice is the complement of the ideal point.

theorem range_ordinary : range ordinary = {infinity}ᶜ
Proof
:= by
  ext x
  cases x with
  | none => exact ⟨fun ⟨_, h⟩ ↦ (nomatch h), fun h ↦ (h rfl).elim⟩
  | some p => exact ⟨fun _ h ↦ (nomatch h), fun _ ↦ ⟨p, rfl⟩⟩

theorem isOpenEmbedding_ordinary

TopologyByExample.RoyLattice.isOpenEmbedding_ordinary

The ordinary subspace is open.

theorem isOpenEmbedding_ordinary : IsOpenEmbedding ordinary
Proof
:= by
  refine ⟨isEmbedding_ordinary, ?_⟩
  constructor
  · intro p _
    exact ⟨coord p - 1, coord p + 1, ⟨by linarith, by linarith⟩, image_subset_range ..⟩
  · rintro ⟨p, h⟩
    contradiction

theorem hasBasis_point

TopologyByExample.RoyLattice.hasBasis_point

Neighbourhood basis in the punctured lattice.

theorem hasBasis_point (p : Point) :
    (𝓝 p).HasBasis (fun v : ℚ × ℚ ↦ coord p ∈ Ioo v.1 v.2)
      (fun v ↦ strip (idx p) v.1 v.2)
Proof
:= by
  rw [isEmbedding_ordinary.toIsInducing.nhds_eq_comap]
  simpa only [preimage_image_eq _ isEmbedding_ordinary.injective] using
    (hasBasis_ordinary p).comap ordinary

theorem continuous_coord

TopologyByExample.RoyLattice.continuous_coord

The horizontal coordinate is continuous on the ordinary lattice.

theorem continuous_coord : Continuous coord
Proof
:= by
  rw [continuous_iff_continuousAt]
  intro p
  apply ((hasBasis_point p).tendsto_iff (nhds_basis_Ioo (coord p))).mpr
  intro v hv
  exact ⟨v, hv, fun _ hq ↦ hq.2⟩

instance

instance : TotallySeparatedSpace Point
Proof
:=
  totallySeparatedSpace_of_injective continuous_coord coord_injective

theorem submetrizable_point

TopologyByExample.RoyLattice.submetrizable_point

The punctured lattice has a coarser metrizable topology.

theorem submetrizable_point : SubmetrizableSpace Point
Proof
:=
  RealExtension.submetrizableSpace_of_continuous_injective continuous_coord coord_injective

On this site: Roy's lattice subspace is submetrizable

theorem mem_closure_strip

TopologyByExample.RoyLattice.mem_closure_strip

Every strip has adherent points on all levels whose stars meet its own.

theorem mem_closure_strip {i : ℕ} {a b : ℚ} {p : Point} (hp : coord p ∈ Ioo a b)
    (j : ℕ) (hij : Near i j) (hpj : Near (idx p) j) :
    ordinary p ∈ closure (ordinary '' strip i a b)
Proof
:= by
  apply (mem_closure_iff_nhds_basis (hasBasis_ordinary p)).mpr
  intro v hv
  have hab : max a v.1 < min b v.2 := (max_lt hp.1 hv.1).trans (lt_min hp.2 hv.2)
  obtain ⟨r, hr, hrab⟩ := level_meets j hab
  let q : Point := ⟨(j, r), hr⟩
  exact ⟨ordinary q, ⟨q, ⟨hij, (max_lt_iff.mp hrab.1).1, (lt_min_iff.mp hrab.2).1⟩, rfl⟩,
    ⟨q, ⟨hpj, (max_lt_iff.mp hrab.1).2, (lt_min_iff.mp hrab.2).2⟩, rfl⟩⟩

theorem hit_successor

TopologyByExample.RoyLattice.hit_successor

private theorem hit_successor {U : Set Space} (hU : IsClopen U)
    {i : ℕ} (h : ∃ p, idx p = i ∧ ordinary p ∈ U) :
    ∃ q, idx q = i+1 ∧ ordinary q ∈ U
Proof
:= by
  obtain ⟨p, rfl, hp⟩ := h
  obtain ⟨a, b, hab, hsub⟩ := hU.isOpen.1 p hp
  obtain ⟨r, hr, hrab⟩ := level_meets (idx p + 1) (hab.1.trans hab.2)
  let q : Point := ⟨(idx p + 1, r), hr⟩
  refine ⟨q, rfl, (hU.isClosed.closure_subset_iff.mpr hsub) ?_⟩
  have hq : idx q = idx p + 1 := rfl
  by_cases he : idx p % 2 = 0
  · apply mem_closure_strip hrab (idx q) _ (Or.inl rfl)
    unfold Near
    omega
  · apply mem_closure_strip hrab (idx p) (Or.inl rfl)
    unfold Near
    omega

theorem empty_of_misses_infinity

TopologyByExample.RoyLattice.empty_of_misses_infinity

private theorem empty_of_misses_infinity {U : Set Space} (hU : IsClopen U)
    (hi : infinity ∉ U) : U = ∅
Proof
:= by
  apply eq_empty_iff_forall_notMem.mpr
  rintro (_ | p) hp
  · exact hi hp
  · obtain ⟨n, hn⟩ := hU.compl.isOpen.2 hi
    have hh : ∀ k : ℕ, ∃ q, idx q = idx p + k ∧ ordinary q ∈ U := by
      intro k
      induction k with
      | zero => exact ⟨p, by omega, hp⟩
      | succ k h => exact hit_successor hU h
    obtain ⟨q, hq, hqU⟩ := hh (2*n+1)
    exact hn ((mem_tail n q).mpr (by omega)) hqU

instance

instance : PreconnectedSpace Space
Proof
:= by
  apply preconnectedSpace_iff_clopen.mpr
  intro U hU
  by_cases hi : infinity ∈ U
  · exact Or.inr (compl_empty_iff.mp (empty_of_misses_infinity hU.compl (by simpa)))
  · exact Or.inl (empty_of_misses_infinity hU hi)

theorem hasDispersionPoint

TopologyByExample.RoyLattice.hasDispersionPoint

The ideal point is a dispersion point of Roy's full lattice.

theorem hasDispersionPoint : HasDispersionPoint Space
Proof
where
  exists_point := ⟨infinity, range_ordinary ▸
    isEmbedding_ordinary.isTotallyDisconnected_range.mpr inferInstance⟩

On this site: Roy's lattice space has a dispersion point

definition initial

TopologyByExample.RoyLattice.initial

The portion strictly below index 2n, bounded away from infinity.

def initial (n : ℕ) : Set Space
:= ordinary '' {p | idx p < 2*n}

theorem mem_initial

TopologyByExample.RoyLattice.mem_initial

private theorem mem_initial (p : Point) (n : ℕ) : ordinary p ∈ initial n ↔ idx p < 2*n
Proof
:=
  isEmbedding_ordinary.injective.mem_set_image

theorem isOpen_initial

TopologyByExample.RoyLattice.isOpen_initial

private theorem isOpen_initial (n : ℕ) : IsOpen (initial n)
Proof
:= by
  constructor
  · intro p hp
    have h := (mem_initial p n).mp hp
    refine ⟨coord p - 1, coord p + 1, ⟨by linarith, by linarith⟩, ?_⟩
    rintro _ ⟨q, hq, rfl⟩
    apply (mem_initial q n).mpr
    have hn := hq.1
    unfold Near at hn
    omega
  · rintro ⟨q, _, h⟩
    contradiction

theorem closure_initial_subset

TopologyByExample.RoyLattice.closure_initial_subset

private theorem closure_initial_subset (n : ℕ) : closure (initial n) ⊆ (tail n)ᶜ
Proof
:= by
  apply (isOpen_tail n).isClosed_compl.closure_subset_iff.mpr
  rintro x ⟨p, hp, rfl⟩ h
  have := (mem_tail n p).mp h
  change idx p < 2*n at hp
  omega

theorem separate_infinity

TopologyByExample.RoyLattice.separate_infinity

private theorem separate_infinity (p : Point) :
    ∃ s ∈ 𝓝 (ordinary p), ∃ t ∈ 𝓝 infinity, Disjoint (closure s) (closure t)
Proof
:= by
  let n := idx p + 1
  refine ⟨initial n, (isOpen_initial _).mem_nhds ((mem_initial _ _).mpr (by dsimp [n]; omega)),
    tail (n+1), (isOpen_tail _).mem_nhds (infinity_mem_tail _), ?_⟩
  have hT : closure (tail (n+1)) ⊆ (initial (n+1))ᶜ := by
    apply (isOpen_initial _).isClosed_compl.closure_subset_iff.mpr
    rintro _ hT ⟨p, hp, rfl⟩
    have := (mem_tail _ _).mp hT
    change idx p < 2*(n+1) at hp
    omega
  apply Set.disjoint_left.mpr
  intro x hx ht
  have hp := closure_initial_subset n hx
  cases x with
  | none => exact hp (infinity_mem_tail _)
  | some q =>
    exact hT ht ((mem_initial _ _).mpr (by
      have := mt (mem_tail n q).mpr hp
      omega))

theorem lift_separation

TopologyByExample.RoyLattice.lift_separation

private theorem lift_separation (p q : Point) (hne : p ≠ q) :
    ∃ s ∈ 𝓝 (ordinary p), ∃ t ∈ 𝓝 (ordinary q), Disjoint (closure s) (closure t)
Proof
:= by
  obtain ⟨S, hS, T, hT, hd⟩ := exists_nhds_disjoint_closure hne
  let n := idx p + 1
  let A := (ordinary '' S) ∩ initial n
  have ha : A ∈ 𝓝 (ordinary p) := inter_mem (isOpenEmbedding_ordinary.image_mem_nhds.mpr hS)
    ((isOpen_initial n).mem_nhds ((mem_initial p n).mpr (by dsimp [n]; omega)))
  refine ⟨A, ha, ordinary '' T, isOpenEmbedding_ordinary.image_mem_nhds.mpr hT, ?_⟩
  apply Set.disjoint_left.mpr
  intro x hx ht
  cases x with
  | none =>
    exact closure_initial_subset n (closure_mono inter_subset_right hx) (infinity_mem_tail _)
  | some z =>
    refine Set.disjoint_left.mp hd (show z ∈ closure S from ?_) ?_
    · rw [isEmbedding_ordinary.closure_eq_preimage_closure_image]
      exact closure_mono inter_subset_left hx
    · rw [isEmbedding_ordinary.closure_eq_preimage_closure_image]
      exact ht

instance

instance : T25Space Space
Proof
:= by
  apply t25Space_of_exists_nhds_disjoint_closure
  rintro (_ | p) (_ | q) h
  · exact (h rfl).elim
  · obtain ⟨s, hs, t, ht, hd⟩ := separate_infinity q
    exact ⟨t, ht, s, hs, hd.symm⟩
  · exact separate_infinity p
  · exact lift_separation p q (fun he ↦ h (congrArg ordinary he))

theorem not_hasIsolatedPoint_point

TopologyByExample.RoyLattice.not_hasIsolatedPoint_point

Every ordinary point has other points of its own line in its neighbourhoods.

theorem not_hasIsolatedPoint_point : ¬ HasIsolatedPoint Point
Proof
:= by
  rintro ⟨p, hp⟩
  obtain ⟨v, hv, hs⟩ := (hasBasis_point p).mem_iff.mp (hp.mem_nhds rfl)
  obtain ⟨r, hr, hrab⟩ := level_meets (idx p) hv.2
  let q : Point := ⟨(idx p, r), hr⟩
  have he : q = p := hs (show q ∈ strip (idx p) v.1 v.2 from
    ⟨Or.inl rfl, hv.1.trans hrab.1, hrab.2⟩)
  exact hrab.1.ne ((congrArg coord he).symm)

On this site: Roy's lattice subspace has no isolated point

theorem not_hasIsolatedPoint

TopologyByExample.RoyLattice.not_hasIsolatedPoint

The full lattice has no isolated point.

theorem not_hasIsolatedPoint : ¬ HasIsolatedPoint Space
Proof
:= by
  rintro ⟨(_ | p), hp⟩
  · obtain ⟨n, _, hn⟩ := hasBasis_infinity.mem_iff.mp (hp.mem_nhds rfl)
    obtain ⟨r, hr, _⟩ := level_meets (2*n+1) (show (0:ℚ) < 1 by norm_num)
    let q : Point := ⟨(2*n+1,r),hr⟩
    have he : ordinary q = infinity := hn ((mem_tail _ _).mpr le_rfl)
    cases he
  · apply not_hasIsolatedPoint_point
    refine ⟨p, ?_⟩
    have he : ordinary ⁻¹' ({ordinary p} : Set Space) = {p} := by
      ext q
      exact isEmbedding_ordinary.injective.eq_iff
    rw [← he]
    exact hp.preimage isEmbedding_ordinary.continuous

On this site: Roy's lattice space has no isolated point

theorem not_pseudocompactSpace_point

TopologyByExample.RoyLattice.not_pseudocompactSpace_point

The horizontal coordinate is an unbounded continuous real-valued function.

theorem not_pseudocompactSpace_point : ¬ PseudocompactSpace Point
Proof
:= by
  intro h
  let f : C(Point, ℝ) := ⟨fun p ↦ (coord p : ℝ), Rat.continuous_coe_real.comp continuous_coord⟩
  obtain ⟨M, hM⟩ := (h.bddAbove_and_bddBelow_range f).1
  obtain ⟨n, hn⟩ := exists_nat_gt M
  obtain ⟨r, hr, hn'⟩ := level_meets 0 (show (n:ℚ) < n+1 by linarith)
  let p : Point := ⟨(0,r), hr⟩
  have hle : (r : ℝ) ≤ M := hM (mem_range_self p)
  have hlt : (n : ℝ) < r := by exact_mod_cast hn'.1
  linarith

On this site: Roy's lattice subspace is not pseudocompact

theorem not_semiregular_point

TopologyByExample.RoyLattice.not_semiregular_point

An interval on line two witnesses failure of semiregularity in the punctured lattice.

theorem not_semiregular_point : ¬ SemiregularSpace Point
Proof
:= by
  intro h
  obtain ⟨r, hr, hrab⟩ := level_meets 1 (show (0:ℚ) < 1 by norm_num)
  let p : Point := ⟨(1,r),hr⟩
  have ho : IsOpen (strip 1 0 1) := by
    simpa only [preimage_image_eq _ isEmbedding_ordinary.injective] using
      (isOpen_strip 1 0 1).preimage isEmbedding_ordinary.continuous
  obtain ⟨U, hreg, hp, hU⟩ := h.isTopologicalBasis.exists_subset_of_mem_open
    (show p ∈ strip 1 0 1 from ⟨Or.inl rfl,hrab⟩) ho
  obtain ⟨v, hv, hs⟩ :=
    (hasBasis_point p).mem_iff.mp ((h.isTopologicalBasis.isOpen hreg).mem_nhds hp)
  obtain ⟨t, ht, htv⟩ := level_meets 0 (hv.1.trans hv.2)
  let q : Point := ⟨(0,t),ht⟩
  have hi : q ∈ interior (closure U) := by
    apply mem_interior_iff_mem_nhds.mpr
    apply (hasBasis_point q).mem_of_superset (i := v) htv
    intro z hz
    apply closure_mono hs
    rw [isEmbedding_ordinary.closure_eq_preimage_closure_image]
    apply mem_closure_strip hz.2 1 (Or.inl rfl)
    have hqz : Near 0 (idx z) := hz.1
    unfold Near at *
    omega
  have hqU : q ∈ U := (show interior (closure U) = U from hreg) ▸ hi
  have hn : Near 1 0 := (hU hqU).1
  norm_num [Near] at hn

On this site: Roy's lattice subspace is not semiregular

theorem not_semiregular

TopologyByExample.RoyLattice.not_semiregular

The open ordinary subspace prevents semiregularity of the full lattice.

theorem not_semiregular : ¬ SemiregularSpace Space
Proof
:= fun _ ↦
  not_semiregular_point (SemiregularSpace.of_isOpenEmbedding isOpenEmbedding_ordinary)

On this site: Roy's lattice space is not semiregular