(* Our final vector *)
Definition Kn := kn p.
Definition K0 := genk p 0%f.
Definition Keq: Kn -> Kn -> bool := eq p.
Definition Kadd: Kn -> Kn -> Kn := add p.
Definition Kscal: K -> Kn -> Kn := scal p.
Definition Kproj: nat -> Kn -> K := proj p.
Definition Ksprod: Kn -> Kn -> K := pscal p.
Definition Kgen := gen p.
Canonical Structure v_eparams :=
Build_eparams Kn K K0 Keq Kadd Kscal.
Definition f : vparamsProp v_eparams := fn p.
(* Prod of two vectors as list *)
Fixpoint kprod (n : nat) : kn n -> kn n -> kn n :=
match n with
| 0%nat => fun a b => tt
| S n1 =>
fun l1 l2 =>
let (v1, l3) := l1 in
let (v2, l4) := l2 in ((v1 * v2)%f, kprod n1 l3 l4)
end.
Local Notation "a  [*]  b" := (kprod _ a b) (at level 40).

Lemma kprod_addl n a b c :
(a + b) [*] c = a [*] c + b [*] c :> kn n.