(* Iterated contraction *)
Definition mcontra n (ll: list (kn n)) (x: vect n) :=
fold_left (fun x l => #<l,x>#) ll x.
Notation "#<< l , x >>#" := (mcontra _ l x).

(* Specifications: *)
Lemma mcontra_nil n (x: vect n) : #<<nil, x>># = x.
Lemma mcontra0 n lfs : #<< lfs, 0 >># = (0: vect n).
Hint Rewrite mcontra0: GRm0.
Lemma mcontra_id n a l (M: vect n) : #<< a::a::l, M>># = 0.
Lemma mcontra_scal n k lfs (x: vect n) : #<< lfs, k .* x >># = k .* #<< lfs , x >>#.
Lemma mcontra_swap n a b l (M: vect n) :
#<< a::b::l, M>># = (-(1)).*  #<<b::a::l, M>>#.
Lemma mcontra_add n lfs (x y: vect n) :
#<< lfs, x + y >># = #<< lfs, x >># + #<< lfs,  y >>#.
Lemma mcontra_conj n lfs b (x: vect n) :
#<<lfs, x ^_ b >># = #<< lfs, x >># ^_ (iter negb (length lfs) b).
Lemma mcontra_hom n k (x: vect n) l :
hom n k x -> hom n (k - length l) #<<l, x>>#.