Sumcheck stages
Every non-terminal Akita fold runs a short sumcheck cascade over the fold witness:
- Stage 1 — digit range check. Proves that every witness entry is a valid
balanced digit and outputs one evaluation of the virtual range-image table.
A fold on the
L2route also proves the complete physical response norm in the final Stage 1 substage. - Stage 2 — fused relation sumcheck. Proves the ring-switched fold relation and binds both Stage 1's virtual range-image value and the opening claim carried into the fold to the committed witness; the resulting witness evaluation becomes the next opening claim.
- Stage 3 — setup product sumcheck. When recursive setup contribution is selected, proves the deferred A/B/D setup contribution and leaves one setup-prefix opening claim for the next fold.
This chapter explains the Stage 1 range protocol and the Stage 2 fused relation protocol in detail. Stage 3 is summarized at the end. The terminal fold runs none of these sumchecks. When it uses an L2 route, the verifier computes the clear response norm directly. See The proving protocol.
Contents
- Stage 1: digit range check
- The complete Stage-1 protocol
- Stage 2: fused relation sumcheck
- Stage 3: recursive setup contribution
Stage 1: digit range check
What it certifies
Let
be the balanced-digit table of the newly committed witness. The level chooses one basis
and every Boolean entry must lie in
This range bound keeps the recursive witness norm under control.
The simplest sound design
The direct vanishing polynomial for the balanced alphabet is
A Boolean entry is valid exactly when . Checking only the unweighted sum of these values would not be sound, because nonzero violations could cancel. Instead, the protocol anchors the table at a random equality point and proves
The right-hand side is a random evaluation of the multilinear extension of the Boolean violation table. An equality-factored sumcheck proves this identity one variable at a time; see Equality-factored sum-check.
This design is simple, but has degree . Akita represents the same condition with a degree- polynomial before deciding whether a product tree is needed.
Reduce the degree with the range image
Pair the positive digit with the negative digit :
Define the pointwise range image
and roots
The direct polynomial factors as
where
Thus exactly when . Stage 1 starts from the anchored zero claim
The table is virtual: it is not committed and is not appended to the recursive witness. Stage 1 proves the range identity for ; Stage 2 later proves that its final evaluation comes from on the committed witness.
The complete Stage-1 protocol
Quartic leaves and product substages
For basis or , has degree at most four and one equality-factored sumcheck proves the anchored identity directly.
For larger bases, the protocol partitions the roots into consecutive groups of at most four:
Their product is . Each is quartic except at basis , where
the only leaf is quadratic. Product substages prove how these leaves combine,
using only arity- or arity- products. The topology is fixed by
DigitRangePlan:
| Basis | Product substages | Final leaf |
|---|---|---|
| 4 | none | one quadratic leaf |
| 8 | none | one quartic leaf |
| 16 | arity 2, emitting 2 child claims | batch of 2 quartic leaves |
| 32 | arity 4, emitting 4 child claims | batch of 4 quartic leaves |
| 64 | arity 2, emitting 2 claims; then arity 4, emitting 8 claims | batch of 8 quartic leaves |
One product substage
Suppose the current substage has parent tables , and each parent is the pointwise product of child tables:
Let be the current equality point and the current parent weights. The carried claim is
The product substage proves
At the sumcheck's sampled point , the prover supplies the child evaluations
in canonical order. The verifier closes the substage against
The protocol then:
- absorbs the child evaluations in canonical order;
- samples a fresh interstage challenge ;
- assigns weights in that same order;
- batches the child evaluations into the next carried claim; and
- uses as the equality point for the next substage.
Let the canonical order of the child nodes be , and write their evaluations at as . The child node in position receives weight , so both parties derive the next claim from the absorbed child claims and the transcript challenge:
For the next substage, these canonically ordered child nodes become the new parent nodes. Set its equality point to and its parent weights to . The carried claim is therefore
Equation (2) has the same form as Equation (1), the carried claim proved by each product substage. In other words, the handoff substitutes , , and in the product-substage claim above.
At the root there is one parent with weight and claim . Each product
substage expands the current parents into their children; the fresh powers of
compress those child claims back into one claim for the next
substage. The prover and verifier follow the same transcript order
(digit_range/mod.rs,
stage1.rs).
The final leaf
After all product substages, let be the current equality point, the current batched claim, and the current leaf weights. Define
The final equality-factored sumcheck proves
For bases , , , and , is quartic. For basis , it is quadratic. When there is no product substage, , , and .
At the final sampled point , the proof carries
The verifier closes the leaf against
The distinction between the Boolean table and its MLE matters:
in general. The equality holds at Boolean vertices, but
multilinear extension does not commute with the quadratic map away from those
vertices. The proof therefore carries the independent
range_image_evaluation field
(levels.rs).
Optional physical norm term
An L2 selected fold proves the squared norm of the complete physical folded
response. The physical response domain contains every live Z coefficient once
and assigns zero to padding addresses. WitnessLayout defines this domain for
the prover, verifier, and proof size code.
For a large field, the final Stage 1 substage batches the range leaf with
The proof carries the public integer value , one additional coefficient in each final sumcheck round, and the final virtual evaluation of . The verifier checks against the cap stored in the schedule.
For a small field, the allowed digit range may make the full square sum wrap the base field. The schedule then divides the physical domain into fixed blocks and proves bounded limb inner products. Each subclaim has a unique centered integer lift because its public bound is below half the modulus. The verifier reconstructs with checked integer arithmetic and rejects a wrong subclaim count, an overflow, or a value above the cap.
The proof stream has no route header. The schedule determines whether the norm
proof exists and gives its exact shape. An L∞ fold uses the ordinary Stage 1
shape and carries no norm values.
Domain and challenge order
Stage 1 views the digits as one flat Boolean table. The live witness occupies a prefix; every remaining address is public zero padding. Zero is a valid balanced digit, so padded entries also satisfy the range polynomial.
Ring switching supplies in column-then-ring order, while the flat
table binds variables in increasing physical-address-bit order. The protocol
reorders the point so that ring-slot coordinates come first, followed by
column coordinates
(stage1.rs).
The verifier
The verifier replays the same product substages, derives the same interstage
challenges and weights, checks each child-product claim, and closes the final
leaf at range_image_evaluation
(stage1.rs).
Passing Stage 1 proves that the range-tree claims are internally consistent and
reduces the final leaf to range_image_evaluation. It does not by itself
tie that virtual value to the committed witness.
Stage 2: fused relation sumcheck
Stage 2 always proves three statements about the same committed digit witness :
- satisfies the ring-switched fold relation;
- Stage 1's virtual range-image value is correctly derived from ; and
- the opening claim for this fold is consistent with .
The protocol fuses all three statements into one sumcheck. The range-image and opening-consistency terms are shared by both payload modes and both ring-relation modes. Raw payload uses only the ordinary physical rows; compressed payload adds compact relation weights and a support-restricted constraint for the compression digits. Separately, quotient lifting uses a factored relation weight over explicit quotient digits, whereas reduced evaluation uses a dense prover weight table over a witness with no quotient ranges. Neither axis adds a second Stage-2 sumcheck.
When Stage 1 also proves a physical norm, Stage 2 adds the Z virtualization relation derived from the schedule. It proves that each final physical response or limb evaluation is the balanced basis recomposition of the committed Z digit plane evaluations at the same point.
Write for everything in the Stage-2 residual that does not depend on the physical-L2 batching challenge, and write for the residual of virtual evaluation . The prover and verifier derive
Thus the constant coefficient belongs only to . The virtual coefficients start at , not at one. This distinction is load-bearing: a coefficient vector would place and in the same constant coefficient, so the prover could arrange the challenge-independent cancellation . With the shifted identity above, an identically zero polynomial has separately zero constant and virtual coefficients.
The transcript absorbs all Stage-1 claims and physical-L2 virtual evaluations before sampling . Direct mode has one virtual residual; LimbGram mode has one per limb. The resulting polynomial has degree at most , and the transcript-grinding plan prices that degree.
Start with the schedule-selected ring relation
Raw and compressed payload realizations defines the physical rows. Checking ring relations over a field derives the two ways to turn them into field claims. Here we first derive the quotient-lift factorization, then state the reduced-evaluation replacement.
Let be the -th ring element encoded by the digit witness, and let row of the ordinary extended fold relation be
In quotient-lift mode, the extended relation includes the quotient witness, so Equation (3) is an equality rather than a congruence modulo a ring polynomial. The public right side is zero for some rows and contains the public data for the remaining rows.
Ring switching samples one field element and evaluates every ring polynomial at that point:
The scalar removes the ring-coefficient dimension from the algebraic relation. It is not a Boolean sumcheck point.
Batch the matrix rows
Suppose the ordinary relation has rows indexed by . Its method-independent
rows are , , and , with their quotient terms.
For EvaluationTrace, it also includes the legacy fold-consistency row and its
quotient. SubringCoefficientPacking keeps the consistency-row slot and its
batching weight, but replaces the legacy coefficients: its packed E/Q
coordinate-plane events join the common relation events, and its
folded-source contribution is added later as the packing-Z structured term.
The protocol samples a Boolean MLE point of sufficient width for the
complete physical row domain and defines
It takes the random linear combination of Equation (4) over all rows. Define
The batched relation is the single scalar claim
This is where the matrix-row dimension goes. It is contracted by before Stage 2 starts its witness-address sumcheck. Consequently, the Stage-2 sumcheck point has no matrix-row coordinate.
Stage 2 proves the relation for this batched row. Soundness comes from the fact that was sampled after the witness was committed: a false collection of rows cannot generally arrange for its random multilinear combination to vanish.
Expand the ring elements into one flat witness
For the moment, suppose every witness ring element has coefficients:
Evaluating at gives
Substituting this into Equation (5) yields
Now view as one flat Boolean address . The low bits select the coefficient and the remaining bits select the witness lane . Define
The native matrix relation weight factors as
so Equation (6) becomes
The Boolean domain is padded with zeros when the live witness length is not a power of two.
The production protocol also permits different ring dimensions in different parts of the native relation. It chooses the largest power-of-two coefficient block common to every role and to the outgoing witness. The low address still selects a coefficient inside that common block. Any remaining high power of , together with the matrix entry and its row weight, is absorbed into the lane weight . Thus the exact factorization continues to hold without adding another sumcheck dimension. The packed E/Q events also preserve this common-alpha factorization and are included in . The packing-Z and direct-opening contributions are ordered structured linear terms that are not forced into it.
Reduced evaluation starts from the same physical rows but replaces each unreduced product coefficient by the public signed-wrap kernel . After row batching and flattening, define to be the complete coefficient multiplying witness entry . It satisfies the same scalar claim
but it does not generally factor as one coefficient-power table times one lane table. The prover therefore materializes and folds as one ephemeral dense Stage-2 oracle. The verifier evaluates its final MLE from terminal residue kernels and the fused setup scan without materializing this table.
For the rest of this chapter, let
Raw and compressed relation terms
Raw mode has no payload-compression term . The mode-selected is its complete relation component, and its and right-hand sides contain the transmitted semantic commitments. The scheduled opening method still contributes below.
Compressed mode retains the method-selected ordinary relation and, in quotient-lift mode, its quotients, but sets the and right-hand sides to zero. Their rows now also contain the source-recomposition terms, and the physical row domain additionally contains the , , , and rows. Thus remains one component of the compressed relation, but it is not a complete relation identity by itself.
To derive the missing component directly, process each compressed physical row in its native ring using the selected relation realization. Define to be the coefficient multiplying the flat witness entry in the -weighted sum of all linear terms not already in .
In quotient-lift mode, the intuition is simpler than the expanded formula. Its first line is only the increment to the existing rows: and their ordinary quotient terms are already in , so adds the missing negative recomposition term. The second and third lines are the two newly added physical rows: links the two compression layers, while binds the last layer to the terminal payload . Their quotient terms lift those native-ring congruences to exact identities. Suppressing component indices, the quotient-lift contribution of one chain is
Here is the set of ordinary rows, is the row weight of , and is the quotient ring element that lifts that compression row. The chain contributes the analogous terms with replaced by . Summing these coefficient weights over every chain and the shared chain gives the single compact Boolean table .
Reduced-evaluation mode has the same row ownership and batching, but replaces each parenthesized lifted identity by its terminal-residue kernel. It has no or witness spans. The verifier evaluates the residue kernels from their separately owned canonical compression-relation program; they are not columns of the fused public setup tensor. Define the complete compressed right-hand side in either mode by
The nonzero new targets in are carried by the terminal and rows. Adding the directly collected compression weights to gives the full compressed relation identity
This follows the same lift-evaluate-batch-flatten procedure as the raw relation, but the resulting compact table does not need to share the factorization because its rows use different native dimensions.
The compression digit spans must also use the stricter alphabet . Let be exactly the union of those digit intervals and define the Boolean table
With a separate batching challenge , compressed mode adds the zero claim
This restriction does not apply to compression quotient digits or alignment padding. At a non-Boolean sumcheck point, the verifier evaluates the MLE of the single restricted table ; it does not multiply separately extended support and equality tables.
Add the range-image binding
Let be the final point produced by Stage 1, and let be the
range_image_evaluation carried by its proof. Stage 1 established a claim
about a virtual table. Stage 2 must connect that table to the committed
witness by proving
This is a sum over Boolean addresses. It does not claim that , which is generally false.
After absorbing , the transcript samples a fresh scalar . The protocol uses to batch Equation (8) with the relation claim.
Add the opening claim consistency
Stage 2 also verifies the incoming opening claim against
the committed witness . The schedule selects how the public opening weight
is prepared. EvaluationTrace uses the trace weights
derived in Field-to-ring evaluation reduction.
SubringCoefficientPacking uses the direct coefficient-packing weights
derived in Field-to-ring evaluation
reduction.
Both methods establish the same linear evaluation-consistency shape
Here we focus only on how this relation is fused into Stage 2. Equation (9) has the same linear form in as a row of the ring-switched relation, so the protocol treats it as a virtual row placed immediately after the physical relation rows. If is that row's index in the padded row domain, the shared row challenge assigns it the weight
The virtual row is not inserted into the physical matrix or its relation-weight factorization. Only its batching weight comes from the row domain. Stage 2 directly fuses
into the sumcheck over the flat witness address . In this way, the opening claim reuses the same row randomness as the ring-switched relation without becoming a physical matrix row.
The implementation does not materialize a dense
table. Define the method-dependent weight
as follows. For EvaluationTrace, it is the compact
trace opening weight ; its legacy
fold-consistency row is already in . For
SubringCoefficientPacking, which production schedules pair only with
quotient lifting, contains the packed E/Q
relation events in place of the legacy consistency coefficients. Its
is the ordered sum of only the packing-Z and
direct-opening terms. Each contribution is therefore included exactly once.
Stage 2 folds each structured linear term under the same challenges and sums
their final values. This preserves the native relation fast path without
building one dense weight table. The
physical packing
realization
explains the quotient and the two evaluations of the shared challenge.
The fused Stage-2 claim
In raw mode, combining Equations (7), (8), and (9) gives the input claim
Stage 2 proves
In compressed mode, the stricter binary claim in Equation (7c) has target zero, while Equation (7b) supplies the complete compressed relation claim. Therefore
and the sumcheck polynomial gains two terms:
Every term uses the same flat witness address . This is why each payload mode still needs only one Stage-2 sumcheck.
Sumcheck rounds and the final point
Let denote the mode-selected polynomial expression inside the brackets in Equation (10) or Equation (10c). In round , after challenges have been sampled, the prover sends
The verifier checks
samples the next coordinate , and sets
After all rounds, these coordinates form the flat witness point
Split it according to the flat address as
In raw mode, the verifier closes the sumcheck against
In compressed mode, the ordinary factors are evaluated for the compressed layout, and the verifier closes the sumcheck against
The value becomes the next-witness opening claim in both modes. The shared range term and the restricted compression-binary term have degree at most three in each sumcheck variable. The ordinary, compression, and method-dependent structured terms have degree at most two. Therefore Stage 2 keeps the same degree-three bound in both modes.
The random objects have separate jobs:
| Object | Shape | What it removes or binds |
|---|---|---|
| one field element | evaluates the ring-polynomial variable | |
| a point over matrix rows | batches all relation rows into one virtual row | |
| one field element | batches range-image consistency with the linear claims | |
| one field element in compressed mode | batches the zero-valued constraint | |
| Stage-1 output point over flat witness addresses | identifies the carried range-image evaluation | |
| Stage-2 output point over flat witness addresses | reduces the complete fused claim to one witness evaluation |
In particular, , , and are not coordinates of one larger point. They contract three different domains.
Stage 3: recursive setup contribution
Stage 3 is controlled by the setup-contribution mode, not by the raw or compressed payload equation above. Payload mode determines whether Stage 2 has the extra and terms. Setup mode determines whether the verifier scans the public A/B/D setup directly or defers that contribution to Stage 3. Current schedules permit recursive setup offloading only inside the compressed prefix, but the Stage-3 algebra remains an A/B/D setup product and does not include the maps. Reduced evaluation is admitted only with direct setup contribution, so any fold that reaches Stage 3 necessarily uses quotient lifting. Schedule validation rejects a reduced fold with an incoming setup prefix or deferred Stage 3 before transcript replay.
After Stage 2 fixes its final relation-address point, let be coefficient of shared setup ring , and let collect all A/B/D row, witness-address, gadget, and mixed-dimension projection weights for that setup ring. The deferred claim used by Stage 2 is
Pad the setup-index domain to a power of two and set outside the active A/B/D footprint. If , , and are the MLEs of the setup table, the setup-index weight, and , Stage 3 runs a degree-two sumcheck on
The implementation binds coefficient variables first and setup-index variables second. At its final point , the verifier checks
This is a setup-only sumcheck. It does not batch Stage 2's next-witness opening. When the next level selects an authenticated setup prefix, it leaves the independent setup-prefix opening
The next fold then receives that opening as one precommitted polynomial group and receives the Stage-2 next-witness opening as a second group at . Its grouped opening protocol later authenticates both claims against their own commitments. Under direct setup contribution, Stage 3 is absent and the verifier computes by scanning the required public setup prefix. See Setup contribution and Stage 3 for the mixed-dimension plan and setup-prefix checks.