Set Implicit Arguments.
Definition funcomp {X Y Z} (g : Y -> Z) (f : X -> Y)  :=
fun x => g (f x).
Notation "f >> g" := (funcomp g f) (at level 50).
Fixpoint it (n: nat) {X: Type} (f: X -> X) (s: X) :=
match n with
| 0 => s
| S n => f (it n f s)
end.
(* step up the <= game *)
Instance max_proper: Proper (le ++> le ++> le) max.
Instance plus_proper: Proper (le ++> le ++> le) plus.
Instance lt_le_subrel: subrelation lt le.
Fixpoint Sum (N: list nat) :=
match N with
| nil => 0
| n :: N => n + Sum N
end.

Lemma Sum_app N1 N2:
Sum (N1 ++ N2) = Sum N1 + Sum N2.