The leaf test #
⚠️ Unreviewed by Bolton
At a leaf the walk asks one question of each coin string: would the verifier have sent every
message the transcript records, and does it accept? The first half is
Complexity.Protocol.replay, which walks the rounds in play order carrying the encoding body
with it — the wrong direction for a stack, whose top frame is the last round.
Carrying each frame's body inside the frame removes the problem: the check a round contributes
depends only on that round's verifier message and its own body, so the conjunction may be taken in
any order. That is what Complexity.stkCheckB does, and it is what a scan over the encoded stack
can compute.
Main definitions #
Complexity.stkCheckB— the per-frame form of the consistency test
Main results #
Complexity.Protocol.replay_append— a round appended checks its own message lastComplexity.replay_eq_stkCheckB— the two forms agree
The consistency test as a conjunction over the frames, each checking its own recorded message against its own body.
Equations
- Complexity.stkCheckB vf x s [] = true
- Complexity.stkCheckB vf x s (g :: gs) = (decide (g.v = vf (Complexity.pair (Complexity.pair x s) (false :: g.body ++ [true]))) && Complexity.stkCheckB vf x s gs)
Instances For
The two forms of the consistency test agree.
Flags as decisions #
The scan over the stack #
The check one frame contributes, on the tape.
Equations
- Complexity.chkOneP vf xu y = Complexity.Cobham.eqFlag (Complexity.IPM.fV y) (vf (Complexity.pair xu (false :: Complexity.IPM.fBody y ++ [true])))
Instances For
The running flag after folding in a list of frames.
Equations
- Complexity.chkFold vf xu x✝ [] = x✝
- Complexity.chkFold vf xu x✝ (g :: gs) = Complexity.chkFold vf xu (Complexity.andBit x✝ (Complexity.chkOneP vf xu (Complexity.IPM.encFrm g))) gs
Instances For
The packed scan #
The packed scan state: the verifier's fixed arguments, the running flag, and the chain of frames still to check.
Equations
- Complexity.chkPack xu acc S = Complexity.pair xu (Complexity.pair acc S)
Instances For
The leaf test #
The consistency flag, computed by running the scan against a ruler.
Equations
- Complexity.chkFlag vf rr xu S = Complexity.pairFst (Complexity.pairSnd ((Complexity.chkStepP vf)^[rr.length] (Complexity.chkPack xu [true] S)))
Instances For
The leaf test is polynomial-time #
The leaf test discharges the walk's hypothesis #
The leaf test is exactly what the walk asks for, for every stack the walk can reach.