Definition normalize {X} `{Finite X} (d : dist X) : dist X.
refine {|
dist_pmf := map (fun x => (x, eval_dist d (Classes.eqb x))) enum;
dist_law := _;
|}.

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').