Oracles that agree on the calls a program makes #
If every call of a program satisfies p (OracleComp.QueriesSatisfy), two handlers that agree on
the calls satisfying p interpret the program identically. For programs with private coins, the
predicate constrains only the external requests, and the output laws of two runs agree when the
two oracles have the same law on every request satisfying p.
Main results #
Cslib.OracleComp.QueriesSatisfy.interpret_congr: equal interpretations.Cslib.ProbOracleComp.QueriesSatisfy.eval_run_congr: equal output laws of runs.
theorem Cslib.OracleComp.QueriesSatisfy.interpret_congr {ι : Type u} {spec : OracleSpec ι} {α : Type v} {m : Type v → Type w} [Monad m] [LawfulMonad m] {p : ι → Prop} {program : OracleComp spec α} (h : QueriesSatisfy p program) {handler handler' : (q : ι) → m (spec q)} (hagree : ∀ (q : ι), p q → handler q = handler' q) :
Handlers that agree on every call satisfying p interpret a program whose calls all satisfy
p identically.
theorem Cslib.ProbOracleComp.QueriesSatisfy.eval_run_congr {Query α : Type} {spec : Query → Type} {p : Query → Prop} {program : ProbOracleComp spec α} (h : QueriesSatisfy p program) {oracle oracle' : (q : Query) → ProbComp (spec q)} (hagree : ∀ (q : Query), p q → (oracle q).eval = (oracle' q).eval) :
Runs of a program whose external requests all satisfy p have the same output law under two
oracles with the same law on every request satisfying p.