Running a program against a stateful oracle #
A program with private samples and typed external calls (Cslib.ProbOracleComp) interacts with a
stateful probabilistic oracle answering each call q with an element of spec q, possibly at
random and updating a private state. Cslib.ProbOracleComp.runWith is the joint law of the result
and the final oracle state, with fresh fair samples for the private coins, and
Cslib.ProbOracleComp.acceptProbWith the probability that a Boolean program returns true.
A prover of an interactive proof is such an oracle; Cslib.Complexity.Prover.run is the case of
word queries and replies (Cslib.Complexity.Prover.run_eq_runWith).
Main definitions #
Cslib.ProbOracleComp.runWith: the joint law of the result and the final oracle state.Cslib.ProbOracleComp.acceptProbWith: the acceptance probability.
Main results #
Cslib.ProbOracleComp.runWith_pure,Cslib.ProbOracleComp.runWith_bind,Cslib.ProbOracleComp.runWith_map,Cslib.ProbOracleComp.runWith_query,Cslib.ProbOracleComp.runWith_sample: structural rules forrunWith.Cslib.ProbOracleComp.acceptProbWith_bind: sequencing for acceptance probability.Cslib.ProbOracleComp.acceptProbWith_query_bind,Cslib.ProbOracleComp.acceptProbWith_sample_bind: averages over replies and samples.Cslib.ProbOracleComp.acceptProbWith_bind_ite_le: a check run only after another one accepted accepts at most as often.
The joint law of the result of program and the final state of the oracle answering its
external calls, starting from the state s. Private samples are fresh.
Instances For
The probability that program returns true against the oracle from the state s.
Instances For
Running program >>= next runs program, then runs next at its result from the oracle
state it reached.
Mapping f over a program maps it over the result and keeps the final oracle state.
An acceptance probability is at most 1.
The acceptance probability of program >>= next averages the acceptance probability of next
over the joint law of the result and oracle state of program.
The acceptance probability after an external call q averages over the oracle's replies and
next states.
The acceptance probability after a private sample averages over the law of the sample, with the oracle state unchanged.
Running a second check only after a first one accepted accepts at most as often as the first check.