Composing strict oracle PPT programs #
Strict oracle PPT certificates compose like closed ones: by monadic bind, with captured input,
deterministic pre- and postprocessing, conditionals and bounded adaptive loops. Every rule
quantifies over all shared stateful oracles and arbitrarily long replies, and preserves the
complete joint law of the result and the external oracle state.
Each rule first replaces its premises by clean realizations
(Cslib.Probability.IsOraclePPTOn.isTidyOraclePPTOn), so a later phase never sees partial
requests or stale storage left by an earlier one, and then composes those. Conditionals execute
only the selected branch: an unselected branch makes no external call. The only primitive
external operation is query_take, which returns a charged prefix of one reply; returning a full
unbounded reply is not oracle PPT (ComplexityTests.OraclePPT).
Main results #
Cslib.Probability.IsOraclePPTOn.query_take: one external call returning a reply prefix.Cslib.Probability.IsPPTOn.isOraclePPTOn: closed PPT programs are oracle PPT viasample.Cslib.Probability.IsOraclePPTOn.isPPTOn: conversely, a sampled closed program certified without external channels is closed PPT.Cslib.Probability.IsOraclePPTOn.bind,.bind_with,.pair,.keep_input,.map,.map_with,.preprocess: composition with charged intermediate data.Cslib.Probability.IsOraclePPTOn.cond,.ite,.finite_cases: dispatch to one branch.Cslib.Probability.IsOraclePPTOn.iterate_spec,.iterateWith_spec,.iterateWith_of_bounded_growth,.iterate_of_bounded_growth: bounded adaptive loops.
References #
Adapts the closed composition rules of Computability/Probabilistic/Composition.lean and
Computability/Probabilistic/Adaptive.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8 to strict oracle PPT.
One external call on channel op with an efficiently computed request, returning at most an
efficiently computed number of reply bits. Building the request and reading the prefix are
charged; the remainder of an arbitrarily long reply is never read.
Sequence two strict oracle PPT programs. The intermediate output length bounds the continuation's clock, and every effect of both phases on the shared oracle is retained.
Retain efficiently computed input data beside an oracle result.
Keep the original argument available to a later computation, charging its encoded copy.
A continuation may use both the caller's input and the first result.
Efficiently prepare the argument of a strict oracle PPT program.
Efficient deterministic postprocessing of every result preserves strict oracle PPT.
A deterministic callback may capture the original argument.
Select a branch with an efficient Boolean condition. Only the selected branch runs: the other branch makes no external call and cannot change the oracle state.
Select a branch with an efficiently decidable condition, executing only that branch.
A computed finite tag selects one certified branch, which alone is executed.
A bounded adaptive loop is strict oracle PPT when one invariant bounds every reachable state. The invariant holds for every possible result under every stateful oracle, and it is also established for the final state. Every iteration may query the shared oracle.
The loop body may capture the original input; the invariant describes the changing state.
Captured-input steps may grow by a polynomially bounded amount depending on that input, for every possible next state under every stateful oracle.
A strict oracle PPT step with constant growth can be repeated a polynomial number of times.
A closed strict PPT program is strict oracle PPT when sampled privately: its machine never uses an external channel, so every external oracle state is preserved.
A sampled closed program certified without external channels is closed strict PPT: the realizing machine has no channels, so it is a closed machine with the same output law.