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.

(* Specifications: *)
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).
Lemma first_deg0 n : first_deg n 0 = 0%nat.
Lemma first_deg0i n v : first_deg n v = 0%nat -> hom n 0 v.
Lemma hom_first_deg n k x : x <> 0 -> hom n k x -> first_deg n x = k.