Lean library · module TopologyByExample.Theorems.PlaneRectangle

Thin rectangles joining two open subsets of the 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

theorem exists_rectangle_within

TopologyByExample.PlaneRectangle.exists_rectangle_within

Two distinct points in prescribed open sets can be the lower corners of an embedded thin rectangle contained in a prescribed open convex neighbourhood.

theorem exists_rectangle_within {U V O : Set ℂ} (hU : IsOpen U) (hV : IsOpen V)
    (hO : IsOpen O) (hcO : Convex ℝ O)
    {a b : ℂ} (ha : a ∈ U) (hb : b ∈ V) (hab : a ≠ b) (haO : a ∈ O) (hbO : b ∈ O) :
    ∃ p : C(unitInterval × unitInterval, ℂ), Function.Injective p ∧
      (∀ t, p (0, t) ∈ U) ∧ (∀ t, p (1, t) ∈ V) ∧ ∀ z, p z ∈ O
Proof
:= by
  let p : ℝ → unitInterval × unitInterval → ℂ := fun e z ↦
    a + (b - a) * ((z.1 : ℂ) + (e : ℂ) * (z.2 : ℂ) * Complex.I)
  let W : Set (ℝ × (unitInterval × unitInterval)) :=
    {q | p q.1 (0, q.2.2) ∈ U ∧ p q.1 (1, q.2.2) ∈ V ∧ p q.1 q.2 ∈ O}
  have hW : IsOpen W := by
    apply (hU.preimage ?_).inter ((hV.preimage ?_).inter (hO.preimage ?_))
    all_goals dsimp [p]; fun_prop
  have hsub : ({0} : Set ℝ) ×ˢ (univ : Set (unitInterval × unitInterval)) ⊆ W := by
    rintro ⟨e, z⟩ ⟨he, _⟩
    have he0 : e = 0 := he
    subst e
    have hz := hcO.add_smul_sub_mem haO hbO z.1.property
    have hzO : p 0 z ∈ O := by
      simpa [p, Complex.real_smul, mul_comm] using hz
    exact ⟨by simpa [p] using ha, by simpa [p] using hb, hzO⟩
  obtain ⟨A, B, hA, _, h0A, hIB, hAB⟩ :=
    generalized_tube_lemma isCompact_singleton isCompact_univ hW hsub
  obtain ⟨d, hd, hdA⟩ := Metric.isOpen_iff.mp hA 0 (h0A (mem_singleton 0))
  have he : 0 < d / 2 := half_pos hd
  have heA : d / 2 ∈ A := hdA (by
    simpa [Metric.mem_ball, Real.dist_eq, abs_of_pos he, abs_of_pos hd] using half_lt_self hd)
  refine ⟨⟨p (d / 2), by dsimp [p]; fun_prop⟩, ?_, ?_, ?_, ?_⟩
  · intro x y hxy
    have hba : b - a ≠ 0 := sub_ne_zero.mpr hab.symm
    have h := mul_left_cancel₀ hba (add_left_cancel hxy)
    have hr := congrArg Complex.re h
    have hi := congrArg Complex.im h
    simp only [Complex.ofReal_div, Complex.ofReal_ofNat, Complex.add_re, Complex.ofReal_re,
      Complex.mul_re, Complex.div_ofNat_re, Complex.div_ofNat_im, Complex.ofReal_im,
      zero_div, mul_zero, sub_zero, Complex.I_re, Complex.mul_im, zero_mul, add_zero,
      Complex.I_im, mul_one, sub_self, Complex.add_im, zero_add, mul_eq_mul_left_iff,
      div_eq_zero_iff, hd.ne', OfNat.ofNat_ne_zero, or_self, or_false] at hr hi
    exact Prod.ext (Subtype.ext hr) (Subtype.ext hi)
  · intro t
    exact (hAB (show (d / 2, (0, t)) ∈ A ×ˢ B from
      ⟨heA, hIB (mem_univ (0, t))⟩)).1
  · intro t
    exact (hAB (show (d / 2, (0, t)) ∈ A ×ˢ B from
      ⟨heA, hIB (mem_univ (0, t))⟩)).2.1
  · intro z
    exact (hAB (show (d / 2, z) ∈ A ×ˢ B from ⟨heA, hIB (mem_univ z)⟩)).2.2

theorem exists_compact_connected_outside_complex_within

TopologyByExample.PlaneRectangle.exists_compact_connected_outside_complex_within

Two disjoint nonempty open sets in the complex plane leave a nondegenerate compact connected set outside their union, inside an open convex neighbourhood.

theorem exists_compact_connected_outside_complex_within {U V O : Set ℂ}
    (hU : IsOpen U) (hV : IsOpen V) (hUn : U.Nonempty) (hVn : V.Nonempty)
    (hd : Disjoint U V) (hO : IsOpen O) (hcO : Convex ℝ O)
    (hUO : U ⊆ O) (hVO : V ⊆ O) :
    ∃ K : Set ℂ, IsCompact K ∧ IsPreconnected K ∧ K.Nontrivial ∧ K ⊆ (U ∪ V)ᶜ ∧ K ⊆ O
Proof
:= by
  obtain ⟨f, hfU, hfV, hf0⟩ :=
    PlaneSeparation.exists_signed_separator hU hV hUn hVn hd
  obtain ⟨a, ha⟩ := hVn
  obtain ⟨b, hb⟩ := hUn
  have hab : a ≠ b := by
    intro he
    exact Set.disjoint_left.mp hd (he ▸ hb) ha
  obtain ⟨p, hp, hpV, hpU, hpO⟩ :=
    exists_rectangle_within hV hU hO hcO ha hb hab (hVO ha) (hUO hb)
  obtain ⟨K, hK, hc, hnt, hzero⟩ := RectangleIVT.exists_compact_connected_zeros (f.comp p)
    (fun t ↦ hfV _ (hpV t)) (fun t ↦ hfU _ (hpU t))
  refine ⟨p '' K, hK.image p.continuous, hc.image p p.continuous.continuousOn,
    hnt.image hp, ?_, ?_⟩
  · rintro z ⟨x, hx, rfl⟩
    exact (hf0 (p x)).mp (hzero x hx)
  · rintro z ⟨x, _, rfl⟩
    exact hpO x

theorem exists_compact_connected_outside_within

TopologyByExample.PlaneRectangle.exists_compact_connected_outside_within

Two disjoint nonempty open sets in the real plane leave a nondegenerate compact connected set outside their union, inside an open convex neighbourhood.

theorem exists_compact_connected_outside_within {U V O : Set (ℝ × ℝ)}
    (hU : IsOpen U) (hV : IsOpen V) (hUn : U.Nonempty) (hVn : V.Nonempty)
    (hd : Disjoint U V) (hO : IsOpen O) (hcO : Convex ℝ O)
    (hUO : U ⊆ O) (hVO : V ⊆ O) :
    ∃ K : Set (ℝ × ℝ), IsCompact K ∧ IsPreconnected K ∧ K.Nontrivial ∧
      K ⊆ (U ∪ V)ᶜ ∧ K ⊆ O
Proof
:= by
  let e := Complex.equivRealProdCLM.toHomeomorph
  have hUn' : (e ⁻¹' U).Nonempty := by
    obtain ⟨x, hx⟩ := hUn
    exact ⟨e.symm x, by simpa using hx⟩
  have hVn' : (e ⁻¹' V).Nonempty := by
    obtain ⟨x, hx⟩ := hVn
    exact ⟨e.symm x, by simpa using hx⟩
  obtain ⟨K, hK, hc, hnt, hsub, hKO⟩ := exists_compact_connected_outside_complex_within
    (hU.preimage e.continuous) (hV.preimage e.continuous) hUn' hVn' (hd.preimage e)
    (hO.preimage e.continuous) (hcO.linear_preimage Complex.equivRealProdCLM.toLinearMap)
    (fun _ hx ↦ hUO hx) (fun _ hx ↦ hVO hx)
  refine ⟨e '' K, hK.image e.continuous, hc.image e e.continuous.continuousOn,
    hnt.image e.injective, ?_, ?_⟩
  · rintro z ⟨x, hx, rfl⟩
    exact hsub hx
  · rintro z ⟨x, hx, rfl⟩
    exact hKO hx

