(* M is decomposable and l is its decomposition *)
Definition decomposable n l M := is_vector_space n l /\ M = joinl n l.

Lemma decomp_hom n (l: list (vect n)) M : decomposable n l M -> hom n (length l) M.
Fixpoint contra (n : nat) {struct n}: kn n -> vect n -> vect n :=
match n return (kn n -> vect n -> vect n) with
| 0%nat => fun k a => 0
| S n1 =>
fun lf l1 =>
let (k, lf1) := lf in
let (l2, l3) := l1 in
((- (1)).* (contra n1 lf1 l2),  (k : K) .* l2 + contra n1 lf1 l3)
end.