Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Root fold and ring switching

One folding step builds a batched relation and switches it into the next ring witness. The schedule also selects how each commitment group is opened.

Subring coefficient packing

The preceding pages established the two semantic facts needed by SubringCoefficientPacking:

  1. the direct packed scalar row recombines the packed opening digits into the original scalar claim; and
  2. packing commutes with the sparse source fold, so the packed partial and folded source describe the same random combination.

This section starts from those facts and explains their physical realization: the packing quotient, its coordinate planes, and evaluation at the ring-switch challenge.

Native geometry

Let be the base field and the opening field, with . The schedule chooses , , and a packing factor satisfying

The implementation and live specification call these values d_A, s, and h, respectively. The three relevant rings are

RingDefinitionPhysical role
A ringsource witness and A rows
challenge subringsparse fold challenges
extension opening ringpacked partial and packing quotient

The embedding used by the A relation is

The two-dimensional source table already showed how the columns are contracted and the rows are kept. This page starts from its output. One packed partial has coefficients in . Expanding each coefficient in the canonical basis gives the following physical representation:

ObjectLogical shapeBase-field storageWidth
all packed partials one -coefficient element of per claim/block pair[claim][block][extension coordinate][subring coefficient] per pair
one group's one degree-below- polynomial in [extension coordinate][subring coefficient]

Within either object, one extension-coordinate plane contains all coefficients in increasing order. Its width is not the dimension of one larger ring. A packed partial is one logical -valued element represented by base-field planes. The quotient has the same coefficient shape, but is kept as a degree-below- representative in . The D commitment, or its compressed H realization, binds the digit-decomposed partial planes before the fold challenge is sampled.

The packing consistency quotient

Let be the packed partial for a live claim/block pair and let be its fold challenge. For the folded-source digits, use the shorthand

This notation preserves the vector: the sum recomposes only the fold digit index . Applying the packing map gives . Semantic consistency says

Canonical representatives of the two sides need not be equal as ordinary polynomials. Their difference is divisible by the cyclotomic modulus, so the prover supplies

such that the following identity holds in :

The quotient also has coefficients in , hence coordinate planes of length . Its digit coordinates occupy the consistency-row slot in the shared pre-compression quotient range. In Stage 2, the packed E and Q events join the common relation-weight factorization, while the folded-source side is the separate packing-Z structured term. These contributions replace the legacy EvaluationTrace consistency coefficients; they do not add a second copy of the obligation.

Evaluate the native relations at one challenge

After the quotient and next witness are bound, the transcript samples the ring-switch challenge . Evaluating Equation (1) at gives

The A rows use the same challenge polynomials through the embedding. For a challenge

the two required evaluations are

Equation (3) does not introduce a second transcript challenge. It evaluates one coefficient list in the two native geometries required by packing consistency and the A relation.

One packing fold in transcript order

  1. The schedule fixes , , the canonical extension basis, and the sparse challenge family.
  2. The prover forms each packed partial and digit-decomposes its base-field coordinates.
  3. The prover binds the complete D payload, or its compressed H payload.
  4. The transcript samples one for each live claim/block pair.
  5. The prover folds the A-ring sources with and computes .
  6. The prover binds and the next witness; only then does the transcript sample .
  7. Stage 2 checks the scalar opening, Equation (2), and the A rows using the two evaluations in Equation (3).

This ordering fixes the packed digits before the subring challenges and fixes the quotient and next witness before the evaluation point.

Worked production geometry

For the fp32 candidate

d_A = 1024,
k   = 4,
s   = 128,
h   = 2,
k h = 8,

the A-ring coefficient index is a + 8j. For every fixed j, the partial contracts eight base-field coefficients into one element of the degree-four extension field. That value occupies four base-field coordinates:

evaluation-trace partial:  1024 coordinates in F
packed partial:              128 values in E
                             128 * 4 = 512 coordinates in F

The packed partial and are each half as wide as their full-A-ring counterparts. The challenge embeds at exponents 0, 8, 16, ..., 1016.

Choosing s = 64 with the same d_A and k would instead give h = 4 and 256 base-field coordinates per packed object. That smaller subring needs a different sparse challenge family and can increase the A response bound or change the recursive suffix. The planner therefore prices the complete schedule rather than minimizing s alone.

Scope and schedule placement

Packing gives two direct savings at an eligible fold: it removes EOR for a proper extension-field opening, and it reduces each partial and packing quotient from to base-field coordinates before digit decomposition. It does not shrink every proof component by ; gadget depths, matrix ranks, compression payloads, response bounds, and later folds can change.

Current generated schedules require packing at levels 0 and 1 and every multi-chunk nonterminal fold. Every group in such a fold must have a feasible packing assignment, and one fold cannot mix packing with EvaluationTrace. Single-chunk folds at level 2 or later may choose either method when their source encoding supports it. All roots retain packing over canonical coefficients. The terminal uses EvaluationTrace; packing adds neither an EOR payload nor a packing terminal.

This chapter documents the implemented relation and schedule boundary. The active design record gives the planner and algebraic soundness requirements. Indexed coordinates supply fork structure for the accepting-tree extractor; the indexed fold bound charges every adversarially touched or verifier-completed coordinate stream.

