(* Base of k vector *)
Fixpoint base (n: nat) k:list (vect n) :=
  match n return list (vect n) with 
  | O =>  match k with | O => 1%f::nil | _ => nil end
  | S n1 => 
          match k with | O => 
                     map (lift n1) (base n1 k) | S k1 => 
           (map (dlift n1) (base n1 k1) ++ 
            map (lift n1) (base n1 k))%list
          end
  end.

(* Specifications: *)
Lemma proj_base_length n (x: vect n) k : length (proj n k x) = length (base n k).
Lemma base0 n : base n 0 = 'e_n::nil.
Lemma base_lt_nil m n : m < n -> base m n = nil.
Lemma base_n n : base n n = all n::nil.
Lemma base_length n k : length (base n k) = bin n k.
Lemma base_hom n k v : k <= n -> In v (base n k) -> hom n k v.
Lemma proj_homk n (x: vect n) k : hom n k x -> proj n k x *X* base n k = x.
Lemma base_free n k : free _ (base n k).
Lemma e_in_base1 n i : i < n -> In 'e_i (base n 1).
Lemma e_in_base1_ex n v : In v (base n 1) -> exists p1, p1 < n /\ v = 'e_p1.
Lemma base1_length n : length (base n 1) = n.
Lemma base_nil n k : n < k -> base n k = nil.
Lemma cbl1_hom1_equiv n (x: vect n) : cbl _ (base n 1) x <-> hom n 1 x.
Lemma cblk_homk_equiv n k (x: vect n): cbl _ (base n k) x <-> hom n k x.