Lean library · module TopologyByExample.Spaces.MisraLimitRegularOpen

Regular open extensions in the all-pairs limit

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

TopologyByExample.MisraAllPairs.exists_open_disjoint_tailPatch

A neighbourhood of an excluded old point meets an open set disjoint from its tail patch.

theorem exists_open_disjoint_tailPatch {X : Type*} [TopologicalSpace X]
    {U : Set X} {x : X} (hx : x ∉ U)
    {O : Set (Space (allPairs (X := X)))} (hO : IsOpen O) (hxo : base allPairs x ∈ O) :
    ∃ W : Set (Space (allPairs (X := X))), IsOpen W ∧ (O ∩ W).Nonempty ∧
      Disjoint W (tailPatch allPairs U ⊥).set
Proof
:= by
  classical
  have hV := hO.preimage (continuous_copy allPairs (x, x))
  have ha : MisraE0.apex false ∈ copy allPairs (x, x) ⁻¹' O := by
    simpa only [mem_preimage, copy_apex, allPairs, Bool.false_eq_true, ite_false] using hxo
  obtain ⟨δ, hδ⟩ := hV.2 false ha
  obtain ⟨α, hα⟩ := exists_gt δ
  obtain ⟨β, hβ, _⟩ := (hδ α hα).exists_mem_inter (hδ α hα)
  let z := MisraE0.cell false α β
  have hz : IsClopen ({z} : Set MisraE0) :=
    ⟨isClosed_singleton, MisraE0.isOpen_singleton_cell false α β⟩
  have hn : ∀ s, MisraE0.apex s ∉ ({z} : Set MisraE0) := by simp [z]
  let P := singlePatch (allPairs (X := X)) (x, x) {z} hn
  refine ⟨P.set, (isClopen_singlePatch allPairs (x, x) hz hn).isOpen,
    ⟨copy allPairs (x, x) z, hβ, ?_⟩, ?_⟩
  · simp [P, singlePatch]
  · apply Patch.disjoint
    · exact disjoint_bot_left
    · intro i
      by_cases hi : i = (x, x)
      · subst i
        simp [P, singlePatch, tailPatch, allPairs, hx]
      · simp [P, singlePatch, hi]

theorem disjoint_limitSet_of_tail_bound

