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