(* 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_natsLess f n :
sumn (map f (natsLess n)) = sumn (map (fun i => f (n - (1 + i))) (natsLess n)).