Lean library · module TopologyByExample.Theorems.ArcJoining

Joining arcs in Hausdorff spaces

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
variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]

definition ArcJoined

TopologyByExample.ArcJoined

Two points coincide or there is an injective path between them.

def ArcJoined (x y : X) : Prop
:= x ≠ y → ∃ p : Path x y, Function.Injective p

theorem map

TopologyByExample.ArcJoined.map

Continuous injections preserve joining by arcs.

theorem ArcJoined.map {x y : X} (h : ArcJoined x y) {f : X → Y} (hf : Continuous f)
    (hi : Function.Injective f) : ArcJoined (f x) (f y)
Proof
:= by
  intro hne
  obtain ⟨p, hp⟩ := h (fun e ↦ hne (congrArg f e))
  exact ⟨p.map hf, hi.comp hp⟩

theorem symm

TopologyByExample.ArcJoined.symm

Joining by arcs is symmetric.

theorem ArcJoined.symm {x y : X} (h : ArcJoined x y) : ArcJoined y x
Proof
:= by
  intro hne
  obtain ⟨p, hp⟩ := h (Ne.symm hne)
  exact ⟨p.symm, hp.comp unitInterval.symm_bijective.injective⟩

theorem injective_subpath

TopologyByExample.injective_subpath

private theorem injective_subpath {x y : X} (p : Path x y) (hp : Function.Injective p)
    {a b : unitInterval} (hab : a ≠ b) : Function.Injective (p.subpath a b)
Proof
:= by
  apply hp.comp
  intro s t he
  have h := congrArg Subtype.val he
  change (1 - (s : ℝ)) * a + s * b = (1 - (t : ℝ)) * a + t * b at h
  have h₀ : ((s : ℝ) - t) * ((b : ℝ) - a) = 0 := by linarith only [h]
  exact Subtype.ext (sub_eq_zero.mp ((mul_eq_zero.mp h₀).resolve_right
    (sub_ne_zero.mpr (fun hh ↦ hab (Subtype.ext hh.symm)))))

theorem trans

TopologyByExample.ArcJoined.trans

Joining by arcs is transitive in a Hausdorff space.

theorem ArcJoined.trans [T2Space X] {x y z : X} (hxy : ArcJoined x y) (hyz : ArcJoined y z) :
    ArcJoined x z
