The program of the repeated decider #
The decider of ComputeParrepVerifier (thm:parallel-repetition;
planning/repetition-verifier.md, R3(c)) as a program of the ambient model, before the s-m-n
construction. On ((S̄, D̄, λ, τ, β), (n, x, y, a, b)) it
- sanitizes
x, y, a, binto bit strings (bitsProg: every element read as a bit), so that the rest of the program is total on every datum; - computes, in unary,
s = s(n)fromS̄,m = τ(|λ| + |n|), the repetition countk = 2^m, the question lengthk s, and the parse lengthB = 2^{β(|λ| + |n|)}; - checks
|x| = |y| = k sand thata,bare the serializations of the data they parse to (Data.parse,Data.toBitsPost), the four verdicts combined byandExpr; - runs the coordinate loop
coordBodyon the state(k, x, y, parse a, parse b, (D̄, n, s, B)).
prepProg is steps 1–3, returning the state of the loop or nil; its run lemma
prepProg_runs is a straight line of deterministic steps, generated mechanically.
Sanitizing a list into a bit string #
Body of the sanitizer: on cons rem acc, move the head of rem, read as a bit, onto acc.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The sanitizer: the bits of a list, encode (bitsOf l).
Equations
Instances For
Conjunction of four verdicts #
ok₁ ∧ ok₂ ∧ ok₃ ∧ ok₄ on encoded booleans at the given indices (each test extends the
environment by two entries).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The straight-line prefix of the decider (generated) #
Steps 1–3 of the repeated decider, returning the state of the coordinate loop or nil.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The cost of parseProg on x.
Equations
- MIPRE.Cost.Prog.parseCost x = (List.length x + 2) * ((MIPRE.Cost.encode x).size + 2 * List.length x + 25)
Instances For
The full preparation, the main program and the core #
The four verdicts of the checks: |x| = |y| = k s, and a, b canonical.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The result of prepProg: the state when the checks pass, nil otherwise.
Equations
- MIPRE.Cost.Prog.prepResult dP lam tau beta n s x y a b = if MIPRE.Cost.Prog.prepOk lam tau n s x y a b = true then MIPRE.Cost.Prog.prepState dP lam tau beta n s x y a b else MIPRE.Cost.Data.nil
Instances For
prepProg computes prepResult, on every input of the right shape.
The main program: the preparation, then the coordinate loop on its state.
Equations
- univ.decMain = univ.prepProg.let_ (MIPRE.Cost.Prog.elim 0 MIPRE.Cost.Prog.nil (MIPRE.Cost.Prog.callVar 2 univ.coordBody.loop))
Instances For
Inversion of the main program.
The hardcoded datum ((S̄, D̄), λ, τ, β).
Equations
Instances For
The core of the repeated decider, before the s-m-n construction: on
(((S̄, D̄), λ, τ, β), (n, x, y, a, b)), the main program on (S̄, D̄, λ, τ, β, n, x, y, a, b).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Inversion of the core on an input of the right shape.