Lean library · module TopologyByExample.Theorems.DoubleJones

The double Jones construction

Source file

Integer-indexed copies of a space are given two ideal ends. Gluing adjacent copies alternately along two disjoint closed sets gives the double Jones construction.

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

inductive type Raw

TopologyByExample.DoubleJones.Raw

A family of copies of a space indexed by the integers, with two ideal ends.

inductive Raw (Y : Type*)
  | neg | pos | layer (n : ℤ) (y : Y)
variable {Y : Type*} [TopologicalSpace Y]

instance

instance : TopologicalSpace (Raw Y)
Proof
where
  IsOpen U := (∀ n, IsOpen (layer n ⁻¹' U)) ∧
    (neg ∈ U → ∃ N : ℤ, ∀ n ≤ N, ∀ y, layer n y ∈ U) ∧
    (pos ∈ U → ∃ N : ℤ, ∀ n ≥ N, ∀ y, layer n y ∈ U)
  isOpen_univ := ⟨fun _ ↦ isOpen_univ, fun _ ↦ ⟨0, by simp⟩, fun _ ↦ ⟨0, by simp⟩⟩
  isOpen_inter U V hU hV := by
    refine ⟨fun n ↦ (hU.1 n).inter (hV.1 n), ?_, ?_⟩
    · rintro ⟨hu, hv⟩
      obtain ⟨a, ha⟩ := hU.2.1 hu
      obtain ⟨b, hb⟩ := hV.2.1 hv
      exact ⟨min a b, fun n hn y ↦ ⟨ha n (hn.trans (min_le_left ..)) y,
        hb n (hn.trans (min_le_right ..)) y⟩⟩
    · rintro ⟨hu, hv⟩
      obtain ⟨a, ha⟩ := hU.2.2 hu
      obtain ⟨b, hb⟩ := hV.2.2 hv
      exact ⟨max a b, fun n hn y ↦ ⟨ha n ((le_max_left ..).trans hn) y,
        hb n ((le_max_right ..).trans hn) y⟩⟩
  isOpen_sUnion S hS := by
    refine ⟨fun n ↦ ?_, ?_, ?_⟩
    · rw [preimage_sUnion]
      exact isOpen_biUnion fun U hU ↦ (hS U hU).1 n
    · rintro ⟨U, hU, he⟩
      obtain ⟨N, hN⟩ := (hS U hU).2.1 he
      exact ⟨N, fun n hn y ↦ mem_sUnion_of_mem (hN n hn y) hU⟩
    · rintro ⟨U, hU, he⟩
      obtain ⟨N, hN⟩ := (hS U hU).2.2 he
      exact ⟨N, fun n hn y ↦ mem_sUnion_of_mem (hN n hn y) hU⟩

theorem isOpen_iff

TopologyByExample.DoubleJones.Raw.isOpen_iff

Openness is determined on each level and by ordinary full tails at the ends.

theorem isOpen_iff {U : Set (Raw Y)} : IsOpen U ↔
    (∀ n, IsOpen (layer n ⁻¹' U)) ∧
    (neg ∈ U → ∃ N : ℤ, ∀ n ≤ N, ∀ y, layer n y ∈ U) ∧
    (pos ∈ U → ∃ N : ℤ, ∀ n ≥ N, ∀ y, layer n y ∈ U)
Proof
:= Iff.rfl

theorem isClosed_iff

TopologyByExample.DoubleJones.Raw.isClosed_iff

The corresponding test for closedness.

theorem isClosed_iff {F : Set (Raw Y)} : IsClosed F ↔
    (∀ n, IsClosed (layer n ⁻¹' F)) ∧
    (neg ∉ F → ∃ N : ℤ, ∀ n ≤ N, ∀ y, layer n y ∉ F) ∧
    (pos ∉ F → ∃ N : ℤ, ∀ n ≥ N, ∀ y, layer n y ∉ F)
Proof
:= by
  rw [← isOpen_compl_iff, isOpen_iff]
  simp only [preimage_compl, isOpen_compl_iff, mem_compl_iff]

theorem continuous_layer

TopologyByExample.DoubleJones.Raw.continuous_layer

Inclusion of an integer level is continuous.

theorem continuous_layer (n : ℤ) : Continuous (layer (Y := Y) n)
Proof
:=
  continuous_def.mpr fun _ h ↦ (isOpen_iff.mp h).1 n
omit [TopologicalSpace Y] in

theorem preimage_layer_image

TopologyByExample.DoubleJones.Raw.preimage_layer_image

private theorem preimage_layer_image (m n : ℤ) (A : Set Y) :
    layer m ⁻¹' layer n '' A = if m = n then A else ∅
Proof
:= by
  ext x
  by_cases h : m = n <;> simp [h, eq_comm]

theorem isOpenMap_layer

TopologyByExample.DoubleJones.Raw.isOpenMap_layer

Each integer level is open.

theorem isOpenMap_layer (n : ℤ) : IsOpenMap (layer (Y := Y) n)
Proof
:= by
  intro A hA
  refine isOpen_iff.mpr ⟨fun m ↦ ?_, by simp, by simp⟩
  rw [preimage_layer_image]
  split <;> first | assumption | exact isOpen_empty

theorem isClosedMap_layer

TopologyByExample.DoubleJones.Raw.isClosedMap_layer

Each integer level is closed.

theorem isClosedMap_layer (n : ℤ) : IsClosedMap (layer (Y := Y) n)
Proof
:= by
  intro A hA
  refine isClosed_iff.mpr ⟨fun m ↦ ?_, fun _ ↦ ⟨n-1, ?_⟩, fun _ ↦ ⟨n+1, ?_⟩⟩
  · rw [preimage_layer_image]
    split <;> first | assumption | exact isClosed_empty
  · intro m hm y
    simp [show n ≠ m by omega]
  · intro m hm y
    simp [show n ≠ m by omega]

definition upper

TopologyByExample.DoubleJones.Raw.upper

The upper tail starting at a specified level.

def upper (N : ℤ) : Set (Raw Y)
Definition
:= {p | match p with
  | neg => False
  | pos => True
  | layer n _ => N ≤ n}

definition lower

TopologyByExample.DoubleJones.Raw.lower

The lower tail ending at a specified level.

def lower (N : ℤ) : Set (Raw Y)
Definition
:= {p | match p with
  | neg => True
  | pos => False
  | layer n _ => n ≤ N}

theorem isClopen_upper

TopologyByExample.DoubleJones.Raw.isClopen_upper

theorem isClopen_upper (N : ℤ) : IsClopen (upper (Y := Y) N)
Proof
:= by
  have hp (n : ℤ) : layer n ⁻¹' upper (Y := Y) N = if N ≤ n then univ else ∅ := by
    by_cases h : N ≤ n <;> ext y <;> simp [upper, h]
  constructor
  · refine isClosed_iff.mpr ⟨fun n ↦ ?_, fun _ ↦ ⟨N-1, fun n h _ ↦ by change ¬N ≤ n; omega⟩,
      fun h ↦ (h trivial).elim⟩
    rw [hp]; split <;> simp
  · refine isOpen_iff.mpr ⟨fun n ↦ ?_, False.elim, fun _ ↦ ⟨N, fun _ h _ ↦ h⟩⟩
    rw [hp]; split <;> simp

theorem isClopen_lower

TopologyByExample.DoubleJones.Raw.isClopen_lower

theorem isClopen_lower (N : ℤ) : IsClopen (lower (Y := Y) N)
Proof
:= by
  have he : lower (Y := Y) N = (upper (N+1))ᶜ := by
    ext x
    cases x with
    | neg => simp [upper, lower]
    | pos => simp [upper, lower]
    | layer n y => change n ≤ N ↔ ¬N+1 ≤ n; omega
  rw [he]
  exact (isClopen_upper _).compl

instance

instance [RegularSpace Y] : RegularSpace (Raw Y)
Proof
:= by
  apply RegularSpace.of_exists_mem_nhds_isClosed_subset
  intro x U hU
  obtain ⟨O, hOU, hO, hx⟩ := mem_nhds_iff.mp hU
  rcases x with _ | _ | ⟨n, y⟩
  · obtain ⟨N, hN⟩ := (isOpen_iff.mp hO).2.1 hx
    refine ⟨lower N, (isClopen_lower N).2.mem_nhds trivial, (isClopen_lower N).1, ?_⟩
    rintro (_ | _ | ⟨i, z⟩) h
    · exact hOU hx
    · exact False.elim h
    · exact hOU (hN i h z)
  · obtain ⟨N, hN⟩ := (isOpen_iff.mp hO).2.2 hx
    refine ⟨upper N, (isClopen_upper N).2.mem_nhds trivial, (isClopen_upper N).1, ?_⟩
    rintro (_ | _ | ⟨i, z⟩) h
    · exact False.elim h
    · exact hOU hx
    · exact hOU (hN i h z)
  · obtain ⟨C, hC, hCc, hCO⟩ := exists_mem_nhds_isClosed_subset
      (((isOpen_iff.mp hO).1 n).mem_nhds hx)
    refine ⟨layer n '' C, (isOpenMap_layer n).image_mem_nhds hC,
      isClosedMap_layer n C hCc, ?_⟩
    rintro _ ⟨z, hz, rfl⟩
    exact hOU (hCO hz)

instance

instance [T1Space Y] : T1Space (Raw Y)
Proof
:= by
  constructor
  rintro (_ | _ | ⟨n, y⟩)
  · exact isClosed_iff.mpr ⟨fun _ ↦ by simp [preimage], by simp,
      fun _ ↦ ⟨0, by simp⟩⟩
  · exact isClosed_iff.mpr ⟨fun _ ↦ by simp [preimage], fun _ ↦ ⟨0, by simp⟩, by simp⟩
  · simpa using isClosedMap_layer n {y} isClosed_singleton

structure Data

TopologyByExample.DoubleJones.Data

Closed disjoint gluing loci in the spaces at the levels.

structure Data (Y : Type*) [TopologicalSpace Y] where
  /-- The closed set identified across an even-to-odd pair of levels. -/
  H : Set Y
  /-- The closed set identified across an odd-to-even pair of levels. -/
  K : Set Y
  closedH : IsClosed H
  closedK : IsClosed K
  disjoint : Disjoint H K
variable {Y : Type*} [TopologicalSpace Y] (d : Data Y)

inductive type Space

TopologyByExample.DoubleJones.Space

Points of the quotient, in which adjacent representatives of a glued point are assigned a single integer index.

inductive Space (d : Data Y)
  | neg | pos | point (n : ℤ) (y : Y)

definition slot

TopologyByExample.DoubleJones.Data.slot

The integer label of a point in the image of level n.

noncomputable def slot (n : ℤ) (y : Y) : ℤ
:= by
  classical
  exact if y ∈ d.H then n / 2 else if y ∈ d.K then (n+1) / 2 else n

definition chart

TopologyByExample.DoubleJones.Data.chart

Inclusion of one unglued level in the quotient.

noncomputable def chart (n : ℤ) (y : Y) : Space d
:= .point (d.slot n y) y

definition quotient

TopologyByExample.DoubleJones.Data.quotient

The quotient map from the two-ended sum.

noncomputable def quotient : Raw Y → Space d
  | .neg => .neg
  | .pos => .pos
  | .layer n y => d.chart n y

theorem surjective_quotient

TopologyByExample.DoubleJones.Data.surjective_quotient

theorem surjective_quotient : Function.Surjective d.quotient
Proof
:= by
  rintro (_ | _ | ⟨k, y⟩)
  · exact ⟨.neg, rfl⟩
  · exact ⟨.pos, rfl⟩
  · by_cases h : y ∈ d.H ∨ y ∈ d.K
    · refine ⟨.layer (2*k) y, ?_⟩
      rcases h with h | h <;> simp [quotient, chart, slot, h]
      omega
    · exact ⟨.layer k y, by simp [quotient, chart, slot, not_or.mp h]⟩

instance

noncomputable instance : TopologicalSpace (Space d)
Proof
:= .coinduced d.quotient inferInstance

theorem isQuotientMap

TopologyByExample.DoubleJones.Data.isQuotientMap

The map gives the glued space its quotient topology.

theorem isQuotientMap : IsQuotientMap d.quotient
Proof
:= ⟨⟨rfl⟩, d.surjective_quotient⟩

theorem continuous_chart

TopologyByExample.DoubleJones.Data.continuous_chart

theorem continuous_chart (n : ℤ) : Continuous (d.chart n)
Proof
:=
  d.isQuotientMap.continuous.comp (Raw.continuous_layer n)

theorem nearby

TopologyByExample.DoubleJones.Data.nearby

Representatives sharing a normalized label lie on the same or adjacent levels.

theorem nearby {m n : ℤ} {y : Y} (h : d.slot m y = d.slot n y) :
    m - 1 ≤ n ∧ n ≤ m + 1
Proof
:= by
  unfold slot at h
  split at h
  · omega
  · split at h <;> omega

theorem closed_equal_slots

TopologyByExample.DoubleJones.Data.closed_equal_slots

The coincidence set of two levels is closed.

theorem closed_equal_slots (m n : ℤ) : IsClosed {y | d.slot m y = d.slot n y}
Proof
:= by
  classical
  by_cases he : m = n
  · simp [he]
  have hset : {y | d.slot m y = d.slot n y} =
      (if m/2 = n/2 then d.H else ∅) ∪ (if (m+1)/2 = (n+1)/2 then d.K else ∅) := by
    ext y
    by_cases hH : y ∈ d.H
    · have hK := disjoint_left.mp d.disjoint hH
      split_ifs <;> simp_all [slot]
    · by_cases hK : y ∈ d.K <;> split_ifs <;> simp_all [slot]
  rw [hset]
  exact IsClosed.union (by split <;> simp [d.closedH]) (by split <;> simp [d.closedK])

theorem isClosedMap

TopologyByExample.DoubleJones.Data.isClosedMap

A closed subset of the two-ended sum has closed image in the glued space.

theorem isClosedMap : IsClosedMap d.quotient
Proof
:= by
  intro C hC
  apply d.isQuotientMap.isClosed_preimage.mp
  obtain ⟨hlev, hlo, hhi⟩ := Raw.isClosed_iff.mp hC
  apply Raw.isClosed_iff.mpr
  refine ⟨fun m ↦ ?_, ?_, ?_⟩
  · have he : Raw.layer m ⁻¹' d.quotient ⁻¹' (d.quotient '' C) =
        ⋃ n ∈ Finset.Icc (m-1) (m+1), ((Raw.layer n ⁻¹' C) ∩ {y | d.slot m y = d.slot n y}) := by
      ext y
      constructor
      · rintro ⟨(_ | _ | ⟨n, z⟩), hz, h⟩ <;> try contradiction
        change Space.point _ _ = Space.point _ _ at h
        obtain ⟨hs, rfl⟩ := Space.point.inj h
        exact mem_iUnion₂.mpr ⟨n, Finset.mem_Icc.mpr (d.nearby hs.symm), hz, hs.symm⟩
      · intro hy
        obtain ⟨n, _, hn, hs⟩ := mem_iUnion₂.mp hy
        exact ⟨.layer n y, hn, congrArg (fun k ↦ Space.point k y) hs.symm⟩
    rw [he]
    exact isClosed_biUnion_finset fun n _ ↦ (hlev n).inter (d.closed_equal_slots m n)
  · intro he
    obtain ⟨N, hN⟩ := hlo (fun h ↦ he ⟨.neg, h, rfl⟩)
    refine ⟨N-1, fun n hn y ↦ ?_⟩
    rintro ⟨(_ | _ | ⟨j, z⟩), hz, hh⟩ <;> try contradiction
    obtain ⟨hs, rfl⟩ := Space.point.inj hh
    have := d.nearby hs.symm
    exact hN j (by omega) _ hz
  · intro he
    obtain ⟨N, hN⟩ := hhi (fun h ↦ he ⟨.pos, h, rfl⟩)
    refine ⟨N+1, fun n hn y ↦ ?_⟩
    rintro ⟨(_ | _ | ⟨j, z⟩), hz, hh⟩ <;> try contradiction
    obtain ⟨hs, rfl⟩ := Space.point.inj hh
    have := d.nearby hs.symm
    exact hN j (by omega) _ hz

theorem closedEmbedding_chart

TopologyByExample.DoubleJones.Data.closedEmbedding_chart

A full original level is always a closed embedded copy of the starting space.

theorem closedEmbedding_chart (n : ℤ) : IsClosedEmbedding (d.chart n)
Proof
:=
  IsClosedEmbedding.of_continuous_injective_isClosedMap (d.continuous_chart n)
    (fun _ _ h ↦ (Space.point.inj h).2) (d.isClosedMap.comp (Raw.isClosedMap_layer n))

theorem isOpen_iff

TopologyByExample.DoubleJones.Data.isOpen_iff

Membership of an open set can be tested on the original planks and at the two ends.

theorem isOpen_iff {U : Set (Space d)} : IsOpen U ↔
    (∀ n, IsOpen (d.chart n ⁻¹' U)) ∧
    (Space.neg ∈ U → ∃ N : ℤ, ∀ n ≤ N, ∀ y, d.chart n y ∈ U) ∧
    (Space.pos ∈ U → ∃ N : ℤ, ∀ n ≥ N, ∀ y, d.chart n y ∈ U)
Proof
:= Iff.rfl

theorem finite_fibre

TopologyByExample.DoubleJones.Data.finite_fibre

Every fibre of the quotient map is finite.

theorem finite_fibre (x : Space d) : (d.quotient ⁻¹' {x}).Finite
Proof
:= by
  obtain ⟨z, rfl⟩ := d.surjective_quotient x
  cases z with
  | neg =>
    suffices d.quotient ⁻¹' {d.quotient .neg} = {Raw.neg} by rw [this]; exact finite_singleton _
    ext (_ | _ | ⟨_, _⟩) <;> simp [quotient, chart]
  | pos =>
    suffices d.quotient ⁻¹' {d.quotient .pos} = {Raw.pos} by rw [this]; exact finite_singleton _
    ext (_ | _ | ⟨_, _⟩) <;> simp [quotient, chart]
  | layer n y =>
    apply ((finite_Icc (n-1) (n+1)).image (fun m ↦ Raw.layer m y)).subset
    rintro (_ | _ | ⟨m, z⟩) hx <;> try contradiction
    obtain ⟨hs, rfl⟩ := Space.point.inj hx
    exact ⟨m, d.nearby hs.symm, rfl⟩

instance

instance [T1Space Y] : T1Space (Space d)
Proof
:= by
  constructor
  intro x
  obtain ⟨z, rfl⟩ := d.surjective_quotient x
  simpa using d.isClosedMap {z} isClosed_singleton

instance

instance [RegularSpace Y] : RegularSpace (Space d)
Proof
:= by
  apply RegularSpace.of_exists_mem_nhds_isClosed_subset
  intro x U hx
  obtain ⟨O, hOU, hO, hxo⟩ := mem_nhds_iff.mp hx
  have hpre := hO.preimage d.isQuotientMap.continuous
  have hK : d.quotient ⁻¹' O ∈ 𝓝ˢ (d.quotient ⁻¹' {x}) :=
    hpre.mem_nhdsSet.mpr (preimage_mono (singleton_subset_iff.mpr hxo))
  obtain ⟨V, hV, hKV, hVU⟩ := (d.finite_fibre x).isCompact.exists_isOpen_closure_subset hK
  have hW := isClosedMap_iff_kernImage.mp d.isClosedMap hV
  refine ⟨d.quotient '' closure V, mem_of_superset (hW.mem_nhds ?_) ?_,
    d.isClosedMap _ isClosed_closure, (image_subset_iff.mpr hVU).trans hOU⟩
  · exact fun z hz ↦ hKV hz
  · intro w hw
    obtain ⟨z, rfl⟩ := d.surjective_quotient w
    exact ⟨z, subset_closure (hw rfl), rfl⟩

theorem isOpen_chart_image

TopologyByExample.DoubleJones.Data.isOpen_chart_image

On the complement of both gluing sets, an open piece of any level remains open.

theorem isOpen_chart_image {O : Set Y} (hO : IsOpen O) (hH : Disjoint O d.H)
    (hK : Disjoint O d.K) (n : ℤ) : IsOpen (d.chart n '' O)
Proof
:= by
  apply d.isOpen_iff.mpr
  refine ⟨fun m ↦ ?_, by simp [chart], by simp [chart]⟩
  have he : d.chart m ⁻¹' d.chart n '' O = if m = n then O else ∅ := by
    ext y
    constructor
    · rintro ⟨z, hz, hh⟩
      obtain ⟨hs, rfl⟩ := Space.point.inj hh
      have h1 := disjoint_left.mp hH hz
      have h2 := disjoint_left.mp hK hz
      simp only [slot, h1, h2, ↓reduceIte] at hs
      simpa [hs] using hz
    · by_cases hm : m = n
      · subst m
        simpa using fun h : y ∈ O ↦ (mem_image_of_mem (d.chart n) h)
      · simp [hm]
  rw [he]
  split <;> first | exact hO | exact isOpen_empty

theorem tendsto_pos

TopologyByExample.DoubleJones.Data.tendsto_pos

Every choice of a point on each level approaches the upper end.

theorem tendsto_pos (y : ℤ → Y) : Tendsto (fun n ↦ d.chart n (y n)) atTop (𝓝 Space.pos)
Proof
:= by
  apply tendsto_nhds.mpr
  intro U hU hx
  obtain ⟨N, hN⟩ := (d.isOpen_iff.mp hU).2.2 hx
  exact eventually_atTop.mpr ⟨N, fun n hn ↦ hN n hn _⟩

theorem tendsto_neg

TopologyByExample.DoubleJones.Data.tendsto_neg

Every choice of a point on each level approaches the lower end in the reverse direction.

theorem tendsto_neg (y : ℤ → Y) : Tendsto (fun n ↦ d.chart n (y n)) atBot (𝓝 Space.neg)
Proof
:= by
  apply tendsto_nhds.mpr
  intro U hU hx
  obtain ⟨N, hN⟩ := (d.isOpen_iff.mp hU).2.1 hx
  exact eventually_atBot.mpr ⟨N, fun n hn ↦ hN n hn _⟩