CCS
Introduction
Customizable Constraint System
Definition 2.1 (R1CS). An R1CS structure consists of:
size bounds where
and three matrices with at most non-zero entries in total.
An R1CS instance consists of public input . An R1CS witness consists of a vector . An R1CS structure-instance tuple is satisfied by an R1CS witness if:
where
Here, denotes a matrix-vector multiplication operation, denotes the Hadamard (i.e., entry-wise) product between vectors, and is a zero vector in .
Definition 2.2 (CCS). A CCS structure consists of:
size bounds where
a sequence of matrices with at most non-zero entries in total
a sequence of multisets , where an element in each multiset is from the domain and the cardinality of each multiset is at most
a sequence of constants , where each constant is from
A CCS instance consists of public input . A CCS witness consists of a vector . Then, a CCS structure-instance tuple is satisfied by a CCS witness if:
where
denotes matrix-vector multiplication, denotes the Hadamard product between vectors, and is a zero vector in .
Representing Plonkish with CCS
Let's recall the Plonkish constraint system first.
Definition 2.3 (Plonkish). A Plonkish structure consists of:
size bounds ;
a multivariate polynomial in variables, where is expressed as a sum of monomials and each monomial has a total degree at most ;
a vector of constants called selectors ; and
a set of constraints. Each constraint is specified via a vector of length , with entries in the range . is interpreted as specifying entries of a purported satisfying assignment to feed into .
A Plonkish instance consists of public input . A Plonkish witness consists of a vector . A Plonkish structure-instance tuple is satisfied by a Plonkish witness if:
where .
Representing AIR with CCS
Definition 2.4 (AIR). An AIR structure consists of:
size bounds , where is even;
a multivariate polynomial in variables, where is expressed as a sum of monomials and each monomial has total degree at most .
An AIR instance consists of public input and output . An AIR witness consists of a vector . Let
Notice that, can be viewed as matrix. Let us index the “rows” of as . An AIR structure-instance tuple is satisfied by an AIR witness if:
This can be also called as state transition constraint.
Handling many AIR constraint polynomials
To represent the constraints capturing a single step of a CPU, typically many polynomials will be needed, say . In practice, may be in the many dozens to hundreds [GPR21, BGtRZt23]. There is, however, a straightforward and standard randomized reduction from AIR with constraint polynomials to AIR with a single constraint polynomial : the verifier picks a random and sends it to the prover, and the prover replaces with the single constraint polynomial
If Equation (7) holds for all in place of , then with probability 1 over the choice of the same will hold for the random linear combination . Meanwhile, if it fails to hold for any then with probability at least , it will fail to hold for the random linear combination . You could also get random values for each polynomial, which improves the soundness error to .
Lemma 3 (AIR to CCS transformation). Given an AIR structure , instance , and witness , there exists a CCS structure such that the tuple is satisfied by if and only if is satisfied by . The natural NP checker’s time to verify the tuple is identical to the runtime of the NP checker that evaluates monomial-by-monomial when checking that satisfies Equation (7).
Proof. TODO
Last updated