proposition: Theorem security_based_on_prf LA A q: ValidPackage LA [interface #val #[query]: 'unit → 'word × 'word ] A_export A -> fdisjoint LA ( EVAL_locs_tt :|: EVAL_locs_ff :|: GEN_HYB_locs ) -> AdvantageE (GEN_HYB_pkg q) (GEN false) A = 0 -> Advantage GEN A <= \sum_(i < q) prf_epsilon (A ∘ GEN_HYB_EVAL_pkg i).
proof: Proof. move=> vA H GEN_equiv_false. rewrite Advantage_E Advantage_sym. ssprove triangle (GEN true) [:: pack (GEN_HYB_pkg 0) ; pack (GEN_HYB_pkg q) ] (GEN false) A as ineq. apply: le_trans. 1: by apply: ineq. rewrite !fdisjointUr in H. move: H => /andP [/andP [H1 H2] H3]. move: {ineq H1 H2 H3} (H1, H2, H3, fdisjoints0) => H. rewrite GEN_equiv_true ?fdisjointUr ?H // GRing.add0r. rewrite GEN_equiv_false GRing.addr0. by rewrite hyb_security_based_on_prf // !fdisjointUr !H. Qed.
imports: Relational(OrderEnrichedCategory GenericRulesSimple) mathcomp(all_ssreflect all_algebra reals distr realsum ssrnat ssreflect ssrfun ssrbool ssrnum eqtype choice seq) Mon(SPropBase) Crypt(Axioms ChoiceAsOrd SubDistr Couplings UniformDistrLemmas FreeProbProg Theta_dens RulesStateProb pkg_core_definition choice_type pkg_composition pkg_rhl Package Prelude) extructures(ord fset fmap) Equations(Equations)