Global Instance Finite_bool : Finite bool.

(* Specifications: *)
Lemma Qsum_map_update_probs {X} (q : Q) (l : list (X * Q)) (f : X * Q -> Q) :
(forall x q1 q2, f (x, q1 * q2) == q1 * f (x, q2)) ->
Qsum (map f (update_probs q l)) ==
q * Qsum (map f l).