Lean library · module TopologyByExample.Spaces.SineCurves

The topologist's sine curves and the Warsaw circle

Source file

Let G = {(x, sin x⁻¹) : 0 < x ≤ 1} be the graph of sin x⁻¹ over (0, 1], a subset of the plane ℝ × ℝ. This file studies four subspaces of the plane built from it:

  • the topologist's sine curve G ∪ {(0, 0)};
  • the closed topologist's sine curve G ∪ {0} × [-1, 1], the closure of G;
  • the extended topologist's sine curve, the closed curve together with the top segment [0, 1] × {1};
  • the Warsaw circle, the closed curve closed up by an arc: the closed curve together with {0} × [-2, 1], [0, 1] × {-2} and {1} × [-2, sin 1].

The graph oscillates between the heights -1 and 1 on every interval (0, a]. Two consequences carry the file. First, along a path in a set whose points to the right of the vertical axis lie on G (and which has no point to the left of it), the set of times at which the path is on the axis is open as well as closed: near such a time the second coordinate moves by less than 1, while if the first coordinate became positive it would sweep an interval [0, a] and the second coordinate would take both values 1 and -1. So no path joins a point of the axis to a point of G. Second, near (0, 0) such sets are not locally connected: a connected neighbourhood of (0, 0) inside the box x < 1 / 2, |y| < 1 / 2 would project onto an interval [0, x₀] of first coordinates, but over some x₁ ∈ (0, x₀) the only point is (x₁, 1), outside the box.

Main definitions

Main statements

Tags

topologist's sine curve, Warsaw circle, connected, path connected, locally 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

The sets

definition graph

TopologyByExample.SineCurves.graph

The graph {(x, sin x⁻¹) : 0 < x ≤ 1} of sin x⁻¹ over (0, 1].

noncomputable def graph : Set (ℝ × ℝ)
:= (fun x : ℝ ↦ (x, sin x⁻¹)) '' Ioc 0 1

definition limitSegment

TopologyByExample.SineCurves.limitSegment

The limit segment {0} × [-1, 1] of the graph.

def limitSegment : Set (ℝ × ℝ)
:= {0} ×ˢ Icc (-1) 1

definition topSegment

TopologyByExample.SineCurves.topSegment

The top segment [0, 1] × {1} of the extended sine curve.

def topSegment : Set (ℝ × ℝ)
:= Icc 0 1 ×ˢ {1}

definition warsawArc

TopologyByExample.SineCurves.warsawArc

The arc closing up the Warsaw circle: {0} × [-2, 1], [0, 1] × {-2} and {1} × [-2, sin 1].

noncomputable def warsawArc : Set (ℝ × ℝ)
:=
  {0} ×ˢ Icc (-2) 1 ∪ Icc 0 1 ×ˢ {-2} ∪ {1} ×ˢ Icc (-2) (sin 1)

definition sineCurve

TopologyByExample.SineCurves.sineCurve

The topologist's sine curve G ∪ {(0, 0)}.

noncomputable def sineCurve : Set (ℝ × ℝ)
:= insert (0, 0) graph

definition closedSineCurve

TopologyByExample.SineCurves.closedSineCurve

The closed topologist's sine curve G ∪ {0} × [-1, 1].

noncomputable def closedSineCurve : Set (ℝ × ℝ)
:= graph ∪ limitSegment

definition extendedSineCurve

TopologyByExample.SineCurves.extendedSineCurve

The extended topologist's sine curve: the closed sine curve and the top segment [0, 1] × {1}.

noncomputable def extendedSineCurve : Set (ℝ × ℝ)
:= closedSineCurve ∪ topSegment

definition warsawCircle

TopologyByExample.SineCurves.warsawCircle

The Warsaw circle: the closed sine curve closed up by the arc warsawArc.

noncomputable def warsawCircle : Set (ℝ × ℝ)
:= closedSineCurve ∪ warsawArc

The graph

theorem continuousOn_graphMap

TopologyByExample.SineCurves.continuousOn_graphMap

The map x ↦ (x, sin x⁻¹) is continuous on the positive reals.

theorem continuousOn_graphMap :
    ContinuousOn (fun x : ℝ ↦ (x, sin x⁻¹)) (Ioi 0)
