unfold TrueRepeat_G2, TrueRepeat_G3.
repeat (inline_first; comp_skip).
comp_simp.
eapply comp_spec_impl_le.
eapply
comp_spec_ret.
simpl.
case_eq ( hd_error (filter P x0)); intuition.
rewrite orb_false_r in *.
eapply fold_left_orb_true_in.
eapply filter_In.
eapply hd_error_Some_In.
eauto.
trivial.
Qed.
Definition TrueRepeat_G3_bad :=
a <-$ A1;
compFold _ (fun b _ => x <-$ c a; ret b && negb (P x)) true (forNats n).

(* Specifications: *)
Theorem G3_TrueMult_equiv :
Pr[x <-$ TrueRepeat_G3; ret (fst x)] ==
Pr[TrueMult_G _ c A1 f n].