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.

(* Specifications: *)
Lemma power_le_l : forall a b n, a <= b -> power a n <= power b n.
Definition plusl (l:list nat) : nat :=
fold_right plus 0 l.
Lemma plusl_cons : forall x l, plusl (x :: l) = x + plusl l.
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).