Definition normalize {X} `{Finite X} (d : dist X) : dist X.

Lemma list_sum_map_extQ {X} `{EqDec X} (f : X -> Q) (l : list X) : forall (l' : list X), NoDup l -> NoDup l' -> (forall x, In x l -> In x l') -> (forall x, In x l' -> In x l) -> Qsum (map f l) == Qsum (map f l').