Definition update_probs {B} q l :=
  List.map
    (fun yq' : B * Q => let (y, q') := yq' in (y, q * q'))
    l.

(* Specifications: *)
Lemma update_probs_OK: forall {B} q l, Qeq (sum_dist (@update_probs B q l)) (q * sum_dist l).
Lemma update_probs_OK: forall {B} q l, Qeq (sum_dist (@update_probs B q l)) (q * sum_dist l).