Lean library · module TopologyByExample.Spaces.WheelWithoutHub

The wheel without its hub

Source file

The punctured closed complex unit disc, with its Euclidean topology enlarged by the open radial intervals inside the open disc. This is the defining topology, not an assumed metric presentation.

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

definition WheelWithoutHub

TopologyByExample.WheelWithoutHub

The punctured closed unit disc.

def WheelWithoutHub
:= {z : ℂ // 0 < ‖z‖ ∧ ‖z‖ ≤ 1}

On this site: Space: Wheel without its hub

definition val

TopologyByExample.WheelWithoutHub.val

The underlying complex coordinate.

def val (z : WheelWithoutHub) : ℂ
:= Subtype.val z

theorem val_injective

TopologyByExample.WheelWithoutHub.val_injective

The coordinate map is injective.

theorem val_injective : Function.Injective val
Proof
:= Subtype.val_injective

definition radialInterval

TopologyByExample.WheelWithoutHub.radialInterval

An open radial interval, specified by its direction and radial endpoints.

def radialInterval (u : ℂ) (a b : ℝ) : Set WheelWithoutHub
:=
  {z | ∃ r : ℝ, a < r ∧ r < b ∧ val z = r • u}

instance

Euclidean open sets together with open radial intervals generate the topology.

instance : TopologicalSpace WheelWithoutHub
Proof
:= generateFrom
  ({U | ∃ V : Set ℂ, IsOpen V ∧ U = val ⁻¹' V} ∪
    {U | ∃ u : ℂ, ∃ a b : ℝ, ‖u‖ = 1 ∧ 0 ≤ a ∧ b ≤ 1 ∧ U = radialInterval u a b})

theorem isOpen_preimage_val

TopologyByExample.WheelWithoutHub.isOpen_preimage_val

Every Euclidean open set remains open.

theorem isOpen_preimage_val {V : Set ℂ} (hV : IsOpen V) : IsOpen (val ⁻¹' V)
Proof
:=
  GenerateOpen.basic _ (Or.inl ⟨V, hV, rfl⟩)

theorem continuous_val

TopologyByExample.WheelWithoutHub.continuous_val

The natural map to the Euclidean plane is continuous.

theorem continuous_val : Continuous val
Proof
:= continuous_def.2 fun _ ↦ isOpen_preimage_val

theorem isOpen_radialInterval

TopologyByExample.WheelWithoutHub.isOpen_radialInterval

Every radial interval in the open disc is open.

theorem isOpen_radialInterval {u : ℂ} {a b : ℝ} (hu : ‖u‖ = 1)
    (ha : 0 ≤ a) (hb : b ≤ 1) : IsOpen (radialInterval u a b)
Proof
:=
  GenerateOpen.basic _ (Or.inr ⟨u, a, b, hu, ha, hb, rfl⟩)

instance

The wheel is Hausdorff because its topology contains the Euclidean topology.

instance : T2Space WheelWithoutHub
Proof
:= T2Space.of_injective_continuous val_injective continuous_val

instance

Euclidean continuous functions separate distinct wheel points.

instance : FunctionallyHausdorffSpace WheelWithoutHub
Proof
:=
  FunctionallyHausdorffSpace.of_injective_continuous val_injective continuous_val

definition ofInterval

TopologyByExample.WheelWithoutHub.ofInterval

The positive real radius supplies an injection of the open unit interval.

def ofInterval (r : Ioo (0 : ℝ) 1) : WheelWithoutHub
:=
  ⟨(r : ℝ), by simpa only [Complex.norm_real, Real.norm_eq_abs, abs_of_pos r.property.1]
    using And.intro r.property.1 r.property.2.le⟩

theorem ofInterval_injective

TopologyByExample.WheelWithoutHub.ofInterval_injective

Distinct radial coordinates give distinct points.

theorem ofInterval_injective : Function.Injective ofInterval
Proof
:= by
  intro r s h
  apply Subtype.ext
  exact Complex.ofReal_injective (congrArg val h)

theorem cardinality_continuum

TopologyByExample.WheelWithoutHub.cardinality_continuum

The wheel has continuum cardinality.

theorem cardinality_continuum : CardinalityContinuum WheelWithoutHub
Proof
:= by
  apply le_antisymm
  · simpa only [mk_complex] using Cardinal.mk_le_of_injective val_injective
  · simpa only [mk_Ioo_real (by norm_num : (0 : ℝ) < 1)] using
      Cardinal.mk_le_of_injective ofInterval_injective

On this site: The wheel without its hub has cardinality equal to \(\mathfrak{c}\)

theorem not_countable

TopologyByExample.WheelWithoutHub.not_countable

The wheel is uncountable.

theorem not_countable : ¬ Countable WheelWithoutHub
Proof
:= by
  intro h
  have hc := mk_le_aleph0 (α := WheelWithoutHub)
  rw [show #WheelWithoutHub = 𝔠 from cardinality_continuum] at hc
  exact (not_le_of_gt aleph0_lt_continuum) hc

instance

The wheel is inhabited.

instance : Nonempty WheelWithoutHub
Proof
:= ⟨ofInterval ⟨1 / 2, by norm_num⟩⟩

definition middleCircle

TopologyByExample.WheelWithoutHub.middleCircle

The circle halfway between the missing hub and the rim.

def middleCircle : Set WheelWithoutHub
:= {z | ‖val z‖ = 1 / 2}

theorem isClosed_middleCircle

TopologyByExample.WheelWithoutHub.isClosed_middleCircle

The middle circle is closed.

theorem isClosed_middleCircle : IsClosed middleCircle
Proof
:=
  isClosed_eq continuous_val.norm continuous_const

theorem isDiscrete_middleCircle

TopologyByExample.WheelWithoutHub.isDiscrete_middleCircle

The middle circle is discrete in the wheel topology.

theorem isDiscrete_middleCircle : IsDiscrete middleCircle
Proof
:= by
  rw [isDiscrete_iff_forall_mem_exists_isOpen]
  intro z hz
  change ‖val z‖ = 1 / 2 at hz
  let u : ℂ := (2 : ℝ) • val z
  have hu : ‖u‖ = 1 := by simp [u, hz]
  refine ⟨radialInterval u 0 1, isOpen_radialInterval hu le_rfl le_rfl, ?_⟩
  ext w
  constructor
  · rintro ⟨⟨r, hr, _, hwr⟩, hw⟩
    change ‖val w‖ = 1 / 2 at hw
    have hnorm : ‖val w‖ = r := by
      rw [hwr, norm_smul, hu, Real.norm_eq_abs, abs_of_pos hr, mul_one]
    have hrhalf : r = 1 / 2 := hnorm.symm.trans hw
    apply mem_singleton_iff.2
    apply val_injective
    rw [hwr, hrhalf]
    simp [u]
  · rintro rfl
    refine ⟨⟨1 / 2, by norm_num, by norm_num, ?_⟩, hz⟩
    simp [u]

definition middleOfCircle

TopologyByExample.WheelWithoutHub.middleOfCircle

Radially shrinking a unit vector gives a point on the middle circle.

noncomputable def middleOfCircle (u : Circle) : middleCircle
Definition
:=
  ⟨⟨(1 / 2 : ℝ) • (u : ℂ), by
      have hn : ‖(1 / 2 : ℝ) • (u : ℂ)‖ = 1 / 2 := by simp
      rw [hn]; norm_num⟩, by
    change ‖(1 / 2 : ℝ) • (u : ℂ)‖ = 1 / 2
    simp⟩

theorem middleOfCircle_injective

TopologyByExample.WheelWithoutHub.middleOfCircle_injective

Distinct unit directions give distinct points on the middle circle.

theorem middleOfCircle_injective : Function.Injective middleOfCircle
Proof
:= by
  intro u v huv
  apply Subtype.ext
  have he := congrArg (fun z : middleCircle ↦ val z.val) huv
  change (1 / 2 : ℝ) • (u : ℂ) = (1 / 2 : ℝ) • (v : ℂ) at he
  exact (smul_right_injective ℂ (by norm_num : (1 / 2 : ℝ) ≠ 0)) he

theorem exists_closed_discrete_continuum_le

TopologyByExample.WheelWithoutHub.exists_closed_discrete_continuum_le

The wheel has a closed discrete subset of cardinality at least continuum.

theorem exists_closed_discrete_continuum_le :
    ∃ s : Set WheelWithoutHub, IsClosed s ∧ IsDiscrete s ∧ 𝔠 ≤ #s
Proof
:= by
  refine ⟨middleCircle, isClosed_middleCircle, isDiscrete_middleCircle, ?_⟩
  let e := TopologyByExample.Circle.nonempty_onePoint_real_homeomorph.some
  have hinj : Function.Injective (fun r : ℝ ↦ middleOfCircle (e (r : OnePoint ℝ))) :=
    middleOfCircle_injective.comp (e.injective.comp OnePoint.coe_injective)
  simpa only [mk_real] using Cardinal.mk_le_of_injective hinj

On this site: The wheel without its hub has a closed discrete subset of cardinality \(\mathfrak{c}\)

definition radius

TopologyByExample.WheelWithoutHub.radius

A radial parametrisation, including the rim but excluding the hub.

noncomputable def radius (u : Circle) (r : Ioc (0 : ℝ) 1) : WheelWithoutHub
Definition
:=
  ⟨(r : ℝ) • (u : ℂ), by
    simpa only [norm_smul, Real.norm_eq_abs, abs_of_pos r.property.1,
      Circle.norm_coe, mul_one, mem_Ioc] using r.property⟩

theorem radial_unique

TopologyByExample.WheelWithoutHub.radial_unique

Positive radial coordinates and unit directions are unique.

theorem radial_unique {u v : ℂ} (hu : ‖u‖ = 1) (hv : ‖v‖ = 1)
    {r s : ℝ} (hr : 0 < r) (hs : 0 < s) (h : r • u = s • v) : r = s ∧ u = v
Proof
:= by
  have hn := congrArg norm h
  simp only [norm_smul, hu, hv, Real.norm_eq_abs, abs_of_pos hr, abs_of_pos hs, mul_one] at hn
  refine ⟨hn, ?_⟩
  rw [← hn] at h
  exact smul_right_injective ℂ hr.ne' h

theorem continuous_radius

TopologyByExample.WheelWithoutHub.continuous_radius

Each radius carries a continuous copy of the half-open interval.

theorem continuous_radius (u : Circle) : Continuous (radius u)
Proof
:= by
  apply continuous_generateFrom_iff.2
  rintro U (⟨V, hV, rfl⟩ | ⟨v, a, b, hv, ha, _, rfl⟩)
  · exact hV.preimage (continuous_subtypeVal.smul continuous_const)
  · by_cases huv : (u : ℂ) = v
    · have he : radius u ⁻¹' radialInterval v a b =
          (Subtype.val : Ioc (0 : ℝ) 1 → ℝ) ⁻¹' Ioo a b := by
        ext r
        constructor
        · rintro ⟨s, hs, hsb, he⟩
          have hrs := (radial_unique (by simp) hv r.property.1 (lt_of_le_of_lt ha hs) he).1
          exact ⟨hrs.symm ▸ hs, hrs.symm ▸ hsb⟩
        · rintro ⟨hra, hrb⟩
          exact ⟨r, hra, hrb, by change (r : ℝ) • (u : ℂ) = (r : ℝ) • v; rw [huv]⟩
      rw [he]
      exact isOpen_Ioo.preimage continuous_subtypeVal
    · have he : radius u ⁻¹' radialInterval v a b = ∅ := by
        apply eq_empty_iff_forall_notMem.2
        rintro r ⟨s, hs, _, he⟩
        exact huv (radial_unique (by simp) hv r.property.1 (lt_of_le_of_lt ha hs) he).2
      rw [he]
      exact isOpen_empty

definition rim

TopologyByExample.WheelWithoutHub.rim

The rim retains its usual circle topology in the direction of inclusion.

noncomputable def rim (u : Circle) : WheelWithoutHub
:= radius u ⟨1, by norm_num⟩

theorem continuous_rim

TopologyByExample.WheelWithoutHub.continuous_rim

The inclusion of the ordinary circle as the rim is continuous.

theorem continuous_rim : Continuous rim
Proof
:= by
  apply continuous_generateFrom_iff.2
  rintro U (⟨V, hV, rfl⟩ | ⟨v, a, b, hv, ha, hb, rfl⟩)
  · change IsOpen ((fun u : Circle ↦ (1 : ℝ) • (u : ℂ)) ⁻¹' V)
    simp only [one_smul]
    exact hV.preimage continuous_subtypeVal
  · have he : rim ⁻¹' radialInterval v a b = ∅ := by
      apply eq_empty_iff_forall_notMem.2
      rintro u ⟨s, hs, hsb, he⟩
      have he' : (1 : ℝ) • (u : ℂ) = s • v := he
      have h1 := (radial_unique (by simp) hv zero_lt_one (lt_of_le_of_lt ha hs) he').1
      linarith
    rw [he]
    exact isOpen_empty

definition direction

TopologyByExample.WheelWithoutHub.direction

The unit direction of a wheel point.

noncomputable def direction (z : WheelWithoutHub) : Circle
Definition
:=
  ⟨‖val z‖⁻¹ • val z, by
    apply mem_sphere_zero_iff_norm.2
    rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (inv_nonneg.mpr (norm_nonneg _))]
    exact inv_mul_cancel₀ z.property.1.ne'⟩

theorem continuous_direction

TopologyByExample.WheelWithoutHub.continuous_direction

The direction map to the ordinary circle is continuous.

theorem continuous_direction : Continuous direction
Proof
:= by
  apply Continuous.subtype_mk
  exact (continuous_val.norm.inv₀ (fun z ↦ z.property.1.ne')).smul continuous_val

theorem radius_direction

TopologyByExample.WheelWithoutHub.radius_direction

A point is recovered from its radial coordinate and direction.

theorem radius_direction (z : WheelWithoutHub) :
    radius (direction z) ⟨‖val z‖, z.property⟩ = z
Proof
:= by
  apply val_injective
  change ‖val z‖ • (‖val z‖⁻¹ • val z) = val z
  rw [smul_smul, mul_inv_cancel₀ (show ‖val z‖ ≠ 0 from z.property.1.ne'), one_smul]

theorem joined_rim

TopologyByExample.WheelWithoutHub.joined_rim

Every wheel point can be joined to its point on the rim.

theorem joined_rim (z : WheelWithoutHub) : Joined z (rim (direction z))
Proof
:= by
  have hc : IsPathConnected (Ioc (0 : ℝ) 1) := (convex_Ioc 0 1).isPathConnected ⟨1, by norm_num⟩
  let : PathConnectedSpace (Ioc (0 : ℝ) 1) :=
    isPathConnected_iff_pathConnectedSpace.mp hc
  have hj := (PathConnectedSpace.joined
    ⟨‖val z‖, z.property⟩ (⟨1, by norm_num⟩ : Ioc (0 : ℝ) 1)).map
    (continuous_radius (direction z))
  simpa only [radius_direction, rim] using hj

instance

The wheel is path connected.

instance : PathPreconnectedSpace WheelWithoutHub
Proof
:= by
  refine ⟨fun x y ↦ ?_⟩
  have hxy := (PathConnectedSpace.joined (direction x) (direction y)).map continuous_rim
  exact (joined_rim x).trans (hxy.trans (joined_rim y).symm)

definition metricGraph

TopologyByExample.WheelWithoutHub.metricGraph

The closed equations for the proposed complete metric graph.

def metricGraph : Set (ℂ × RadialMetric)
:=
  {p | ‖p.1‖ * (‖RadialMetric.toRad.symm p.2‖ + 1) = 1 ∧
    ‖p.1‖ • RadialMetric.toRad.symm p.2 = ‖RadialMetric.toRad.symm p.2‖ • p.1}

theorem isClosed_metricGraph

TopologyByExample.WheelWithoutHub.isClosed_metricGraph

These graph equations cut out a closed subset of the complete product.

theorem isClosed_metricGraph : IsClosed metricGraph
Proof
:= by
  have hw : Continuous (fun p : ℂ × RadialMetric ↦ RadialMetric.toRad.symm p.2) :=
    RadialMetric.continuous_symm_toRad.comp continuous_snd
  exact (isClosed_eq (continuous_fst.norm.mul (hw.norm.add continuous_const))
    continuous_const).inter
      (isClosed_eq (continuous_fst.norm.smul hw) (hw.norm.smul continuous_fst))

definition graphProjection

TopologyByExample.WheelWithoutHub.graphProjection

Points on the graph project into the punctured closed disc.

def graphProjection (p : metricGraph) : WheelWithoutHub
Definition
:=
  ⟨p.val.1, by
    have he := p.property.1
    have hn := norm_nonneg (RadialMetric.toRad.symm p.val.2)
    have hz := norm_nonneg p.val.1
    constructor
    · by_contra h
      have h0 : ‖p.val.1‖ = 0 := le_antisymm (le_of_not_gt h) hz
      rw [h0, zero_mul] at he
      norm_num at he
    · nlinarith⟩

theorem graphProjection_injective

TopologyByExample.WheelWithoutHub.graphProjection_injective

The first coordinate determines a graph point.

theorem graphProjection_injective : Function.Injective graphProjection
Proof
:= by
  intro p q hpq
  have hz : p.val.1 = q.val.1 := congrArg val hpq
  have hpos : 0 < ‖p.val.1‖ := (graphProjection p).property.1
  have hnorm : ‖RadialMetric.toRad.symm p.val.2‖ = ‖RadialMetric.toRad.symm q.val.2‖ := by
    have hp := p.property.1
    have hq := q.property.1
    rw [← hz] at hq
    nlinarith
  apply Subtype.ext
  apply Prod.ext hz
  apply RadialMetric.toRad.symm.injective
  apply smul_right_injective ℂ hpos.ne'
  dsimp only
  calc
    ‖p.val.1‖ • RadialMetric.toRad.symm p.val.2 =
        ‖RadialMetric.toRad.symm p.val.2‖ • p.val.1 := p.property.2
    _ = ‖RadialMetric.toRad.symm q.val.2‖ • q.val.1 := by rw [hnorm, hz]
    _ = ‖q.val.1‖ • RadialMetric.toRad.symm q.val.2 := q.property.2.symm
    _ = ‖p.val.1‖ • RadialMetric.toRad.symm q.val.2 := by rw [hz]

theorem graphProjection_surjective

TopologyByExample.WheelWithoutHub.graphProjection_surjective

Every wheel point has a representative on the closed graph.

theorem graphProjection_surjective : Function.Surjective graphProjection
Proof
:= by
  intro z
  let r := ‖val z‖
  have hr : 0 < r := z.property.1
  have hr1 : r ≤ 1 := z.property.2
  let d := r⁻¹ - 1
  have hd : 0 ≤ d := by
    dsimp [d]
    have hi : 1 ≤ r⁻¹ := (one_le_inv₀ hr).2 hr1
    linarith
  let w : ℂ := d • (direction z : ℂ)
  have hn : ‖w‖ = d := by simp only [w, norm_smul, Real.norm_eq_abs, abs_of_nonneg hd,
    Circle.norm_coe, mul_one]
  have hgraph : (val z, RadialMetric.toRad w) ∈ metricGraph := by
    change r * (‖w‖ + 1) = 1 ∧ r • w = ‖w‖ • val z
    rw [hn]
    constructor
    · dsimp [d]
      rw [sub_add_cancel, mul_inv_cancel₀ hr.ne']
    · change r • (d • (r⁻¹ • val z)) = d • val z
      rw [smul_smul, smul_smul]
      congr 1
      field_simp
  refine ⟨⟨(val z, RadialMetric.toRad w), hgraph⟩, ?_⟩
  exact val_injective rfl

definition depth

TopologyByExample.WheelWithoutHub.depth

Radial depth for the complete metric graph, diverging at the missing hub.

noncomputable def depth (z : WheelWithoutHub) : ℝ
:= ‖val z‖⁻¹ - 1

theorem depth_nonneg

TopologyByExample.WheelWithoutHub.depth_nonneg

Depth is nonnegative on the closed disc.

theorem depth_nonneg (z : WheelWithoutHub) : 0 ≤ depth z
Proof
:=
  sub_nonneg.mpr ((one_le_inv₀ z.property.1).2 z.property.2)

theorem continuous_depth

TopologyByExample.WheelWithoutHub.continuous_depth

Depth is continuous in the wheel topology.

theorem continuous_depth : Continuous depth
Proof
:=
  (continuous_val.norm.inv₀ (fun z ↦ z.property.1.ne')).sub continuous_const

definition graphCoordinate

TopologyByExample.WheelWithoutHub.graphCoordinate

The second coordinate of the complete metric graph.

noncomputable def graphCoordinate (z : WheelWithoutHub) : RadialMetric
:=
  RadialMetric.toRad (depth z • (direction z : ℂ))

theorem graphCoordinate_dist_zero

TopologyByExample.WheelWithoutHub.graphCoordinate_dist_zero

Its distance to the radial origin is the depth.

theorem graphCoordinate_dist_zero (z : WheelWithoutHub) :
    dist (graphCoordinate z) (RadialMetric.toRad 0) = depth z
Proof
:= by
  rw [graphCoordinate, RadialMetric.dist_zero, norm_smul, Real.norm_eq_abs,
    abs_of_nonneg (depth_nonneg z), Circle.norm_coe, mul_one]

theorem direction_of_mem_radialInterval

TopologyByExample.WheelWithoutHub.direction_of_mem_radialInterval

Every point on an open spoke has its prescribed direction.

theorem direction_of_mem_radialInterval {z : WheelWithoutHub} {u : Circle}
    (hz : z ∈ radialInterval u 0 1) : direction z = u
Proof
:= by
  obtain ⟨r, hr, _, he⟩ := hz
  have hrec : ‖val z‖ • (direction z : ℂ) = val z := congrArg val (radius_direction z)
  exact Circle.ext (radial_unique (by simp) (by simp) z.property.1 hr (hrec.trans he)).2

theorem continuous_graphCoordinate

TopologyByExample.WheelWithoutHub.continuous_graphCoordinate

The complete metric graph coordinate is continuous.

theorem continuous_graphCoordinate : Continuous graphCoordinate
Proof
:= by
  rw [continuous_iff_continuousAt]
  intro z
  by_cases hz : ‖val z‖ = 1
  · have hzero : graphCoordinate z = RadialMetric.toRad 0 := by
      apply dist_eq_zero.mp
      rw [graphCoordinate_dist_zero]
      simp [depth, hz]
    change Filter.Tendsto graphCoordinate (nhds z) (nhds (graphCoordinate z))
    rw [hzero, tendsto_iff_dist_tendsto_zero]
    simp_rw [graphCoordinate_dist_zero]
    have h : Tendsto depth (nhds z) (nhds (depth z)) := continuous_depth.continuousAt
    have hd : depth z = 0 := by simp [depth, hz]
    rwa [hd] at h
  · have hlt : ‖val z‖ < 1 := lt_of_le_of_ne z.property.2 hz
    have hmem : z ∈ radialInterval (direction z) 0 1 :=
      ⟨‖val z‖, z.property.1, hlt, (congrArg val (radius_direction z)).symm⟩
    have he : ∀ᶠ w in nhds z, direction w = direction z :=
      Filter.Eventually.mono ((isOpen_radialInterval (by simp) le_rfl le_rfl).mem_nhds hmem)
        fun _ hw ↦ direction_of_mem_radialInterval hw
    have hc : Continuous (fun w : WheelWithoutHub ↦
        RadialMetric.toRad (depth w • (direction z : ℂ))) := by
      change Continuous ((fun t : ℝ ↦ RadialMetric.toRad (t * (direction z : ℂ))) ∘ depth)
      exact (RadialMetric.isometry_line (by simp)).continuous.comp continuous_depth
    apply hc.continuousAt.congr_of_eventuallyEq
    filter_upwards [he] with w hw
    simp only [graphCoordinate, hw]

theorem exists_smul_of_coll

TopologyByExample.WheelWithoutHub.exists_smul_of_coll

A vector collinear with a nonzero vector is a real multiple of it.

theorem exists_smul_of_coll {w u : ℂ} (hu : u ≠ 0) (h : RadialMetric.Coll w u) :
    ∃ r : ℝ, w = r • u
Proof
:= by
  have h' : w.re * u.im = w.im * u.re := h
  by_cases hre : u.re = 0
  · have him : u.im ≠ 0 := fun hi ↦ hu (Complex.ext hre hi)
    have hw : w.re = 0 := by rw [hre, mul_zero] at h'; exact (mul_eq_zero.mp h').resolve_right him
    refine ⟨w.im / u.im, ?_⟩
    apply Complex.ext <;> simp [hre, hw, him]
  · refine ⟨w.re / u.re, ?_⟩
    apply Complex.ext
    · simp [hre]
    · simp only [Complex.smul_im, smul_eq_mul]
      field_simp
      nlinarith [h']

theorem isOpen_radialMetric_ray

TopologyByExample.WheelWithoutHub.isOpen_radialMetric_ray

A positive ray excluding the origin is open in the radial metric topology.

theorem isOpen_radialMetric_ray {u : ℂ} (hu : ‖u‖ = 1) :
    IsOpen {w : RadialMetric | ∃ t : ℝ, 0 < t ∧ w = RadialMetric.toRad (t • u)}
Proof
:= by
  rw [Metric.isOpen_iff]
  rintro _ ⟨t, ht, rfl⟩
  refine ⟨t, ht, ?_⟩
  intro y hy
  let w := RadialMetric.toRad.symm y
  have hdist : RadialMetric.rdist w (t • u) < t := hy
  have hcoll : RadialMetric.Coll w (t • u) := by
    by_contra h
    rw [RadialMetric.rdist_of_not_coll h, norm_smul, Real.norm_eq_abs,
      abs_of_pos ht, hu, mul_one] at hdist
    linarith [norm_nonneg w]
  have hcolu : RadialMetric.Coll w u := by
    change w.re * (t • u).im = w.im * (t • u).re at hcoll
    simp only [Complex.smul_im, Complex.smul_re, smul_eq_mul] at hcoll
    change w.re * u.im = w.im * u.re
    nlinarith
  have hune : u ≠ 0 := fun h ↦ by simp [h] at hu
  obtain ⟨s, hs⟩ := exists_smul_of_coll hune hcolu
  have hys : y = RadialMetric.toRad (s • u) := by
    apply RadialMetric.toRad.symm.injective
    exact hs
  have hst : |s - t| < t := by
    have h := (RadialMetric.isometry_line hu).dist_eq s t
    rw [Real.dist_eq] at h
    change dist y (RadialMetric.toRad (t • u)) < t at hy
    rw [hys] at hy
    change dist (RadialMetric.toRad (s * u)) (RadialMetric.toRad (t * u)) < t at hy
    rwa [h] at hy
  refine ⟨s, ?_, hys⟩
  have := (abs_lt.mp hst).1
  linarith

theorem mem_metricGraph

TopologyByExample.WheelWithoutHub.mem_metricGraph

The wheel point and its radial graph coordinate satisfy the graph equations.

theorem mem_metricGraph (z : WheelWithoutHub) :
    (val z, graphCoordinate z) ∈ metricGraph
Proof
:= by
  have hn : ‖RadialMetric.toRad.symm (graphCoordinate z)‖ = depth z := by
    change ‖depth z • (direction z : ℂ)‖ = depth z
    rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (depth_nonneg z), Circle.norm_coe, mul_one]
  change ‖val z‖ * (‖RadialMetric.toRad.symm (graphCoordinate z)‖ + 1) = 1 ∧ _
  rw [hn]
  constructor
  · simp only [depth, sub_add_cancel]
    exact mul_inv_cancel₀ z.property.1.ne'
  · change ‖val z‖ • (depth z • (‖val z‖⁻¹ • val z)) = depth z • val z
    rw [smul_smul, smul_smul]
    congr 1
    field_simp [show ‖val z‖ ≠ 0 from z.property.1.ne']

definition graphLift

TopologyByExample.WheelWithoutHub.graphLift

The wheel maps to the closed graph.

noncomputable def graphLift (z : WheelWithoutHub) : metricGraph
:=
  ⟨(val z, graphCoordinate z), mem_metricGraph z⟩

theorem graphProjection_graphLift

TopologyByExample.WheelWithoutHub.graphProjection_graphLift

Projection undoes the graph map.

theorem graphProjection_graphLift (z : WheelWithoutHub) : graphProjection (graphLift z) = z
Proof
:=
  val_injective rfl

theorem graphLift_graphProjection

TopologyByExample.WheelWithoutHub.graphLift_graphProjection

The graph map undoes projection.

theorem graphLift_graphProjection (p : metricGraph) : graphLift (graphProjection p) = p
Proof
:=
  graphProjection_injective (graphProjection_graphLift _)

theorem continuous_graphLift

TopologyByExample.WheelWithoutHub.continuous_graphLift

The map from the wheel to its metric graph is continuous.

theorem continuous_graphLift : Continuous graphLift
Proof
:=
  (continuous_val.prodMk continuous_graphCoordinate).subtype_mk _

theorem exists_euclidean_nhds_of_rim

TopologyByExample.WheelWithoutHub.exists_euclidean_nhds_of_rim

At rim points, wheel neighborhoods contain Euclidean neighborhoods.

theorem exists_euclidean_nhds_of_rim {U : Set WheelWithoutHub} (hU : IsOpen U) :
    ∀ z, ‖val z‖ = 1 → z ∈ U →
      ∃ V : Set ℂ, IsOpen V ∧ val z ∈ V ∧ val ⁻¹' V ⊆ U
Proof
:= by
  change GenerateOpen _ U at hU
  induction hU with
  | basic U h =>
    intro z hz hzu
    rcases h with ⟨V, hV, rfl⟩ | ⟨u, a, b, hu, ha, hb, rfl⟩
    · exact ⟨V, hV, hzu, subset_rfl⟩
    · obtain ⟨r, hr, hrb, he⟩ := hzu
      have hrpos : 0 < r := lt_of_le_of_lt ha hr
      have hn := congrArg norm he
      rw [hz, norm_smul, Real.norm_eq_abs, abs_of_pos hrpos, hu, mul_one] at hn
      exfalso
      linarith
  | univ =>
    intro z _ _
    exact ⟨univ, isOpen_univ, mem_univ _, subset_univ _⟩
  | inter U V _ _ hU hV =>
    intro z hz h
    obtain ⟨A, hAo, hAz, hAU⟩ := hU z hz h.1
    obtain ⟨B, hBo, hBz, hBV⟩ := hV z hz h.2
    exact ⟨A ∩ B, hAo.inter hBo, ⟨hAz, hBz⟩,
      fun _ hx ↦ ⟨hAU hx.1, hBV hx.2⟩⟩
  | sUnion S _ hS =>
    intro z hz h
    obtain ⟨U, hUS, hzU⟩ := mem_sUnion.1 h
    obtain ⟨V, hVo, hzV, hVU⟩ := hS U hUS z hz hzU
    exact ⟨V, hVo, hzV, hVU.trans (subset_sUnion_of_mem hUS)⟩

theorem graphProjection_preimage_radial

TopologyByExample.WheelWithoutHub.graphProjection_preimage_radial

A radial interval pulls back to an open interval in radius and an open positive ray.

theorem graphProjection_preimage_radial {u : ℂ} {a b : ℝ} (hu : ‖u‖ = 1)
    (ha : 0 ≤ a) (hb : b ≤ 1) :
    graphProjection ⁻¹' radialInterval u a b =
      {p : metricGraph | ‖p.val.1‖ ∈ Ioo a b} ∩
      {p : metricGraph | ∃ t : ℝ, 0 < t ∧ p.val.2 = RadialMetric.toRad (t • u)}
Proof
:= by
  ext p
  let z := graphProjection p
  constructor
  · rintro ⟨r, har, hrb, hzr⟩
    have hr : 0 < r := lt_of_le_of_lt ha har
    have hz : ‖val z‖ = r := by
      change ‖val (graphProjection p)‖ = r
      rw [hzr, norm_smul, Real.norm_eq_abs, abs_of_pos hr, hu, mul_one]
    have hdir : (direction z : ℂ) = u := by
      have hrec := congrArg val (radius_direction z)
      exact (radial_unique (by simp) hu z.property.1 hr (hrec.trans hzr)).2
    have hd : 0 < depth z := by
      change 0 < ‖val z‖⁻¹ - 1
      rw [hz]
      have hi : 1 < r⁻¹ := (one_lt_inv₀ hr).2 (lt_of_lt_of_le hrb hb)
      linarith
    refine ⟨⟨hz.symm ▸ har, hz.symm ▸ hrb⟩, depth z, hd, ?_⟩
    have hp := congrArg (fun q : metricGraph ↦ q.val.2) (graphLift_graphProjection p)
    change graphCoordinate z = p.val.2 at hp
    rw [← hp]
    simp only [graphCoordinate, hdir]
  · rintro ⟨⟨har, hrb⟩, t, ht, hp⟩
    refine ⟨‖p.val.1‖, har, hrb, ?_⟩
    have hn : ‖RadialMetric.toRad.symm p.val.2‖ = t := by
      rw [hp]
      simp only [Equiv.symm_apply_apply, norm_smul, Real.norm_eq_abs, abs_of_pos ht, hu, mul_one]
    have he := p.property.2
    rw [hn, hp] at he
    change ‖p.val.1‖ • (t • u) = t • p.val.1 at he
    apply (smul_right_injective ℂ ht.ne')
    change t • p.val.1 = t • (‖p.val.1‖ • u)
    rw [← he, smul_comm]

theorem continuous_graphProjection

TopologyByExample.WheelWithoutHub.continuous_graphProjection

The graph projection is continuous for the defining wheel topology.

theorem continuous_graphProjection : Continuous graphProjection
Proof
:= by
  apply continuous_generateFrom_iff.2
  rintro U (⟨V, hV, rfl⟩ | ⟨u, a, b, hu, ha, hb, rfl⟩)
  · exact hV.preimage (continuous_fst.comp continuous_subtypeVal)
  · rw [graphProjection_preimage_radial hu ha hb]
    exact (isOpen_Ioo.preimage (continuous_fst.comp continuous_subtypeVal).norm).inter
      ((isOpen_radialMetric_ray hu).preimage (continuous_snd.comp continuous_subtypeVal))

definition graphHomeomorph

TopologyByExample.WheelWithoutHub.graphHomeomorph

The defining wheel topology is the topology of the closed metric graph.

noncomputable def graphHomeomorph : WheelWithoutHub ≃ₜ metricGraph
Definition
where
  toFun := graphLift
  invFun := graphProjection
  left_inv := graphProjection_graphLift
  right_inv := graphLift_graphProjection
  continuous_toFun := continuous_graphLift
  continuous_invFun := continuous_graphProjection

instance

The wheel admits a complete compatible metric.

instance : IsCompletelyMetrizableSpace WheelWithoutHub
Proof
:= by
  let : IsCompletelyMetrizableSpace metricGraph := isClosed_metricGraph.isCompletelyMetrizableSpace
  exact graphHomeomorph.isClosedEmbedding.IsCompletelyMetrizableSpace

theorem isDiscrete_level

TopologyByExample.WheelWithoutHub.isDiscrete_level

Every circle strictly inside the rim is closed and discrete.

theorem isDiscrete_level {r : ℝ} (hr : 0 < r) (hr1 : r < 1) :
    IsDiscrete {z : WheelWithoutHub | ‖val z‖ = r}
Proof
:= by
  rw [isDiscrete_iff_forall_mem_exists_isOpen]
  intro z hz
  change ‖val z‖ = r at hz
  refine ⟨radialInterval (direction z) 0 1,
    isOpen_radialInterval (by simp) le_rfl le_rfl, ?_⟩
  ext w
  constructor
  · rintro ⟨hw, hwr⟩
    have hd := direction_of_mem_radialInterval hw
    apply mem_singleton_iff.2
    apply val_injective
    have hwrec := congrArg val (radius_direction w)
    have hzrec := congrArg val (radius_direction z)
    change ‖val w‖ • (direction w : ℂ) = val w at hwrec
    change ‖val z‖ • (direction z : ℂ) = val z at hzrec
    change ‖val w‖ = r at hwr
    rw [← hwrec, ← hzrec, hwr, hz, hd]
  · rintro rfl
    refine ⟨⟨r, hr, hr1, ?_⟩, hz⟩
    have he := congrArg val (radius_direction w)
    change ‖val w‖ • (direction w : ℂ) = val w at he
    rw [hz] at he
    exact he.symm

theorem circle_open_infinite

TopologyByExample.WheelWithoutHub.circle_open_infinite

Every nonempty open subset of the ordinary circle is infinite.

theorem circle_open_infinite {V : Set Circle} (hV : IsOpen V) (hne : V.Nonempty) :
    V.Infinite
Proof
:= by
  intro hf
  obtain ⟨u, hu⟩ := hne
  have hopen : IsOpen ({u} : Set Circle) :=
    isOpen_singleton_of_finite_mem_nhds u (hV.mem_nhds hu) hf
  have he : ({u} : Set Circle) = Set.univ :=
    (IsClopen.eq_univ ⟨isClosed_singleton, hopen⟩ (singleton_nonempty u))
  have hall : ∀ v : Circle, v = u := fun v ↦ mem_singleton_iff.mp (he.symm ▸ mem_univ v)
  exact TopologyByExample.Circle.one_ne_neg_one ((hall 1).trans (hall (-1)).symm)

theorem not_weaklyLocallyCompactSpace

TopologyByExample.WheelWithoutHub.not_weaklyLocallyCompactSpace

No compact neighbourhood exists at the rim point in direction one.

theorem not_weaklyLocallyCompactSpace : ¬ WeaklyLocallyCompactSpace WheelWithoutHub
Proof
:= by
  intro h
  obtain ⟨K, hK, hKz⟩ := h.exists_compact_mem_nhds (rim 1)
  obtain ⟨U, hUK, hU, hzU⟩ := mem_nhds_iff.mp hKz
  obtain ⟨V, hV, hzV, hVU⟩ :=
    exists_euclidean_nhds_of_rim hU (rim 1) (by simp [rim, radius, val]) hzU
  obtain ⟨ε, hε, hεV⟩ := Metric.isOpen_iff.mp hV (val (rim 1)) hzV
  let d : ℝ := min (ε / 2) (1 / 2)
  have hd : 0 < d := lt_min (by positivity) (by norm_num)
  have hdε : d ≤ ε / 2 := min_le_left _ _
  have hd1 : d ≤ 1 / 2 := min_le_right _ _
  let r := 1 - d
  have hr : 0 < r := by dsimp [r]; linarith
  have hr1 : r < 1 := by dsimp [r]; linarith
  have hrV : (r : ℂ) ∈ V := by
    apply hεV
    change dist (r : ℂ) (val (rim 1)) < ε
    have hone : val (rim 1) = 1 := by simp [rim, radius, val]
    rw [hone, Complex.dist_eq]
    have hn : ‖(r : ℂ) - 1‖ = d := by
      rw [← Complex.ofReal_one, ← Complex.ofReal_sub, Complex.norm_real, Real.norm_eq_abs]
      dsimp [r]
      rw [sub_sub_cancel_left, abs_neg, abs_of_pos hd]
    rw [hn]
    linarith
  let A : Set Circle := {u | r • (u : ℂ) ∈ V}
  have hAo : IsOpen A := by
    change IsOpen ((fun u : Circle ↦ r • (u : ℂ)) ⁻¹' V)
    exact hV.preimage ((continuous_const : Continuous (fun _ : Circle ↦ r)).smul
      (continuous_subtypeVal : Continuous (fun u : Circle ↦ (u : ℂ))))
  have hAne : A.Nonempty := ⟨1, by simpa [A] using hrV⟩
  have hAi := circle_open_infinite hAo hAne
  let S : Set WheelWithoutHub := {z | ‖val z‖ = r}
  have hSc : IsClosed S := isClosed_eq continuous_val.norm continuous_const
  have hSf : (K ∩ S).Finite :=
    (hK.inter_right hSc).finite ((isDiscrete_level hr hr1).mono inter_subset_right)
  let f : Circle → WheelWithoutHub := fun u ↦ radius u ⟨r, hr, hr1.le⟩
  have hf : Function.Injective f := by
    intro u v huv
    apply Circle.ext
    have he := congrArg val huv
    exact smul_right_injective ℂ hr.ne' he
  apply hAi
  apply Set.Finite.of_finite_image (f := f) _ hf.injOn
  apply hSf.subset
  rintro _ ⟨u, hu, rfl⟩
  refine ⟨hUK (hVU hu), ?_⟩
  change ‖r • (u : ℂ)‖ = r
  rw [norm_smul, Real.norm_eq_abs, abs_of_pos hr, Circle.norm_coe, mul_one]

On this site: The wheel without its hub is not weakly locally compact

definition collar

TopologyByExample.WheelWithoutHub.collar

A collar above radial level a over a subset of the rim.

def collar (a : ℝ) (V : Set Circle) : Set WheelWithoutHub
:=
  {z | a < ‖val z‖ ∧ direction z ∈ V}

theorem isOpen_collar

TopologyByExample.WheelWithoutHub.isOpen_collar

Collars over open rim sets are open.

theorem isOpen_collar {a : ℝ} {V : Set Circle} (hV : IsOpen V) : IsOpen (collar a V)
Proof
:=
  (isOpen_lt continuous_const continuous_val.norm).inter (hV.preimage continuous_direction)

definition radiusTail

TopologyByExample.WheelWithoutHub.radiusTail

The high part of a radius is continuously parametrised by a real interval.

noncomputable def radiusTail (u : Circle) (a : ℝ) (ha : 0 ≤ a) (r : Ioc a 1) :
    WheelWithoutHub
:= radius u ⟨r, lt_of_le_of_lt ha r.property.1, r.property.2⟩

theorem continuous_radiusTail

TopologyByExample.WheelWithoutHub.continuous_radiusTail

Continuity of the high-radius parametrisation.

theorem continuous_radiusTail (u : Circle) (a : ℝ) (ha : 0 ≤ a) :
    Continuous (radiusTail u a ha)
Proof
:=
  (continuous_radius u).comp (continuous_subtypeVal.subtype_mk _)

theorem direction_radius

TopologyByExample.WheelWithoutHub.direction_radius

A radial point has its specified direction.

theorem direction_radius (u : Circle) (r : Ioc (0 : ℝ) 1) : direction (radius u r) = u
Proof
:= by
  apply Circle.ext
  have he := congrArg val (radius_direction (radius u r))
  have hn : ‖val (radius u r)‖ = (r : ℝ) := by
    change ‖(r : ℝ) • (u : ℂ)‖ = (r : ℝ)
    rw [norm_smul, Real.norm_eq_abs, abs_of_pos r.property.1, Circle.norm_coe, mul_one]
  change ‖val (radius u r)‖ • (direction (radius u r) : ℂ) = (r : ℝ) • (u : ℂ) at he
  rw [hn] at he
  exact smul_right_injective ℂ r.property.1.ne' he

theorem joinedIn_collar_rim

TopologyByExample.WheelWithoutHub.joinedIn_collar_rim

A collar point joins its rim point within the collar.

theorem joinedIn_collar_rim {a : ℝ} (ha : 0 ≤ a) {V : Set Circle}
    {z : WheelWithoutHub} (hz : z ∈ collar a V) : JoinedIn (collar a V) z (rim (direction z))
Proof
:= by
  have ha1 : a < 1 := lt_of_lt_of_le hz.1 z.property.2
  have hc := (convex_Ioc a 1).isPathConnected (show (Ioc a (1 : ℝ)).Nonempty from ⟨1, ha1, le_rfl⟩)
  let : PathConnectedSpace (Ioc a (1 : ℝ)) := isPathConnected_iff_pathConnectedSpace.mp hc
  let p : Ioc a (1 : ℝ) := ⟨‖val z‖, hz.1, z.property.2⟩
  let q : Ioc a (1 : ℝ) := ⟨1, ha1, le_rfl⟩
  have hj := (joinedIn_univ.mpr (PathConnectedSpace.joined p q)).map
    (continuous_radiusTail (direction z) a ha).continuousOn
  have hsub : radiusTail (direction z) a ha '' Set.univ ⊆ collar a V := by
    rintro _ ⟨r, _, rfl⟩
    constructor
    · change a < ‖(r : ℝ) • (direction z : ℂ)‖
      simpa only [norm_smul, Real.norm_eq_abs, abs_of_pos (lt_of_le_of_lt ha r.property.1),
        Circle.norm_coe, mul_one] using r.property.1
    · change direction (radius (direction z) _) ∈ V
      rw [direction_radius]
      exact hz.2
  have h := hj.mono hsub
  simpa only [radiusTail, p, q, radius_direction, rim] using h

theorem isPathConnected_collar

TopologyByExample.WheelWithoutHub.isPathConnected_collar

Collars over path-connected rim sets are path connected.

theorem isPathConnected_collar {a : ℝ} (ha : 0 ≤ a) (ha1 : a < 1)
    {V : Set Circle} (hV : IsPathConnected V) : IsPathConnected (collar a V)
Proof
:= by
  obtain ⟨u, hu⟩ := hV.nonempty
  have hrim : ∀ v ∈ V, rim v ∈ collar a V := by
    intro v hv
    constructor
    · simpa [rim, radius, val] using ha1
    · change direction (radius v _) ∈ V
      rw [direction_radius]
      exact hv
  refine ⟨rim u, hrim u hu, fun z hz ↦ ?_⟩
  have hj := (hV.joinedIn u hu (direction z) hz.2).map continuous_rim.continuousOn
  have hj' := hj.mono (show rim '' V ⊆ collar a V from by
    rintro _ ⟨v, hv, rfl⟩; exact hrim v hv)
  exact hj'.trans (joinedIn_collar_rim ha hz).symm

definition radiusOpen

TopologyByExample.WheelWithoutHub.radiusOpen

The open interior of a radius.

noncomputable def radiusOpen (u : Circle) (r : Ioo (0 : ℝ) 1) : WheelWithoutHub
:=
  radius u ⟨r, r.property.1, r.property.2.le⟩

theorem continuous_radiusOpen

TopologyByExample.WheelWithoutHub.continuous_radiusOpen

The open-radius parametrisation is continuous.

theorem continuous_radiusOpen (u : Circle) : Continuous (radiusOpen u)
Proof
:=
  (continuous_radius u).comp (continuous_subtypeVal.subtype_mk _)

theorem isOpenMap_radiusOpen

TopologyByExample.WheelWithoutHub.isOpenMap_radiusOpen

Open subsets of an open radius are open in the wheel.

theorem isOpenMap_radiusOpen (u : Circle) : IsOpenMap (radiusOpen u)
Proof
:= by
  intro W hW
  let A : Set ℝ := Subtype.val '' W
  have hA : IsOpen A := isOpen_Ioo.isOpenEmbedding_subtypeVal.isOpenMap W hW
  have he : radiusOpen u '' W = radialInterval u 0 1 ∩ (fun z ↦ ‖val z‖) ⁻¹' A := by
    ext z
    constructor
    · rintro ⟨r, hr, rfl⟩
      refine ⟨⟨r, r.property.1, r.property.2, rfl⟩, ?_⟩
      have hn : ‖val (radiusOpen u r)‖ = (r : ℝ) := by
        change ‖(r : ℝ) • (u : ℂ)‖ = (r : ℝ)
        rw [norm_smul, Real.norm_eq_abs, abs_of_pos r.property.1, Circle.norm_coe, mul_one]
      change ‖val (radiusOpen u r)‖ ∈ A
      rw [hn]
      exact mem_image_of_mem _ hr
    · rintro ⟨⟨r, hr, hr1, he⟩, ⟨s, hs, hsz⟩⟩
      refine ⟨s, hs, ?_⟩
      apply val_injective
      have hn : ‖val z‖ = r := by
        rw [he, norm_smul, Real.norm_eq_abs, abs_of_pos hr, Circle.norm_coe, mul_one]
      change (s : ℝ) • (u : ℂ) = val z
      change (s : ℝ) = ‖val z‖ at hsz
      rw [hsz, hn, he]
  rw [he]
  exact (isOpen_radialInterval (by simp) le_rfl le_rfl).inter (hA.preimage continuous_val.norm)

theorem exists_pathConnected_nhds_interior

TopologyByExample.WheelWithoutHub.exists_pathConnected_nhds_interior

Interior points have arbitrarily small open path-connected radial neighborhoods.

theorem exists_pathConnected_nhds_interior {z : WheelWithoutHub} (hz : ‖val z‖ < 1)
    {U : Set WheelWithoutHub} (hU : IsOpen U) (hzU : z ∈ U) :
    ∃ W : Set WheelWithoutHub, IsOpen W ∧ z ∈ W ∧ IsPathConnected W ∧ W ⊆ U
Proof
:= by
  let r : Ioo (0 : ℝ) 1 := ⟨‖val z‖, z.property.1, hz⟩
  have he : radiusOpen (direction z) r = z := radius_direction z
  let : LocallyPathConnectedSpace (Ioo (0 : ℝ) 1) :=
    (convex_Ioo (0 : ℝ) 1).locallyPathConnectedSpace
  obtain ⟨W, ⟨hWo, hrW, hWp⟩, hWU⟩ := (isOpen_isPathConnected_basis r).mem_iff.mp
    (((hU.preimage (continuous_radiusOpen (direction z))).mem_nhds (by
      change radiusOpen (direction z) r ∈ U
      rw [he]
      exact hzU)))
  refine ⟨radiusOpen (direction z) '' W, isOpenMap_radiusOpen _ W hWo,
    ⟨r, hrW, he⟩, hWp.image (continuous_radiusOpen _),
    image_subset_iff.mpr hWU⟩

theorem exists_pathConnected_nhds_rim

TopologyByExample.WheelWithoutHub.exists_pathConnected_nhds_rim

Rim points have arbitrarily small open path-connected collars.

theorem exists_pathConnected_nhds_rim {z : WheelWithoutHub} (hz : ‖val z‖ = 1)
    {U : Set WheelWithoutHub} (hU : IsOpen U) (hzU : z ∈ U) :
    ∃ W : Set WheelWithoutHub, IsOpen W ∧ z ∈ W ∧ IsPathConnected W ∧ W ⊆ U
Proof
:= by
  obtain ⟨O, hO, hzO, hOU⟩ := exists_euclidean_nhds_of_rim hU z hz hzU
  obtain ⟨ε, hε, hεO⟩ := Metric.isOpen_iff.mp hO (val z) hzO
  let : LocallyPathConnectedSpace Circle := TopologyByExample.Circle.locallyPathConnectedSpace
  obtain ⟨V, ⟨hVo, hzV, hVp⟩, hVB⟩ := (isOpen_isPathConnected_basis (direction z)).mem_iff.mp
    (Metric.ball_mem_nhds (direction z) (by positivity : (0 : ℝ) < ε / 2))
  let a : ℝ := max 0 (1 - ε / 2)
  have ha : 0 ≤ a := le_max_left _ _
  have ha1 : a < 1 := max_lt_iff.mpr ⟨by norm_num, by linarith⟩
  have haε : 1 - ε / 2 ≤ a := le_max_right _ _
  refine ⟨collar a V, isOpen_collar hVo, ⟨by rw [hz]; exact ha1, hzV⟩,
    isPathConnected_collar ha ha1 hVp, ?_⟩
  intro w hw
  apply hOU
  apply hεO
  have hwε : 1 - ‖val w‖ < ε / 2 := by linarith [hw.1]
  have hd : dist (direction w : ℂ) (direction z : ℂ) < ε / 2 := hVB hw.2
  have hzw : val z = (direction z : ℂ) := by
    have he := congrArg val (radius_direction z)
    change ‖val z‖ • (direction z : ℂ) = val z at he
    simpa only [hz, one_smul] using he.symm
  have hwd : dist (val w) (direction w : ℂ) = 1 - ‖val w‖ := by
    rw [dist_eq_norm]
    have he := congrArg val (radius_direction w)
    change ‖val w‖ • (direction w : ℂ) = val w at he
    have hsub : val w - (direction w : ℂ) = (‖val w‖ - 1) • (direction w : ℂ) := by
      rw [sub_smul, one_smul, he]
    rw [hsub, norm_smul, Real.norm_eq_abs, Circle.norm_coe, mul_one,
      abs_of_nonpos (sub_nonpos.mpr (show ‖val w‖ ≤ 1 from w.property.2))]
    ring
  change dist (val w) (val z) < ε
  rw [hzw]
  have ht := dist_triangle (val w) (direction w : ℂ) (direction z : ℂ)
  rw [hwd] at ht
  linarith

instance

The wheel is locally path connected, using radial intervals inside and collars at the rim.

instance : LocallyPathConnectedSpace WheelWithoutHub
Proof
:= by
  constructor
  intro z
  rw [hasBasis_self]
  intro U hU
  obtain ⟨O, hOU, hO, hzO⟩ := mem_nhds_iff.mp hU
  have hex : ∃ W : Set WheelWithoutHub, IsOpen W ∧ z ∈ W ∧ IsPathConnected W ∧ W ⊆ O := by
    by_cases hz : ‖val z‖ = 1
    · exact exists_pathConnected_nhds_rim hz hO hzO
    · exact exists_pathConnected_nhds_interior (lt_of_le_of_ne z.property.2 hz) hO hzO
  obtain ⟨W, hWo, hzW, hWp, hWO⟩ := hex
  exact ⟨W, hWo.mem_nhds hzW, hWp, hWO.trans hOU⟩