TopologyByExample.MisraAllPairs.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}
    (hb : ∀ k, n ≤ k → toLimit (k + 1) ⁻¹' V ⊆
      (tailPatch allPairs (toLimit k ⁻¹' V) ⊥).set)
    {W : Set (Stage n)} (hd : Disjoint W (toLimit n ⁻¹' V)) :
    Disjoint (limitSet n W) V
Proof
:= by
  have hlate {k : ℕ} (h : n ≤ k) : Disjoint (forward h W) (toLimit 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 h]
      exact (disjoint_tailPatch allPairs ih ⊥ ⊥).mono_right (hb k h)
  apply disjoint_left.2
  intro z hz hv
  obtain ⟨⟨m, x⟩, hx⟩ := Quot.exists_rep z
  change toLimit m x = z at hx
  let k := max n m
  let y := advance (Nat.le_max_right n m) x
  have hy : toLimit k y = z := (toLimit_advance _ x).trans hx
  have hyw : y ∈ forward (Nat.le_max_left n m) W := by
    have hmem : y ∈ toLimit k ⁻¹' limitSet 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 k y ∈ V
    rwa [hy])

theorem isRegularOpen_of_tail_bound

TopologyByExample.MisraAllPairs.isRegularOpen_of_tail_bound

An open limit subset bounded by tail extensions eventually is regular open.

theorem isRegularOpen_of_tail_bound {V : Set Limit} (hV : IsOpen V) (n : ℕ)
    (hb : ∀ k, n ≤ k → toLimit (k + 1) ⁻¹' V ⊆
      (tailPatch allPairs (toLimit k ⁻¹' V) ⊥).set) : IsRegularOpen V
Proof
:= by
  apply le_antisymm
  · intro z hz
    by_contra hzV
    obtain ⟨⟨m, x⟩, hx⟩ := Quot.exists_rep z
    change toLimit m x = z at hx
    let k := max n m
    let y := advance (Nat.le_max_right n m) x
    have hy : toLimit k y = z := (toLimit_advance _ x).trans hx
    let O := toLimit (k + 1) ⁻¹' interior (closure V)
    have hO : IsOpen O := isOpen_interior.preimage (continuous_toLimit (k + 1))
    have hyo : base allPairs y ∈ O := by
      change toLimit (k + 1) (step k y) ∈ interior (closure V)
      rw [← toLimit_step, hy]
      exact hz
    have hyn : y ∉ toLimit k ⁻¹' V := by simpa only [mem_preimage, hy] using hzV
    obtain ⟨W, hW, ⟨a, haO, haW⟩, hd⟩ := exists_open_disjoint_tailPatch hyn hO hyo
    have hd' : Disjoint W (toLimit (k + 1) ⁻¹' V) :=
      hd.mono_right (hb k (Nat.le_max_left n m))
    have he := disjoint_limitSet_of_tail_bound (k + 1)
      (fun j hj ↦ hb j ((Nat.le_max_left n m).trans ((Nat.le_succ k).trans hj))) hd'
    have haL : toLimit (k + 1) a ∈ limitSet (k + 1) W := by
      change a ∈ toLimit (k + 1) ⁻¹' limitSet (k + 1) W
      exact (preimage_limitSet_self (k + 1) W).symm ▸ haW
    exact disjoint_left.1 (he.closure_right (isOpen_limitSet _ hW)) haL
      (interior_subset haO)
  · exact hV.subset_interior_closure

definition restrictedForward

TopologyByExample.MisraAllPairs.restrictedForward

Extend the trace of a prescribed limit subset, clipping each tail patch to that subset.

noncomputable def restrictedForward (O : Set Limit) {n m : ℕ} (h : n ≤ m) :
    Set (Stage m)
Definition
:=
  Nat.leRecOn h (fun {k} V ↦
    (tailPatch (allPairs (X := Stage k)) V ⊥).set ∩ toLimit (k + 1) ⁻¹' O)
    (toLimit n ⁻¹' O)

theorem restrictedForward_self

TopologyByExample.MisraAllPairs.restrictedForward_self

@[simp] theorem restrictedForward_self (O : Set Limit) (n : ℕ) :
    restrictedForward O (le_refl n) = toLimit n ⁻¹' O
Proof
:=
  Nat.leRecOn_self (motive := fun k ↦ Set (Stage k)) _

theorem restrictedForward_succ

TopologyByExample.MisraAllPairs.restrictedForward_succ

Each clipped extension is the intersection of a tail patch and the prescribed trace.

theorem restrictedForward_succ (O : Set Limit) {n m : ℕ} (h : n ≤ m) :
    restrictedForward O (h.trans (Nat.le_succ m)) =
      (tailPatch allPairs (restrictedForward O h) ⊥).set ∩ toLimit (m + 1) ⁻¹' O
Proof
:=
  Nat.leRecOn_succ (motive := fun k ↦ Set (Stage k)) h _

theorem restrictedForward_subset

TopologyByExample.MisraAllPairs.restrictedForward_subset

Clipped extensions stay within the prescribed trace.

theorem restrictedForward_subset (O : Set Limit) {n m : ℕ} (h : n ≤ m) :
    restrictedForward O h ⊆ toLimit m ⁻¹' O
Proof
:= by
  induction m, h using Nat.le_induction with
  | base => simp only [restrictedForward_self, subset_refl]
  | succ m h _ => rw [restrictedForward_succ O h]; exact inter_subset_right

theorem isOpen_restrictedForward

TopologyByExample.MisraAllPairs.isOpen_restrictedForward

Clipped extensions of an open subset are open at every stage.

theorem isOpen_restrictedForward {O : Set Limit} (hO : IsOpen O) {n m : ℕ} (h : n ≤ m) :
    IsOpen (restrictedForward O h)
Proof
:= by
  induction m, h using Nat.le_induction with
  | base => simpa only [restrictedForward_self] using hO.preimage (continuous_toLimit n)
  | succ m h ih =>
    rw [restrictedForward_succ O h]
    exact (isOpen_tailPatch allPairs ih ⊥).inter (hO.preimage (continuous_toLimit (m + 1)))

theorem preimage_restrictedForward_succ

TopologyByExample.MisraAllPairs.preimage_restrictedForward_succ

Clipping retains exact traces on the preceding stage.

theorem preimage_restrictedForward_succ (O : Set Limit) {n m : ℕ} (h : n ≤ m) :
    step m ⁻¹' restrictedForward O (h.trans (Nat.le_succ m)) = restrictedForward O h
Proof
:= by
  rw [restrictedForward_succ O h]
  ext x
  change (x ∈ restrictedForward O h ∧ toLimit (m + 1) (step m x) ∈ O) ↔ _
  rw [← toLimit_step]
  exact ⟨And.left, fun hx ↦ ⟨hx, restrictedForward_subset O h hx⟩⟩

definition restrictedThread

TopologyByExample.MisraAllPairs.restrictedThread

The prescribed earlier traces and clipped later extensions form a compatible thread.

noncomputable def restrictedThread (O : Set Limit) (n k : ℕ) : Set (Stage k)
:=
  if h : n ≤ k then restrictedForward O h else toLimit k ⁻¹' O

theorem restrictedThread_compatible

TopologyByExample.MisraAllPairs.restrictedThread_compatible

Successive clipped-thread members have identical old-point traces.

theorem restrictedThread_compatible (O : Set Limit) (n k : ℕ) :
    step k ⁻¹' restrictedThread O n (k + 1) = restrictedThread O n k
Proof
:= by
  by_cases h : n ≤ k
  · rw [restrictedThread, dite_eq_left (h.trans (Nat.le_succ k)),
      restrictedThread, dite_eq_left h, preimage_restrictedForward_succ O h]
  · by_cases h' : n ≤ k + 1
    · have he : n = k + 1 := by omega
      subst n
      simp only [restrictedThread, dite_eq_left (le_refl (k + 1)),
        restrictedForward_self, dite_eq_right h]
      ext x
      exact Iff.of_eq (congrArg (fun z ↦ z ∈ O) (toLimit_step k x).symm)
    · simp only [restrictedThread, dite_eq_right h', dite_eq_right h]
      ext x
      exact Iff.of_eq (congrArg (fun z ↦ z ∈ O) (toLimit_step k x).symm)

definition restrictedSet

TopologyByExample.MisraAllPairs.restrictedSet

Descend the clipped thread to a subset of the limit.

noncomputable def restrictedSet (O : Set Limit) (n : ℕ) : Set Limit
Definition
:=
  Set.ofPred <| Quot.lift (fun p : Σ k, Stage k ↦ p.2 ∈ restrictedThread O n p.1) (by
    intro a b h
    cases h with
    | next k x =>
      exact congrArg (fun V : Set (Stage k) ↦ x ∈ V)
        (restrictedThread_compatible O n k).symm)

theorem preimage_restrictedSet

TopologyByExample.MisraAllPairs.preimage_restrictedSet

The trace of a clipped limit extension is its thread member.

@[simp] theorem preimage_restrictedSet (O : Set Limit) (n k : ℕ) :
    toLimit k ⁻¹' restrictedSet O n = restrictedThread O n k
Proof
:= rfl

theorem restrictedSet_subset

TopologyByExample.MisraAllPairs.restrictedSet_subset

Clipped limit extensions are contained in the original subset.

theorem restrictedSet_subset (O : Set Limit) (n : ℕ) : restrictedSet O n ⊆ O
Proof
:= by
  intro z
  induction z using Quot.inductionOn with
  | h p =>
    change p.2 ∈ restrictedThread O n p.1 → toLimit p.1 p.2 ∈ O
    unfold restrictedThread
    split_ifs with h
    · intro hp
      exact restrictedForward_subset O h hp
    · exact id

theorem preimage_restrictedSet_self

TopologyByExample.MisraAllPairs.preimage_restrictedSet_self

A clipped extension retains the complete prescribed trace at its starting stage.

theorem preimage_restrictedSet_self (O : Set Limit) (n : ℕ) :
    toLimit n ⁻¹' restrictedSet O n = toLimit n ⁻¹' O
Proof
:= by
  simp [restrictedThread]

theorem isOpen_restrictedSet

TopologyByExample.MisraAllPairs.isOpen_restrictedSet

Clipping an open subset produces an open limit extension.

theorem isOpen_restrictedSet {O : Set Limit} (hO : IsOpen O) (n : ℕ) :
    IsOpen (restrictedSet O n)
Proof
:= by
  apply (isQuotientMap_quot_mk (r := Rel)).isOpen_preimage.mp
  apply isOpen_sigma_iff.2
  intro k
  change IsOpen (restrictedThread O n k)
  unfold restrictedThread
  split_ifs with h
  · exact isOpen_restrictedForward hO h
  · exact hO.preimage (continuous_toLimit k)

theorem isRegularOpen_restrictedSet

TopologyByExample.MisraAllPairs.isRegularOpen_restrictedSet

Every clipped open extension is regular open.

theorem isRegularOpen_restrictedSet {O : Set Limit} (hO : IsOpen O) (n : ℕ) :
    IsRegularOpen (restrictedSet O n)
Proof
:= by
  apply isRegularOpen_of_tail_bound (isOpen_restrictedSet hO n) n
  intro k h
  simp only [preimage_restrictedSet, restrictedThread]
  rw [dite_eq_left (h.trans (Nat.le_succ k)), dite_eq_left h, restrictedForward_succ O h]
  exact inter_subset_left

theorem exists_regularOpen_refinement

TopologyByExample.MisraAllPairs.exists_regularOpen_refinement

Every open neighbourhood contains a regular open one with the same trace at a chosen stage.

theorem exists_regularOpen_refinement {O : Set Limit} (hO : IsOpen O) (n : ℕ) :
    ∃ V : Set Limit, IsRegularOpen V ∧ V ⊆ O ∧ toLimit n ⁻¹' V = toLimit n ⁻¹' O
Proof
:=
  ⟨restrictedSet O n, isRegularOpen_restrictedSet hO n, restrictedSet_subset O n,
    preimage_restrictedSet_self O n⟩

On this site: The all-pairs Misra limit: Regular open refinements with prescribed finite-stage trace

instance

The all-pairs limit has a base of regular open neighbourhoods.

instance : SemiregularSpace Limit
Proof
:= by
  refine ⟨isTopologicalBasis_of_isOpen_of_nhds (fun _ hs ↦ IsRegularOpen.isOpen hs) ?_⟩
  intro z O hz hO
  obtain ⟨⟨n, x⟩, hx⟩ := Quot.exists_rep z
  change toLimit n x = z at hx
  refine ⟨restrictedSet O n, isRegularOpen_restrictedSet hO n, ?_, restrictedSet_subset O n⟩
  rw [← hx] at hz ⊢
  change x ∈ toLimit n ⁻¹' restrictedSet O n
  rw [preimage_restrictedSet_self]
  exact hz