(* Quick characterization of the null sequence. *)

Definition sumn := foldr addn 0.

(* Specifications: *)
Lemma sumn_nseq x n : sumn (nseq n x) = x * n.
Lemma sumn_cat s1 s2 : sumn (s1 ++ s2) = sumn s1 + sumn s2.
Lemma sumn_rcons s n : sumn (rcons s n) = sumn s + n.
Lemma sumn_rev s : sumn (rev s) = sumn s.