(** ** Polynomial defined as a sum of a range of variables

  - [psum start len] is the polynomial with [start+len] variables and
    consisting in the sum of the variables [start] to [start+len-1].
*)

Definition psum (start len : nat) : pol :=
  pplus (pcst (start+len) 0) (pplusl (map (pproj (start+len)) (seq start len))).

(* Specifications: *)
Lemma psum_correct start len l : peval (psum start len) l = plusl (map (fun i => nth i l 0) (seq start len)).
Lemma pWF_psum start len : pWF (psum start len).
Lemma parity_psum start len : parity (psum start len) = start + len.