Lean library · module TopologyByExample.Spaces.NestedAngles

Nested angles

Source file

For n ≥ 1 let Sₙ be the segment in the plane from a = (0, 1) to (n, 1 / (n + 1)), the set of points (x, 1 - x / (n + 1)) with 0 ≤ x ≤ n, and let Hₙ be the horizontal half-line of points (x, 1 / (n + 1)) with x ≤ n. The nested angles space is the union of all the Sₙ and Hₙ with the horizontal axis, with the subspace topology of the plane. In this file the angles are indexed from 0: segment m is S_{m + 1} and halfLine m is H_{m + 1}.

The segments Sₙ all pass through a, and as n grows they approach the horizontal ray y = 1, x > 0, which is not part of the space. So the space is not closed in the plane; it is the intersection of a closed set (the space together with that ray) with a Gδ set, hence completely metrizable. At a it is not weakly locally compact: a compact neighbourhood of a would contain the limits (x, 1) of the points (x, 1 - x / (n + 1)). The union of the angles Sₙ ∪ Hₙ is path connected, and its closure contains the axis, so the space is connected. In the region y (x + 2) < 1, which contains the axis and meets no segment, the ordinates of points of the space lie in the countable set of the numbers 0 and 1 / (n + 1), so a connected set there has constant ordinate; hence no path leaves the axis and the space is not locally connected at the origin.

Main definitions

Main statements

Tags

nested angles, locally compact, locally connected, path connected

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 segment

TopologyByExample.NestedAngles.segment

The segment S_{m + 1} from (0, 1) to (m + 1, 1 / (m + 2)).

def segment (m : ℕ) : Set (ℝ × ℝ)
:=
  {p | 0 ≤ p.1 ∧ p.1 ≤ (m : ℝ) + 1 ∧ p.2 = 1 - p.1 / ((m : ℝ) + 2)}

definition halfLine

TopologyByExample.NestedAngles.halfLine

The half-line H_{m + 1}: the points (x, 1 / (m + 2)) with x ≤ m + 1.

def halfLine (m : ℕ) : Set (ℝ × ℝ)
:= {p | p.1 ≤ (m : ℝ) + 1 ∧ p.2 = 1 / ((m : ℝ) + 2)}

definition nestedAngles

TopologyByExample.NestedAngles.nestedAngles

The nested angles: the segments, the half-lines and the horizontal axis.

def nestedAngles : Set (ℝ × ℝ)
:= (⋃ m, segment m ∪ halfLine m) ∪ {p | p.2 = 0}

definition heights

TopologyByExample.NestedAngles.heights

The ordinates 0 and 1 / (m + 2), which are also the slopes (up to sign) of the segments and of the ray y = 1.

noncomputable def heights : Set ℝ
:= insert 0 (range fun m : ℕ ↦ 1 / ((m : ℝ) + 2))

theorem tendsto_one_div_add_two

TopologyByExample.NestedAngles.tendsto_one_div_add_two

theorem tendsto_one_div_add_two :
    Tendsto (fun m : ℕ ↦ 1 / ((m : ℝ) + 2)) atTop (𝓝 0)
Proof
:= by
  have := (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)).comp (tendsto_add_atTop_nat 1)
  refine this.congr fun n ↦ ?_
  simp only [Function.comp_apply, Nat.cast_add, Nat.cast_one]; ring

theorem isCompact_heights

TopologyByExample.NestedAngles.isCompact_heights

theorem isCompact_heights : IsCompact heights
Proof
:= tendsto_one_div_add_two.isCompact_insert_range

theorem countable_heights

TopologyByExample.NestedAngles.countable_heights

theorem countable_heights : heights.Countable
Proof
:= (countable_range _).insert 0

theorem apex_mem_segment

TopologyByExample.NestedAngles.apex_mem_segment

The apex (0, 1) lies on every segment.

theorem apex_mem_segment (m : ℕ) : ((0, 1) : ℝ × ℝ) ∈ segment m
Proof
:=
  ⟨le_rfl, by positivity, by simp⟩

