Section IND_CPA_SecretKey_OI_impl_O.
Hypothesis KeyGen_wf :
well_formed_comp KeyGen.
Hypothesis A2_wf :
forall a,
well_formed_oc (A2 a).
Variable maxA : nat.
Hypothesis maxA_correct :
forall ls s_A,
In (ls, s_A) (getSupport A1) ->
length ls <= maxA.
Variable IND_CPA_Adv : Rat.
Hypothesis IND_CPA_Adv_correct :
(forall i,
IND_CPA_SecretKey_O_Advantage (A_c
(B1 defA _ _ A1 i)
A2
(B2
(fun x : A =>
key <-$ KeyGen;
z <-$
(A2 x) unit unit_EqDec (EncryptOracle Ciphertext_EqDec key) tt;
[b, _]<-2 z; ret b)
(fun x : A =>
key <-$ KeyGen;
z <-$
(A2 x) unit unit_EqDec
(EncryptNothingOracle Ciphertext_EqDec ptDefault key) tt;
[b, _]<-2 z; ret b) B_EqDec A3)
)
_
ptDefault
<= IND_CPA_Adv)%rat.
reflexivity.
Qed.
reflexivity.
Qed.
Hypothesis Encrypt_wf :
forall k p,
well_formed_comp (Encrypt k p).

Theorem IND_CPA_OI_impl_O :
(IND_CPA_SecretKey_OI_Advantage <= maxA / 1 * IND_CPA_Adv)%rat.