Lean library · module TopologyByExample.Spaces.MisraSparseRegularOpen

Regular-open refinement tools for sparse attachments

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_open_disjoint_tailPatch_at_endpoint

TopologyByExample.MisraAttachment.exists_open_disjoint_tailPatch_at_endpoint

A neighbourhood of an excluded endpoint meets an open set disjoint from the tail patch.

theorem exists_open_disjoint_tailPatch_at_endpoint {X ι : Type*} [TopologicalSpace X]
    (t : ι → Bool → X) (i : ι) (s : Bool) {U : Set X} (hx : t i s ∉ U)
    {O : Set (Space t)} (hO : IsOpen O) (hxo : base t (t i s) ∈ O) :
    ∃ W : Set (Space t), IsOpen W ∧ (O ∩ W).Nonempty ∧
      Disjoint W (tailPatch t U ⊥).set
Proof
:= by
  classical
  have hV := hO.preimage (continuous_copy t i)
  have ha : MisraE0.apex s ∈ copy t i ⁻¹' O := by
    simpa only [mem_preimage, copy_apex] using hxo
  obtain ⟨δ, hδ⟩ := hV.2 s ha
  obtain ⟨α, hα⟩ := exists_gt δ
  obtain ⟨β, hβ, _⟩ := (hδ α hα).exists_mem_inter (hδ α hα)
  let z := MisraE0.cell s α β
  have hz : IsClopen ({z} : Set MisraE0) :=
    ⟨isClosed_singleton, MisraE0.isOpen_singleton_cell s α β⟩
  have hn : ∀ b, MisraE0.apex b ∉ ({z} : Set MisraE0) := by simp [z]
  let P := singlePatch t i {z} hn
  refine ⟨P.set, (isClopen_singlePatch t i hz hn).isOpen,
    ⟨copy t i z, hβ, ?_⟩, ?_⟩
  · simp [P, singlePatch]
  · apply Patch.disjoint
    · exact disjoint_bot_left
    · intro j
      by_cases hj : j = i
      · subst j
        change Disjoint (if i = i then {z} else ∅) (⋃ b, ⋃ (_ : t i b ∈ U), MisraE0.apexNhd b ⊥)
        simp only [ite_true, disjoint_singleton_left, mem_iUnion, not_exists]
        intro b hb
        have hsb : s ≠ b := by
          intro heq
          exact hx (heq ▸ hb)
        simp [z, MisraE0.apexNhd, hsb]
      · simp [P, singlePatch, hj]

theorem exists_attachment_endpoint

TopologyByExample.MisraSparse.exists_attachment_endpoint

Each non-apex point in a designated copy is an endpoint at the next stage.

theorem exists_attachment_endpoint (e : OmegaOne → OmegaOne) (n : ℕ)
    (i : (layer e n).Copies) (y : MisraE0) (hy : ∀ s, y ≠ MisraE0.apex s) :
    ∃ j, attachment e (layer e n) j false = (layer e n).copyMap i y
Proof
:= by
  cases y with
  | apex s => exact False.elim (hy s rfl)
  | row α => exact ⟨(i, none, true, α), rfl⟩
  | cell s α β => exact ⟨(i, some (s, α), true, β), rfl⟩
variable (e : OmegaOne → OmegaOne)

theorem disjoint_limitSet_of_tail_bound

TopologyByExample.MisraSparse.disjoint_limitSet_of_tail_bound

Tail control after a fixed stage preserves disjointness from a later open extension.

