Global Hint Resolve uniform_respectful : core.

Lemma part_lemma {X Y} (part : X -> Y -> bool) (f : Y -> Q) (xs : list X) :
(forall x x' y, part x y = true -> part x' y = true -> x = x') ->
NoDup xs -> forall ys : list Y,
(forall y, In y ys -> exists x, In x xs /\ part x y = true) ->
Qsum (map f ys) ==
Qsum (map (fun x => Qsum (map f (filter (part x) ys))) xs).