The coordinate loop of the repeated decider #
The repeated decider of thm:parallel-repetition runs the input decider D̄ on each of the
k coordinates of its input (planning/repetition-verifier.md, R3(c)). This module is that
loop, on the state (k, remX, remY, remA, remB, ctx) — k a unary counter, remX, remY the
questions still to be cut into blocks of s, remA, remB the answers still to be checked,
ctx = (D̄, n, s, B):
preProgcuts a block offremXandremY, checks that the current answers are bit strings of length at mostB(okBits), and returns the query(D̄, (n, x_i, y_i, a_i, b_i))for the universal machine with the next state, ornilwhen a check fails;stepProgruns the query throughunivand continues when the answer is1;finalProgaccepts, once the counter is exhausted, when no answer is left over;coordBodyis the body of the loop.
Two readings of the loop are proved: a forward one, decLoop_of_acc — the loop accepts when
every coordinate passes (DecAcc) — and an inversion, decLoop_inv — the loop accepts
only then, obtained from stepProg_inv by determinism of the semantics. The inversion is
what the game equivalence of the repeated verifier needs, since the input decider may not
halt on inputs it does not accept. A third, decLoop_runs_bounded, is the forward reading
with costs, against an oracle for the answers of univ, for the time bound.
Bit strings of bounded length #
d is the encoding of a bit string of length at most B: the walk bitWalk against the
unary budget B ends with the string exhausted.
Equations
- MIPRE.Cost.Prog.okBits B d = match d.bitWalk (MIPRE.Cost.Data.ofNat B) with | MIPRE.Cost.Data.nil.cons a => true | x => false
Instances For
The state and the programs #
The context of the loop: the input decider D̄, the index n, and s, B in unary.
Equations
- MIPRE.Cost.Prog.decCtx dD nD s B = dD.cons (nD.cons ((MIPRE.Cost.Data.ofNat s).cons (MIPRE.Cost.Data.ofNat B)))
Instances For
On the exhausted counter: accept iff no answer is left over.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Before the call: cut a block off remX and remY, check the current answers, and return
the query with the next state — or nil.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The cost of preProg at s, B, on remainders of sizes U, Y, answer lists of sizes
A, Bs, a context of size C and a counter of size K.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The step: the call to the input decider #
One coordinate: preProg, then the query through univ, continuing when the answer is
1 (cons nil nil), stopping with 0 otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The result of the step from the answer r of univ: continue with st' on 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body #
The body of the coordinate loop: on the exhausted counter, finalProg; otherwise the
step on the decremented state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Inversion of the body. On the exhausted counter, the body stops with the verdict of
finalProg; otherwise it is a run of the step on the decremented state.
The loop #
Acceptance of the coordinate loop: k answers on each side, each a bit string of
length at most B, and the input decider, through univ, answering 1 on every
coordinate.
Equations
Instances For
The loop accepts on DecAcc.
The loop accepts only on DecAcc.
The loop with costs #
The potential queries of the loop, in order: one per coordinate while answers remain.
Equations
Instances For
The per-iteration budget of the loop, in a bound Z on the sizes and the cost Tu of a
call.
Instances For
The loop halts within (k + 1) · coordIter Z Tu when univ answers every potential
query within Tu and the sizes in play are bounded by Z.