Primitives of the repeated sampler and decider #
Three loops of the ambient model that the programs of thm:parallel-repetition share
(planning/repetition-verifier.md, R3(a)–(b)):
powBody: on the state(e, bl, bn, acc)—ea unary counter,blandbnthe bit lists ofλandn,acca list — prepend|bl| + |bn|copies ofniltoacc,etimes (powLoop_runs). Withacc = []the result is the unary numerale · (|λ| + |n|); withaccthe numeral1it is the binary numeral2^{e(|λ| + |n|)}, the repetition countk(n)and the parse lengthB(n)ofMIPRE.Repetition; withaccthe bits ofs ≠ 0it is2^{e(|λ| + |n|)} · s, the dimension of the repeated sampler.dblBody: on(m, acc),ma unary counter andacca unary numeral, doubleaccmtimes (dblLoop_runs): the unary numeral2^mfrom the unary numeralm.takeBodyandchunkBody: cut a list into pieces ofselements (Data.chunks),sgiven in unary (chunkLoop_runs): the blocks of a vector of𝔽₂^{k s}.
The pieces of s elements of two lists, in lockstep: as many as the first list has, the
second one's possibly shorter or empty.
Equations
Instances For
Prepending e · (|bl| + |bn|) copies of nil #
Body of the power walk: on the state cons u (cons bl (cons bn acc)), stop with acc if
the counter u is empty, and otherwise walk bn then bl, prepending a nil to acc per
element, and decrement u.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The state of the power walk.
Equations
- MIPRE.Cost.Prog.powState e bl bn acc = (MIPRE.Cost.Data.ofNat e).cons ((MIPRE.Cost.Data.list bl).cons ((MIPRE.Cost.Data.list bn).cons (MIPRE.Cost.Data.list acc)))
Instances For
One iteration of the power walk.
The power walk: e rounds, each prepending |bl| + |bn| copies of nil.
Doubling a unary numeral #
Body of the doubling loop: on the state cons u acc, stop with acc if the counter u is
empty, and otherwise replace acc by acc ++ acc (reversal onto itself, acc being a list of
nils) and decrement u.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The doubling loop: dblBody on (m, a) computes 2^m · a.
Taking a prefix of given unary length #
Body of the take loop: on the state cons u (cons rem cur), stop with cons rem cur if the
counter u is empty or rem is; otherwise move the head of rem onto cur and decrement.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The state of the take loop.
Equations
- MIPRE.Cost.Prog.takeState c rem cur = (MIPRE.Cost.Data.ofNat c).cons ((MIPRE.Cost.Data.list rem).cons (MIPRE.Cost.Data.list cur))
Instances For
The take loop: c elements moved from rem onto cur, reversed.