Query budgets of randomized programs #
A program with private coins, ProbOracleComp spec α, makes two kinds of calls: private samples
(Sum.inl) and external queries (Sum.inr). Its query budgets are the budgets
OracleComp.IsCostBounded of a cost that is 0 on every sample:
ProbOracleComp.IsQueryBounded program n: at mostnexternal queries on every path, whatever the samples and the replies;ProbOracleComp.QueriesSatisfy p program: every external query satisfiesp, for example a bound on its length.
All rules of OracleComp.IsCostBounded apply. A program over the external interface alone, with
its calls made external queries, keeps its budget (isCostBounded_interpret_query).
Meaning. Against every stateful oracle, the external queries recorded on a supported run
respect the budget (transcript_cost_le). Conversely, when every reply type is nonempty, a program
whose recorded queries respect the budget against every stateful oracle satisfies it
(isCostBounded_iff_transcript_cost_le): an oracle that answers its first call with a chosen
reply realizes each path. This is how a certificate stated through executions, such as an oracle
machine's, yields a structural budget. Without nonempty reply types the converse fails: if some
reply type is empty, no oracle exists, and the condition on executions holds vacuously.
Main definitions #
Cslib.ProbOracleComp.IsQueryBounded: at mostnexternal queries on every path.Cslib.ProbOracleComp.QueriesSatisfy: every external query on every path satisfiesp.
Main results #
Cslib.ProbOracleComp.isCostBounded_sample: private samples cost nothing.Cslib.ProbOracleComp.isCostBounded_interpret_query: budgets of programs without private coins.Cslib.ProbOracleComp.isCostBounded_iff_transcript_cost_le: the structural budget is the budget of every logged execution.
The program makes at most n external queries on every path, whatever its private samples and
the replies. Private samples are free.
Instances For
Every external query of the program, on every path, satisfies p. Private samples are
unconstrained.
Instances For
A closed sampler makes no external query.
A single external query costs its cost.
A program over the external interface alone keeps its budget when its calls become external queries of a program with private coins.
A closed sampler makes no external query.
A single external query is one query.
A program without private coins makes as many external queries as it makes calls.
A closed sampler makes no external query.
A single external query satisfies p when its request does.
A weaker predicate on external queries is still satisfied.
Every program satisfies a predicate that holds for every external query.
Logged executions #
Against every stateful oracle, the external queries recorded on a supported run cost at most the budget. Private samples are not recorded.
If, against every stateful oracle, the external queries recorded on every supported run cost
at most n, and every reply type is nonempty, then the program's external queries cost at most
n on every path.
When every reply type is nonempty, a program's external queries cost at most n on every
path exactly when, against every stateful oracle, those recorded on every supported run do.
Against every stateful oracle, a supported run records at most n external queries.
Against every stateful oracle, every external query recorded on a supported run satisfies
p.
When every reply type is nonempty and, against every stateful oracle, every supported run
records at most n external queries, the program makes at most n external queries.
When every reply type is nonempty and, against every stateful oracle, every external query
recorded on a supported run satisfies p, every external query of the program satisfies p.