fact: Fixpoint pick {A : Type} (def : G A) (xs : list (nat * G A)) n : nat * G A := match xs with | nil => (0, def) | (k, x) :: xs => if (n < k) then (k, x) else pick def xs (n - k) end.
imports: Coq(String List ZArith Lia) mathcomp.ssreflect.ssreflect mathcomp(ssrfun ssrbool ssrnat eqtype seq) QuickChick(RandomQC RoseTrees Sets Tactics Producer)