Lean library · module TopologyByExample.Spaces.IrrationalCoordinateArcs

Global and local arcs in the irrational-coordinate plane

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

instance

The irrational-coordinate plane is nonempty.

instance : Nonempty IrrationalCoordinatePlane
Proof
:= by
  obtain ⟨a, ha, _⟩ := exists_irrational_btwn (show (0 : ℝ) < 1 by norm_num)
  exact ⟨⟨(a, 0), Or.inl ha⟩⟩

instance

The irrational-coordinate plane is arc connected.

instance : ArcConnectedSpace IrrationalCoordinatePlane
Proof
:= by
  obtain ⟨a, ha, _⟩ := exists_irrational_btwn (show (0 : ℝ) < 1 by norm_num)
  have he : frame univ univ = irrationalCoordinateSet := by
    ext p
    simp [frame, irrationalCoordinateSet]
  change ArcConnectedSpace irrationalCoordinateSet
  rw [← he]
  exact arcConnectedSpace_frame convex_univ convex_univ (mem_univ a) (mem_univ a) ha ha

theorem arcConnectedSpace_rectangle

TopologyByExample.IrrationalCoordinatePlane.arcConnectedSpace_rectangle

The trace of a rectangle containing an irrational grid point is arc connected.

theorem arcConnectedSpace_rectangle {s t : Set ℝ} (hs : Convex ℝ s) (ht : Convex ℝ t)
    {a b : ℝ} (ha : a ∈ s) (hb : b ∈ t) (hia : Irrational a) (hib : Irrational b) :
    ArcConnectedSpace {p : IrrationalCoordinatePlane | p.val.1 ∈ s ∧ p.val.2 ∈ t}
Proof
:= by
  let V : Set IrrationalCoordinatePlane := {p | p.val.1 ∈ s ∧ p.val.2 ∈ t}
  let e := IsEmbedding.subtypeVal.homeomorphImage V
  apply (Homeomorph.arcConnectedSpace_iff e).mpr
  have he : Subtype.val '' V = frame s t := by
    ext p
    constructor
    · rintro ⟨x, hx, rfl⟩
      exact ⟨hx.1, hx.2, x.property⟩
    · rintro ⟨hp, hq, hi⟩
      exact ⟨⟨p, hi⟩, ⟨hp, hq⟩, rfl⟩
  rw [he]
  exact arcConnectedSpace_frame hs ht ha hb hia hib

instance

Small open rectangles give a basis of arc-connected neighbourhoods.

instance : LocallyArcConnectedSpace IrrationalCoordinatePlane
Proof
:= by
  refine ⟨fun x U hU hx ↦ ?_⟩
  obtain ⟨W, hW, hWU⟩ := isOpen_induced_iff.mp hU
  have hxW : x.val ∈ W := by change x ∈ Subtype.val ⁻¹' W; rwa [hWU]
  obtain ⟨s, t, hs, ht, hxs, hxt, hst⟩ := isOpen_prod_iff.mp hW x.val.1 x.val.2 hxW
  obtain ⟨l, r, hxlr, hlr⟩ := mem_nhds_iff_exists_Ioo_subset.mp (hs.mem_nhds hxs)
  obtain ⟨d, u, hxdu, hdu⟩ := mem_nhds_iff_exists_Ioo_subset.mp (ht.mem_nhds hxt)
  let V : Set IrrationalCoordinatePlane := {p | p.val.1 ∈ Ioo l r ∧ p.val.2 ∈ Ioo d u}
  have hVo : IsOpen V := (isOpen_Ioo.prod isOpen_Ioo).preimage continuous_subtypeVal
  refine ⟨V, hVo, ⟨hxlr, hxdu⟩, ?_, ?_⟩
  · intro p hp
    rw [← hWU]
    exact hst ⟨hlr hp.1, hdu hp.2⟩
  · obtain ⟨a, ha, hal, har⟩ := exists_irrational_btwn (hxlr.1.trans hxlr.2)
    obtain ⟨b, hb, hbd, hbu⟩ := exists_irrational_btwn (hxdu.1.trans hxdu.2)
    exact arcConnectedSpace_rectangle (convex_Ioo l r) (convex_Ioo d u)
      ⟨hal, har⟩ ⟨hbd, hbu⟩ ha hb