Lean library · module TopologyByExample.Spaces.Brooms

The infinite broom and the closed infinite broom

Source file

For n : ℕ let Lₙ be the segment from the origin to (1, 1 / (n + 1)) in the plane, the set of points (t, t / (n + 1)) with t ∈ [0, 1]. The infinite broom is the union of the Lₙ with the half-open segment (1 / 2, 1] × {0}; the closed infinite broom is the union of the Lₙ with the whole segment [0, 1] × {0}, and is the closure of the infinite broom. Both carry the subspace topology of the plane.

Every point of the closed broom off the vertical axis lies on a segment through the origin, and its slope y / x is one of the countably many numbers 0 and 1 / (n + 1). So a connected set of points with x > 0 has constant slope: it lies on one segment. This gives the failure of local connectedness of both brooms at (1, 0), whose neighbourhoods contain the points (1, 1 / (n + 1)) of other segments, and the failure of path connectedness of the infinite broom: a path leaving (1, 0) stays on the axis segment (1 / 2, 1] × {0}, which is closed in the infinite broom, since the infinite broom has no point (x, 0) with 0 < x ≤ 1 / 2. The infinite broom is not weakly locally compact at the origin, because every neighbourhood of the origin contains points (x, x / (n + 1)) converging to the missing point (x, 0).

Main definitions

Main statements

Tags

infinite broom, closed infinite broom, locally connected, path connected, locally compact

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 spread

TopologyByExample.Broom.spread

The map (t, s) ↦ (t, t s), which sends [0, 1] × {s} onto the segment from the origin to (1, s).

def spread (q : ℝ × ℝ) : ℝ × ℝ
:= (q.1, q.1 * q.2)

theorem continuous_spread

TopologyByExample.Broom.continuous_spread

The map spread is continuous.

theorem continuous_spread : Continuous spread
Proof
:= by
  unfold spread
  fun_prop

definition slopes

TopologyByExample.Broom.slopes

The slopes 1 / (n + 1), n : ℕ, of the segments of the broom.

noncomputable def slopes : Set ℝ
:= range fun n : ℕ ↦ 1 / ((n : ℝ) + 1)

definition bristles

TopologyByExample.Broom.bristles

The bristles of the broom: the union of the segments from the origin to (1, 1 / (n + 1)).

noncomputable def bristles : Set (ℝ × ℝ)
:= spread '' (Icc 0 1 ×ˢ slopes)

definition infiniteBroom

TopologyByExample.Broom.infiniteBroom

The infinite broom: the segments from the origin to (1, 1 / (n + 1)), together with the half-open segment (1 / 2, 1] × {0}.

noncomputable def infiniteBroom : Set (ℝ × ℝ)
:= bristles ∪ Ioc (1 / 2 : ℝ) 1 ×ˢ {0}

definition closedInfiniteBroom

TopologyByExample.Broom.closedInfiniteBroom

The closed infinite broom: the segments from the origin to (1, 1 / (n + 1)), together with the segment [0, 1] × {0}.

noncomputable def closedInfiniteBroom : Set (ℝ × ℝ)
:= bristles ∪ Icc (0 : ℝ) 1 ×ˢ {0}

theorem mem_bristles

TopologyByExample.Broom.mem_bristles

A point lies on the bristles if and only if it is (t, t / (n + 1)) for some t ∈ [0, 1] and n : ℕ.

theorem mem_bristles {p : ℝ × ℝ} :
    p ∈ bristles ↔ ∃ n : ℕ, p.1 ∈ Icc (0 : ℝ) 1 ∧ p.2 = p.1 * (1 / ((n : ℝ) + 1))
Proof
:= by
  constructor
  · rintro ⟨q, ⟨hq1, n, hn⟩, rfl⟩
    exact ⟨n, hq1, by simp [spread, hn]⟩
  · rintro ⟨n, hp1, hp2⟩
    exact ⟨(p.1, 1 / ((n : ℝ) + 1)), ⟨hp1, n, rfl⟩, Prod.ext rfl hp2.symm⟩

theorem zero_mem_bristles

TopologyByExample.Broom.zero_mem_bristles

The origin lies on the bristles.

