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 sum_2D {X Y} `{Finite X, Finite Y} (f : X * Y -> nat) :
sumF f = sumF (fun x => sumF (fun y => f (x,y))).