theorem disjoint_limitSet_of_tail_bound (n : ℕ) {V : Set (Limit e)}
    (hb : ∀ k, n ≤ k → toLimit e (k + 1) ⁻¹' V ⊆
      (tailPatch (attachment e (layer e k)) (toLimit e k ⁻¹' V) ⊥).set)
    {W : Set (Stage e n)} (hd : Disjoint W (toLimit e n ⁻¹' V)) :
    Disjoint (limitSet e n W) V
Proof
:= by
  have hlate {k : ℕ} (h : n ≤ k) : Disjoint (forward e h W) (toLimit e k ⁻¹' V) := by
    induction k, h using Nat.le_induction with
    | base => simpa only [forward_self] using hd
    | succ k h ih =>
      rw [forward_succ e h]
      exact (disjoint_tailPatch (attachment e (layer e k)) ih ⊥ ⊥).mono_right (hb k h)
  apply disjoint_left.2
  intro z hz hv
  obtain ⟨⟨m, x⟩, hx⟩ := Quot.exists_rep z
  change toLimit e m x = z at hx
  let k := max n m
  let y := advance e (Nat.le_max_right n m) x
  have hy : toLimit e k y = z := (toLimit_advance e _ x).trans hx
  have hyw : y ∈ forward e (Nat.le_max_left n m) W := by
    have hmem : y ∈ toLimit e k ⁻¹' limitSet e n W := by simpa only [mem_preimage, hy] using hz
    simpa only [preimage_limitSet, thread, k, dite_eq_left (Nat.le_max_left n m)] using hmem
  exact disjoint_left.1 (hlate (Nat.le_max_left n m)) hyw (by
    change toLimit e k y ∈ V
    rwa [hy])

theorem old_or_later_birth

TopologyByExample.MisraSparse.old_or_later_birth

A limit point is either old at a fixed stage or is born in a later designated copy.

theorem old_or_later_birth (n : ℕ) (z : Limit e) :
    (∃ x : Stage e n, toLimit e n x = z) ∨
      ∃ k, n < k ∧ ∃ i : (layer e k).Copies, ∃ y : MisraE0,
        (∀ s, y ≠ MisraE0.apex s) ∧ toLimit e k ((layer e k).copyMap i y) = z
Proof
:= by
  obtain ⟨⟨m, x⟩, rfl⟩ := Quot.exists_rep z
  change (∃ a : Stage e n, toLimit e n a = toLimit e m x) ∨ _
  induction m with
  | zero =>
    exact Or.inl ⟨advance e (Nat.zero_le n) x, toLimit_advance e _ x⟩
  | succ m ih =>
    by_cases h : m + 1 ≤ n
    · exact Or.inl ⟨advance e h x, toLimit_advance e h x⟩
    · rcases base_or_new (attachment e (layer e m)) x with ⟨a, rfl⟩ | ⟨i, y, hy, rfl⟩
      · rcases ih a with ⟨b, hb⟩ | ⟨k, hk, i, y, hy, he⟩
        · exact Or.inl ⟨b, hb.trans (toLimit_step e m a)⟩
        · exact Or.inr ⟨k, hk, i, y, hy, he.trans (toLimit_step e m a)⟩
      · exact Or.inr ⟨m + 1, Nat.lt_of_not_ge h, i, y, hy, rfl⟩

theorem preimage_closure_subset_of_tail_bound

TopologyByExample.MisraSparse.preimage_closure_subset_of_tail_bound

Tail-bounded extensions create no extra closure points on their starting stage.

theorem preimage_closure_subset_of_tail_bound (n : ℕ) {V : Set (Limit e)}
    (hb : ∀ k, n ≤ k → toLimit e (k + 1) ⁻¹' V ⊆
      (tailPatch (attachment e (layer e k)) (toLimit e k ⁻¹' V) ⊥).set) :
    toLimit e n ⁻¹' closure V ⊆ closure (toLimit e n ⁻¹' V)
Proof
:= by
  intro x hx
  by_contra hn
  let W : Set (Stage e n) := (closure (toLimit e n ⁻¹' V))ᶜ
  have hW : IsOpen W := isClosed_closure.isOpen_compl
  have hd : Disjoint W (toLimit e n ⁻¹' V) :=
    disjoint_left.2 (fun _ hw hv ↦ hw (subset_closure hv))
  have hdL := disjoint_limitSet_of_tail_bound e n hb hd
  have hxW : toLimit e n x ∈ limitSet e n W := by
    change x ∈ toLimit e n ⁻¹' limitSet e n W
    exact (preimage_limitSet_self e n W).symm ▸ hn
  exact disjoint_left.1 (hdL.closure_right (isOpen_limitSet e n hW)) hxW hx

theorem isRegularOpen_of_tail_bound

TopologyByExample.MisraSparse.isRegularOpen_of_tail_bound

A regular-open initial trace makes a tail-bounded open limit extension regular open.

theorem isRegularOpen_of_tail_bound {V : Set (Limit e)} (hV : IsOpen V) (n : ℕ)
    (hr : IsRegularOpen (toLimit e n ⁻¹' V))
    (hb : ∀ k, n ≤ k → toLimit e (k + 1) ⁻¹' V ⊆
      (tailPatch (attachment e (layer e k)) (toLimit e k ⁻¹' V) ⊥).set) :
    IsRegularOpen V
Proof
:= by
  apply le_antisymm
  · intro z hz
    by_contra hzV
    rcases old_or_later_birth e n z with ⟨x, rfl⟩ | ⟨k, hk, i, y, hy, rfl⟩
    · have hsub : toLimit e n ⁻¹' interior (closure V) ⊆
          interior (closure (toLimit e n ⁻¹' V)) :=
        interior_maximal
          ((preimage_mono interior_subset).trans (preimage_closure_subset_of_tail_bound e n hb))
          (isOpen_interior.preimage (continuous_toLimit e n))
      have hx := hsub hz
      rw [hr] at hx
      exact hzV hx
    · let a := (layer e k).copyMap i y
      obtain ⟨j, hj⟩ := exists_attachment_endpoint e k i y hy
      let O := toLimit e (k + 1) ⁻¹' interior (closure V)
      have hO : IsOpen O := isOpen_interior.preimage (continuous_toLimit e (k + 1))
      have hao : base (attachment e (layer e k)) (attachment e (layer e k) j false) ∈ O := by
        change toLimit e (k + 1) (step e k (attachment e (layer e k) j false)) ∈
          interior (closure V)
        rw [← toLimit_step, hj]
        exact hz
      have han : attachment e (layer e k) j false ∉ toLimit e k ⁻¹' V := by
        rw [hj]
        exact hzV
      obtain ⟨W, hW, ⟨b, hbO, hbW⟩, hd⟩ :=
        exists_open_disjoint_tailPatch_at_endpoint (attachment e (layer e k)) j false han hO hao
      have hd' : Disjoint W (toLimit e (k + 1) ⁻¹' V) := hd.mono_right (hb k hk.le)
      have he := disjoint_limitSet_of_tail_bound e (k + 1)
        (fun l hl ↦ hb l (hk.le.trans ((Nat.le_succ k).trans hl))) hd'
      have hbL : toLimit e (k + 1) b ∈ limitSet e (k + 1) W := by
        change b ∈ toLimit e (k + 1) ⁻¹' limitSet e (k + 1) W
        exact (preimage_limitSet_self e (k + 1) W).symm ▸ hbW
      exact disjoint_left.1 (he.closure_right (isOpen_limitSet e _ hW)) hbL
        (interior_subset hbO)
  · exact hV.subset_interior_closure