Lazy random oracles behind a represented state #
A game usually keeps its random-oracle tables in its own state: association lists, several caches
in a record, or caches for several oracles at once. When each call of such a handler, read through
a map rep from the game state to a RandomOracle.Cache, is a lazy RandomOracle.answer, the
game has the law of completing the represented cache once and answering every call from the
completed table (eval_run_interpret_eq_complete_bind). The per-call hypothesis is the only
game-specific step of an eager/lazy argument.
Several oracles are one oracle on the sum of their interfaces. RandomOracle.Cache.sum, re-exported
here, joins their caches, so that one represented state serves them all, and bind_complete_sum
splits the completed table back into one table per oracle.
Main results #
Cslib.RandomOracle.run_interpret_eq_complete_bind,Cslib.RandomOracle.eval_run_interpret_eq_complete_bind: a handler that is a lazy random oracle on a represented cache has the law of the completed table.Cslib.RandomOracle.run_interpret_bind_complete,Cslib.RandomOracle.eval_run_interpret_bind_complete: the joint law of its result and the completion of its final represented cache, the relation an approximate simulation (OracleComp.closeTo_run_interpret_simulation) is stated against.Cslib.RandomOracle.bind_complete_sum: completing a joined cache completes each side independently.
A stateful handler that, read through rep, answers every call as the lazy random oracle
answer distribution has the joint law of its result and the completion of its represented final
cache: completing the represented initial cache, answering every call from the completed table, and
keeping that table.
A stateful handler that, read through rep, answers every call as the lazy random oracle
answer distribution has the result law of completing the represented initial cache and answering
every call from the completed table.
run_interpret_bind_complete for a closed stateful handler.
A closed stateful handler that, read through rep, answers every call as the lazy random
oracle answer distribution has the result law of completing the represented initial cache and
answering every call from the completed table.
Completing a joined cache completes its two sides independently.