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

Lemma list_sum_map_ext {X} `{EqDec X} (f : X -> nat) (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) -> list_sum (map f l) = list_sum (map f l').