theorem zero_mem_bristles : ((0 : ℝ), (0 : ℝ)) ∈ bristles
Proof
:=
  mem_bristles.2 ⟨0, ⟨le_rfl, zero_le_one⟩, by simp⟩

theorem tip_mem_bristles

TopologyByExample.Broom.tip_mem_bristles

The end (1, 1 / (n + 1)) of the n-th segment lies on the bristles.

theorem tip_mem_bristles (n : ℕ) : ((1 : ℝ), 1 / ((n : ℝ) + 1)) ∈ bristles
Proof
:=
  mem_bristles.2 ⟨n, ⟨zero_le_one, le_rfl⟩, by simp⟩

theorem fst_eq_zero_of_mem_bristles

TopologyByExample.Broom.fst_eq_zero_of_mem_bristles

The only point of the bristles on the horizontal axis is the origin.

theorem fst_eq_zero_of_mem_bristles {p : ℝ × ℝ} (hp : p ∈ bristles) (h2 : p.2 = 0) : p.1 = 0
Proof
:= by
  obtain ⟨n, -, hn⟩ := mem_bristles.1 hp
  rw [h2] at hn
  have : (1 : ℝ) / ((n : ℝ) + 1) ≠ 0 := by positivity
  exact (mul_eq_zero.1 hn.symm).resolve_right this

theorem slopes_subset_teeth

TopologyByExample.Broom.slopes_subset_teeth

The slopes lie in the set of abscissae of the teeth of the comb.

theorem slopes_subset_teeth : slopes ⊆ CombSpace.teeth
Proof
:= subset_insert _ _

theorem closedInfiniteBroom_eq

TopologyByExample.Broom.closedInfiniteBroom_eq

The closed broom is the image of [0, 1] × T under spread, where T is the set 0, 1 / (n + 1).

theorem closedInfiniteBroom_eq : closedInfiniteBroom = spread '' (Icc 0 1 ×ˢ CombSpace.teeth)
Proof
:= by
  have h0 : spread '' (Icc 0 1 ×ˢ {0}) = Icc (0 : ℝ) 1 ×ˢ ({0} : Set ℝ) := by
    ext p
    simp only [mem_image, mem_prod, mem_singleton_iff, spread, Prod.exists]
    constructor
    · rintro ⟨t, s, ⟨ht, rfl⟩, rfl⟩
      exact ⟨ht, by simp⟩
    · rintro ⟨hp1, hp2⟩
      exact ⟨p.1, 0, ⟨hp1, rfl⟩, by ext <;> simp [hp2]⟩
  rw [CombSpace.teeth, insert_eq, prod_union, image_union, h0, union_comm]
  rfl

theorem isPathConnected_spread_image

TopologyByExample.Broom.isPathConnected_spread_image

The image under spread of [0, 1] × S is path connected for every nonempty S: each of its points is joined to the origin along its segment.

theorem isPathConnected_spread_image {S : Set ℝ} (hS : S.Nonempty) :
    IsPathConnected (spread '' (Icc 0 1 ×ˢ S))
Proof
:= by
  set F := spread '' (Icc 0 1 ×ˢ S)
  have key : ∀ p ∈ F, JoinedIn F p (0, 0) := by
    rintro _ ⟨⟨t, s⟩, ⟨ht, hs⟩, rfl⟩
    have hseg : IsPathConnected ((fun τ : ℝ ↦ spread (τ, s)) '' Icc 0 1) :=
      ((convex_Icc (0 : ℝ) 1).isPathConnected (nonempty_Icc.2 zero_le_one)).image
        (continuous_spread.comp (by fun_prop))
    refine (hseg.joinedIn _ (mem_image_of_mem _ ht) _ ?_).mono ?_
    · exact ⟨0, ⟨le_rfl, zero_le_one⟩, by simp [spread]⟩
    · rintro _ ⟨τ, hτ, rfl⟩
      exact mem_image_of_mem _ ⟨hτ, hs⟩
  obtain ⟨s, hs⟩ := hS
  refine isPathConnected_iff.2 ⟨⟨spread (0, s), mem_image_of_mem _ ⟨⟨le_rfl, zero_le_one⟩, hs⟩⟩,
    fun x hx y hy ↦ (key x hx).trans (key y hy).symm⟩

