Definition mod2 (n : nat) : nat :=
n - 2 * div2 n.
Fixpoint power (m n:nat) : nat :=
match n with
| 0 => 1
| S n' => m * power m n'
end.

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).