Instance frequencySizeMonotonic_alt :
forall {A : Type} (g0 : G A) (lg : seq (nat * G A)),
SizeMonotonic g0 ->
lg \subset [set x | SizeMonotonic x.2 ] ->
SizeMonotonic (frequency g0 lg).

(* Specifications: *)
Lemma eq_lt_0 : (fun x => x <= 0) <--> [set 0].
Lemma semBacktrackFuelDef {A} fuel (l : list (nat * G (option A))) size :
sum_fst l = 0 ->
semGenSize (backtrackFuel fuel 0 l) size <--> [set None].
Lemma in_memP {A : eqType} x (l : seq A) :
reflect (List.In x l) (x \in l)%bool.
Lemma forall_leq_sum_fst {A} (l : list (nat * A)) :
forall a n, seq_In l (n, a) -> n <= sum_fst l.
Lemma pickDrop_leq_top {A} (l : seq (nat * G (option A))) (n : nat) k g l' size s :
pickDrop l n = (k, g, l') ->
semGenSize g size (Some s) ->
n < sum_fst l.
Lemma backtrackFuelSizeMonotonic {A : Type} tot fuel (lg : seq (nat * G (option A))) :
sum_fst lg = tot -> length lg = fuel ->
lg \subset [set x | SizeMonotonic x.2 ] ->
SizeMonotonic (backtrackFuel fuel tot lg).
Lemma pickDrop_subset {A} (l1 l2 : seq (nat * G (option A))) (n m : nat) g :
pickDrop l1 n = (m, g, l2) ->
l2 \subset l1.
Lemma length_sum_lst {A} (l : list (nat * A)) :
length l = 0 ->
sum_fst l = 0.