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_remove_aux_map {X} `{EqDec X} (a : X) : forall (l : list X) (f : X -> nat),
In a l ->
(list_sum (map f (remove_aux Classes.eqb l a)) =
list_sum (remove_aux Nat.eqb (map f l) (f a)))%nat.