(* 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_c X c (l:list X) :
sumn (map (fun _ => c) l) = length l * c.