# Documentation

Mathlib.Data.Finsupp.Fin

# cons and tail for maps Fin n →₀ M#

We interpret maps Fin n →₀ M as n-tuples of elements of M, We define the following operations:

• Finsupp.tail : the tail of a map Fin (n + 1) →₀ M, i.e., its last n entries;
• Finsupp.cons : adding an element at the beginning of an n-tuple, to get an n + 1-tuple;

In this context, we prove some usual properties of tail and cons, analogous to those of Data.Fin.Tuple.Basic.

def Finsupp.tail {n : } {M : Type u_1} [Zero M] (s : Fin (n + 1) →₀ M) :

tail for maps Fin (n + 1) →₀ M. See Fin.tail for more details.

Equations
• = Finsupp.equivFunOnFinite.symm (Fin.tail s)
Instances For
def Finsupp.cons {n : } {M : Type u_1} [Zero M] (y : M) (s : Fin n →₀ M) :
Fin (n + 1) →₀ M

cons for maps Fin n →₀ M. See Fin.cons for more details.

Equations
• = Finsupp.equivFunOnFinite.symm (Fin.cons y s)
Instances For
theorem Finsupp.tail_apply {n : } (i : Fin n) {M : Type u_1} [Zero M] (t : Fin (n + 1) →₀ M) :
() i = t ()
@[simp]
theorem Finsupp.cons_zero {n : } {M : Type u_1} [Zero M] (y : M) (s : Fin n →₀ M) :
() 0 = y
@[simp]
theorem Finsupp.cons_succ {n : } (i : Fin n) {M : Type u_1} [Zero M] (y : M) (s : Fin n →₀ M) :
() () = s i
@[simp]
theorem Finsupp.tail_cons {n : } {M : Type u_1} [Zero M] (y : M) (s : Fin n →₀ M) :
@[simp]
theorem Finsupp.cons_tail {n : } {M : Type u_1} [Zero M] (t : Fin (n + 1) →₀ M) :
Finsupp.cons (t 0) () = t
@[simp]
theorem Finsupp.cons_zero_zero {n : } {M : Type u_1} [Zero M] :
= 0
theorem Finsupp.cons_ne_zero_of_left {n : } {M : Type u_1} [Zero M] {y : M} {s : Fin n →₀ M} (h : y 0) :
0
theorem Finsupp.cons_ne_zero_of_right {n : } {M : Type u_1} [Zero M] {y : M} {s : Fin n →₀ M} (h : s 0) :
0
theorem Finsupp.cons_ne_zero_iff {n : } {M : Type u_1} [Zero M] {y : M} {s : Fin n →₀ M} :
0 y 0 s 0