On Constraint Satisfiability
Proving STARK constraints that only hold on part of the trace (boundaries, periodic rows, row selectors) by picking subdomains with sparse vanishing polynomials instead of adding selector columns.
Setup
Let be a finite field of prime order such that for some integer . Set , and let be a multiplicative subgroup of order . Every subgroup of is generated by some power of , so we can completely describe the subgroup structure as:
where each subgroup has order , for .
The vanishing polynomial over a set , denoted , is the polynomial whose roots are precisely the elements of . For example, it is easy to see that and more generally that for any cyclic group or order .
We say that a polynomial of degree is sparse if it can be evaluated at any point of in operations. Vanishing polynomials over any cyclic group are sparse, as well as the vanishing polynomials over sets of size .
Subdomain Constraints
We consider the problem of proving algebraic constraints over a fixed, known evaluation domain. Concretely, given a finite multiplicative group of order , we aim to prove the validity of constraints over the entire domain , as well as over specific deterministic (non-random) subsets .
A constraint is a multivariate polynomial , where each variable represents a polynomial over of degree strictly less than , evaluated over the domain . We write to denote the degree of after substituting each with the corresponding polynomial.
From now on, we assume that constraints are non-trivial over , i.e. that .
This framework is motivated by the need to efficiently express and enforce common classes of constraints arising in algebraic trace systems, namely trace boundaries, periodic constraints, and row selectors. More precisely:
- Trace Boundaries. Constraints that are enforced only at specific boundary points of the trace, typically the first and/or last row.
- Periodic Constraints. Constraints that hold over a periodic subset of the trace, corresponding to a repeating structural pattern.
- Row Selectors. Constraints that are enforced at a predetermined set of rows within the trace, not necessarily contiguous or periodic.
Subdomain Constraints in STARKs
In STARKs, proving that a constraint is satisfied over (i.e., evaluates to zero over ) is usually done by reducing the problem of constraint satisfiability to a low-degree test as follows. Given a set of constraints , we compute the following rational function using a verifier-supplied random field element :
In the honest setting, divides each as polynomials, so is a polynomial of degree . The problem reduces to proving that is a polynomial of degree at most .
Now, what happens when we aim to prove a constraint that is satisfied over a subset of ? A common approach is:
- Define an auxiliar polynomial that “encodes” , that is if and if .
- Define , transforming the original constraint to one satisfied over .
- Prove the satisfiability of over instead of the one of over .
This process is correct but it incurs in an additional transformation from the natural context of the constraint to a generic one.
The alternative would to define the rational fraction as:
where each is the satisfaction domain of . This avoids auxiliary polynomials, but the verifier must evaluate the vanishing polynomials at some random points. Sparse vanishing polynomials are therefore required for efficient verification.
The optimal strategy is a combination of both approaches, finding subsets that admit sparse vanishing polynomials.
Finding Good Domains
We know show how trace boundaries, periodic constraints and row selectors can be described by a sparse vanishing polynomial, making them amenable to the strategy described in the previous section. We assume that rows are labelled by the exponent of the generating set .
Trace Boundaries
A trace boundary constraint is satisfied at one of:
- The first row.
- The last row.
- All rows except the first.
- All rows except the last.
The first two vanishing polynomials are as easy as and , where we used the shorthand for . The complements are the standard Lagrange polynomials:
i.e., is the -th Lagrange polynomial.
All of these are sparse.
Periodic Constraints
If we take to be a subgroup of or order , then we have . More generally, for a coset with , we have . These cases correspond to index sets of the form
that is, arithmetic progressions modulo whose period divides .
More generally, a union of cosets , where each is a subgroup of order has vanishing polynomial . As long as , this polynomial is sparse. The corresponding index set is:
Row Selectors
Row selectors correspond to arbitrary predetermined subsets of the trace. Let denote the selected rows. The vanishing polynomial is .
- Sparse evaluation is possible if can be decomposed as a union of cosets of power-of-two subgroups, as discussed above.
- Otherwise, is dense and evaluating it requires operations, which is inefficient for large .
Thus, by carefully choosing subset aligned with subgroup structure, we can maintain evaluation efficiency for general row selectors, periodic constraints, and trace boundaries.