Definition plusl (l:list nat) : nat :=
  fold_right plus 0 l.

(* Specifications: *)
Lemma plusl_cons : forall x l, plusl (x :: l) = x + plusl l.
Lemma plusl_app l1 l2 : plusl (l1++l2) = plusl l1 + plusl l2.
Lemma plusl_compat : forall A (l : list A) f g, (forall x, In x l -> f x <= g x) -> plusl (map f l) <= plusl (map g l).