Lean library · module TopologyByExample.Spaces.MisraSparseStageMaps

Extending a continuous section from any finite sparse stage

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
variable {Y : Type*} [TopologicalSpace Y] (e : OmegaOne → OmegaOne)

definition futureSection

TopologyByExample.MisraSparse.futureSection

Extend a section from any stage through a finite number of later attachments.

noncomputable def futureSection {n m : ℕ} (h : n ≤ m)
    (f : MapSection Y e (layer e n)) : MapSection Y e (layer e m)
:=
  Nat.leRecOn h (fun {_k} g ↦ g.next) f

theorem futureSection_self

TopologyByExample.MisraSparse.futureSection_self

@[simp] theorem futureSection_self (n : ℕ) (f : MapSection Y e (layer e n)) :
    futureSection e (le_refl n) f = f
Proof
:= Nat.leRecOn_self _

theorem futureSection_succ

TopologyByExample.MisraSparse.futureSection_succ

One additional step takes the constant extension over each new copy.

theorem futureSection_succ {n m : ℕ} (h : n ≤ m) (f : MapSection Y e (layer e n)) :
    futureSection e (h.trans (Nat.le_succ m)) f = (futureSection e h f).next
Proof
:=
  Nat.leRecOn_succ h _

theorem futureSection_step

TopologyByExample.MisraSparse.futureSection_step

Values on old points are retained by the extended section.

theorem futureSection_step {n m : ℕ} (h : n ≤ m) (f : MapSection Y e (layer e n))
    (x : Stage e m) :
    (futureSection e (h.trans (Nat.le_succ m)) f).value (step e m x) =
      (futureSection e h f).value x
Proof
:= by
  rw [futureSection_succ e h]
  rfl

definition sectionThread

TopologyByExample.MisraSparse.sectionThread

Later sections and earlier pullbacks give a function at every stage.

noncomputable def sectionThread (n : ℕ) (f : MapSection Y e (layer e n)) (k : ℕ) :
    Stage e k → Y
:=
  if h : n ≤ k then (futureSection e h f).value
  else f.value ∘ advance e (Nat.le_of_lt (Nat.lt_of_not_ge h))

theorem sectionThread_self

TopologyByExample.MisraSparse.sectionThread_self

The section thread retains its starting function.

@[simp] theorem sectionThread_self (n : ℕ) (f : MapSection Y e (layer e n)) :
    sectionThread e n f n = f.value
Proof
:= by simp [sectionThread]

theorem sectionThread_step

TopologyByExample.MisraSparse.sectionThread_step

The stage functions agree along every bonding map.

theorem sectionThread_step (n : ℕ) (f : MapSection Y e (layer e n)) (k : ℕ)
    (x : Stage e k) :
    sectionThread e n f (k + 1) (step e k x) = sectionThread e n f k x
Proof
:= by
  by_cases h : n ≤ k
  · rw [sectionThread, dite_eq_left (h.trans (Nat.le_succ k)),
      sectionThread, dite_eq_left h, futureSection_step e h]
  · by_cases h' : n ≤ k + 1
    · have he : n = k + 1 := by omega
      subst n
      rw [sectionThread_self, sectionThread, dite_eq_right h]
      change f.value (step e k x) = f.value (advance e _ x)
      congr 1
      exact ((advance_succ e (le_refl k) x).trans
        (congrArg (step e k) (advance_self e k x))).symm
    · rw [sectionThread, dite_eq_right h', sectionThread, dite_eq_right h]
      exact congrArg f.value (advance_succ_left e (by omega) x)

theorem continuous_sectionThread

TopologyByExample.MisraSparse.continuous_sectionThread

Each stage function of a section thread is continuous.

theorem continuous_sectionThread (n : ℕ) (f : MapSection Y e (layer e n)) (k : ℕ) :
    Continuous (sectionThread e n f k)
Proof
:= by
  unfold sectionThread
  split_ifs with h
  · exact (futureSection e h f).continuous_value
  · exact f.continuous_value.comp (continuous_advance e _)

definition stageLimitMap

TopologyByExample.MisraSparse.stageLimitMap

Descend a section starting at an arbitrary finite stage to the whole sparse limit.

noncomputable def stageLimitMap (n : ℕ) (f : MapSection Y e (layer e n)) : Limit e → Y
Definition
:=
  Quot.lift (fun p : Σ k, Stage e k ↦ sectionThread e n f p.1 p.2) (by
    intro a b h
    cases h with
    | step k x => exact (sectionThread_step e n f k x).symm)

theorem continuous_stageLimitMap

TopologyByExample.MisraSparse.continuous_stageLimitMap

The descended map is continuous.

theorem continuous_stageLimitMap (n : ℕ) (f : MapSection Y e (layer e n)) :
    Continuous (stageLimitMap e n f)
Proof
:= by
  apply continuous_quot_lift
  exact continuous_sigma (continuous_sectionThread e n f)

theorem stageLimitMap_toLimit_self

TopologyByExample.MisraSparse.stageLimitMap_toLimit_self

The descended map has the prescribed value on its starting stage.

theorem stageLimitMap_toLimit_self (n : ℕ) (f : MapSection Y e (layer e n)) (x : Stage e n) :
    stageLimitMap e n f (toLimit e n x) = f.value x
Proof
:= by
  change sectionThread e n f n x = f.value x
  rw [sectionThread_self]