Lean library · module TopologyByExample.Theorems.SpecializingArcEndpoints

Changing the endpoints of arcs by specialization

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 continuous_update_of_specializes

TopologyByExample.continuous_update_of_specializes

private theorem continuous_update_of_specializes {A B : Type*} [TopologicalSpace A] [T1Space A]
    [DecidableEq A] [TopologicalSpace B] {f : A → B} (hf : Continuous f) {a : A} {b : B}
    (hab : f a ⤳ b) : Continuous (Function.update f a b)
Proof
:= by
  apply continuous_iff_continuousAt.mpr
  intro t
  by_cases he : t = a
  · subst t
    exact continuousAt_update_same.mpr ((hf.tendsto a).mono_left nhdsWithin_le_nhds
      |>.mono_right hab)
  · exact (continuousAt_update_of_ne he).mpr hf.continuousAt

theorem arcJoined_of_specializing_endpoints

TopologyByExample.arcJoined_of_specializing_endpoints

An injective interval map remains an arc when each endpoint is changed to a specialization outside the image and the two new endpoints are distinct.

theorem arcJoined_of_specializing_endpoints {X : Type*} [TopologicalSpace X]
    {x y : X} {f : unitInterval → X} (hf : Continuous f) (hi : Function.Injective f)
    (hx : f 0 ⤳ x) (hy : f 1 ⤳ y) (hfx : ∀ t, f t ≠ x) (hfy : ∀ t, f t ≠ y) : ArcJoined x y
