The typed oracularized decider #
Piece O4 of planning/oracularization.md (issue #189): the decider of the paper's typed
oracularized verifier (sec:orac-def, fig:oracle-decider) as a total CL.TypedDecider over the
three roles, whose acceptance law is O2's bit-string predicate oraclePred.
The paper runs the input decider in its timeout-counter form, which halts within a bound
B_𝒟(n) read off its description, and parses answers against that bound. The ambient model has
no such form, and the detyping compiler needs a total typed decider, so the timeout is made
explicit: an index routine (OracleDecider.Index) supplies at index n a parse cut B n and a
simulation budget K n, and the decider runs an unclocked core under the clocked universal
machine for K n steps. Three programs, each fixed, with the input programs as data:
gameProg j, the game check: on(S̄, D̄, n, z, a₁, a₂), ask the input sampler for the marginalsL^𝖠_{≤ j} zandL^𝖡_{≤ j} zand run the input decider on(n, L^𝖠 z, L^𝖡 z, a₁, a₂), all through the universal machine;core j, on((S̄, D̄, B), (n, t, x, u, y, a, b)): parse each answer by its role againstB, run the game check for each oracle, and accept iff every check offig:oracle-deciderpasses;shell j, on((S̄, D̄, Ī), input): ask the index routineĪfor(K n, B n)and run the core on((S̄, D̄, B n), input)under the clocked universal machine with budgetK n.
The decider is hardcode (shell j) (encode (S̄, D̄, Ī)), so its program is the s-m-n function of
the three programs. It halts on every input, whatever the input programs do
(oracleDecider_total), and it accepts exactly when the core accepts within the budget
(oracleDecider_accepts_iff). The core's acceptance law is oraclePred exactly, with no
hypothesis on the input verifier (core_accepts_iff): the input decider need not halt on the
inputs it rejects, which is why both directions go through inversion lemmas of the programs.
So the decider's acceptance implies oraclePred unconditionally (accepts_sound), and
oraclePred implies acceptance once the core's run fits in the budget (accepts_complete) —
the role the timeout bound plays in the paper's completeness.
Inverting the routing combinators #
Inverting callWithContext: a run is a run of the callee on the argument, followed by the
postprocessor.
Inverting a routed call: when the router calls, a run is a run of the callee on the argument, followed by the postprocessor.
Inverting a routed call when the router answers directly.
The game check #
The input sampler's program, first field of a game check's input.
Instances For
The input decider's program.
Equations
Instances For
The index.
Equations
Instances For
The seed.
Equations
Instances For
The pair of answers.
Equations
Instances For
The marginal query (n, w, marginal, j, z) at the game check's seed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
First call: Alice's marginal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Second call: Bob's marginal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Third call: the input decider on the two questions and the two answers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The three stages of the game check.
Equations
Instances For
Equations
Instances For
Equations
Instances For
The game check at level j.
Equations
Instances For
The input of a game check.
Equations
- MIPRE.OracleDecider.gInput sp dp n z a₁ a₂ = (MIPRE.Cost.encode sp).cons ((MIPRE.Cost.encode dp).cons (MIPRE.Cost.encode (n, z, a₁, a₂)))
Instances For
The question the game check computes for player w from the seed z.
Equations
- MIPRE.OracleDecider.margBits S n j w z = MIPRE.CL.toBits ((MIPRE.CL.CLFun.truncate j (S.cl n w)).eval (MIPRE.CL.ofBits (S.dim n) z))
Instances For
The input decider's input in a game check.
Equations
- MIPRE.OracleDecider.gameArg S n j z a₁ a₂ = MIPRE.Cost.encode (n, MIPRE.OracleDecider.margBits S n j MIPRE.Player.alice z, MIPRE.OracleDecider.margBits S n j MIPRE.Player.bob z, a₁, a₂)
Instances For
The two marginal calls, through the universal machine.
The game check runs the input decider on the two questions and the two answers, and returns whether it accepted.
The sampler's run on a marginal query, read back through the universal machine.
Inverting the game check: every run of it is a run of the input decider on the two questions and the two answers, whose verdict it returns.
The game check accepts exactly when the input decider does on the two questions and the two answers.
Parsing an answer by its role #
A datum decodes to a bit string exactly when it is its encoding.
An oracle's answer parses to a pair exactly when its postorder parse is the encoding of that pair.
Postorder parsing, as a polynomial-time function (Prog.parseProg).
Equations
- One or more equations did not get rendered due to their size.
Instances For
a ∧ b on Boolean-valued functions.
Equations
Instances For
¬ a ∨ b on Boolean-valued functions.
Equations
Instances For
Equality of two raw trees.
Equations
Instances For
Whether a role datum is the oracle's.
Equations
Instances For
The postorder parse of an answer datum.
Equations
Instances For
A bit string datum of length at most the cut.
Equations
Instances For
The bounded parse, as a check: an oracle's answer must parse to the encoding of a pair of strings of length at most the cut, an isolated player's must have length at most the cut.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The parsed answer, as a datum: the parse tree of an oracle's answer, an isolated player's answer as it is.
Equations
Instances For
The datum a parsed answer is represented by.
Equations
Instances For
Two answers of the same shape are equal exactly when their data are.
The parse check is the bounded parse, and the parsed datum represents the parse.
The bounded parse returns answers of the role's shape.
The core #
The fields of the core's input ((S̄, D̄, B), (n, t, x, u, y, a, b)).
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
The core's input.
Equations
Instances For
The parse checks and the parsed answers of the two players.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Check 2(a): equal roles force equal answers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Check 2(b), for the role r against the role r': an oracle's component for an isolated
player's role must be that player's answer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The checks that need no call: both parses, check 2(a) and check 2(b) both ways.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The local checks are the checks of oaccepts that need no call.
The game checks and the verdict #
The game check's input for the answer datum rep at the seed z.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Route a game check: when cond holds of the core's input (read through view), call the game
check on arg; otherwise pass true on. The whole state is the context either way.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The game check of each player runs when that player is an oracle whose answer parsed.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
A routed game check.
Equations
- MIPRE.OracleDecider.gameStage j cond arg view = MIPRE.Cost.Prog.routeOneCall (MIPRE.OracleDecider.gameRoute cond arg view) (MIPRE.OracleDecider.gameProg j) MIPRE.Cost.PolyTimeFun.treePair
Instances For
The verdict: the local checks passed and both game checks returned true.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The second game check and the verdict.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The core of the typed oracularized decider.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The core's acceptance law #
The input decider's input in the game check at a seed is the query of 𝒱_n's predicate.
One game check is the game check of fig:oracle-decider.
A game-check stage returns true only if the role's game check holds.
A game-check stage returns true when the role's game check holds.
oraclePred accepts exactly the pairs that parse to answers oaccepts accepts.
The core's acceptance law is oraclePred, with no hypothesis on the input verifier: the
input decider need not halt on the inputs it rejects.
The shell: the index routine and the clock #
The index routine of the oracularized decider: at index n, a simulation budget K n,
in unary, and a parse cut B n — the explicit form of the paper's timeout bound B_𝒟(n), which
plays both roles there.
The parse cut.
The simulation budget.
- prog : Cost.Prog
The routine.
- runs (n : ℕ) : ∃ (t : ℕ), self.prog.Runs (Cost.encode n) ((Cost.Data.ofNat (self.budget n)).cons (Cost.encode (self.cut n))) t
On
nit returns(K n, B n).
Instances For
The index routine's program, third of the hardcoded programs.
Equations
Instances For
The index of the typed input.
Equations
Instances For
Call the index routine on the index.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Assemble the clocked simulation's input (K, (core, ((S̄, D̄, B), input))) from the index
routine's answer (K, B).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The index stage.
Equations
Instances For
The shell: the index stage, the clocked simulation of the core, and the check of its result.
Equations
Instances For
The shell's run on every input with the hardcoded programs: the verdict of the core, clocked at the budget, on the input with the parse cut.
The typed oracularized decider, at level j, of the input programs S̄, D̄ with the index
routine I.
Equations
- MIPRE.OracleDecider.oracleDecider j sp dp I = { prog := MIPRE.Cost.hardcode (MIPRE.OracleDecider.shell j) (MIPRE.Cost.encode (sp, dp, I.prog)), closed := ⋯ }
Instances For
The decider halts on every input, whatever the input programs do.
The decider accepts exactly when the core accepts within the budget.
Soundness of the acceptance law: the decider accepts only answers oraclePred accepts, at
the index routine's cut, whatever the budget.
Completeness of the acceptance law: the decider accepts the answers oraclePred accepts
once the core's accepting run fits in the budget.
The decider's program as a polynomial-time function of the three programs: the s-m-n map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The typed predicate of the detyping compiler #
The detyping compiler reads a typed decider through typedPredicate, whose typed game over the
complete graph on the roles is O2's (oracleSampler_cl). Its acceptance factors through the
bounded parse, and it accepts the honest encodings once the core's runs on them fit in the budget:
the two forms in which O2's value transfers take a typed predicate.
The compiler's typed predicate of the oracularized decider accepts only what oaccepts
accepts after the bounded parse.
The compiler's typed predicate of the oracularized decider accepts the honest encodings of
every answer pair oaccepts accepts, when the inner cut holds them and the core's accepting runs
fit in the budget.
Soundness of the compiled typed game: its quantum value above 1 - ε puts val*(𝒱_n) at
the parse cut at least 1 - 24√ε, whatever the budget.
Completeness of the compiled typed game: a value-1 PCC strategy of 𝒱_n at the parse
cut gives one of the doubled typed game, when the inner cut holds every honest encoding and the
core's accepting runs fit in the budget.