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

Lemma semSize_retryBody {A} (n : nat) (g : G (option A)) (s : nat) :
match n with
| S n' => semGenSize (retry n' g) s <--> semGenSize g s
| O => True
end ->
semGenSize (retryBody retry n g) s <--> semGenSize g s.