(* How to generate the multiple product for a constant *)
Fixpoint lgenk (n: nat) (k: K p) {struct n} : list (K p) :=
match n  with
O => nil
| 1 => k :: nil
| S n1 => k::lgenk n1 k
end.

(* Specifications: *)
(* The length is ok *)
Lemma lgenk_length n k : length (lgenk n k) = n.
(* 0 as a multiple product *)
Lemma genk0_mprod vs :  0 = lgenk (length vs) 0%f *X* vs.
(* A linear combination is a multiple product *)
Lemma cbl_mprod vs v : cbl vs v ->
exists ks, length ks = length vs /\ v = ks *X* vs.
Lemma scalE_add0 x : x + (- (1)) .* x = 0.
Lemma scalE_integral k x : k .* x = 0 -> {k = 0%f} + {x = 0}.
Lemma scalE_swap k1 k2 x : k1 .* (k2 .* x) = k2 .* (k1 .* x).
Lemma addE_swap x1 x2 x3 : x1 + (x2 + x3) = x2 + (x1 + x3).
Lemma cblnil x : cbl nil x -> x = 0.
Lemma cbl1 x y : cbl (x::nil) y -> exists k, y = k .* x.
End VectorSpace.