theorem isPathConnected_bristles

TopologyByExample.Broom.isPathConnected_bristles

The bristles are path connected.

theorem isPathConnected_bristles : IsPathConnected bristles
Proof
:=
  isPathConnected_spread_image ⟨_, mem_range_self 0⟩

theorem isPathConnected_closedInfiniteBroom

TopologyByExample.Broom.isPathConnected_closedInfiniteBroom

The closed infinite broom is path connected.

theorem isPathConnected_closedInfiniteBroom : IsPathConnected closedInfiniteBroom
Proof
:=
  closedInfiniteBroom_eq ▸ isPathConnected_spread_image ⟨0, CombSpace.zero_mem_teeth⟩

theorem isCompact_closedInfiniteBroom

TopologyByExample.Broom.isCompact_closedInfiniteBroom

The closed infinite broom is a compact subset of the plane.

theorem isCompact_closedInfiniteBroom : IsCompact closedInfiniteBroom
Proof
:=
  closedInfiniteBroom_eq ▸ (isCompact_Icc.prod CombSpace.isCompact_teeth).image continuous_spread

theorem isClosed_closedInfiniteBroom

TopologyByExample.Broom.isClosed_closedInfiniteBroom

The closed infinite broom is a closed subset of the plane.

theorem isClosed_closedInfiniteBroom : IsClosed closedInfiniteBroom
Proof
:=
  isCompact_closedInfiniteBroom.isClosed

theorem infiniteBroom_subset

TopologyByExample.Broom.infiniteBroom_subset

The infinite broom lies in the closed infinite broom.

theorem infiniteBroom_subset : infiniteBroom ⊆ closedInfiniteBroom
Proof
:=
  union_subset_union_right _ (Set.prod_mono (Ioc_subset_Icc_self.trans
    (Icc_subset_Icc (by norm_num) le_rfl)) le_rfl)

theorem closure_bristles

TopologyByExample.Broom.closure_bristles

The closure of the bristles is the closed infinite broom.

theorem closure_bristles : closure bristles = closedInfiniteBroom
Proof
:= by
  refine Subset.antisymm (closure_minimal (subset_union_left.trans subset_rfl)
    isClosed_closedInfiniteBroom) ?_
  have hT : CombSpace.teeth ⊆ closure slopes :=
    insert_subset (mem_closure_of_tendsto tendsto_one_div_add_atTop_nhds_zero_nat
      (Eventually.of_forall fun n ↦ mem_range_self n)) subset_closure
  rw [closedInfiniteBroom_eq]
  calc spread '' (Icc 0 1 ×ˢ CombSpace.teeth)
      ⊆ spread '' closure (Icc 0 1 ×ˢ slopes) := by
        rw [closure_prod_eq, isClosed_Icc.closure_eq]
        exact image_mono (prod_mono le_rfl hT)
    _ ⊆ closure bristles := image_closure_subset_closure_image continuous_spread

theorem closure_infiniteBroom

TopologyByExample.Broom.closure_infiniteBroom

The closure of the infinite broom is the closed infinite broom.

theorem closure_infiniteBroom : closure infiniteBroom = closedInfiniteBroom
Proof
:=
  Subset.antisymm (closure_minimal infiniteBroom_subset isClosed_closedInfiniteBroom)
    (closure_bristles ▸ closure_mono subset_union_left)

On this site: Infinite broom: The closure of the infinite broom is the closed infinite broom

theorem slope_eq_of_isPreconnected

TopologyByExample.Broom.slope_eq_of_isPreconnected

A preconnected subset of the closed infinite broom whose points all lie to the right of the vertical axis lies on a single segment through the origin: any two of its points have the same slope. The slope y / x maps it continuously into the countable set of slopes 0, 1 / (n + 1).

theorem slope_eq_of_isPreconnected {s : Set (ℝ × ℝ)} (hs : IsPreconnected s)
    (hsc : s ⊆ closedInfiniteBroom) (hpos : ∀ p ∈ s, 0 < p.1) {p q : ℝ × ℝ} (hp : p ∈ s)
    (hq : q ∈ s) : p.2 / p.1 = q.2 / q.1
