Lean library · module TopologyByExample.Theorems.ButterflyNonextension

Butterfly wings obstruct extension from a dense subspace

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_nonextension_of_butterfly

TopologyByExample.exists_nonextension_of_butterfly

A dense continuous map omitting a butterfly point admits an interval-valued continuous function which cannot extend across that point.

theorem exists_nonextension_of_butterfly {X Y : Type*}
    [TopologicalSpace X] [TopologicalSpace Y] (e : Y → X)
    (he : Continuous e) (hd : DenseRange e) (p : X) (hp : ∀ y, e y ≠ p)
    (U V : Set X) (hU : IsOpen U) (hV : IsOpen V) (hUV : Disjoint U V)
    (hc : U ∪ V = {p}ᶜ) (hpU : p ∈ closure U) (hpV : p ∈ closure V) :
    ∃ f : C(Y, unitInterval), ∀ g : C(X, unitInterval), ∃ y, g (e y) ≠ f y
Proof
:= by
  classical
  let W : Set Y := e ⁻¹' U
  have hWc : Wᶜ = e ⁻¹' V := by
    ext y
    change (e y ∉ U) ↔ e y ∈ V
    constructor
    · intro hy
      have hmem : e y ∈ U ∪ V := by
        rw [hc]
        exact hp y
      exact hmem.resolve_left hy
    · intro hy hu
      exact disjoint_left.mp hUV hu hy
  have hW : IsClopen W :=
    ⟨isOpen_compl_iff.mp (hWc ▸ hV.preimage he), hU.preimage he⟩
  let f : C(Y, unitInterval) := ⟨fun y ↦ if e y ∈ U then 0 else 1,
    continuous_const.if (fun y hy ↦ by
      have hn : frontier W = ∅ := hW.frontier_eq
      exact (hn ▸ hy).elim) continuous_const⟩
  refine ⟨f, ?_⟩
  intro g
  by_contra hn
  push Not at hn
  have hzero : U ∩ range e ⊆ {x | g x = 0} := by
    rintro x ⟨hx, y, rfl⟩
    change g (e y) = 0
    rw [hn y]
    simp [f, hx]
  have hone : V ∩ range e ⊆ {x | g x = 1} := by
    rintro x ⟨hx, y, rfl⟩
    change g (e y) = 1
    rw [hn y]
    have hxu : e y ∉ U := fun hu ↦ disjoint_left.mp hUV hu hx
    simp [f, hxu]
  have hpu : p ∈ closure (U ∩ range e) :=
    closure_minimal (hd.open_subset_closure_inter hU) isClosed_closure hpU
  have hpv : p ∈ closure (V ∩ range e) :=
    closure_minimal (hd.open_subset_closure_inter hV) isClosed_closure hpV
  have hg0 : g p = 0 :=
    closure_minimal hzero (isClosed_eq g.continuous continuous_const) hpu
  have hg1 : g p = 1 :=
    closure_minimal hone (isClosed_eq g.continuous continuous_const) hpv
  exact zero_ne_one (hg0.symm.trans hg1)

On this site: Theorem: Butterfly wings obstruct extension from a dense image