Hint Resolve scal_hom.
(* Get homogeneity part *)
Fixpoint get_hom (n m : nat) {struct n} : vect n -> vect n :=
match n return (vect n -> vect n) with
| 0%nat => fun a => match m with O => a | S _ => 0 end
| S n1 =>
fun l1 =>
let (l2, l3) := l1 in
((match m with O => [0]
| S m1 => get_hom n1 m1 l2
end), get_hom n1 m l3)
end.

(* Specifications: *)
Lemma get_hom0 n m : get_hom n m [0] = [0].
Lemma get_homk0 n k: get_hom n 0 [k] = [k].
Lemma get_homkS n m k: get_hom n m.+1 [k] = [0].
Lemma get_hom_ei n m i :  i < n ->
get_hom n m 'e_i = match m with 1 => 'e_i | _ => [0] end.
Lemma get_hom_scal n m k x :
get_hom n m (k .* x) = k .* get_hom n m x.
Lemma get_hom_add n m x y :
get_hom n m (x + y) = get_hom n m x + get_hom n m y.
Lemma get_hom_up n m x : n < m -> get_hom n m x = [0].
Fixpoint sum (n : nat) (f: (nat -> vect n)) (m : nat) {struct m} :
vect n :=
match m with
| 0%nat => f 0%nat
| S m1 => f m + sum n f m1
end.
Lemma sumEl n f m :
sum n f m.+1 = f 0%nat + sum n (fun m => f m.+1) m.
Lemma sumEr n f m : sum n f m.+1 = f m.+1 + sum n f m.
Lemma get_hom_sum n (x : vect n) :
x = sum n (fun m => get_hom n m x) n.
Lemma hom_get_hom n (x : vect n) m : hom n m (get_hom n m x).
Fixpoint first_deg (n : nat) {struct n} : vect n -> nat :=
match n return (vect n -> nat) with
| 0%nat => fun a => 0%nat
| S n1 =>
fun l1 =>
let (l2, l3) := l1 in
if l2 ?= 0 then first_deg n1 l3 else S (first_deg n1 l2)
end.