intuition.
unfold G2_3, G2_4.
inline_first.
comp_skip.
inline_first.
eapply comp_spec_impl_eq.
comp_skip.
eapply A_randomFunc_F_spec.
simpl in *.
comp_simp.
eapply comp_spec_ret; intuition.
pairInv.
intuition.
pairInv.
trivial.
pairInv.
simpl in *.
rewrite H3 in H4.
intuition.
pairInv.
trivial.
Qed.
Definition F_randomFunc_O f d :
OracleComp
(list (Bvector b))
(Bvector b)
(Bvector c * list ((list (Bvector b) * Bvector b) * Bvector c))  :=
fd <--$ OC_Query _ d;
match arrayLookup_f _ f fd with
| Some r => $ ret (r, ((d, fd), r) :: f)
| None => r <--$$ {0, 1}^c; $ ret (r, ((d, fd), r) :: f)
end.
Definition au_F_A : OracleComp (list (Bvector b)) (Bvector b) _ :=
[_, p ] <--$2 OC_Run _ _ _ A F_randomFunc_O nil;
let coll :=
match (findCollision _ _ (fst (split p)) ) with
| None => (nil, nil)
| Some p => fst p
end in
$ ret (coll).
Definition G2_3_bad :=
k_in <-$ {0, 1}^k;
[p, _] <-$2 au_F_A _ _ (WCR_Oracle _ F k_in) tt;
[d1, d2] <-2 p;
ret (negb (eqb d1 d2) && eqb (F k_in d1) (F k_in d2)).

(* Specifications: *)
Theorem G2_3_bad_small :
Pr[G2_3_bad] == Adv_WCR _ _ F (Rnd k) au_F_A.
Theorem G2_3_bad_small :
Pr[G2_3_bad] == Adv_WCR _ _ F (Rnd k) au_F_A.