Proof
:= by
  intro hxy
  let g := Function.update f 0 x
  have hg := continuous_update_of_specializes hf hx
  have hgy : g 1 ⤳ y := by simpa [g] using hy
  let p : Path x y :=
    { toFun := Function.update g 1 y
      continuous_toFun := continuous_update_of_specializes hg hgy
      source' := by simp [g]
      target' := by simp }
  have hform (t : unitInterval) : p t = if t = 1 then y else if t = 0 then x else f t := by
    simp only [p, g, Path.coe_mk_mk, Function.update_apply]
  refine ⟨p, fun a b hab ↦ ?_⟩
  rw [hform, hform] at hab
  split_ifs at hab <;> grind

On this site: Theorem: Specializing the endpoints of an arc

theorem arcConnectedSpace_open

TopologyByExample.InterlockingInterval.arcConnectedSpace_open

Every open subspace of the interlocking interval is arc connected.

theorem arcConnectedSpace_open {U : Set InterlockingInterval} (hU : IsOpen U) :
    ArcConnectedSpace U
Proof
:= by
  refine ⟨fun x y ↦ ?_⟩
  obtain ⟨m, hm, hx⟩ := exists_Ioo_subset (U := nhdsKer {x.val}) isOpen_nhdsKer
    (subset_nhdsKer (mem_singleton _))
  obtain ⟨n, hn, hy⟩ := exists_Ioo_subset (U := nhdsKer {y.val}) isOpen_nhdsKer
    (subset_nhdsKer (mem_singleton _))
  let d := min (min (1 : ℝ) (min (toReal x) (toReal y))) (min (m : ℝ)⁻¹ (n : ℝ)⁻¹)
  have hd : 0 < d := lt_min (lt_min one_pos (lt_min (toReal_pos _) (toReal_pos _)))
    (lt_min (inv_pos.mpr (by exact_mod_cast hm)) (inv_pos.mpr (by exact_mod_cast hn)))
  let r (t : unitInterval) := d * (1 + t.val) / 4
  have hr (t) : 0 < r t ∧ r t < d := by
    have ht := t.property
    dsimp [r]
    constructor <;> nlinarith [mul_nonneg hd.le ht.1, mul_le_mul_of_nonneg_left ht.2 hd.le]
  have hd1 : d ≤ 1 := (min_le_left _ _).trans (min_le_left _ _)
  let f (t : unitInterval) := mk (r t) 0 (by simpa using (hr t).1)
    (by simpa using (hr t).2.trans_le hd1)
  have hfx (t) : f t ⤳ x.val := mem_nhdsKer_singleton.mp
    (hx _ ((hr t).2.trans_le ((min_le_right _ _).trans (min_le_left _ _))))
  have hfy (t) : f t ⤳ y.val := mem_nhdsKer_singleton.mp
    (hy _ ((hr t).2.trans_le ((min_le_right _ _).trans (min_le_right _ _))))
  let g (t : unitInterval) : U := ⟨f t, (hfx t).mem_open hU x.property⟩
  have hc : Continuous f := by
    apply continuous_generateFrom_iff.mpr
    rintro _ ⟨k, hk, rfl⟩
    have he : f ⁻¹' S k = {t | r t < (k : ℝ)⁻¹} := by
      ext t
      change (r t < (k : ℝ)⁻¹ ∨ (k : ℝ) < r t ∧ r t < (k : ℝ) + 1) ↔ _
      have hk1 : (1 : ℝ) ≤ k := by exact_mod_cast hk
      have hrt := (hr t).2.trans_le hd1
      simp only [not_lt_of_ge (hrt.le.trans hk1), false_and, or_false, mem_ofPred_eq]
    rw [he]
    apply isOpen_lt _ continuous_const
    dsimp [r]
    fun_prop
  have hi : Function.Injective g := by
    intro s t h
    have he : r s = r t := congrArg (fun a : U ↦ toReal a.val) h
    apply Subtype.ext
    dsimp [r] at he
    nlinarith [mul_left_cancel₀ hd.ne' (show d * (1 + s.val) = d * (1 + t.val) by linarith)]
  apply arcJoined_of_specializing_endpoints (f := g) (hc.subtype_mk _) hi
    (IsInducing.subtypeVal.specializes_iff.mp (hfx 0))
    (IsInducing.subtypeVal.specializes_iff.mp (hfy 1))
  · intro t he
    have he' : r t = toReal x := congrArg (fun a : U ↦ toReal a.val) he
    have hdx : d ≤ toReal x := (min_le_left _ _).trans ((min_le_right _ _).trans (min_le_left _ _))
    exact ((hr t).2.trans_le hdx).ne he'
  · intro t he
    have he' : r t = toReal y := congrArg (fun a : U ↦ toReal a.val) he
    have hdy : d ≤ toReal y := (min_le_left _ _).trans ((min_le_right _ _).trans (min_le_right _ _))
    exact ((hr t).2.trans_le hdy).ne he'

theorem locallyArcConnectedSpace

TopologyByExample.InterlockingInterval.locallyArcConnectedSpace

The interlocking interval is locally arc connected.

theorem locallyArcConnectedSpace : LocallyArcConnectedSpace InterlockingInterval
Proof
:=
  ⟨fun _ U hU hx ↦ ⟨U, hU, hx, Subset.rfl, arcConnectedSpace_open hU⟩⟩

On this site: The interlocking interval topology is locally arc connected

theorem arcConnectedSpace

TopologyByExample.InterlockingInterval.arcConnectedSpace

The interlocking interval is arc connected.

theorem arcConnectedSpace : ArcConnectedSpace InterlockingInterval
Proof
:=
  (Homeomorph.arcConnectedSpace_iff (Homeomorph.Set.univ _)).mp (arcConnectedSpace_open isOpen_univ)

On this site: The interlocking interval topology is arc connected

theorem arcConnectedSpace_open

TopologyByExample.NestedIntervalContinuum.arcConnectedSpace_open

Every open subspace of the continuum-sized nested interval topology is arc connected.

theorem arcConnectedSpace_open {U : Set Space} (hU : IsOpen U) : ArcConnectedSpace U
Proof
:= by
  refine ⟨fun x y ↦ ?_⟩
  let e := WithTopology.equiv ℝ ⊤
  let c := max (e x.val.2) (e y.val.2) + 1
  let f (t : unitInterval) : Space := (WithUpper.toUpper (OrderDual.toDual 0), e.symm (c + t.val))
  have hs (t : unitInterval) (z : Space) : f t ⤳ z := by
    have hz : z.1 ≤ WithUpper.toUpper (OrderDual.toDual 0) := Nat.zero_le _
    apply Specializes.prod (Topology.IsUpper.specializes_iff.mpr hz)
    apply specializes_iff_forall_open.mpr
    intro A hA hz
    rcases (IndiscreteTopology.isOpen_iff A).mp hA with rfl | rfl
    · exact hz.elim
    · trivial
  let g (t : unitInterval) : U := ⟨f t, (hs t x).mem_open hU x.property⟩
  have hf : Continuous f := continuous_const.prodMk continuous_of_indiscreteTopology
  have hcoord (t : unitInterval) : e (g t).val.2 = c + t.val := e.apply_symm_apply _
  have hi : Function.Injective g := by
    intro s t h
    exact Subtype.ext (add_left_cancel ((hcoord s).symm.trans
      ((congrArg (fun a : U ↦ e a.val.2) h).trans (hcoord t))))
  apply arcJoined_of_specializing_endpoints (f := g) (hf.subtype_mk _) hi
    (IsInducing.subtypeVal.specializes_iff.mp (hs 0 x))
    (IsInducing.subtypeVal.specializes_iff.mp (hs 1 y))
  · intro t he
    have h := congrArg (fun a : U ↦ e a.val.2) he
    change e (g t).val.2 = e x.val.2 at h
    rw [hcoord] at h
    dsimp [c] at h
    linarith [le_max_left (e x.val.2) (e y.val.2), t.property.1]
  · intro t he
    have h := congrArg (fun a : U ↦ e a.val.2) he
    change e (g t).val.2 = e y.val.2 at h
    rw [hcoord] at h
    dsimp [c] at h
    linarith [le_max_right (e x.val.2) (e y.val.2), t.property.1]

theorem locallyArcConnectedSpace

TopologyByExample.NestedIntervalContinuum.locallyArcConnectedSpace

The continuum-sized nested interval topology is locally arc connected.

theorem locallyArcConnectedSpace : LocallyArcConnectedSpace Space
Proof
:=
  ⟨fun _ U hU hx ↦ ⟨U, hU, hx, Subset.rfl, arcConnectedSpace_open hU⟩⟩

On this site: The nested interval topology on \((0,1)\) is locally arc connected

theorem arcConnectedSpace

TopologyByExample.NestedIntervalContinuum.arcConnectedSpace

The continuum-sized nested interval topology is arc connected.

theorem arcConnectedSpace : ArcConnectedSpace Space
Proof
:=
  (Homeomorph.arcConnectedSpace_iff (Homeomorph.Set.univ _)).mp (arcConnectedSpace_open isOpen_univ)

On this site: The nested interval topology on \((0,1)\) is arc connected