Lean library · module TopologyByExample.Theorems.DeletedDiscArcs

Local arcs in the deleted diameter and deleted radius topologies

Source file

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

Imports

theorem convex_disc

TopologyByExample.DeletedDiscPlane.convex_disc

private theorem convex_disc (p : ℝ × ℝ) (r : ℝ) : Convex ℝ (disc p r)
Proof
:= by
  intro x hx y hy a b ha hb hab
  obtain rfl : a = 1 - b := by linarith
  change (x.1 - p.1) ^ 2 + (x.2 - p.2) ^ 2 < r ^ 2 at hx
  change (y.1 - p.1) ^ 2 + (y.2 - p.2) ^ 2 < r ^ 2 at hy
  change ((1 - b) * x.1 + b * y.1 - p.1) ^ 2 + ((1 - b) * x.2 + b * y.2 - p.2) ^ 2 < r ^ 2
  rcases ha.eq_or_lt with h | h
  · have : b = 1 := by linarith
    simpa [this] using hy
  nlinarith [mul_pos h (sub_pos.mpr hx), mul_nonneg hb (sub_nonneg.mpr hy.le),
    mul_nonneg (mul_nonneg ha hb) (sq_nonneg (x.1 - y.1)),
    mul_nonneg (mul_nonneg ha hb) (sq_nonneg (x.2 - y.2))]
variable {S : Set ℝ} (hS0 : (0 : ℝ) ∉ S)
  (hS : ∀ a b : ℝ, a ∉ S → b ∉ S → a + b ∉ S)
include hS0 hS

theorem arcConnectedSpace_nbhd

TopologyByExample.DeletedDiscPlane.arcConnectedSpace_nbhd

A basic deleted disc of positive radius is arc connected.

theorem arcConnectedSpace_nbhd (p : ℝ × ℝ) {r : ℝ} (hr : 0 < r) :
    ArcConnectedSpace (ofPlane '' nbhd S p r : Set (DeletedDiscPlane S))
Proof
:= by
  let F : Set (DeletedDiscPlane S) := ofPlane '' nbhd S p r
  let liftPoint (x : ℝ × ℝ) (hx : x ∈ nbhd S p r) : F := ⟨ofPlane x, x, hx, rfl⟩
  have join (x y : ℝ × ℝ) (hx : x ∈ nbhd S p r) (hy : y ∈ nbhd S p r)
      (hx₂ : x.2 = p.2) (hy₂ : y.2 ≠ p.2) : ArcJoined (liftPoint x hx) (liftPoint y hy) := by
    have hd : y.2 - x.2 ≠ 0 := sub_ne_zero.mpr (hx₂ ▸ hy₂)
    let f := line (S := S) x (y - x)
    have hf : Continuous f := continuous_line hS0 hS x hd
    have hm (t : unitInterval) : f t ∈ F := by
      refine ⟨x + (t : ℝ) • (y - x), ⟨?_, ?_⟩, rfl⟩
      · apply (convex_disc p r).segment_subset hx.1 hy.1
        rw [segment_eq_image']
        exact ⟨t, t.property, rfl⟩
      · rintro ⟨he, hdel⟩
        change x.2 + (t : ℝ) * (y.2 - x.2) = p.2 at he
        have ht : (t : ℝ) = 0 := (mul_eq_zero.mp (by linarith only [he, hx₂])).resolve_right hd
        exact hx.2 ⟨hx₂, by simpa [ht] using hdel⟩
    let γ : Path (liftPoint x hx) (liftPoint y hy) :=
      { toFun := fun t ↦ ⟨f t, hm t⟩
        continuous_toFun := (hf.comp continuous_subtypeVal).subtype_mk _
        source' := Subtype.ext (by simp [f, line, liftPoint])
        target' := Subtype.ext (by simp [f, line, liftPoint]) }
    intro _
    refine ⟨γ, fun s t hst ↦ Subtype.ext ?_⟩
    have he := congrArg (fun w : F ↦ (toPlane w.val).2) hst
    change x.2 + (s : ℝ) * (y.2 - x.2) = x.2 + (t : ℝ) * (y.2 - x.2) at he
    exact (mul_right_cancel₀ hd) (add_left_cancel he)
  have hp := mem_nbhd_self hS0 p hr
  let w : ℝ × ℝ := (p.1, p.2 + r / 2)
  have hw₂ : w.2 ≠ p.2 := by dsimp [w]; linarith
  have hw : w ∈ nbhd S p r := by
    refine ⟨?_, notMem_deleted_of_ne hw₂⟩
    change (p.1 - p.1) ^ 2 + (p.2 + r / 2 - p.2) ^ 2 < r ^ 2
    nlinarith [sq_pos_of_pos hr]
  have hub (z : F) : ArcJoined (liftPoint p hp) z := by
    obtain ⟨_, q, hq, rfl⟩ := z
    by_cases hq₂ : q.2 = p.2
    · exact (join p w hp hw rfl hw₂).trans (join q w hq hw hq₂ hw₂).symm
    · exact join p q hp hq rfl hq₂
  exact ⟨fun x y ↦ (hub x).symm.trans (hub y)⟩

theorem locallyArcConnectedSpace

TopologyByExample.DeletedDiscPlane.locallyArcConnectedSpace

Basic deleted discs supply a neighbourhood basis of arc-connected open sets.

theorem locallyArcConnectedSpace : LocallyArcConnectedSpace (DeletedDiscPlane S)
Proof
:= by
  refine ⟨fun x U hU hx ↦ ?_⟩
  obtain ⟨r, hr, hrU⟩ := (hasBasis_nhds hS0 hS x).mem_iff.mp (hU.mem_nhds hx)
  exact ⟨_, isOpen_nbhd hS _ r, ⟨toPlane x, mem_nbhd_self hS0 _ hr, rfl⟩, hrU,
    arcConnectedSpace_nbhd hS0 hS _ hr⟩

theorem locallyArcConnectedSpace

TopologyByExample.DeletedRadius.locallyArcConnectedSpace

The deleted radius topology is locally arc connected.

theorem DeletedRadius.locallyArcConnectedSpace : LocallyArcConnectedSpace DeletedRadius
Proof
:=
  DeletedDiscPlane.locallyArcConnectedSpace zero_notMem add_notMem

On this site: Deleted radius topology is locally arc connected

theorem locallyArcConnectedSpace

TopologyByExample.DeletedDiameter.locallyArcConnectedSpace

The deleted diameter topology is locally arc connected.

theorem DeletedDiameter.locallyArcConnectedSpace : LocallyArcConnectedSpace DeletedDiameter
Proof
:=
  DeletedDiscPlane.locallyArcConnectedSpace zero_notMem add_notMem

On this site: Deleted diameter topology is locally arc connected