Set Warnings "-extraction-opaque-accessed,-extraction".
Set Warnings "-notation-overridden,-parsing".
GenLow GenLowInterface
GenHighImpl GenHighInterface
RandomQC Tactics Sets.
Set Bullet Behavior "Strict Subproofs".
Module Import GenHigh := GenHighImpl.Impl GenLow.

(* Specifications: *)
Lemma oneOf_freq {A} (g : G A) (gs : list (G A)) size :
semGenSize (oneOf (g ;; gs)) size <-->
semGenSize (freq ((1, g) ;; map (fun x => (1, x)) gs)) size.
Lemma semFreq :
forall {A : Type} (ng : nat * G A) (l : seq (nat * G A)),
List.Forall (fun x => x.1 > 0) (ng :: l) ->
semGen (freq ((fst ng, snd ng) ;; l)) <-->
\bigcup_(x in (ng :: l)) semGen x.2.
Lemma semFreqSize :
forall {A : Type} (ng : nat * G A) (l : seq (nat * G A)) (size : nat),
List.Forall (fun x => x.1 > 0) (ng :: l) ->
semGenSize (freq ((fst ng, snd ng) ;; l)) size <-->
\bigcup_(x in (ng :: l)) semGenSize x.2 size.
Lemma bigcup_cons_setI_subset_compat_backtrack_weak
{A} (n : nat) (g g' : G (option A)) (l l' : seq (nat * G (option A))) :
(forall s, isSome :&: semGenSize g s  \subset isSome :&: semGenSize g' s) ->
(forall s, \bigcup_(x in (l :&: (fun x => x.1 <> 0))) (isSome :&: semGenSize x.2 s) \subset
\bigcup_(x in (l' :&: (fun x => x.1 <> 0))) (isSome :&: semGenSize x.2 s)) ->
(forall s, \bigcup_(x in (((n, g) :: l) :&: (fun x => x.1 <> 0))) (isSome :&: semGenSize x.2 s) \subset
\bigcup_(x in (((n, g') :: l') :&: (fun x => x.1 <> 0))) (isSome :&: semGenSize x.2 s)).
Lemma bigcup_cons_setI_subset_pres_backtrack_weak
{A} (n : nat) (g : G (option A)) (l l' : seq (nat * G (option A))) :
(forall s, \bigcup_(x in (l :&: (fun x => x.1 <> 0))) (isSome :&: semGenSize x.2 s) \subset
\bigcup_(x in (l' :&: (fun x => x.1 <> 0))) (isSome :&: semGenSize x.2 s)) ->
(forall s, \bigcup_(x in (l :&: (fun x => x.1 <> 0))) (isSome :&: semGenSize x.2 s) \subset
\bigcup_(x in ((n, g) :: l') :&: (fun x => x.1 <> 0)) (isSome :&: semGenSize x.2 s)).