Section IND_CPA_SecretKey_O_concrete_3Proc.
Variable A B State : Set.
Hypothesis B_EqDec : EqDec B.
Variable A1 : Comp (A * State).
Variable A2 : A -> OracleComp Plaintext Ciphertext B.
Variable A3 : State -> B -> Comp bool.
Hypothesis Ciphertext_EqDec : EqDec Ciphertext.
Variable ptDefault : Plaintext.
Definition IND_CPA_SecretKey_O_3Proc_G0 :=
[a, s_A] <-$2 A1;
key <-$ KeyGen ;
[b, _] <-$2 (A2 a) _ _ (EncryptOracle _ key) tt;
A3 s_A b.
Definition IND_CPA_SecretKey_O_3Proc_G1 :=
[a, s_A] <-$2 A1;
key <-$ KeyGen ;
[b, _] <-$2 (A2 a) _ _ (EncryptNothingOracle _ ptDefault key) tt;
A3 s_A b.
Definition IND_CPA_SecretKey_O_3Proc_Advantage := | Pr[IND_CPA_SecretKey_O_3Proc_G0] - Pr[IND_CPA_SecretKey_O_3Proc_G1]  |.
Definition A_c :=
[a, s_A] <--$2$ A1;
x <--$ A2 a;
$ A3 s_A x.

Theorem IND_CPA_SecretKey_2Proc_impl_O :
IND_CPA_SecretKey_O_3Proc_Advantage == IND_CPA_SecretKey_O_Advantage A_c _ ptDefault.