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:

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
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
theorem Finsupp.tail_apply {n : } (i : Fin n) {M : Type u_1} [Zero M] (t : Fin (n + 1) →₀ M) :
t.tail i = t i.succ
@[simp]
theorem Finsupp.cons_zero {n : } {M : Type u_1} [Zero M] (y : M) (s : Fin n →₀ M) :
(cons y s) 0 = y
@[simp]
theorem Finsupp.cons_succ {n : } (i : Fin n) {M : Type u_1} [Zero M] (y : M) (s : Fin n →₀ M) :
(cons y s) i.succ = s i
@[simp]
theorem Finsupp.tail_cons {n : } {M : Type u_1} [Zero M] (y : M) (s : Fin n →₀ M) :
(cons y s).tail = s
@[simp]
theorem Finsupp.tail_update_zero {n : } {M : Type u_1} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) :
(t.update 0 y).tail = t.tail
@[simp]
theorem Finsupp.tail_update_succ {n : } (i : Fin n) {M : Type u_1} [Zero M] (y : M) (t : Fin (n + 1) →₀ M) :
(t.update i.succ y).tail = t.tail.update i y
@[simp]
theorem Finsupp.cons_tail {n : } {M : Type u_1} [Zero M] (t : Fin (n + 1) →₀ M) :
cons (t 0) t.tail = t
@[simp]
theorem Finsupp.cons_zero_zero {n : } {M : Type u_1} [Zero M] :
cons 0 0 = 0
theorem Finsupp.cons_ne_zero_of_left {n : } {M : Type u_1} [Zero M] {y : M} {s : Fin n →₀ M} (h : y 0) :
cons y s 0
theorem Finsupp.cons_ne_zero_of_right {n : } {M : Type u_1} [Zero M] {y : M} {s : Fin n →₀ M} (h : s 0) :
cons y s 0
theorem Finsupp.cons_ne_zero_iff {n : } {M : Type u_1} [Zero M] {y : M} {s : Fin n →₀ M} :
cons y s 0 y 0 s 0
theorem Finsupp.cons_support {n : } {M : Type u_1} [Zero M] {y : M} {s : Fin n →₀ M} :
theorem Finsupp.cons_right_injective {n : } {M : Type u_2} [Zero M] (y : M) :