Program Instance elementsUnsized {A} {def : A} (l : list A) :
Unsized (elements def l).
Next Obligation.
rewrite ! semElementsSize. by case: l.
Qed.
(* A rather long frequency proof, probably we can do better *)

Lemma pick_exists :
forall {A} (l: list (nat * G A)) n def,
n <  sum_fst l <->
exists x, List.In x l /\ pick def l n = x /\ fst x <> 0.