Proof
:= by
  have himg : (fun r : ℝ × ℝ ↦ r.2 / r.1) '' s ⊆ CombSpace.teeth := by
    rintro _ ⟨r, hr, rfl⟩
    have hr' := hsc hr
    rw [closedInfiniteBroom_eq] at hr'
    obtain ⟨⟨t, a⟩, ⟨-, ha⟩, rfl⟩ := hr'
    have ht : t ≠ 0 := (hpos _ hr).ne'
    simpa [spread, mul_div_cancel_left₀ _ ht] using ha
  have hcont : ContinuousOn (fun r : ℝ × ℝ ↦ r.2 / r.1) s :=
    continuous_snd.continuousOn.div continuous_fst.continuousOn fun r hr ↦ (hpos r hr).ne'
  exact CombSpace.countable_teeth.isTotallyDisconnected _ himg (hs.image _ hcont)
    (mem_image_of_mem _ hp) (mem_image_of_mem _ hq)

On this site: Closed infinite broom: A connected set off the vertical axis lies on one segment

theorem tendsto_tips

TopologyByExample.Broom.tendsto_tips

The ends (1, 1 / (n + 1)) of the segments converge to (1, 0).

theorem tendsto_tips :
    Tendsto (fun n : ℕ ↦ ((1 : ℝ), 1 / ((n : ℝ) + 1))) atTop (𝓝 (1, 0))
Proof
:=
  tendsto_const_nhds.prodMk_nhds tendsto_one_div_add_atTop_nhds_zero_nat

theorem not_locallyConnectedSpace_of_subset

TopologyByExample.Broom.not_locallyConnectedSpace_of_subset

A subspace of the plane between the bristles and the closed infinite broom that contains (1, 0) is not locally connected at that point: a connected neighbourhood of (1, 0) to the right of x = 1 / 2 would contain an end (1, 1 / (n + 1)) of a segment, of a different slope.

theorem not_locallyConnectedSpace_of_subset {X : Set (ℝ × ℝ)} (hb : bristles ⊆ X)
    (hX : X ⊆ closedInfiniteBroom) (h1 : ((1 : ℝ), (0 : ℝ)) ∈ X) : ¬LocallyConnectedSpace X
Proof
:= by
  intro h
  set e : X := ⟨(1, 0), h1⟩
  have hU : {p : X | 1 / 2 < (p : ℝ × ℝ).1} ∈ 𝓝 e :=
    (isOpen_lt continuous_const (continuous_fst.comp continuous_subtypeVal)).mem_nhds
      (by norm_num [e])
  obtain ⟨V, hV, hVc, hVU⟩ := locallyConnectedSpace_iff_connected_subsets.1 h e _ hU
  have hq : Tendsto (fun n : ℕ ↦ (⟨_, hb (tip_mem_bristles n)⟩ : X)) atTop (𝓝 e) :=
    tendsto_subtype_rng.2 tendsto_tips
  obtain ⟨n, hn⟩ := (hq.eventually hV).exists
  have := slope_eq_of_isPreconnected (hVc.image _ continuous_subtypeVal.continuousOn)
    ((image_subset_iff.2 fun p _ ↦ p.property).trans hX)
    (by rintro _ ⟨p, hp, rfl⟩; exact one_half_pos.trans (hVU hp))
    (mem_image_of_mem _ hn) (mem_image_of_mem _ (mem_of_mem_nhds hV))
  simp only [e, div_one] at this
  exact (by positivity : (1 : ℝ) / ((n : ℝ) + 1) ≠ 0) this

theorem fst_eq_zero_or_of_mem_infiniteBroom

TopologyByExample.Broom.fst_eq_zero_or_of_mem_infiniteBroom

A point of the infinite broom on the horizontal axis is the origin or lies to the right of 1 / 2.

theorem fst_eq_zero_or_of_mem_infiniteBroom {p : ℝ × ℝ} (hp : p ∈ infiniteBroom) (h2 : p.2 = 0) :
    p.1 = 0 ∨ 1 / 2 < p.1
Proof
:= by
  rcases hp with hp | ⟨hp, -⟩
  · exact Or.inl (fst_eq_zero_of_mem_bristles hp h2)
  · exact Or.inr hp.1

