(* Nats smaller than n *)
Fixpoint natsLess n : list nat :=
match n with
0 => []
| S n => n :: natsLess n
end.
(* Sum *)
Fixpoint sumn (A:list nat) :=
match A with
[] => 0
| a::A => a + sumn A
end.
Hint Rewrite sumn_app : list.
induction A;cbn. reflexivity. autorewrite with list in *. lia.
Qed.
Definition maxl := fold_right max 0.

Lemma maxl_leq_l c l :
(forall n, n el l -> n <= c) -> maxl l <= c.