(* The base as the list of all the generators *)

(* Specifications: *)
(* Each generator is in the base *)
Lemma e_in_base n i : i < n -> In ('e_i) (base n).
(* An element of the base is a generator *)
Lemma e_in_base_ex n v :
In v (base n) -> exists p1, p1 < n /\ v = 'e_p1.
(* The length of the base is n *)
Lemma base_length n : length (base n) = n.
(* The base is free *)
Lemma base_free n : free _ (base n).
Lemma k2l_mprod n (v: kn n) : kn2l n v *X* base n = v.
(* Every vector is a linear combination of the base *)
Lemma cbl_base n v : cbl _ (base n) v.
Fixpoint proj (n: nat) k : (kn n) -> K :=
match n return kn n -> K with
| O => fun _ => 0%f
| S n1 => fun l => let (a,l1) := l in
match k with | O => a | S k1 =>
proj n1 k1 l1
end
end.