unfold G2_2, G2_3.
inline_first.
comp_skip.
inline_first.
comp_skip.
comp_simp.
simpl.
intuition.
Qed.
Definition G2_4 :=
k_in <-$ {0, 1}^k;
[b, f] <-$2 A _ _ (fun s a => b <- F k_in a; randomFunc_mem _ _ ({0, 1}^c) s (a, b)) nil;
ret (b, funcCollision _ _ (fst (split f))).

(* Specifications: *)
Theorem arrayLookup_noCollision_eq :
forall (A B C : Set)(eqda : EqDec A)(eqdb : EqDec B)(x1 : list ((A * B) * C)) a b0 b,
arrayLookup _ x1 (a, b) = Some b0 ->
collidesWith _ _ (fst (split x1)) a b = false ->
arrayLookup_f _ x1 b = Some b0.
Theorem arrayLookup_noCollision_eq :
forall (A B C : Set)(eqda : EqDec A)(eqdb : EqDec B)(x1 : list ((A * B) * C)) a b0 b,
arrayLookup _ x1 (a, b) = Some b0 ->
collidesWith _ _ (fst (split x1)) a b = false ->
arrayLookup_f _ x1 b = Some b0.