unfold G2, Gi.
fcf_skip.
fcf_simp.
fcf_to_prhl_eq.
comp_skip.
eapply (fcf_oracle_eq (fun a b => a = fst b)); trivial; intuition; subst.
unfold Oi.
comp_simp.
destruct (ge_dec n 0).
simpl.
fcf_ident_expand_l.
comp_skip.
eapply comp_spec_ret; intuition.
omega.
simpl in  H1.
intuition; subst.
comp_simp.
simpl in *.
intuition; subst.
eapply comp_spec_eq_refl.
Qed.

(* Step 3: rewrite using the equalities in the previous steps, and then use some arithmetic to show that the distance between G1 and G2 is small. *)
Theorem G1_G2_close :
| Pr[G1] - Pr[G2] | <= (q / 1) * k.