(* 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.

Lemma sumn_map_mult_c_r X f c (l:list X) :
sumn (map (fun x => f x *c) l) = sumn (map f l)*c.