Proof
:= by
  by_cases he : x = y
  · simpa only [he] using hyz
  by_cases he' : y = z
  · simpa only [← he'] using hxy
  obtain ⟨p, hp⟩ := hxy he
  obtain ⟨q, hq⟩ := hyz he'
  let F := p ⁻¹' range q
  have hclosed : IsClosed F := (isCompact_range q.continuous).isClosed.preimage p.continuous
  have hne : F.Nonempty := ⟨1, 0, q.source.trans p.target.symm⟩
  obtain ⟨a, ha⟩ := hclosed.isCompact.exists_isLeast hne
  obtain ⟨b, hb⟩ := ha.1
  intro hxz
  by_cases ha₀ : a = 0
  · subst a
    have hb₁ : b ≠ 1 := fun hh ↦ hxz (p.source.symm.trans (hb.symm.trans (hh ▸ q.target)))
    exact ⟨(q.subpath b 1).cast (p.source.symm.trans hb.symm) q.target.symm,
      injective_subpath q hq hb₁⟩
  by_cases hb₁ : b = 1
  · subst b
    exact ⟨(p.subpath 0 a).cast p.source.symm (q.target.symm.trans hb),
      injective_subpath p hp (Ne.symm ha₀)⟩
  let r := (p.subpath 0 a).cast p.source.symm rfl
  let s := (q.subpath b 1).cast hb.symm q.target.symm
  have hr : Function.Injective r := injective_subpath p hp (Ne.symm ha₀)
  have hs : Function.Injective s := injective_subpath q hq hb₁
  refine ⟨r.trans s, injective_path_trans r s hr hs ?_⟩
  intro i j hij
  let u := Icc.convexComb 0 a i
  let v := Icc.convexComb b 1 j
  have huv : p u = q v := hij
  have huF : u ∈ F := ⟨v, huv.symm⟩
  have hua : u = a := le_antisymm (Icc.convexComb_le (bot_le : 0 ≤ a) i) (ha.2 huF)
  have hir : r i = p a := congrArg p hua
  exact ⟨hr (hir.trans r.target.symm), hs (hij.symm.trans (hir.trans s.source.symm))⟩

On this site: Theorem: Joining arcs in Hausdorff spaces

theorem isOpen_arcJoined

TopologyByExample.isOpen_arcJoined

The points joined to a given point by arcs form an open set in a locally arc-connected Hausdorff space.

theorem isOpen_arcJoined [T2Space X] [LocallyArcConnectedSpace X] (x : X) :
    IsOpen {y | ArcJoined x y}
Proof
:= by
  rw [isOpen_iff_mem_nhds]
  intro y hy
  obtain ⟨U, hU, hyU, -, hA⟩ := LocallyArcConnectedSpace.exists_open y univ isOpen_univ trivial
  apply Filter.mem_of_superset (hU.mem_nhds hyU)
  intro z hz
  have harc : ArcJoined (⟨y, hyU⟩ : U) ⟨z, hz⟩ := hA.exists_injective_path _ _
  exact ArcJoined.trans hy (harc.map continuous_subtypeVal Subtype.val_injective)

theorem arcConnectedSpace_of_preconnected_locallyArcConnected

TopologyByExample.arcConnectedSpace_of_preconnected_locallyArcConnected

A connected locally arc-connected Hausdorff space is arc connected.

theorem arcConnectedSpace_of_preconnected_locallyArcConnected [T2Space X] [PreconnectedSpace X]
    [LocallyArcConnectedSpace X] : ArcConnectedSpace X
Proof
:= by
  refine ⟨fun x y ↦ ?_⟩
  let s := {z | ArcJoined x z}
  have hs : IsOpen s := isOpen_arcJoined x
  have hsc : IsOpen sᶜ := by
    rw [isOpen_iff_mem_nhds]
    intro z hz
    have hzz : ArcJoined z z := fun hn ↦ (hn rfl).elim
    apply Filter.mem_of_superset ((isOpen_arcJoined z).mem_nhds hzz)
    intro w hw hxw
    exact hz (ArcJoined.trans hxw (ArcJoined.symm hw))
  have hcl := preconnectedSpace_iff_clopen.mp (inferInstance : PreconnectedSpace X) s
    ⟨isOpen_compl_iff.mp hsc, hs⟩
  rcases hcl with h | h
  · have hx : x ∈ s := fun hn ↦ (hn rfl).elim
    simp [h] at hx
  · exact (show y ∈ s by rw [h]; trivial)

On this site: Theorem: Connected locally arc connected Hausdorff spaces are arc connected

variable {E : Type*} [AddCommGroup E] [Module ℝ E] [TopologicalSpace E]
  [ContinuousAdd E] [ContinuousSMul ℝ E]

theorem arcJoined_of_segment_subset

TopologyByExample.arcJoined_of_segment_subset

A segment contained in a subspace joins its endpoints by an arc.

theorem arcJoined_of_segment_subset {s : Set E} {x y : s}
    (h : segment ℝ (x : E) (y : E) ⊆ s) : ArcJoined x y
Proof
:= by
  let p := Path.segment (x : E) (y : E)
  have hp (t) : p t ∈ s := h (by rw [← Path.range_segment]; exact mem_range_self t)
  let q : Path x y :=
    { toFun := fun t ↦ ⟨p t, hp t⟩
      continuous_toFun := p.continuous.subtype_mk hp
      source' := Subtype.ext p.source
      target' := Subtype.ext p.target }
  intro hxy
  have hne : (x : E) ≠ (y : E) := fun e ↦ hxy (Subtype.ext e)
  exact ⟨q, fun _ _ he ↦ Path.segment_injective_of_ne hne (congrArg Subtype.val he)⟩

theorem arcConnectedSpace_of_starConvex

TopologyByExample.arcConnectedSpace_of_starConvex

Every star-convex subset of a Hausdorff real topological vector space is arc connected.

theorem arcConnectedSpace_of_starConvex [T2Space E] {s : Set E} {o : E}
    (hs : StarConvex ℝ o s) : ArcConnectedSpace s
Proof
:= by
  refine ⟨fun x y ↦ ?_⟩
  let hub : s := ⟨o, hs.mem ⟨x, x.property⟩⟩
  have h (z : s) : ArcJoined hub z := arcJoined_of_segment_subset (hs.segment_subset z.property)
  exact (h x).symm.trans (h y)

On this site: Theorem: Star-convex sets are arc connected