theorem infiniteBroom_eq

TopologyByExample.Broom.infiniteBroom_eq

The infinite broom is the intersection of the closed infinite broom with the union of two open half-planes and the closed half-plane x ≤ 0; in particular it is a Gδ set.

theorem infiniteBroom_eq : infiniteBroom = closedInfiniteBroom ∩
    ({p : ℝ × ℝ | 1 / 2 < p.1} ∪ {p | p.2 ≠ 0} ∪ {p | p.1 ≤ 0})
Proof
:= by
  ext p
  constructor
  · intro hp
    refine ⟨infiniteBroom_subset hp, ?_⟩
    by_cases h2 : p.2 = 0
    · rcases fst_eq_zero_or_of_mem_infiniteBroom hp h2 with h | h
      · exact Or.inr h.le
      · exact Or.inl (Or.inl h)
    · exact Or.inl (Or.inr h2)
  · rintro ⟨hb | ⟨hp1, hp2⟩, h⟩
    · exact Or.inl hb
    · rw [mem_singleton_iff] at hp2
      rcases h with (h | h) | h
      · exact Or.inr ⟨⟨h, hp1.2⟩, hp2⟩
      · exact absurd hp2 h
      · have hp : p = (0, 0) := Prod.ext (le_antisymm h hp1.1) hp2
        exact hp ▸ Or.inl zero_mem_bristles

theorem isGδ_infiniteBroom

TopologyByExample.Broom.isGδ_infiniteBroom

The infinite broom is a Gδ subset of the plane.

theorem isGδ_infiniteBroom : IsGδ infiniteBroom
Proof
:= by
  rw [infiniteBroom_eq]
  exact isClosed_closedInfiniteBroom.isGδ.inter
    (((isOpen_lt continuous_const continuous_fst).isGδ.union
      (isOpen_ne_fun continuous_snd continuous_const).isGδ).union
      (isClosed_le continuous_fst continuous_const).isGδ)

theorem isConnected_infiniteBroom

TopologyByExample.Broom.isConnected_infiniteBroom

The infinite broom is a connected subset of the plane: it lies between the path connected bristles and their closure.

theorem isConnected_infiniteBroom : IsConnected infiniteBroom
Proof
:=
  ⟨⟨_, Or.inl zero_mem_bristles⟩, isPathConnected_bristles.isConnected.isPreconnected.subset_closure
    subset_union_left (closure_bristles ▸ infiniteBroom_subset)⟩

definition InfiniteBroom

TopologyByExample.InfiniteBroom

The infinite broom: the subspace Broom.infiniteBroom of the plane.

abbrev InfiniteBroom : Type
:= Broom.infiniteBroom

On this site: Space: Infinite broom

definition ClosedInfiniteBroom

TopologyByExample.ClosedInfiniteBroom

The closed infinite broom: the subspace Broom.closedInfiniteBroom of the plane.

abbrev ClosedInfiniteBroom : Type
:= Broom.closedInfiniteBroom

On this site: Space: Closed infinite broom

definition origin

TopologyByExample.InfiniteBroom.origin

The origin, the vertex of the infinite broom.

def origin : InfiniteBroom
:= ⟨(0, 0), Or.inl zero_mem_bristles⟩

definition one

TopologyByExample.InfiniteBroom.one

The point (1, 0) of the infinite broom.

noncomputable def one : InfiniteBroom
:= ⟨(1, 0), Or.inr ⟨⟨by norm_num, le_rfl⟩, rfl⟩⟩

definition tip

TopologyByExample.InfiniteBroom.tip

The point (1, 1), the end of the first segment.

noncomputable def tip : InfiniteBroom
:= ⟨(1, 1), Or.inl (by simpa using tip_mem_bristles 0)⟩

instance

The infinite broom is nonempty.

instance : Nonempty InfiniteBroom
Proof
:= ⟨origin⟩

theorem isCompletelyMetrizableSpace

TopologyByExample.InfiniteBroom.isCompletelyMetrizableSpace

The infinite broom is completely metrizable: it is a Gδ subset of the plane.

