Global Instance Finite_unit : Finite unit.Global Instance Finite_bool_vec {n} : Finite (vec n bool).Definition transform_pair {X Y Z} (tp : X * Y * Z) : X * (Y * Z) :=
  (fst (fst tp), (snd (fst tp), snd tp)).

Lemma sumFQ_single_lst {X} (x0 : X) (xs : list X) (f : X -> Q) : In x0 xs -> NoDup xs -> (forall x, x <> x0 -> f x == 0) -> Qsum (map f xs) == f x0.