theorem apex_mem

TopologyByExample.NestedAngles.apex_mem

The apex lies in the space.

theorem apex_mem : ((0, 1) : ℝ × ℝ) ∈ nestedAngles
Proof
:=
  Or.inl (mem_iUnion.2 ⟨0, Or.inl (apex_mem_segment 0)⟩)

theorem mul_add_le_one_iff

TopologyByExample.NestedAngles.mul_add_le_one_iff

The inequality x s + s ≤ 1 for the slope s = 1 / (m + 2) says x ≤ m + 1.

theorem mul_add_le_one_iff (m : ℕ) (x : ℝ) :
    x * (1 / ((m : ℝ) + 2)) + 1 / ((m : ℝ) + 2) ≤ 1 ↔ x ≤ (m : ℝ) + 1
Proof
:= by
  have hm : (0 : ℝ) < (m : ℝ) + 2 := by positivity
  rw [show x * (1 / ((m : ℝ) + 2)) + 1 / ((m : ℝ) + 2) = (x + 1) / ((m : ℝ) + 2) by ring,
    div_le_one hm]
  constructor <;> intro h <;> linarith

definition segmentsAndRay

TopologyByExample.NestedAngles.segmentsAndRay

The closed set made of the segments and the ray y = 1, x ≥ 0.

def segmentsAndRay : Set (ℝ × ℝ)
:=
  {p | ∃ s ∈ heights, 0 ≤ p.1 ∧ p.2 = 1 - p.1 * s ∧ p.1 * s + s ≤ 1}

definition halfLinesAndAxis

TopologyByExample.NestedAngles.halfLinesAndAxis

The closed set made of the half-lines and the axis.

def halfLinesAndAxis : Set (ℝ × ℝ)
:= {p | p.2 ∈ heights ∧ p.1 * p.2 + p.2 ≤ 1}

theorem isClosed_segmentsAndRay

TopologyByExample.NestedAngles.isClosed_segmentsAndRay

theorem isClosed_segmentsAndRay : IsClosed segmentsAndRay
Proof
:= by
  have : CompactSpace heights := isCompact_iff_compactSpace.1 isCompact_heights
  set F : Set ((ℝ × ℝ) × heights) :=
    {q | 0 ≤ q.1.1 ∧ q.1.2 = 1 - q.1.1 * q.2 ∧ q.1.1 * q.2 + q.2 ≤ 1}
  have hs : Continuous fun q : (ℝ × ℝ) × heights ↦ (q.2 : ℝ) :=
    continuous_subtypeVal.comp continuous_snd
  have hx : Continuous fun q : (ℝ × ℝ) × heights ↦ q.1.1 := continuous_fst.comp continuous_fst
  have hy : Continuous fun q : (ℝ × ℝ) × heights ↦ q.1.2 := continuous_snd.comp continuous_fst
  have hF : IsClosed F :=
    (isClosed_le (continuous_const : Continuous fun _ : (ℝ × ℝ) × heights ↦ (0 : ℝ)) hx).inter
      ((isClosed_eq hy (continuous_const.sub (hx.mul hs))).inter
        (isClosed_le ((hx.mul hs).add hs) continuous_const))
  convert isClosedMap_fst_of_compactSpace F hF using 1
  ext p
  constructor
  · rintro ⟨s, hs, h⟩
    exact ⟨(p, ⟨s, hs⟩), h, rfl⟩
  · rintro ⟨⟨q, s⟩, h, rfl⟩
    exact ⟨s, s.property, h⟩

theorem isClosed_halfLinesAndAxis

TopologyByExample.NestedAngles.isClosed_halfLinesAndAxis

theorem isClosed_halfLinesAndAxis : IsClosed halfLinesAndAxis
Proof
:=
  (isCompact_heights.isClosed.preimage continuous_snd).inter
    (isClosed_le ((continuous_fst.mul continuous_snd).add continuous_snd) continuous_const)

theorem nestedAngles_eq

TopologyByExample.NestedAngles.nestedAngles_eq

