Program Instance oneofMonotonic {A} (x : G A) (l : list (G A))
`{ SizeMonotonic _ x} `(l \subset SizeMonotonic)
: SizeMonotonic (oneof x l).
Next Obligation.
rewrite !semOneofSize. elim : l H0 => [_ | g gs IH /subconsset [H2 H3]] /=.
- by apply monotonic.
- specialize (IH H3). move => a [ga [[Hga | Hga] Hgen]]; subst.
exists ga. split => //. left => //.
eapply monotonic; eauto. exists ga.
split. right => //.
apply H3 in Hga. by apply (monotonic H1).
Qed.

Lemma semElements {A} (l: list A) (def : A) :
(semGen (elements def l)) <--> if l is nil then [set def] else l.