Query budgets of substituted programs #
A reduction built with ProbOracleComp.simulate handler A keeps A's private samples and replaces
each external query q by the program handler q. When every handler program costs at most the
cost of the query it replaces, the reduction keeps A's budget. In particular, a reduction whose
handlers each make at most one query makes at most as many queries as A, and a handler family
whose external queries all satisfy p' yields a substituted program whose external queries all
satisfy p'.
Main results #
Cslib.ProbOracleComp.isCostBounded_simulate: substitution preserves cost budgets.Cslib.ProbOracleComp.IsQueryBounded.simulate: one-query handlers preserve query budgets.Cslib.ProbOracleComp.queriesSatisfy_simulate: handler query predicates propagate through substitution.
A substituted program costs at most n when the original program does and each handler
program costs at most the cost of the query it replaces.
A substituted program makes at most n queries when the original program does and each
handler program makes at most one.
A substituted program asks only external queries satisfying p' when every handler program
does, whatever the original program asks.