The nested angles are the points of the two closed sets above that are not on the ray y = 1, x > 0.

theorem nestedAngles_eq : nestedAngles =
    (segmentsAndRay ∪ halfLinesAndAxis) ∩ ({p | p.1 ≤ 0} ∪ {p | p.2 ≠ 1})
Proof
:= by
  ext ⟨x, y⟩
  simp only [nestedAngles, segment, halfLine, segmentsAndRay, halfLinesAndAxis, heights,
    mem_union, mem_iUnion, mem_inter_iff, mem_ofPred_eq, mem_insert_iff, mem_range,
    exists_eq_or_imp, exists_exists_eq_and]
  constructor
  · rintro (⟨m, ⟨h0, h1, h2⟩ | ⟨h1, h2⟩⟩ | h)
    · have hm : (0 : ℝ) < (m : ℝ) + 2 := by positivity
      refine ⟨Or.inl (Or.inr ⟨m, h0, by rw [h2]; ring, (mul_add_le_one_iff m x).2 h1⟩), ?_⟩
      · rcases h0.lt_or_eq with h0 | h0
        · right; rw [h2]; intro h; have := div_pos h0 hm; linarith
        · left; exact h0.symm.le
    · have hm : (0 : ℝ) < (m : ℝ) + 2 := by positivity
      refine ⟨Or.inr ⟨Or.inr ⟨m, h2.symm⟩, ?_⟩, Or.inr ?_⟩
      · rw [h2]; exact (mul_add_le_one_iff m x).2 h1
      · rw [h2]; intro h
        rw [div_eq_one_iff_eq hm.ne'] at h
        linarith [m.cast_nonneg' (α := ℝ)]
    · exact ⟨Or.inr ⟨Or.inl h, by rw [h]; norm_num⟩, Or.inr (by rw [h]; norm_num)⟩
  · rintro ⟨(⟨⟨h0, h1, -⟩ | ⟨m, h0, h1, h2⟩⟩ | ⟨h1 | ⟨m, h1⟩, h2⟩), h3⟩
    · have hx : x = 0 := le_antisymm (h3.resolve_right (by simp [h1])) h0
      subst hx
      exact Or.inl ⟨0, Or.inl ⟨le_rfl, by positivity, by simp [h1]⟩⟩
    · exact Or.inl ⟨m, Or.inl ⟨h0, (mul_add_le_one_iff m x).1 h2, by rw [h1]; ring⟩⟩
    · exact Or.inr h1
    · rw [← h1] at h2
      exact Or.inl ⟨m, Or.inr ⟨(mul_add_le_one_iff m x).1 h2, h1.symm⟩⟩

theorem isGδ_nestedAngles

TopologyByExample.NestedAngles.isGδ_nestedAngles

The nested angles form a Gδ subset of the plane.

theorem isGδ_nestedAngles : IsGδ nestedAngles
Proof
:= by
  rw [nestedAngles_eq]
  exact (isClosed_segmentsAndRay.union isClosed_halfLinesAndAxis).isGδ.inter
    ((isClosed_le continuous_fst continuous_const).isGδ.union
      (isOpen_ne_fun continuous_snd continuous_const).isGδ)

On this site: Nested angles: The nested angles form a \(G_\delta\) subset of the plane

theorem segment_eq_image

TopologyByExample.NestedAngles.segment_eq_image

Each segment is the image of an interval.

theorem segment_eq_image (m : ℕ) :
    segment m = (fun x : ℝ ↦ (x, 1 - x / ((m : ℝ) + 2))) '' Icc 0 ((m : ℝ) + 1)
Proof
:= by
  ext ⟨x, y⟩
  simp only [segment, mem_ofPred_eq, mem_image, mem_Icc, Prod.mk.injEq]
  constructor
  · rintro ⟨h0, h1, h2⟩; exact ⟨x, ⟨h0, h1⟩, rfl, h2.symm⟩
  · rintro ⟨t, ⟨h0, h1⟩, rfl, rfl⟩; exact ⟨h0, h1, rfl⟩

theorem isCompact_segment

TopologyByExample.NestedAngles.isCompact_segment

Each segment is compact.

theorem isCompact_segment (m : ℕ) : IsCompact (segment m)
Proof
:=
  segment_eq_image m ▸ isCompact_Icc.image (by fun_prop)

theorem isPathConnected_segment

TopologyByExample.NestedAngles.isPathConnected_segment

Each segment is path connected.

theorem isPathConnected_segment (m : ℕ) : IsPathConnected (segment m)
Proof
:=
  segment_eq_image m ▸ ((convex_Icc _ _).isPathConnected (nonempty_Icc.2 (by positivity))).image
    (by fun_prop)

theorem isPathConnected_halfLine

TopologyByExample.NestedAngles.isPathConnected_halfLine

Each half-line is path connected.

theorem isPathConnected_halfLine (m : ℕ) : IsPathConnected (halfLine m)
Proof
:= by
  have h : halfLine m = Iic ((m : ℝ) + 1) ×ˢ {1 / ((m : ℝ) + 2)} := by
    ext p; simp [halfLine]
  rw [h]
  exact ((convex_Iic _).prod (convex_singleton _)).isPathConnected
    ⟨(0, _), show (0 : ℝ) ≤ (m : ℝ) + 1 by positivity, rfl⟩

theorem corner_mem

TopologyByExample.NestedAngles.corner_mem

The corner (m + 1, 1 / (m + 2)) where a segment meets its half-line.

theorem corner_mem (m : ℕ) :
    (((m : ℝ) + 1, 1 / ((m : ℝ) + 2)) : ℝ × ℝ) ∈ segment m ∩ halfLine m
Proof
:= by
  refine ⟨⟨by positivity, le_rfl, ?_⟩, le_rfl, rfl⟩
  field_simp; ring

definition angles

TopologyByExample.NestedAngles.angles

The angles: the union of the segments and the half-lines.

def angles : Set (ℝ × ℝ)
:= ⋃ m, segment m ∪ halfLine m

theorem isPreconnected_angles

TopologyByExample.NestedAngles.isPreconnected_angles

The union of the angles is preconnected: each angle is, and they all contain (0, 1).

theorem isPreconnected_angles : IsPreconnected angles
Proof
:=
  isPreconnected_iUnion ⟨(0, 1), mem_iInter.2 fun m ↦ Or.inl (apex_mem_segment m)⟩ fun m ↦
    IsPreconnected.union _ (corner_mem m).1 (corner_mem m).2
      (isPathConnected_segment m).isConnected.isPreconnected
      (isPathConnected_halfLine m).isConnected.isPreconnected

theorem axis_subset_closure

TopologyByExample.NestedAngles.axis_subset_closure

The axis lies in the closure of the half-lines.

theorem axis_subset_closure : {p : ℝ × ℝ | p.2 = 0} ⊆ closure angles
Proof
:= by
  rintro ⟨x, y⟩ (hy : y = 0)
  subst hy
  refine mem_closure_of_tendsto (tendsto_const_nhds.prodMk_nhds tendsto_one_div_add_two) ?_
  filter_upwards [eventually_ge_atTop ⌈x⌉₊] with m hm
  refine mem_iUnion.2 ⟨m, Or.inr ⟨?_, rfl⟩⟩
  have : x ≤ (m : ℝ) := (Nat.le_ceil x).trans (by exact_mod_cast hm)
  linarith

theorem isPreconnected_nestedAngles

TopologyByExample.NestedAngles.isPreconnected_nestedAngles

The nested angles form a connected subset of the plane.

theorem isPreconnected_nestedAngles : IsPreconnected nestedAngles
Proof
:=
  isPreconnected_angles.subset_closure subset_union_left
    (union_subset subset_closure axis_subset_closure)

definition region

TopologyByExample.NestedAngles.region

The region y (x + 2) < 1, which contains the axis and meets no segment.

def region : Set (ℝ × ℝ)
:= {p | p.2 * (p.1 + 2) < 1}

theorem isOpen_region

TopologyByExample.NestedAngles.isOpen_region

theorem isOpen_region : IsOpen region
Proof
:=
  isOpen_lt (continuous_snd.mul (continuous_fst.add continuous_const)) continuous_const

theorem snd_mem_heights

TopologyByExample.NestedAngles.snd_mem_heights

In the region y (x + 2) < 1, the ordinates of points of the space are 0 or 1 / (m + 2).

theorem snd_mem_heights {p : ℝ × ℝ} (hp : p ∈ nestedAngles) (hr : p ∈ region) :
    p.2 ∈ heights
Proof
:= by
  rcases hp with hp | hp
  · obtain ⟨m, ⟨h0, h1, h2⟩ | ⟨-, h2⟩⟩ := mem_iUnion.1 hp
    · exfalso
      have hm : (0 : ℝ) < (m : ℝ) + 2 := by positivity
      have hr' : p.2 * (p.1 + 2) < 1 := hr
      rw [h2] at hr'
      have key : (1 - p.1 / ((m : ℝ) + 2)) * (p.1 + 2) * ((m : ℝ) + 2) =
          ((m : ℝ) + 2 - p.1) * (p.1 + 2) := by field_simp
      have h3 : (1 - p.1 / ((m : ℝ) + 2)) * (p.1 + 2) * ((m : ℝ) + 2) < (m : ℝ) + 2 := by
        nlinarith
      rw [key] at h3
      nlinarith
    · exact h2 ▸ mem_insert_of_mem _ (mem_range_self m)
  · exact (hp : p.2 = 0) ▸ mem_insert _ _

theorem mem_region_of_snd_eq_zero

TopologyByExample.NestedAngles.mem_region_of_snd_eq_zero

The axis lies in the region.

theorem mem_region_of_snd_eq_zero {p : ℝ × ℝ} (hp : p.2 = 0) : p ∈ region
Proof
:= by
  change p.2 * (p.1 + 2) < 1
  rw [hp]; norm_num

theorem snd_eq_of_isPreconnected

TopologyByExample.NestedAngles.snd_eq_of_isPreconnected

A preconnected subset of the space inside the region has constant ordinate.

theorem snd_eq_of_isPreconnected {s : Set (ℝ × ℝ)} (hs : IsPreconnected s)
    (hsub : s ⊆ nestedAngles ∩ region) {p q : ℝ × ℝ} (hp : p ∈ s) (hq : q ∈ s) : p.2 = q.2
Proof
:=
  countable_heights.isTotallyDisconnected _
    (by rintro _ ⟨r, hr, rfl⟩; exact snd_mem_heights (hsub hr).1 (hsub hr).2)
    (hs.image _ continuous_snd.continuousOn) (mem_image_of_mem _ hp) (mem_image_of_mem _ hq)

definition NestedAngles

TopologyByExample.NestedAngles

The nested angles: the subspace NestedAngles.nestedAngles of the plane.

abbrev NestedAngles : Type
:= NestedAngles.nestedAngles

On this site: Space: Nested angles

definition apex

TopologyByExample.NestedAngles.apex

The apex (0, 1).

def apex : NestedAngles
:= ⟨(0, 1), apex_mem⟩

definition origin

TopologyByExample.NestedAngles.origin

The origin, on the axis.

def origin : NestedAngles
:= ⟨(0, 0), Or.inr rfl⟩

instance

The space is nonempty.

instance : Nonempty NestedAngles
Proof
:= ⟨apex⟩

theorem isCompletelyMetrizableSpace

TopologyByExample.NestedAngles.isCompletelyMetrizableSpace

The nested angles are completely metrizable: a Gδ subset of the plane.

theorem isCompletelyMetrizableSpace : IsCompletelyMetrizableSpace NestedAngles
Proof
:=
  isGδ_nestedAngles.isCompletelyMetrizableSpace

On this site: Nested angles is completely metrizable

theorem sigmaCompactSpace

TopologyByExample.NestedAngles.sigmaCompactSpace

The nested angles are σ-compact: the union of the countably many compact segments and the closed set of the half-lines and the axis.

theorem sigmaCompactSpace : SigmaCompactSpace NestedAngles
Proof
:= by
  refine isSigmaCompact_iff_sigmaCompactSpace.1 ?_
  have hH : {p : ℝ × ℝ | p.2 ∈ heights ∧ p.1 * p.2 + p.2 ≤ 1} ⊆ nestedAngles := by
    intro p hp
    rw [nestedAngles_eq]
    refine ⟨Or.inr hp, Or.inr ?_⟩
    change p.2 ≠ 1
    rcases hp.1 with h | ⟨m, h⟩
    · rw [h]; norm_num
    · rw [← h]; intro h1
      rw [div_eq_one_iff_eq (by positivity)] at h1
      linarith [m.cast_nonneg' (α := ℝ)]
  have heq : nestedAngles = (⋃ m, segment m) ∪ halfLinesAndAxis := by
    refine Subset.antisymm ?_ (union_subset (iUnion_subset fun m ↦ ?_) hH)
    · intro p hp
      rw [nestedAngles_eq] at hp
      rcases hp with ⟨hp | hp, h3⟩
      · obtain ⟨s, hs, h0, h1, h2⟩ := hp
        rcases hs with rfl | ⟨m, rfl⟩
        · have hx : p.1 = 0 := le_antisymm (h3.resolve_right (by simp [h1])) h0
          left
          exact mem_iUnion.2 ⟨0, ⟨h0, by rw [hx]; positivity, by rw [h1, hx]; simp⟩⟩
        · left
          exact mem_iUnion.2 ⟨m, h0, (mul_add_le_one_iff m _).1 h2, by rw [h1]; ring⟩
      · exact Or.inr hp
    · exact fun p hp ↦ Or.inl (mem_iUnion.2 ⟨m, Or.inl hp⟩)
  rw [heq, ← sUnion_pair]
  refine isSigmaCompact_sUnion _ ((countable_singleton _).insert _) ?_
  rintro ⟨s, rfl | rfl⟩
  · exact isSigmaCompact_iUnion_of_isCompact _ isCompact_segment
  · exact isSigmaCompact_univ.of_isClosed_subset isClosed_halfLinesAndAxis (subset_univ _)

On this site: Nested angles is σ-compact

theorem preconnectedSpace

TopologyByExample.NestedAngles.preconnectedSpace

The nested angles are connected.

theorem preconnectedSpace : PreconnectedSpace NestedAngles
Proof
:=
  Subtype.preconnectedSpace isPreconnected_nestedAngles

On this site: Nested angles is connected

theorem not_joined_origin_apex

TopologyByExample.NestedAngles.not_joined_origin_apex

No path joins the origin to the apex. Along a path starting at the origin, the set of times at which it lies on the axis is closed, and also open, since near such a time the path stays in the region y (x + 2) < 1, where a connected set has constant ordinate.

theorem not_joined_origin_apex : ¬Joined origin apex
Proof
:= by
  rintro ⟨γ⟩
  set g : ℝ → ℝ × ℝ := fun t ↦ (γ.extend t : ℝ × ℝ) with hg_def
  have hg : Continuous g := continuous_subtypeVal.comp γ.continuous_extend
  have hmem : ∀ t, g t ∈ nestedAngles := fun t ↦ (γ.extend t).property
  have hclosed : IsClosed {t | (g t).2 = 0} := isClosed_eq (continuous_snd.comp hg) continuous_const
  have hopen : IsOpen {t | (g t).2 = 0} := by
    rw [Metric.isOpen_iff]
    intro t (ht : (g t).2 = 0)
    have hU : g ⁻¹' region ∈ 𝓝 t :=
      hg.continuousAt.preimage_mem_nhds (isOpen_region.mem_nhds (mem_region_of_snd_eq_zero ht))
    obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.1 hU
    refine ⟨ε, hε, fun s hs ↦ ?_⟩
    have := snd_eq_of_isPreconnected
      ((Real.ball_eq_Ioo t ε ▸ isPreconnected_Ioo).image g hg.continuousOn)
      (by rintro _ ⟨r, hr, rfl⟩; exact ⟨hmem r, hball hr⟩)
      (mem_image_of_mem g hs) (mem_image_of_mem g (Metric.mem_ball_self hε))
    exact this.trans ht
  have hzero : g 0 = (0, 0) := by simp only [hg_def, Path.extend_zero]; rfl
  have huniv := IsClopen.eq_univ ⟨hclosed, hopen⟩ ⟨0, by simp [hzero]⟩
  have h1 : (1 : ℝ) ∈ {t | (g t).2 = 0} := huniv.symm ▸ mem_univ _
  have hone : g 1 = (0, 1) := by simp only [hg_def, Path.extend_one]; rfl
  simp [hone] at h1

theorem not_pathPreconnectedSpace

TopologyByExample.NestedAngles.not_pathPreconnectedSpace

The nested angles are not path connected.

theorem not_pathPreconnectedSpace : ¬PathPreconnectedSpace NestedAngles
Proof
:= fun h ↦
  not_joined_origin_apex (h.joined origin apex)

On this site: Nested angles is not path connected

theorem not_locallyConnectedSpace

TopologyByExample.NestedAngles.not_locallyConnectedSpace

The nested angles are not locally connected, at the origin: a connected neighbourhood of the origin inside the region y (x + 2) < 1 would lie on the axis, but contains points (0, 1 / (m + 2)) of the half-lines.

theorem not_locallyConnectedSpace : ¬LocallyConnectedSpace NestedAngles
Proof
:= by
  intro h
  have hU : {p : NestedAngles | (p : ℝ × ℝ) ∈ region} ∈ 𝓝 origin :=
    (isOpen_region.preimage continuous_subtypeVal).mem_nhds (mem_region_of_snd_eq_zero rfl)
  obtain ⟨V, hV, hVc, hVU⟩ := locallyConnectedSpace_iff_connected_subsets.1 h origin _ hU
  have hpt : ∀ m : ℕ, ((0 : ℝ), 1 / ((m : ℝ) + 2)) ∈ nestedAngles := fun m ↦
    Or.inl (mem_iUnion.2 ⟨m, Or.inr ⟨by positivity, rfl⟩⟩)
  have hq : Tendsto (fun m : ℕ ↦ (⟨_, hpt m⟩ : NestedAngles)) atTop (𝓝 origin) :=
    tendsto_subtype_rng.2 (tendsto_const_nhds.prodMk_nhds tendsto_one_div_add_two)
  obtain ⟨m, hm⟩ := (hq.eventually hV).exists
  have := snd_eq_of_isPreconnected (hVc.image _ continuous_subtypeVal.continuousOn)
    (by rintro _ ⟨p, hp, rfl⟩; exact ⟨p.property, hVU hp⟩)
    (mem_image_of_mem _ hm) (mem_image_of_mem _ (mem_of_mem_nhds hV))
  simp only [origin] at this
  exact (by positivity : (1 : ℝ) / ((m : ℝ) + 2) ≠ 0) this

On this site: Nested angles is not locally connected

theorem not_isCompact_of_mem_nhds_apex

TopologyByExample.NestedAngles.not_isCompact_of_mem_nhds_apex

The apex (0, 1) has no compact neighbourhood in the plane's subspace: such a neighbourhood would contain the points (x, 1 - x / (m + 2)) for some small x > 0 and all m, and, being closed in the plane, also their limit (x, 1), which is not in the space.

theorem not_isCompact_of_mem_nhds_apex {K : Set NestedAngles} (hKn : K ∈ 𝓝 apex) :
    ¬IsCompact K
Proof
:= by
  intro hK
  obtain ⟨u, hu, huK⟩ := (mem_nhds_subtype _ _ _).1 hKn
  obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.1 hu
  set x : ℝ := min (ε / 2) 1 with hx
  have hx0 : 0 < x := lt_min (half_pos hε) one_pos
  have hxε : x < ε := (min_le_left _ _).trans_lt (half_lt_self hε)
  have hx1 : x ≤ 1 := min_le_right _ _
  have hK' : IsClosed (((↑) : NestedAngles → ℝ × ℝ) '' K) :=
    (hK.image continuous_subtypeVal).isClosed
  have hpt : ∀ m : ℕ, (x, 1 - x / ((m : ℝ) + 2)) ∈ nestedAngles := fun m ↦
    Or.inl (mem_iUnion.2 ⟨m, Or.inl ⟨hx0.le, by linarith [m.cast_nonneg' (α := ℝ)], rfl⟩⟩)
  have hin : ∀ m : ℕ, (x, 1 - x / ((m : ℝ) + 2)) ∈ ((↑) : NestedAngles → ℝ × ℝ) '' K := by
    intro m
    refine ⟨⟨_, hpt m⟩, huK (hball ?_), rfl⟩
    have hm : (2 : ℝ) ≤ (m : ℝ) + 2 := by linarith [m.cast_nonneg' (α := ℝ)]
    have h1 : 0 < x / ((m : ℝ) + 2) := by positivity
    have h2 : x / ((m : ℝ) + 2) ≤ x := div_le_self hx0.le (by linarith)
    simp only [apex, mem_ball, Prod.dist_eq, Real.dist_eq, sub_zero]
    rw [abs_of_pos hx0, show 1 - x / ((m : ℝ) + 2) - 1 = -(x / ((m : ℝ) + 2)) by ring, abs_neg,
      abs_of_pos h1]
    exact max_lt hxε (h2.trans_lt hxε)
  have hlim : Tendsto (fun m : ℕ ↦ (x, 1 - x / ((m : ℝ) + 2))) atTop (𝓝 (x, 1)) := by
    refine tendsto_const_nhds.prodMk_nhds ?_
    have := (tendsto_one_div_add_two.const_mul x).const_sub 1
    simp only [mul_zero, sub_zero] at this
    refine this.congr fun m ↦ ?_
    ring
  obtain ⟨p, -, hp⟩ := hK'.mem_of_tendsto hlim (Eventually.of_forall hin)
  have hpb := p.property
  rw [hp, nestedAngles_eq] at hpb
  exact hpb.2.elim (fun (h : x ≤ 0) ↦ by linarith) fun h ↦ h rfl

On this site: Nested angles: The vertex of the angles has no compact neighbourhood

theorem not_weaklyLocallyCompactSpace

TopologyByExample.NestedAngles.not_weaklyLocallyCompactSpace

The nested angles are not weakly locally compact: the apex has no compact neighbourhood.

theorem not_weaklyLocallyCompactSpace : ¬WeaklyLocallyCompactSpace NestedAngles
Proof
:= fun h ↦
  let ⟨_, hK, hKn⟩ := h.exists_compact_mem_nhds apex
  not_isCompact_of_mem_nhds_apex hKn hK

On this site: Nested angles is not weakly locally compact

theorem not_totallyPathDisconnectedSpace

TopologyByExample.NestedAngles.not_totallyPathDisconnectedSpace

The nested angles are not totally path disconnected: the first segment joins the apex to the corner (1, 1 / 2).

theorem not_totallyPathDisconnectedSpace : ¬TotallyPathDisconnectedSpace NestedAngles
Proof
:= by
  intro h
  have hc : (((0 : ℕ) : ℝ) + 1, 1 / (((0 : ℕ) : ℝ) + 2)) ∈ nestedAngles :=
    Or.inl (mem_iUnion.2 ⟨0, Or.inl (corner_mem 0).1⟩)
  have hj : Joined apex ⟨_, hc⟩ :=
    (((isPathConnected_segment 0).joinedIn _ (apex_mem_segment 0) _ (corner_mem 0).1).mono
      fun p hp ↦ Or.inl (mem_iUnion.2 ⟨0, Or.inl hp⟩)).joined_subtype
  have := congrArg (fun p : NestedAngles ↦ (p : ℝ × ℝ).1) (h.eq_of_joined _ _ hj)
  norm_num [apex] at this

On this site: Nested angles is not totally path disconnected