Definition GOpt A := G (option A).
Global Instance Monad_GOpt : Monad GOpt := {
ret A x := returnGen (Some x);
bind A B := bindGenOpt;
}.

Lemma semSizeOpt_suchThatMaybe {A : Type} (g : G A) (p : A -> bool)
(s : nat) :
semGenSizeOpt (suchThatMaybe g p) s <--> semGenSize g s :&: p.