Documentation

Foundation.Vorspiel.Nat.Matrix

def Nat.natToVec :
ℕ → (n : ℕ) → Option (Fin n → ℕ)
Equations
Instances For
    @[simp]
    theorem Nat.natToVec_vecToNat {n : ℕ} (v : Fin n → ℕ) :
    theorem Nat.lt_of_eq_natToVec {n e : ℕ} {v : Fin n → ℕ} (h : e.natToVec n = some v) (i : Fin n) :
    v i < e
    @[irreducible]

    List form of Nat.natToVec: the same decoding, with the length out of the type.

    Equations
    Instances For

      natToVec succeeds exactly when the length-free decoding has the expected length.

      theorem Nat.natToVec_isSome_of_length {e k : ℕ} (h : e.natToList.length = k) :
      ∃ (v : Fin k → ℕ), e.natToVec k = some v