fact: Definition suchThatMaybeOpt {A : Type} (g : G (option A)) (p : A -> bool) : G (option A) := sized (fun n => retry n (fmap (fun x => match x with | None => None | Some a => if p a then Some a else None end) g)).
imports: Coq(String List ZArith Lia) mathcomp.ssreflect.ssreflect mathcomp(ssrfun ssrbool ssrnat eqtype seq) QuickChick(RandomQC RoseTrees Sets Tactics Producer)