Proof
:=
  continuousOn_id.prodMk (continuous_sin.comp_continuousOn
    (continuousOn_inv₀.mono fun _ hx ↦ (mem_Ioi.1 hx).ne'))

theorem mk_mem_graph

TopologyByExample.SineCurves.mk_mem_graph

A point (x, sin x⁻¹) with 0 < x ≤ 1 lies on the graph.

theorem mk_mem_graph {x : ℝ} (hx : x ∈ Ioc 0 1) : (x, sin x⁻¹) ∈ graph
Proof
:= ⟨x, hx, rfl⟩

theorem of_mem_graph

TopologyByExample.SineCurves.of_mem_graph

A point of the graph has first coordinate in (0, 1] and second coordinate sin x⁻¹.

theorem of_mem_graph {p : ℝ × ℝ} (hp : p ∈ graph) : p.1 ∈ Ioc 0 1 ∧ p.2 = sin p.1⁻¹
Proof
:= by
  obtain ⟨x, hx, rfl⟩ := hp
  exact ⟨hx, rfl⟩

theorem isPathConnected_graph

TopologyByExample.SineCurves.isPathConnected_graph

The graph is path connected: it is a continuous image of (0, 1].

theorem isPathConnected_graph : IsPathConnected graph
Proof
:=
  ((convex_Ioc 0 1).isPathConnected ⟨1, by norm_num⟩).image'
    (continuousOn_graphMap.mono Ioc_subset_Ioi_self)

theorem exists_mem_Ioc_sin_inv_eq

TopologyByExample.SineCurves.exists_mem_Ioc_sin_inv_eq

The function sin x⁻¹ takes every value in [-1, 1] on every interval (0, a].

theorem exists_mem_Ioc_sin_inv_eq {y : ℝ} (hy : y ∈ Icc (-1 : ℝ) 1) {a : ℝ} (ha : 0 < a) :
    ∃ x ∈ Ioc 0 a, sin x⁻¹ = y
Proof
:= by
  obtain ⟨n, hn⟩ := exists_nat_gt a⁻¹
  have h1 := neg_pi_div_two_le_arcsin y
  have hpi := two_le_pi
  have hn0 : (0 : ℝ) < n := (inv_pos.2 ha).trans hn
  have hn1 : (1 : ℝ) ≤ n := by
    have : 0 < n := by exact_mod_cast hn0
    exact_mod_cast this
  set z := arcsin y + n * (2 * π) with hz_def
  have hz : a⁻¹ < z := by nlinarith [mul_le_mul_of_nonneg_right hn1 pi_pos.le]
  have hz0 : 0 < z := (inv_pos.2 ha).trans hz
  refine ⟨z⁻¹, ⟨inv_pos.2 hz0, (inv_le_comm₀ hz0 ha).2 hz.le⟩, ?_⟩
  rw [inv_inv, hz_def, sin_add_nat_mul_two_pi, sin_arcsin' hy]

Paths cannot leave the vertical axis

theorem fst_eq_zero_of_joinedIn

TopologyByExample.SineCurves.fst_eq_zero_of_joinedIn

The sine curve is not path connected. Along a path in a set X of the plane whose points have 0 ≤ x, and whose points with 0 < x lie on the graph of sin x⁻¹, a path starting on the vertical axis stays on it.

theorem fst_eq_zero_of_joinedIn {X : Set (ℝ × ℝ)} (hX0 : ∀ p ∈ X, 0 ≤ p.1)
    (hX : ∀ p ∈ X, 0 < p.1 → p.2 = sin p.1⁻¹) {x y : ℝ × ℝ} (h : JoinedIn X x y)
    (hx : x.1 = 0) : y.1 = 0
Proof
:= by
  set γ := h.somePath
  set g : ℝ → ℝ × ℝ := fun t ↦ γ.extend t with hg_def
  have hg : Continuous g := γ.continuous_extend
  have hgX : ∀ t, g t ∈ X := fun t ↦ h.somePath_mem _
  have hg1 : Continuous fun t ↦ (g t).1 := continuous_fst.comp hg
  have hclosed : IsClosed {t | (g t).1 = 0} := isClosed_eq hg1 continuous_const
  have hopen : IsOpen {t | (g t).1 = 0} := by
    rw [Metric.isOpen_iff]
    intro t ht
    have ht' : (g t).1 = 0 := ht
    obtain ⟨δ, hδ, hball⟩ := Metric.continuous_iff.1 hg t 1 one_pos
    refine ⟨δ, hδ, fun s hs ↦ ?_⟩
    have hs' : dist s t < δ := hs
    by_contra hne
    have hpos : 0 < (g s).1 := (hX0 _ (hgX s)).lt_of_ne' hne
    have key : ∀ v ∈ Icc (-1 : ℝ) 1, ∃ u, dist u t < δ ∧ (g u).2 = v := by
      intro v hv
      obtain ⟨x', hx', hsin⟩ := exists_mem_Ioc_sin_inv_eq hv hpos
      have hmem : x' ∈ uIcc (g t).1 (g s).1 := by
        rw [ht']
        exact Icc_subset_uIcc ⟨hx'.1.le, hx'.2⟩
      obtain ⟨u, hu, hux⟩ := intermediate_value_uIcc hg1.continuousOn hmem
      refine ⟨u, ?_, ?_⟩
      · rw [dist_comm]
        exact (Real.dist_left_le_of_mem_uIcc hu).trans_lt (by rwa [dist_comm])
      · have hux' : (g u).1 = x' := hux
        rw [hX _ (hgX u) (hux' ▸ hx'.1), hux', hsin]
    obtain ⟨u, hu, hu1⟩ := key 1 ⟨by norm_num, le_rfl⟩
    obtain ⟨v, hv, hv1⟩ := key (-1) ⟨le_rfl, by norm_num⟩
    have h2 : dist (g u) (g v) < 2 := by
      have := dist_triangle_right (g u) (g v) (g t)
      linarith [hball u hu, hball v hv]
    have h3 : dist (g u).2 (g v).2 ≤ dist (g u) (g v) := by
      rw [Prod.dist_eq]
      exact le_max_right _ _
    rw [hu1, hv1, Real.dist_eq] at h3
    norm_num at h3
    linarith
  have h0 : (0 : ℝ) ∈ {t | (g t).1 = 0} := by
    change (γ.extend 0).1 = 0
    rw [Path.extend_zero]
    exact hx
  have huniv := IsClopen.eq_univ ⟨hclosed, hopen⟩ ⟨0, h0⟩
  have h1 : (g 1).1 = 0 := (huniv.symm ▸ mem_univ (1 : ℝ) :)
  simpa [hg_def, Path.extend_one] using h1

theorem fst_eq_zero_iff_of_joinedIn

TopologyByExample.SineCurves.fst_eq_zero_iff_of_joinedIn

In a set X of the plane whose points have 0 ≤ x, and whose points with 0 < x lie on the graph of sin x⁻¹, two points joined by a path are both on the vertical axis or both off it.

theorem fst_eq_zero_iff_of_joinedIn {X : Set (ℝ × ℝ)} (hX0 : ∀ p ∈ X, 0 ≤ p.1)
    (hX : ∀ p ∈ X, 0 < p.1 → p.2 = sin p.1⁻¹) {x y : ℝ × ℝ} (h : JoinedIn X x y) :
    x.1 = 0 ↔ y.1 = 0
Proof
:=
  ⟨fst_eq_zero_of_joinedIn hX0 hX h, fst_eq_zero_of_joinedIn hX0 hX h.symm⟩

Not locally connected

theorem not_locallyConnectedSpace_of_subset

TopologyByExample.SineCurves.not_locallyConnectedSpace_of_subset

A subset X of the plane containing (0, 0) and the graph G, whose points in the box 0 < x < 1 / 2, |y| < 1 / 2 all lie on G, is not locally connected: (0, 0) has no connected neighbourhood inside the box.

theorem not_locallyConnectedSpace_of_subset {X : Set (ℝ × ℝ)} (h0 : ((0 : ℝ), (0 : ℝ)) ∈ X)
    (hgraph : graph ⊆ X)
    (hX : ∀ p ∈ X, 0 < p.1 → p.1 < 1 / 2 → |p.2| < 1 / 2 → p.2 = sin p.1⁻¹) :
    ¬LocallyConnectedSpace X
Proof
:= by
  intro hlc
  set p : X := ⟨(0, 0), h0⟩
  set U : Set X := {q | (q : ℝ × ℝ).1 < 1 / 2 ∧ |(q : ℝ × ℝ).2| < 1 / 2} with hU_def
  have hUo : IsOpen U :=
    (isOpen_lt (continuous_fst.comp continuous_subtypeVal) continuous_const).inter
      (isOpen_lt (continuous_abs.comp (continuous_snd.comp continuous_subtypeVal))
        continuous_const)
  have hU : U ∈ 𝓝 p := hUo.mem_nhds (by simp [hU_def, p])
  obtain ⟨V, hV, hVc, hVU⟩ := locallyConnectedSpace_iff_connected_subsets.1 hlc p U hU
  obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.1 hV
  obtain ⟨x₀, hx₀, hsin₀⟩ := exists_mem_Ioc_sin_inv_eq (y := 0) (by norm_num)
    (lt_min (half_pos hε) one_pos)
  have hq : ((x₀, sin x₀⁻¹) : ℝ × ℝ) ∈ X :=
    hgraph (mk_mem_graph ⟨hx₀.1, hx₀.2.trans (min_le_right _ _)⟩)
  have hqV : (⟨_, hq⟩ : X) ∈ V := by
    apply hball
    rw [Metric.mem_ball, Subtype.dist_eq]
    change max (dist x₀ 0) (dist (sin x₀⁻¹) 0) < ε
    rw [hsin₀, dist_self, Real.dist_eq, sub_zero, abs_of_pos hx₀.1, max_eq_left hx₀.1.le]
    exact hx₀.2.trans_lt ((min_le_left _ _).trans_lt (half_lt_self hε))
  have hpre : IsPreconnected ((fun q : X ↦ (q : ℝ × ℝ).1) '' V) :=
    hVc.image _ (continuous_fst.comp continuous_subtypeVal).continuousOn
  obtain ⟨x₁, hx₁, hsin₁⟩ := exists_mem_Ioc_sin_inv_eq (y := 1) ⟨by norm_num, le_rfl⟩ hx₀.1
  obtain ⟨r, hrV, hr⟩ := hpre.Icc_subset (mem_image_of_mem _ (mem_of_mem_nhds hV))
    (mem_image_of_mem _ hqV) (show x₁ ∈ Icc 0 x₀ from ⟨hx₁.1.le, hx₁.2⟩)
  obtain ⟨hr1, hr2⟩ := hVU hrV
  have hr' : (r : ℝ × ℝ).1 = x₁ := hr
  have := hX _ r.property (hr' ▸ hx₁.1) hr1 hr2
  rw [this, hr', hsin₁] at hr2
  norm_num at hr2

The closed sine curve as a closed set

theorem isClosed_setOf_le_or_eq

TopologyByExample.SineCurves.isClosed_setOf_le_or_eq

The set of points with x ≤ 0 or y = sin x⁻¹ is closed.

theorem isClosed_setOf_le_or_eq :
    IsClosed {p : ℝ × ℝ | p.1 ≤ 0 ∨ p.2 = sin p.1⁻¹}
Proof
:= by
  have hc : ContinuousOn (fun p : ℝ × ℝ ↦ p.2 - sin p.1⁻¹) {p | 0 < p.1} := fun p hp ↦
    (continuous_snd.continuousAt.sub (continuous_sin.continuousAt.comp
      (continuousAt_fst.inv₀ (ne_of_gt hp)))).continuousWithinAt
  have ho := hc.isOpen_inter_preimage (isOpen_lt continuous_const continuous_fst)
    (isOpen_compl_singleton (x := (0 : ℝ)))
  rw [← isOpen_compl_iff]
  convert ho using 1
  ext p
  simp [sub_eq_zero, not_or, not_le]

theorem closedSineCurve_eq

TopologyByExample.SineCurves.closedSineCurve_eq

The closed sine curve is the set of points of the rectangle [0, 1] × [-1, 1] with x ≤ 0 or y = sin x⁻¹.

theorem closedSineCurve_eq :
    closedSineCurve = Icc 0 1 ×ˢ Icc (-1) 1 ∩ {p | p.1 ≤ 0 ∨ p.2 = sin p.1⁻¹}
Proof
:= by
  ext ⟨x, y⟩
  constructor
  · rintro (⟨t, ht, h⟩ | ⟨hx, hy⟩)
    · obtain ⟨rfl, rfl⟩ := Prod.mk.inj h
      exact ⟨⟨⟨ht.1.le, ht.2⟩, neg_one_le_sin _, sin_le_one _⟩, Or.inr rfl⟩
    · obtain rfl : x = 0 := hx
      exact ⟨⟨⟨le_rfl, zero_le_one⟩, hy⟩, Or.inl le_rfl⟩
  · rintro ⟨⟨⟨hx0, hx1⟩, hy⟩, h | h⟩
    · exact Or.inr ⟨le_antisymm h hx0, hy⟩
    · rcases hx0.eq_or_lt with rfl | hx0
      · exact Or.inr ⟨rfl, hy⟩
      · refine Or.inl ⟨x, ⟨hx0, hx1⟩, ?_⟩
        simp only at h
        rw [h]

theorem isCompact_closedSineCurve

TopologyByExample.SineCurves.isCompact_closedSineCurve

The closed sine curve is compact.

theorem isCompact_closedSineCurve : IsCompact closedSineCurve
Proof
:= by
  rw [closedSineCurve_eq]
  exact (isCompact_Icc.prod isCompact_Icc).inter_right isClosed_setOf_le_or_eq

theorem isClosed_closedSineCurve

TopologyByExample.SineCurves.isClosed_closedSineCurve

The closed sine curve is closed.

theorem isClosed_closedSineCurve : IsClosed closedSineCurve
Proof
:=
  isCompact_closedSineCurve.isClosed

theorem limitSegment_subset_closure_graph

TopologyByExample.SineCurves.limitSegment_subset_closure_graph

The limit segment lies in the closure of the graph.

theorem limitSegment_subset_closure_graph : limitSegment ⊆ closure graph
Proof
:= by
  rintro ⟨x, y⟩ ⟨hx, hy⟩
  obtain rfl : x = 0 := hx
  rw [Metric.mem_closure_iff]
  intro ε hε
  obtain ⟨t, ht, hsin⟩ := exists_mem_Ioc_sin_inv_eq hy (lt_min (half_pos hε) one_pos)
  have hts := ht.2
  simp only [le_min_iff] at hts
  refine ⟨(t, sin t⁻¹), mk_mem_graph ⟨ht.1, hts.2⟩, ?_⟩
  rw [Prod.dist_eq, hsin]
  simp only [Real.dist_eq, zero_sub, abs_neg, sub_self, abs_zero]
  rw [abs_of_pos ht.1, max_eq_left ht.1.le]
  linarith

theorem closure_graph

TopologyByExample.SineCurves.closure_graph

The closure of the graph G is the closed sine curve G ∪ {0} × [-1, 1].

theorem closure_graph : closure graph = closedSineCurve
Proof
:=
  (closure_minimal subset_union_left isClosed_closedSineCurve).antisymm
    (union_subset subset_closure limitSegment_subset_closure_graph)

On this site: Closed topologist's sine curve: The closed sine curve is the closure of the graph

theorem zero_mem_limitSegment

TopologyByExample.SineCurves.zero_mem_limitSegment

The origin lies on the limit segment.

theorem zero_mem_limitSegment : ((0 : ℝ), (0 : ℝ)) ∈ limitSegment
Proof
:=
  ⟨rfl, by norm_num, by norm_num⟩

theorem closure_sineCurve

TopologyByExample.SineCurves.closure_sineCurve

The closure of the topologist's sine curve G ∪ {(0, 0)} is the closed sine curve.

theorem closure_sineCurve : closure sineCurve = closedSineCurve
Proof
:= by
  refine (closure_minimal (insert_subset (Or.inr zero_mem_limitSegment) subset_union_left)
    isClosed_closedSineCurve).antisymm ?_
  exact closure_graph.symm.subset.trans (closure_mono (subset_insert _ _))

On this site: Topologist's sine curve: The closure of the sine curve is the closed sine curve

theorem not_totallyPathDisconnectedSpace_of_subset

TopologyByExample.SineCurves.not_totallyPathDisconnectedSpace_of_subset

A space containing the graph G is not totally path disconnected: the distinct points (1, sin 1) and (1 / 2, sin 2) of G are joined by a path in G.

theorem not_totallyPathDisconnectedSpace_of_subset {X : Set (ℝ × ℝ)} (hgraph : graph ⊆ X) :
    ¬TotallyPathDisconnectedSpace X
Proof
:= by
  intro h
  have ha : ((1 : ℝ), sin (1 : ℝ)⁻¹) ∈ graph := mk_mem_graph ⟨one_pos, le_rfl⟩
  have hb : ((1 / 2 : ℝ), sin (1 / 2 : ℝ)⁻¹) ∈ graph := mk_mem_graph ⟨by norm_num, by norm_num⟩
  have hj := ((isPathConnected_graph.joinedIn _ ha _ hb).mono hgraph).joined_subtype
  have := congrArg (fun q : X ↦ (q : ℝ × ℝ).1) (h.eq_of_joined _ _ hj)
  norm_num at this

definition TopologistsSineCurve

TopologyByExample.TopologistsSineCurve

The topologist's sine curve G ∪ {(0, 0)}, where G is the graph of sin x⁻¹ over (0, 1], as a subspace of the plane.

abbrev TopologistsSineCurve : Type
:= SineCurves.sineCurve

On this site: Space: Topologist's sine curve

definition ClosedTopologistsSineCurve

TopologyByExample.ClosedTopologistsSineCurve

The closed topologist's sine curve G ∪ {0} × [-1, 1], as a subspace of the plane.

abbrev ClosedTopologistsSineCurve : Type
:= SineCurves.closedSineCurve

On this site: Space: Closed topologist's sine curve

definition ExtendedTopologistsSineCurve

TopologyByExample.ExtendedTopologistsSineCurve

The extended topologist's sine curve, the closed sine curve together with [0, 1] × {1}, as a subspace of the plane.

abbrev ExtendedTopologistsSineCurve : Type
:= SineCurves.extendedSineCurve

On this site: Space: Extended topologist's sine curve

definition WarsawCircle

TopologyByExample.WarsawCircle

The Warsaw circle, the closed sine curve closed up by an arc through (0, -2) and (1, -2), as a subspace of the plane.

abbrev WarsawCircle : Type
:= SineCurves.warsawCircle

On this site: Space: Warsaw circle

definition origin

TopologyByExample.TopologistsSineCurve.origin

The origin, as a point of the topologist's sine curve.

def origin : TopologistsSineCurve
:= ⟨(0, 0), mem_insert _ _⟩

instance

The topologist's sine curve is nonempty.

instance : Nonempty TopologistsSineCurve
Proof
:= ⟨origin⟩

theorem fst_nonneg

TopologyByExample.TopologistsSineCurve.fst_nonneg

The points of the topologist's sine curve have 0 ≤ x.

theorem fst_nonneg {p : ℝ × ℝ} (hp : p ∈ sineCurve) : 0 ≤ p.1
Proof
:= by
  rcases hp with rfl | hp
  · exact le_rfl
  · exact (of_mem_graph hp).1.1.le

theorem mem_graph_of_pos

TopologyByExample.TopologistsSineCurve.mem_graph_of_pos

The points of the topologist's sine curve with 0 < x lie on the graph.

theorem mem_graph_of_pos {p : ℝ × ℝ} (hp : p ∈ sineCurve) (hx : 0 < p.1) : p ∈ graph
Proof
:= by
  rcases hp with rfl | hp
  · exact absurd hx (lt_irrefl 0)
  · exact hp

theorem sineCurve_eq

TopologyByExample.TopologistsSineCurve.sineCurve_eq

The topologist's sine curve is the set of points of the closed sine curve with x ≠ 0 or y = 0.

theorem sineCurve_eq :
    sineCurve = closedSineCurve ∩ ({p | p.1 ≠ 0} ∪ {p | p.2 = 0})
Proof
:= by
  ext p
  constructor
  · rintro (rfl | hp)
    · exact ⟨Or.inr zero_mem_limitSegment, Or.inr rfl⟩
    · exact ⟨Or.inl hp, Or.inl (of_mem_graph hp).1.1.ne'⟩
  · rintro ⟨hp | ⟨hx, -⟩, h | h⟩
    · exact Or.inr hp
    · exact Or.inr hp
    · exact absurd hx h
    · exact Or.inl (Prod.ext hx h)

theorem isCompletelyMetrizableSpace

TopologyByExample.TopologistsSineCurve.isCompletelyMetrizableSpace

The topologist's sine curve is completely metrizable: it is a Gδ subset of the plane.

theorem isCompletelyMetrizableSpace : IsCompletelyMetrizableSpace TopologistsSineCurve
Proof
:= by
  have h : IsGδ sineCurve := by
    rw [sineCurve_eq]
    exact isClosed_closedSineCurve.isGδ.inter
      ((isOpen_ne_fun continuous_fst continuous_const).isGδ.union
        (isClosed_eq continuous_snd continuous_const).isGδ)
  exact h.isCompletelyMetrizableSpace

On this site: The topologist's sine curve is completely metrizable

theorem sigmaCompactSpace

TopologyByExample.TopologistsSineCurve.sigmaCompactSpace

The topologist's sine curve is σ-compact: it is the union of the compact sets made of the origin and the part of the graph over [1 / (n + 1), 1].

theorem sigmaCompactSpace : SigmaCompactSpace TopologistsSineCurve
Proof
:= by
  refine isSigmaCompact_iff_sigmaCompactSpace.1
    ⟨fun n : ℕ ↦ insert (0, 0) ((fun x : ℝ ↦ (x, sin x⁻¹)) '' Icc (1 / ((n : ℝ) + 1)) 1),
      fun n ↦ ?_, ?_⟩
  · refine (isCompact_Icc.image_of_continuousOn (continuousOn_graphMap.mono ?_)).insert _
    exact fun x hx ↦ (lt_of_lt_of_le (by positivity) hx.1 : (0 : ℝ) < x)
  · apply Subset.antisymm
    · refine iUnion_subset fun n ↦ insert_subset_insert (image_mono ?_)
      exact fun x hx ↦ ⟨lt_of_lt_of_le (by positivity) hx.1, hx.2⟩
    · rintro p (rfl | ⟨x, hx, rfl⟩)
      · exact mem_iUnion.2 ⟨0, mem_insert _ _⟩
      · obtain ⟨n, hn⟩ := exists_nat_one_div_lt hx.1
        exact mem_iUnion.2 ⟨n, Or.inr ⟨x, ⟨hn.le, hx.2⟩, rfl⟩⟩

On this site: The topologist's sine curve is σ-compact

theorem isConnected_sineCurve

TopologyByExample.TopologistsSineCurve.isConnected_sineCurve

The topologist's sine curve is a connected subset of the plane: it lies between the connected graph and its closure.

theorem isConnected_sineCurve : IsConnected sineCurve
Proof
:=
  ⟨⟨_, mem_insert _ _⟩, isPathConnected_graph.isConnected.isPreconnected.subset_closure
    (subset_insert _ _) (closure_graph ▸ insert_subset (Or.inr zero_mem_limitSegment)
      (subset_closure.trans closure_graph.subset))⟩

instance instConnectedSpace

TopologyByExample.TopologistsSineCurve.instConnectedSpace

The topologist's sine curve is connected.

instance instConnectedSpace : ConnectedSpace TopologistsSineCurve
Proof
:=
  isConnected_iff_connectedSpace.1 isConnected_sineCurve

theorem preconnectedSpace

TopologyByExample.TopologistsSineCurve.preconnectedSpace

The topologist's sine curve is preconnected (the study's statement of connectedness).

theorem preconnectedSpace : PreconnectedSpace TopologistsSineCurve
Proof
:= inferInstance

On this site: The topologist's sine curve is connected

theorem joined_iff

TopologyByExample.TopologistsSineCurve.joined_iff

Two points of the topologist's sine curve are joined by a path if and only if both lie on the vertical axis or both lie off it: the path components are the graph and the origin.

theorem joined_iff (p q : TopologistsSineCurve) :
    Joined p q ↔ ((p : ℝ × ℝ).1 = 0 ↔ (q : ℝ × ℝ).1 = 0)
Proof
:= by
  obtain ⟨p, hp⟩ := p
  obtain ⟨q, hq⟩ := q
  rw [← joinedIn_iff_joined hp hq]
  refine ⟨fst_eq_zero_iff_of_joinedIn (fun _ ↦ fst_nonneg)
    (fun r hr hr0 ↦ (of_mem_graph (mem_graph_of_pos hr hr0)).2), fun h ↦ ?_⟩
  rcases (fst_nonneg hp).eq_or_lt with hp0 | hp0
  · have hq0 := h.1 hp0.symm
    have hp' : p = (0, 0) := by
      rcases hp with rfl | hp
      · rfl
      · exact absurd hp0.symm (of_mem_graph hp).1.1.ne'
    have hq' : q = (0, 0) := by
      rcases hq with rfl | hq
      · rfl
      · exact absurd hq0 (of_mem_graph hq).1.1.ne'
    subst hp' hq'
    exact JoinedIn.refl hp
  · have hq0 : 0 < q.1 := (fst_nonneg hq).lt_of_ne' fun h' ↦ hp0.ne' (h.2 h')
    exact (isPathConnected_graph.joinedIn _ (mem_graph_of_pos hp hp0) _
      (mem_graph_of_pos hq hq0)).mono (subset_insert _ _)

On this site: Topologist's sine curve: The path components are the graph and the origin

definition one

TopologyByExample.TopologistsSineCurve.one

The point (1, sin 1) of the graph, as a point of the topologist's sine curve.

noncomputable def one : TopologistsSineCurve
:=
  ⟨(1, sin (1 : ℝ)⁻¹), Or.inr (mk_mem_graph ⟨one_pos, le_rfl⟩)⟩

theorem not_pathPreconnectedSpace

TopologyByExample.TopologistsSineCurve.not_pathPreconnectedSpace

The topologist's sine curve is not path connected: no path joins the origin to (1, sin 1).

theorem not_pathPreconnectedSpace : ¬PathPreconnectedSpace TopologistsSineCurve
Proof
:= fun h ↦ by
  have := (joined_iff origin one).1 (h.joined _ _)
  norm_num [origin, one] at this

On this site: The topologist's sine curve is not path connected

theorem not_locallyConnectedSpace

TopologyByExample.TopologistsSineCurve.not_locallyConnectedSpace

The topologist's sine curve is not locally connected (at the origin).

theorem not_locallyConnectedSpace : ¬LocallyConnectedSpace TopologistsSineCurve
Proof
:=
  not_locallyConnectedSpace_of_subset (mem_insert _ _) (subset_insert _ _)
    fun _ hp hx _ _ ↦ (of_mem_graph (mem_graph_of_pos hp hx)).2

On this site: The topologist's sine curve is not locally connected

theorem not_weaklyLocallyCompactSpace

TopologyByExample.TopologistsSineCurve.not_weaklyLocallyCompactSpace

The topologist's sine curve is not weakly locally compact: the origin has no compact neighbourhood. A neighbourhood of the origin contains points (x, y) of the graph with a fixed small y > 0 and x arbitrarily small; a compact neighbourhood is closed in the plane, so it would contain (0, y), which is not in the space.

theorem not_weaklyLocallyCompactSpace : ¬WeaklyLocallyCompactSpace TopologistsSineCurve
Proof
:= by
  intro h
  obtain ⟨K, hK, hKn⟩ := h.exists_compact_mem_nhds origin
  obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.1 hKn
  set y := min (ε / 2) (1 / 2) with hy_def
  have hy0 : 0 < y := lt_min (half_pos hε) one_half_pos
  have hyε : y < ε := (min_le_left _ _).trans_lt (half_lt_self hε)
  have hy1 : y ∈ Icc (-1 : ℝ) 1 :=
    ⟨by linarith, (min_le_right _ _).trans (by norm_num)⟩
  have hK' : IsClosed ((↑) '' K : Set (ℝ × ℝ)) := (hK.image continuous_subtypeVal).isClosed
  have hmem : ((0 : ℝ), y) ∈ (↑) '' K := by
    refine hK'.closure_subset (Metric.mem_closure_iff.2 fun δ hδ ↦ ?_)
    obtain ⟨t, ht, hsin⟩ :=
      exists_mem_Ioc_sin_inv_eq hy1 (lt_min (half_pos hδ) (lt_min (half_pos hε) one_pos))
    have hts := ht.2
    simp only [le_min_iff] at hts
    refine ⟨(t, sin t⁻¹), ⟨⟨_, Or.inr (mk_mem_graph ⟨ht.1, hts.2.2⟩)⟩, hball ?_, rfl⟩, ?_⟩
    · rw [Metric.mem_ball, Subtype.dist_eq]
      change max (dist t 0) (dist (sin t⁻¹) 0) < ε
      rw [hsin, Real.dist_eq, Real.dist_eq, sub_zero, sub_zero, abs_of_pos ht.1, abs_of_pos hy0]
      exact max_lt (by linarith) hyε
    · rw [Prod.dist_eq, hsin]
      simp only [Real.dist_eq, zero_sub, abs_neg, sub_self, abs_zero]
      rw [abs_of_pos ht.1, max_eq_left ht.1.le]
      linarith
  obtain ⟨⟨q, hq⟩, -, hq'⟩ := hmem
  subst hq'
  rcases hq with h | h
  · exact hy0.ne' (congrArg Prod.snd h)
  · exact (lt_irrefl _) (of_mem_graph h).1.1

On this site: The topologist's sine curve is not weakly locally compact

theorem not_totallyPathDisconnectedSpace

TopologyByExample.TopologistsSineCurve.not_totallyPathDisconnectedSpace

The topologist's sine curve is not totally path disconnected: it contains the graph, which is path connected.

theorem not_totallyPathDisconnectedSpace :
    ¬TotallyPathDisconnectedSpace TopologistsSineCurve
Proof
:=
  not_totallyPathDisconnectedSpace_of_subset (subset_insert _ _)

On this site: The topologist's sine curve is not totally path disconnected

definition origin

TopologyByExample.ClosedTopologistsSineCurve.origin

The origin, as a point of the closed sine curve.

def origin : ClosedTopologistsSineCurve
:= ⟨(0, 0), Or.inr zero_mem_limitSegment⟩

instance

The closed sine curve is nonempty.

instance : Nonempty ClosedTopologistsSineCurve
Proof
:= ⟨origin⟩

instance instCompactSpace

TopologyByExample.ClosedTopologistsSineCurve.instCompactSpace

The closed sine curve is compact.

instance instCompactSpace : CompactSpace ClosedTopologistsSineCurve
Proof
:=
  isCompact_iff_compactSpace.1 isCompact_closedSineCurve

On this site: The closed topologist's sine curve is compact

theorem isCompletelyMetrizableSpace

TopologyByExample.ClosedTopologistsSineCurve.isCompletelyMetrizableSpace

The closed sine curve is completely metrizable: it is a closed subset of the plane.

theorem isCompletelyMetrizableSpace : IsCompletelyMetrizableSpace ClosedTopologistsSineCurve
Proof
:=
  isClosed_closedSineCurve.isCompletelyMetrizableSpace

On this site: The closed topologist's sine curve is completely metrizable

theorem isConnected_closedSineCurve

TopologyByExample.ClosedTopologistsSineCurve.isConnected_closedSineCurve

The closed sine curve is a connected subset of the plane: it is the closure of the connected graph.

theorem isConnected_closedSineCurve : IsConnected closedSineCurve
Proof
:=
  closure_graph ▸ isPathConnected_graph.isConnected.closure

instance instConnectedSpace

TopologyByExample.ClosedTopologistsSineCurve.instConnectedSpace

The closed sine curve is connected.

instance instConnectedSpace : ConnectedSpace ClosedTopologistsSineCurve
Proof
:=
  isConnected_iff_connectedSpace.1 isConnected_closedSineCurve

theorem preconnectedSpace

TopologyByExample.ClosedTopologistsSineCurve.preconnectedSpace

The closed sine curve is preconnected (the study's statement of connectedness).

theorem preconnectedSpace : PreconnectedSpace ClosedTopologistsSineCurve
Proof
:= inferInstance

On this site: The closed topologist's sine curve is connected

theorem fst_nonneg

TopologyByExample.ClosedTopologistsSineCurve.fst_nonneg

The points of the closed sine curve have 0 ≤ x.

theorem fst_nonneg {p : ℝ × ℝ} (hp : p ∈ closedSineCurve) : 0 ≤ p.1
Proof
:= by
  rcases hp with hp | ⟨hp, -⟩
  · exact (of_mem_graph hp).1.1.le
  · exact (mem_singleton_iff.1 hp).ge

theorem mem_graph_of_pos

TopologyByExample.ClosedTopologistsSineCurve.mem_graph_of_pos

The points of the closed sine curve with 0 < x lie on the graph.

theorem mem_graph_of_pos {p : ℝ × ℝ} (hp : p ∈ closedSineCurve) (hx : 0 < p.1) : p ∈ graph
Proof
:= by
  rcases hp with hp | ⟨hp, -⟩
  · exact hp
  · exact absurd (mem_singleton_iff.1 hp) hx.ne'

theorem joined_iff

TopologyByExample.ClosedTopologistsSineCurve.joined_iff

Two points of the closed sine curve are joined by a path if and only if both lie on the vertical axis or both lie off it: the path components are the limit segment and the graph.

theorem joined_iff (p q : ClosedTopologistsSineCurve) :
    Joined p q ↔ ((p : ℝ × ℝ).1 = 0 ↔ (q : ℝ × ℝ).1 = 0)
Proof
:= by
  obtain ⟨p, hp⟩ := p
  obtain ⟨q, hq⟩ := q
  rw [← joinedIn_iff_joined hp hq]
  refine ⟨fst_eq_zero_iff_of_joinedIn (fun _ ↦ fst_nonneg)
    (fun r hr hr0 ↦ (of_mem_graph (mem_graph_of_pos hr hr0)).2), fun h ↦ ?_⟩
  rcases (fst_nonneg hp).eq_or_lt with hp0 | hp0
  · have hq0 := h.1 hp0.symm
    have hseg : ∀ r ∈ closedSineCurve, r.1 = 0 → r ∈ limitSegment := by
      intro r hr hr0
      rcases hr with hr | hr
      · exact absurd hr0 (of_mem_graph hr).1.1.ne'
      · exact hr
    exact JoinedIn.mono (joinedIn_of_convex ((convex_singleton _).prod (convex_Icc _ _))
      (subset_refl _) (hseg p hp hp0.symm) (hseg q hq hq0)) subset_union_right
  · have hq0 : 0 < q.1 := (fst_nonneg hq).lt_of_ne' fun h' ↦ hp0.ne' (h.2 h')
    exact (isPathConnected_graph.joinedIn _ (mem_graph_of_pos hp hp0) _
      (mem_graph_of_pos hq hq0)).mono subset_union_left

On this site: Closed topologist's sine curve: The path components are the graph and the segment

definition one

TopologyByExample.ClosedTopologistsSineCurve.one

The point (1, sin 1) of the graph, as a point of the closed sine curve.

noncomputable def one : ClosedTopologistsSineCurve
:=
  ⟨(1, sin (1 : ℝ)⁻¹), Or.inl (mk_mem_graph ⟨one_pos, le_rfl⟩)⟩

theorem not_pathPreconnectedSpace

TopologyByExample.ClosedTopologistsSineCurve.not_pathPreconnectedSpace

The closed sine curve is not path connected: no path joins the origin to (1, sin 1).

theorem not_pathPreconnectedSpace : ¬PathPreconnectedSpace ClosedTopologistsSineCurve
Proof
:= fun h ↦ by
  have := (joined_iff origin one).1 (h.joined _ _)
  norm_num [origin, one] at this

On this site: The closed topologist's sine curve is not path connected

theorem not_locallyConnectedSpace

TopologyByExample.ClosedTopologistsSineCurve.not_locallyConnectedSpace

The closed sine curve is not locally connected (at the origin).

theorem not_locallyConnectedSpace : ¬LocallyConnectedSpace ClosedTopologistsSineCurve
Proof
:=
  not_locallyConnectedSpace_of_subset (Or.inr zero_mem_limitSegment) subset_union_left
    fun _ hp hx _ _ ↦ (of_mem_graph (mem_graph_of_pos hp hx)).2

On this site: The closed topologist's sine curve is not locally connected

theorem not_totallyPathDisconnectedSpace

TopologyByExample.ClosedTopologistsSineCurve.not_totallyPathDisconnectedSpace

The closed sine curve is not totally path disconnected: it contains the graph, which is path connected.

theorem not_totallyPathDisconnectedSpace :
    ¬TotallyPathDisconnectedSpace ClosedTopologistsSineCurve
Proof
:=
  not_totallyPathDisconnectedSpace_of_subset subset_union_left

On this site: The closed topologist's sine curve is not totally path disconnected

theorem isCompact_extendedSineCurve

TopologyByExample.ExtendedTopologistsSineCurve.isCompact_extendedSineCurve

The extended sine curve is a compact subset of the plane.

theorem isCompact_extendedSineCurve : IsCompact extendedSineCurve
Proof
:=
  isCompact_closedSineCurve.union (isCompact_Icc.prod isCompact_singleton)

instance instCompactSpace

TopologyByExample.ExtendedTopologistsSineCurve.instCompactSpace

The extended sine curve is compact.

instance instCompactSpace : CompactSpace ExtendedTopologistsSineCurve
Proof
:=
  isCompact_iff_compactSpace.1 isCompact_extendedSineCurve

On this site: The extended topologist's sine curve is compact

theorem isCompletelyMetrizableSpace

TopologyByExample.ExtendedTopologistsSineCurve.isCompletelyMetrizableSpace

The extended sine curve is completely metrizable: it is a closed subset of the plane.

theorem isCompletelyMetrizableSpace : IsCompletelyMetrizableSpace ExtendedTopologistsSineCurve
Proof
:=
  isCompact_extendedSineCurve.isClosed.isCompletelyMetrizableSpace

On this site: The extended topologist's sine curve is completely metrizable

theorem isPathConnected_extendedSineCurve

TopologyByExample.ExtendedTopologistsSineCurve.isPathConnected_extendedSineCurve

The extended sine curve is a path connected subset of the plane: the limit segment and the top segment are convex and meet at (0, 1), and the graph meets the top segment at (2 / π, 1).

theorem isPathConnected_extendedSineCurve : IsPathConnected extendedSineCurve
Proof
:= by
  have hseg : IsPathConnected (limitSegment ∪ topSegment) :=
    (((convex_singleton _).prod (convex_Icc _ _)).isPathConnected
      ⟨_, zero_mem_limitSegment⟩).union
      (((convex_Icc _ _).prod (convex_singleton _)).isPathConnected ⟨(0, 1), by
        simp [topSegment]⟩)
      ⟨(0, 1), ⟨rfl, by norm_num, le_rfl⟩, ⟨le_rfl, zero_le_one⟩, rfl⟩
  have hpi : 2 / π ∈ Ioc (0 : ℝ) 1 :=
    ⟨by positivity, (div_le_one pi_pos).2 two_le_pi⟩
  have hsin : sin (2 / π)⁻¹ = 1 := by
    rw [inv_div, sin_pi_div_two]
  have h := isPathConnected_graph.union hseg ⟨(2 / π, 1), hsin ▸ mk_mem_graph hpi,
    Or.inr ⟨⟨hpi.1.le, hpi.2⟩, rfl⟩⟩
  rwa [← union_assoc] at h

instance instPathConnectedSpace

TopologyByExample.ExtendedTopologistsSineCurve.instPathConnectedSpace

The extended sine curve is path connected (in Mathlib's sense, which includes nonemptiness).

instance instPathConnectedSpace : PathConnectedSpace ExtendedTopologistsSineCurve
Proof
:=
  isPathConnected_iff_pathConnectedSpace.1 isPathConnected_extendedSineCurve

instance

The extended sine curve is nonempty.

instance : Nonempty ExtendedTopologistsSineCurve
Proof
:= inferInstance

theorem pathPreconnectedSpace

TopologyByExample.ExtendedTopologistsSineCurve.pathPreconnectedSpace

Any two points of the extended sine curve are joined by a path.

theorem pathPreconnectedSpace : PathPreconnectedSpace ExtendedTopologistsSineCurve
Proof
:=
  inferInstance

theorem not_locallyConnectedSpace

TopologyByExample.ExtendedTopologistsSineCurve.not_locallyConnectedSpace

The extended sine curve is not locally connected (at the origin).

theorem not_locallyConnectedSpace : ¬LocallyConnectedSpace ExtendedTopologistsSineCurve
Proof
:= by
  refine not_locallyConnectedSpace_of_subset (Or.inl (Or.inr zero_mem_limitSegment))
    (subset_union_left.trans subset_union_left) fun p hp hx _ hy ↦ ?_
  rcases hp with (hp | ⟨hp, -⟩) | ⟨-, hp⟩
  · exact (of_mem_graph hp).2
  · exact absurd (mem_singleton_iff.1 hp) hx.ne'
  · rw [mem_singleton_iff.1 hp] at hy
    norm_num at hy

On this site: The extended topologist's sine curve is not locally connected

theorem warsawCircle_eq

TopologyByExample.WarsawCircle.warsawCircle_eq

The Warsaw circle is the graph together with the arc warsawArc, which contains the limit segment.

theorem warsawCircle_eq : warsawCircle = graph ∪ warsawArc
Proof
:= by
  have h : limitSegment ⊆ warsawArc := fun p ⟨hp1, hp2⟩ ↦
    Or.inl (Or.inl ⟨hp1, by linarith [hp2.1], hp2.2⟩)
  rw [warsawCircle, closedSineCurve, union_assoc, union_eq_right.2 h]

theorem isCompact_warsawCircle

TopologyByExample.WarsawCircle.isCompact_warsawCircle

The Warsaw circle is a compact subset of the plane.

theorem isCompact_warsawCircle : IsCompact warsawCircle
Proof
:=
  isCompact_closedSineCurve.union
    (((isCompact_singleton.prod isCompact_Icc).union (isCompact_Icc.prod isCompact_singleton)).union
      (isCompact_singleton.prod isCompact_Icc))

instance instCompactSpace

TopologyByExample.WarsawCircle.instCompactSpace

The Warsaw circle is compact.

instance instCompactSpace : CompactSpace WarsawCircle
Proof
:=
  isCompact_iff_compactSpace.1 isCompact_warsawCircle

On this site: The Warsaw circle is compact

theorem isCompletelyMetrizableSpace

TopologyByExample.WarsawCircle.isCompletelyMetrizableSpace

The Warsaw circle is completely metrizable: it is a closed subset of the plane.

theorem isCompletelyMetrizableSpace : IsCompletelyMetrizableSpace WarsawCircle
Proof
:=
  isCompact_warsawCircle.isClosed.isCompletelyMetrizableSpace

On this site: The Warsaw circle is completely metrizable

theorem isPathConnected_warsawCircle

TopologyByExample.WarsawCircle.isPathConnected_warsawCircle

The Warsaw circle is a path connected subset of the plane: the three segments of the arc are convex and meet at (0, -2) and (1, -2), and the graph meets the arc at (1, sin 1).

theorem isPathConnected_warsawCircle : IsPathConnected warsawCircle
Proof
:= by
  have hsin : (-2 : ℝ) ≤ sin 1 := by linarith [neg_one_le_sin 1]
  have h1 : IsPathConnected ({0} ×ˢ Icc (-2) 1 : Set (ℝ × ℝ)) :=
    ((convex_singleton _).prod (convex_Icc _ _)).isPathConnected
      ⟨(0, -2), rfl, le_rfl, by norm_num⟩
  have h2 : IsPathConnected (Icc 0 1 ×ˢ {-2} : Set (ℝ × ℝ)) :=
    ((convex_Icc _ _).prod (convex_singleton _)).isPathConnected
      ⟨(0, -2), ⟨le_rfl, zero_le_one⟩, rfl⟩
  have h3 : IsPathConnected ({1} ×ˢ Icc (-2) (sin 1) : Set (ℝ × ℝ)) :=
    ((convex_singleton _).prod (convex_Icc _ _)).isPathConnected ⟨(1, -2), rfl, le_rfl, hsin⟩
  have harc : IsPathConnected warsawArc :=
    (h1.union h2 ⟨(0, -2), ⟨rfl, le_rfl, by norm_num⟩, ⟨le_rfl, zero_le_one⟩, rfl⟩).union h3
      ⟨(1, -2), Or.inr ⟨⟨zero_le_one, le_rfl⟩, rfl⟩, rfl, le_rfl, hsin⟩
  rw [warsawCircle_eq]
  exact isPathConnected_graph.union harc ⟨(1, sin (1 : ℝ)⁻¹), mk_mem_graph ⟨one_pos, le_rfl⟩,
    Or.inr ⟨rfl, by rw [inv_one]; exact hsin, by rw [inv_one]⟩⟩

instance instPathConnectedSpace

TopologyByExample.WarsawCircle.instPathConnectedSpace

The Warsaw circle is path connected (in Mathlib's sense, which includes nonemptiness).

instance instPathConnectedSpace : PathConnectedSpace WarsawCircle
Proof
:=
  isPathConnected_iff_pathConnectedSpace.1 isPathConnected_warsawCircle

instance

The Warsaw circle is nonempty.

instance : Nonempty WarsawCircle
Proof
:= inferInstance

theorem pathPreconnectedSpace

TopologyByExample.WarsawCircle.pathPreconnectedSpace

Any two points of the Warsaw circle are joined by a path.

theorem pathPreconnectedSpace : PathPreconnectedSpace WarsawCircle
Proof
:= inferInstance

theorem not_locallyConnectedSpace

TopologyByExample.WarsawCircle.not_locallyConnectedSpace

The Warsaw circle is not locally connected (at the origin).

theorem not_locallyConnectedSpace : ¬LocallyConnectedSpace WarsawCircle
Proof
:= by
  refine not_locallyConnectedSpace_of_subset (Or.inl (Or.inr zero_mem_limitSegment))
    (subset_union_left.trans subset_union_left) fun p hp hx hx2 hy ↦ ?_
  rcases hp with (hp | ⟨hp, -⟩) | ((⟨hp, -⟩ | ⟨-, hp⟩) | ⟨hp, -⟩)
  · exact (of_mem_graph hp).2
  · exact absurd (mem_singleton_iff.1 hp) hx.ne'
  · exact absurd (mem_singleton_iff.1 hp) hx.ne'
  · rw [mem_singleton_iff.1 hp] at hy
    norm_num at hy
  · rw [mem_singleton_iff.1 hp] at hx2
    norm_num at hx2

On this site: The Warsaw circle is not locally connected