The root fold

OpeningClaimsLayout routes polynomial groups to claims. Each group keeps its own public point, commitment profile, and opening geometry. The relation order is final group followed by precommitted groups. A recursive fold uses the same group rules for its folded witness and an incoming setup prefix.

Ring switching

The schedule selects how each fold turns its native-ring relations into field relations for Stage 2. In QuotientLift mode, the prover supplies a unique polynomial-modulus quotient for every physical relation row. The derivation below describes this mode.

ReducedEvaluation instead moves negacyclic reduction into public coefficient weights and creates no polynomial-modulus quotient rows or quotient digits. Production schedules admit it only as a monotone, setup-direct single-chunk EvaluationTrace suffix beginning at any eligible fold. Coefficient packing remains quotient-lift-only. Checking ring relations over a field derives both methods and their schedule restrictions. This section explains how the prover computes the quotients.

This operation is distinct from EOR. EOR changes an extension-valued opening claim before the lattice relation is formed. In QuotientLift mode, ring switching lifts the resulting lattice relation out of its quotient ring so that sumcheck can prove it over a field.

Recover the quotient from two convolutions

Let a(X) and s(X) have degree less than D, and write their ordinary product as

where both L and H have degree less than D. Reducing this product modulo the cyclic and negacyclic moduli gives

The field has odd characteristic, so division by two is defined. The high half of the ordinary convolution is therefore

Equation (4) is exactly the quotient in

For a complete row of the relation, let

The quotient-ring equation says that [P_i]_(X^D+1) = h_i. Consequently, the ordinary-polynomial identity used by Stage 2 is

with

The prover digit-decomposes each r_i and appends those digits to the recursive witness. After the verifier substitutes X = alpha, the factor X^D + 1 becomes the public scalar alpha^D + 1. This turns every lifted row into a field relation suitable for the fused Stage-2 sumcheck.

Preserve each row's native ring

Akita does not enlarge every relation to one common ring dimension before computing Equation (5). Consistency and A rows use d_A, B rows use d_B, and D rows use d_D. Their quotients retain those same native dimensions. This is both the mathematical layout and the physical recursive-witness layout; the row geometry records the native dimension and the number of coordinate planes.

The coefficient-packing consistency row is the one nonstandard geometry. It is an equation over E[Y]/(Y^s + 1), represented as k base-field coordinate planes of length s. Its quotient therefore has k s physical coordinates. It is not reinterpreted as one ring of dimension k s. Its modulus evaluates to alpha^s + 1, as in the packing identity in Equation (2).

Compute only the coefficients that survive

The matrix rows use paired cyclic and negacyclic transforms to obtain Equation (5). Akita performs both convolutions through the same CRT profiles used for ring multiplication, then converts their difference back to the base field and multiplies by 1/2.

Sparse challenge products need less work. If a nonzero challenge coefficient is at position p, only source coefficients D-p through D-1 can reach the high half of the ordinary convolution. The quotient kernel visits only those coefficients and accumulates directly into r; it does not form the low half that negacyclic reduction would discard. The same rule applies when the consistency row combines folded opening material with sparse challenges.

Compressed commitments introduce additional F and H relation rows. Their quotients use the same cyclic-versus-negacyclic identity and remain attached to the compression layer that owns them. Compression changes the row layout, not the algebra of Equation (5).

Cached and streamed execution are equivalent

The CPU backend chooses between two execution plans after the complete row geometry has been validated:

  • A retained operation reuses the exact transformed setup prefix held by the prepared setup.
  • A large operation transforms CRT-safe chunks of the same logical prefix as it proceeds and releases each chunk afterward.

Both plans cover the same rows, columns, transform domains, and quotient coordinates. The CRT capacity bound limits how many products may be accumulated before reconstruction in either plan. This choice affects time and memory only; it does not change setup identity, proof bytes, transcript order, or the quotient checked by the verifier.

Implementation map

  • crates/akita-prover/src/protocol/ring_relation.rs assembles ordinary relation terms.
  • crates/akita-cpu-backend/src/opaque/witness_build/relation_quotient.rs computes the role-native ordinary quotients and sparse high-half contributions.
  • crates/akita-cpu-backend/src/arithmetic/ring_switch.rs selects the retained or streamed CPU kernels.
  • crates/akita-prover/src/protocol/ring_switch.rs assembles the ring-switch witness and proof state.
  • crates/akita-cpu-backend/src/opaque/witness_build/coefficient_packing.rs forms packed partials and the packing quotient.
  • crates/akita-cpu-backend/src/arithmetic/coefficient_packing_fold.rs holds the packing map, the direct partial and scalar-opening formulas, and the subring-challenge fold products.
  • crates/akita-params/src/layout/subring_packing_geometry.rs defines and validates the packing geometry.
  • crates/akita-types/src/proof/coefficient_packing_relation.rs validates the packing groups and exposes their checked Stage 2 semantics. The CPU backend expands those semantics into local Stage 2 term tables.
  • crates/akita-verifier/src/coefficient_packing_relation/ builds the verifier's compact factors from the same validated groups.
  • crates/akita-verifier/src/fold/ replays the relation and rejects a proof whose dimensions or quotient structure do not match the selected schedule.