Definition bijection {X Y} (f : X -> Y) : Prop :=
exists g : Y -> X,
(forall x, g (f x) = x) /\
(forall y, f (g y) = y).

Lemma Qsum_map {X} (f g : X -> Q) (xs : list X):
(forall x, f x == g x) -> Qsum (map f xs) == Qsum (map g xs).