theorem exists_rectangle

TopologyByExample.PlaneRectangle.exists_rectangle

Two distinct points in prescribed open sets can be the lower corners of an embedded thin rectangle whose end edges stay in those sets.

theorem exists_rectangle {U V : Set ℂ} (hU : IsOpen U) (hV : IsOpen V)
    {a b : ℂ} (ha : a ∈ U) (hb : b ∈ V) (hab : a ≠ b) :
    ∃ p : C(unitInterval × unitInterval, ℂ), Function.Injective p ∧
      (∀ t, p (0, t) ∈ U) ∧ ∀ t, p (1, t) ∈ V
Proof
:= by
  obtain ⟨p, hp, hU', hV', _⟩ := exists_rectangle_within hU hV isOpen_univ
    convex_univ ha hb hab (mem_univ a) (mem_univ b)
  exact ⟨p, hp, hU', hV'⟩

theorem exists_compact_connected_outside_complex

TopologyByExample.PlaneRectangle.exists_compact_connected_outside_complex

Two disjoint nonempty open sets in the complex plane leave a nondegenerate compact connected set outside their union.

theorem exists_compact_connected_outside_complex {U V : Set ℂ}
    (hU : IsOpen U) (hV : IsOpen V) (hUn : U.Nonempty) (hVn : V.Nonempty)
    (hd : Disjoint U V) :
    ∃ K : Set ℂ, IsCompact K ∧ IsPreconnected K ∧ K.Nontrivial ∧ K ⊆ (U ∪ V)ᶜ
Proof
:= by
  obtain ⟨K, hK, hc, hn, hsub, _⟩ := exists_compact_connected_outside_complex_within
    hU hV hUn hVn hd isOpen_univ convex_univ (subset_univ _) (subset_univ _)
  exact ⟨K, hK, hc, hn, hsub⟩

theorem exists_compact_connected_outside

TopologyByExample.PlaneRectangle.exists_compact_connected_outside

Two disjoint nonempty open sets in the real plane leave a nondegenerate compact connected set outside their union.

theorem exists_compact_connected_outside {U V : Set (ℝ × ℝ)}
    (hU : IsOpen U) (hV : IsOpen V) (hUn : U.Nonempty) (hVn : V.Nonempty)
    (hd : Disjoint U V) :
    ∃ K : Set (ℝ × ℝ), IsCompact K ∧ IsPreconnected K ∧ K.Nontrivial ∧
      K ⊆ (U ∪ V)ᶜ
Proof
:= by
  obtain ⟨K, hK, hc, hn, hsub, _⟩ := exists_compact_connected_outside_within
    hU hV hUn hVn hd isOpen_univ convex_univ (subset_univ _) (subset_univ _)
  exact ⟨K, hK, hc, hn, hsub⟩

On this site: Theorem: A continuum outside two disjoint plane opens