theorem isCompletelyMetrizableSpace : IsCompletelyMetrizableSpace InfiniteBroom
Proof
:=
  isGδ_infiniteBroom.isCompletelyMetrizableSpace

On this site: The infinite broom is completely metrizable

theorem sigmaCompactSpace

TopologyByExample.InfiniteBroom.sigmaCompactSpace

The infinite broom is σ-compact: it is the union of the segments Lₙ and the segments [1 / 2 + 1 / (n + 1), 1] × {0}.

theorem sigmaCompactSpace : SigmaCompactSpace InfiniteBroom
Proof
:= by
  refine isSigmaCompact_iff_sigmaCompactSpace.1 ?_
  have hK : ∀ n : ℕ, IsCompact (spread '' (Icc 0 1 ×ˢ {1 / ((n : ℝ) + 1)}) ∪
      Icc (1 / 2 + 1 / ((n : ℝ) + 1)) 1 ×ˢ ({0} : Set ℝ)) := fun n ↦
    ((isCompact_Icc.prod isCompact_singleton).image continuous_spread).union
      (isCompact_Icc.prod isCompact_singleton)
  convert isSigmaCompact_iUnion_of_isCompact _ hK using 1
  apply Subset.antisymm
  · rintro p (⟨⟨t, a⟩, ⟨ht, n, rfl⟩, rfl⟩ | ⟨hp1, hp2⟩)
    · exact mem_iUnion.2 ⟨n, Or.inl ⟨(t, _), ⟨ht, rfl⟩, rfl⟩⟩
    · obtain ⟨n, hn⟩ := exists_nat_one_div_lt (sub_pos.2 hp1.1)
      exact mem_iUnion.2 ⟨n, Or.inr ⟨⟨by linarith, hp1.2⟩, hp2⟩⟩
  · refine iUnion_subset fun n ↦ union_subset ?_ ?_
    · rintro _ ⟨⟨t, a⟩, ⟨ht, rfl⟩, rfl⟩
      exact Or.inl ⟨(t, _), ⟨ht, n, rfl⟩, rfl⟩
    · rintro p ⟨hp1, hp2⟩
      exact Or.inr ⟨⟨lt_of_lt_of_le (lt_add_of_pos_right _ (by positivity)) hp1.1, hp1.2⟩, hp2⟩

On this site: The infinite broom is σ-compact

theorem preconnectedSpace

TopologyByExample.InfiniteBroom.preconnectedSpace

