Documentation

SphereEversion.Indexing

Indexing types #

This file introduces IndexType : ℕ → Type such that IndexType 0 = ℕ and IndexType (N+1) = Fin (N+1). Each IndexType N has a total order and and inductive principle together with supporting lemmas.

def IndexType (n : ℕ) :

Our model indexing type depending on n : ℕ is ℕ if n = 0 and Fin n otherwise

Equations
Instances For
    @[simp]
    @[simp]
    theorem indexType_succ (n : ℕ) :
    IndexType (n + 1) = Fin (n + 1)
    @[simp]
    theorem indexType_of_zero_lt {n : ℕ} (h : 0 < n) :
    @[implicit_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    @[implicit_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    @[implicit_reducible]
    Equations
    theorem Set.countable_iff_exists_nonempty_indexType_equiv {α : Type u_1} {s : Set α} (hne : s.Nonempty) :
    s.Countable ↔ ∃ (n : ℕ), Nonempty (IndexType n ≃ ↑s)
    theorem IndexType.not_lt_zero {n : ℕ} (j : IndexType n) :
    ¬j < 0
    theorem IndexType.zero_le {n : ℕ} (i : IndexType n) :
    0 ≤ i
    Equations
    Instances For
      theorem IndexType.succ_eq {n : ℕ} (i : IndexType n) :
      i.succ = i ↔ IsMax i
      theorem IndexType.lt_succ {n : ℕ} (i : IndexType n) (h : ¬IsMax i) :
      i < i.succ
      theorem IndexType.le_max {n : ℕ} {i : IndexType n} (h : IsMax i) (j : IndexType n) :
      j ≤ i
      theorem IndexType.le_of_lt_succ {n : ℕ} (i : IndexType n) {j : IndexType n} (h : i < j.succ) :
      i ≤ j
      theorem IndexType.exists_castSucc_eq {n : ℕ} (i : IndexType (n + 1)) (hi : ¬IsMax i) :
      ∃ (i' : Fin n), i'.castSucc = i
      theorem IndexType.toNat_succ {n : ℕ} (i : IndexType n) (hi : ¬IsMax i) :
      theorem IndexType.induction_from {n : ℕ} {P : IndexType n → Prop} {i₀ : IndexType n} (h₀ : P i₀) (ih : ∀ i ≥ i₀, ¬IsMax i → P i → P i.succ) (i : IndexType n) :
      i ≥ i₀ → P i
      theorem IndexType.induction {n : ℕ} {P : IndexType n → Prop} (h₀ : P 0) (ih : ∀ (i : IndexType n), ¬IsMax i → P i → P i.succ) (i : IndexType n) :
      P i
      theorem IndexType.exists_by_induction {n : ℕ} {α : Type u_1} (P : IndexType n → α → Prop) (Q : IndexType n → α → α → Prop) (h₀ : ∃ (a : α), P 0 a) (ih : ∀ (n_1 : IndexType n) (a : α), P n_1 a → ¬IsMax n_1 → ∃ (a' : α), P n_1.succ a' ∧ Q n_1 a a') :
      ∃ (f : IndexType n → α), ∀ (n_1 : IndexType n), P n_1 (f n_1) ∧ (¬IsMax n_1 → Q n_1 (f n_1) (f n_1.succ))