The infinite broom is preconnected (the study's statement of connectedness).

theorem preconnectedSpace : PreconnectedSpace InfiniteBroom
Proof
:=
  Subtype.preconnectedSpace isConnected_infiniteBroom.isPreconnected

On this site: The infinite broom is connected

theorem not_joined_one_origin

TopologyByExample.InfiniteBroom.not_joined_one_origin

In the infinite broom, (1, 0) is not joined to the origin by a path. Along a path starting at (1, 0), the set of times at which it lies on the axis at abscissa at least 1 / 2 is closed, and also open, since near such a time the path stays to the right of x = 1 / 2, where a connected set keeps its slope 0.

theorem not_joined_one_origin : ¬Joined one origin
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 ∈ infiniteBroom := fun t ↦ (γ.extend t).property
  have hclosed : IsClosed {t | (g t).2 = 0 ∧ 1 / 2 ≤ (g t).1} :=
    (isClosed_eq (continuous_snd.comp hg) continuous_const).inter
      (isClosed_le continuous_const (continuous_fst.comp hg))
  have hopen : IsOpen {t | (g t).2 = 0 ∧ 1 / 2 ≤ (g t).1} := by
    rw [Metric.isOpen_iff]
    rintro t ⟨ht2, ht1⟩
    have hgt : 1 / 2 < (g t).1 := by
      rcases fst_eq_zero_or_of_mem_infiniteBroom (hmem t) ht2 with h | h
      · linarith
      · exact h
    have hU : g ⁻¹' {p | 1 / 2 < p.1} ∈ 𝓝 t :=
      hg.continuousAt.preimage_mem_nhds ((isOpen_lt continuous_const continuous_fst).mem_nhds hgt)
    obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.1 hU
    refine ⟨ε, hε, fun s hs ↦ ?_⟩
    have hpos : ∀ p ∈ g '' ball t ε, 0 < p.1 := by
      rintro _ ⟨r, hr, rfl⟩
      exact one_half_pos.trans (hball hr)
    have hsl := slope_eq_of_isPreconnected
      ((Real.ball_eq_Ioo t ε ▸ isPreconnected_Ioo).image g hg.continuousOn)
      (by rintro _ ⟨r, -, rfl⟩; exact infiniteBroom_subset (hmem r))
      hpos (mem_image_of_mem g hs) (mem_image_of_mem g (Metric.mem_ball_self hε))
    rw [ht2, zero_div, div_eq_zero_iff] at hsl
    have hs1 : 1 / 2 < (g s).1 := hball hs
    exact ⟨hsl.resolve_right (by linarith), hs1.le⟩
  have hzero : g 0 = (1, 0) := by simp only [hg_def, Path.extend_zero]; rfl
  have huniv := IsClopen.eq_univ ⟨hclosed, hopen⟩ ⟨0, by simp only [mem_ofPred_eq, hzero]; norm_num⟩
  have h1 : (1 : ℝ) ∈ {t | (g t).2 = 0 ∧ 1 / 2 ≤ (g t).1} := huniv.symm ▸ mem_univ _
  have hone : g 1 = (0, 0) := by simp only [hg_def, Path.extend_one]; rfl
  rw [mem_ofPred_eq, hone] at h1
  norm_num at h1

theorem not_pathPreconnectedSpace

TopologyByExample.InfiniteBroom.not_pathPreconnectedSpace

The infinite broom is not path connected.

theorem not_pathPreconnectedSpace : ¬PathPreconnectedSpace InfiniteBroom
Proof
:= fun h ↦
  not_joined_one_origin (h.joined one origin)

On this site: The infinite broom is not path connected

theorem not_locallyConnectedSpace

TopologyByExample.InfiniteBroom.not_locallyConnectedSpace

The infinite broom is not locally connected, at the point (1, 0).

theorem not_locallyConnectedSpace : ¬LocallyConnectedSpace InfiniteBroom
Proof
:=
  not_locallyConnectedSpace_of_subset subset_union_left infiniteBroom_subset
    (Or.inr ⟨⟨by norm_num, le_rfl⟩, rfl⟩)

On this site: The infinite broom is not locally connected

theorem not_totallyPathDisconnectedSpace

TopologyByExample.InfiniteBroom.not_totallyPathDisconnectedSpace

The infinite broom is not totally path disconnected: the origin and (1, 1) are distinct points joined by a path along the first segment.

theorem not_totallyPathDisconnectedSpace : ¬TotallyPathDisconnectedSpace InfiniteBroom
Proof
:= by
  intro h
  have hj : Joined origin tip :=
    ((isPathConnected_bristles.joinedIn _ zero_mem_bristles _
      (by simpa using tip_mem_bristles 0)).mono subset_union_left).joined_subtype
  have := congrArg (fun p : InfiniteBroom ↦ (p : ℝ × ℝ).1) (h.eq_of_joined _ _ hj)
  norm_num [origin, tip] at this

On this site: The infinite broom is not totally path disconnected

theorem not_weaklyLocallyCompactSpace

TopologyByExample.InfiniteBroom.not_weaklyLocallyCompactSpace

The infinite broom is not weakly locally compact: the origin has no compact neighbourhood. Such a neighbourhood would contain the points (x, x / (n + 1)) for some small x > 0, and being closed in the plane, also their limit (x, 0), which is not in the infinite broom.

theorem not_weaklyLocallyCompactSpace : ¬WeaklyLocallyCompactSpace InfiniteBroom
Proof
:= by
  intro h
  obtain ⟨K, hK, hKn⟩ := h.exists_compact_mem_nhds origin
  obtain ⟨u, hu, huK⟩ := (mem_nhds_subtype _ _ _).1 hKn
  obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.1 hu
  set x : ℝ := min (ε / 2) (1 / 4) with hx
  have hx0 : 0 < x := lt_min (half_pos hε) (by norm_num)
  have hxε : x < ε := (min_le_left _ _).trans_lt (half_lt_self hε)
  have hx4 : x ≤ 1 / 4 := min_le_right _ _
  have hK' : IsClosed (((↑) : InfiniteBroom → ℝ × ℝ) '' K) :=
    (hK.image continuous_subtypeVal).isClosed
  have hpt : ∀ n : ℕ, (x, x * (1 / ((n : ℝ) + 1))) ∈ infiniteBroom := fun n ↦
    Or.inl (mem_bristles.2 ⟨n, ⟨hx0.le, by linarith⟩, rfl⟩)
  have hin : ∀ n : ℕ, (x, x * (1 / ((n : ℝ) + 1))) ∈ ((↑) : InfiniteBroom → ℝ × ℝ) '' K := by
    intro n
    refine ⟨⟨_, hpt n⟩, huK (hball ?_), rfl⟩
    have h1 : 0 < 1 / ((n : ℝ) + 1) := by positivity
    have h2 : 1 / ((n : ℝ) + 1) ≤ 1 :=
      (div_le_one (by positivity)).2 (by linarith [n.cast_nonneg' (α := ℝ)])
    simp only [origin, mem_ball, Prod.dist_eq, Real.dist_eq, sub_zero]
    rw [abs_of_pos hx0, abs_of_pos (mul_pos hx0 h1)]
    exact max_lt hxε (lt_of_le_of_lt (mul_le_of_le_one_right hx0.le h2) hxε)
  have hlim : Tendsto (fun n : ℕ ↦ (x, x * (1 / ((n : ℝ) + 1)))) atTop (𝓝 (x, 0)) :=
    tendsto_const_nhds.prodMk_nhds (by
      simpa using tendsto_one_div_add_atTop_nhds_zero_nat.const_mul x)
  obtain ⟨p, -, hp⟩ := hK'.mem_of_tendsto hlim (Eventually.of_forall hin)
  have hpb := p.property
  rw [hp] at hpb
  rcases fst_eq_zero_or_of_mem_infiniteBroom hpb rfl with h0 | h0
  · exact hx0.ne' h0
  · simp only at h0
    linarith

On this site: The infinite broom is not weakly locally compact

instance

The closed infinite broom is nonempty.

instance : Nonempty ClosedInfiniteBroom
Proof
:= ⟨⟨(0, 0), Or.inl zero_mem_bristles⟩⟩

instance instCompactSpace

TopologyByExample.ClosedInfiniteBroom.instCompactSpace

The closed infinite broom is compact.

instance instCompactSpace : CompactSpace ClosedInfiniteBroom
Proof
:=
  isCompact_iff_compactSpace.1 isCompact_closedInfiniteBroom

On this site: The closed infinite broom is compact

theorem metrizableSpace

TopologyByExample.ClosedInfiniteBroom.metrizableSpace

The closed infinite broom is metrizable.

theorem metrizableSpace : MetrizableSpace ClosedInfiniteBroom
Proof
:= inferInstance

On this site: The closed infinite broom is metrizable

instance instPathConnectedSpace

TopologyByExample.ClosedInfiniteBroom.instPathConnectedSpace

The closed infinite broom is path connected (in Mathlib's sense, which includes nonemptiness).

instance instPathConnectedSpace : PathConnectedSpace ClosedInfiniteBroom
Proof
:=
  isPathConnected_iff_pathConnectedSpace.1 isPathConnected_closedInfiniteBroom

theorem pathPreconnectedSpace

TopologyByExample.ClosedInfiniteBroom.pathPreconnectedSpace

Any two points of the closed infinite broom are joined by a path.

theorem pathPreconnectedSpace : PathPreconnectedSpace ClosedInfiniteBroom
Proof
:= inferInstance

theorem not_locallyConnectedSpace

TopologyByExample.ClosedInfiniteBroom.not_locallyConnectedSpace

The closed infinite broom is not locally connected, at the point (1, 0).

theorem not_locallyConnectedSpace : ¬LocallyConnectedSpace ClosedInfiniteBroom
Proof
:=
  not_locallyConnectedSpace_of_subset subset_union_left subset_rfl
    (Or.inr ⟨⟨zero_le_one, le_rfl⟩, rfl⟩)

On this site: The closed infinite broom is not locally connected