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

Cover

Basic Definitions

In this section, we introduce the basic prerequisites for understanding the proofs in this book.

Essential Algebra

In this book, we will

An integral domain is a commutative ring with no “zero divisors”. All this means is that:

The integers form an integral domain.

An example of a ring, which is not an integral domain is , since: Which means that is a zero divisor.

A field is an integral domain where every non-zero element is a unit. All this means is that:

In other words, is defined for all .

The ring is a field whenever is prime.

This corresponds to the “integers modulo ”.

It is also easy to see that every field is an integral domain. Broadly speaking:

  • The integral domain structure will be sufficient to argue soundness.
  • Sometimes, not always, we will need the additional field structure to prove completness.

The relationship between these algebraic structures can be visualized as:

Venn diagram showing the hierarchical relationship between commutative rings, integral domains, and fields

Other notions exist, which are more fine-grained than the distinction above, for instance, unique factorization domains (UFDs), principal ideal domains (PIDs), and Euclidean domains. But for the purposes of this book, only these three structures will be relevant.

Integral Domains

After showing this general theorem, we are going to immediately restrict ourselves a bit, but just a bit. Namely, we are going to require that is an integral domain. An integral domain is a commutative ring which has no zero divisors, which is a fancy way of saying:

In other words: the only way to get a zero product is to multiply by zero. Fields satisfy this, the integers satisfy this, however, e.g. does not satisfy this:

The fact that is an integral domain is important, because it allows us to conclude that if we have a product of polynomials and a point such that , then either or . Combined with the factor theorem, this allows us to upper bound the number of roots of any polynomial by the degree of .

Tensor Products & Hypercubes

The "Boolean Hypercube" is a tensor product, i.e. "all vectors with entries from", the set :

For instance:

It is clear that the -dimensional Boolean hypercube has elements: . In many ways, the choice of is arbitrary, another popular choice is which has the slight advantage that it is a group under multiplication, making some things slightly nicer.

The most important part about is not the particular sets or , nor that every coordinate is from the same set, but the tensor structure, in the most general case: for small sets in which case: However, most naturally , hence the name "Boolean hypercube".

Multivariate Polynomials

A multivariate polynomial is, as the name suggests, simply a polynomial in one or more variables.

For instance:


  • Is a multivariate polynomial of individual degrees and in the variables and .

  • Is a multivariate polynomial of individual degrees and in the variables and .

  • Is a multivariate polynomial of individual degree in the variable .

A multilinear polynomial is a multivariate polynomial where individual degrees in each variable are at most one. For instance:

While all the earlier examples of multivariate polynomials were not multilinear polynomials.

Roots of Polynomials

The Factor Theorem

The factor theorem states that if a non-zero polynomial has a root at , i.e. , then we can write for some polynomial .

Let , with and let be such that .

Then there exists such that .

We first consider a special case, then use this to prove the general case.

Consider the two cases:

  • Case x = 0. First we show the theorem when , then the claim is that . To see this observe that if then , and since we have . Therefore is of the form: If we define , we see that: As desired.

  • Case x 0. Suppose . Define the polynomial and observe that . Therefore, by the “x = 0” case, we conclude that for some . Next write:

If we define , then we see that:

Actually, the factor theorem can be broadened a bit: no part of the proof requires to be a integral domain, at no point did we use the fact that implies or . Therefore, the factor theorem applies even to polynomials over any commutative ring, for instance, polynomials over .

The Fundamental Theorem

Let be an integral domain and let be a non-zero polynomial of degree , then has at most roots in .

We prove this using induction over the degree of .

  • Base d = 0. If , then for some non-zero . Clearly, has roots.

  • Step d > 0. Let be a polynomial of degree . If has roots in , then we are done. Otherwise, let be a root of . Then, using the factor theorem, we can write for some polynomial of degree . By the inductive hypothesis, has at most roots and has at most root. Finally has at most roots because is an integral domain: since if is such that , then either or , in other words, must be a root of either or of which there are at most .

The theorem also allows us to conclude that if two polynomials and of degree share more than evaluations in , then the polynomials must be equal.

Let and be polynomials of degree over . Let be distinct elements. Then:

Define . Note that is a polynomial in of degree at most and observe that for all : has at least roots in . Therefore, must be the zero polynomial, i.e. .

Schwartz-Zippel Lemma

We can turn the corollary above into a probabilistic check of equality between polynomials, this technique is called the Schwartz-Zippel lemma and is widely used; we will use it a lot.

Let be distinct polynomials of degree and let be an arbitrary subset of the integral domain , then:

Note that the statement is vacuous if . When then the statement implies that there must exist a subset with such that: In which case the previous corollary shows that .

Multivariate Polynomial Roots

An important way for us to view multivariate polynomials will be as univariate polynomials over polynomial rings. To this end, it is useful for us to verify that multivariate polynomials form integral domains allowing us to apply the fundamental theorem:

Let be an integral domain, then is an integral domain.

We can multiply and add polynomials, it is also clear that polynomial multiplication is commutative (since is), i.e. for and , we have: Finally, let us verify that there are no zero divisors in , i.e. show: To see this let and be the degrees of and respectively, denote by and the leading coefficients of and . Note that and otherwise or respectively. Then the leading coefficient of is which is non-zero since is an integral domain. Therefore, if and only if or .

By applying the theorem above times, we can conclude that is an integral domain: let and for . Observe that:

This "iterative" construction of allows us to view -variate polynomials over as univariate polynomials over :

With this interpretation is a polynomial over and therefore can take any value in (not just ), i.e. we can evaluate for every -variate polynomial , which includes the constant polynomials, i.e. .

If we apply the fundamental theorem to this particular setting we get:

Let with be a -variate polynomial. Let be the degree in the variable, then there exist at most distinct -variate polynomials such that . In particular, there exist at most field elements (constant polynomials) such that .

If we apply this observation recursively, we can conclude that for sufficiently large tensor products, a polynomial vanishes over the tensor product if and only if the polynomial is the zero polynomial:

Let be a non-zero -variate polynomial with degree in each variable . Let be the tensor product of where : Then:

We prove this by induction:

  • Base k = 1. When the “multivariate” polynomial is a univariate polynomial , by applying the fundamental theorem with , we observe that the number of roots of is at most , however since the polynomial cannot evaluate to zero on all of . So the claim holds.

  • Step k > 1. Define and now rewrite as a polynomial with coefficients in : Since is an integral domain, we can apply the fundamental theorem, this time to , rather than . We conclude that at most values satisfy: And, in particular, there exist at most elements (constant polynomials) satisfying this. On the other hand, since there must exist at least one which is not a root, in other words: We then apply the induction hypothesis on to conclude that it does not vanish over . In other words, we conclude that there is at least one such that , which also allows us to conclude: So also cannot vanish over and the claim holds for as well.

Setting and as the -dimensional hypercube, we conclude that a non-zero multilinear polynomial cannot vanish on the hypercube, i.e. if then there exists at least one such that .

An easy, but very important, observation is that two multilinear polynomials can agree on the hypercube if and only if they actually are equal as polynomials.

Let be two multilinear polynomials such that: Then .

We can form: By assumption , therefore we conclude that by the theorem. Hence .

Multivariate Schwartz-Zippel

We can extend the techniques above to reason about the probability that a multivariate polynomial vanishes at a random point .

Let and let be a multivariate polynomial of individual degrees in . Then the probability that the polynomial vanishes at uniformly random can be bounded as follows: where .

We show this by induction:

  • Base k = 1. When the “multivariate” polynomial is a univariate polynomial , by applying the fundamental theorem with we observe that the number of roots of is at most . Hence for uniform , the probability that , i.e. that is one of the at most roots, is at most .

  • Step k > 1. Basically, there are two ways that could be zero:

    • When we partially evaluate we get the zero polynomial
    • Or, , but .

    Define and view as a polynomial in : Since is an integral domain, we conclude that at most values satisfy: And, in particular, there exist at most elements which make , hence the probability that makes is at most .

    On the other hand, if is not a root: We can apply the induction hypothesis on to conclude that: By applying a union bound on both these events we conclude that:

Lagrange Interpolation

Subgroup Fast Fourier Transform

Also called the "Cooley-Tukey FFT".

Subspace Fast Fourier Transform

Interpolation over The Unit Circle

Interpolation over Algebraic Curves

Reductions of Knowledge

Karp-Levin reductions reduce membership of one

What if we were to broaden this notion so that it could encompass randomized reductions?

Multivariate Reductions

Multivariate Sum-Check

The multivariate sum-check allows reducing a claim of he form

Let

Input Relation:

Output Relation:

Reduction:

  1. Prover computes:

Polynomial Packing

Input Relation:

Output Relation:

Reduction:

  1. Prover computes:

Univariate

Smooth Univariate Sum-Check

The following is taken from the Aurora paper [BSCRSVW18].

In the section that follows, let be an integral domain, in particular any field .

Let be a multiplicative coset of a cyclic subgroup, and let , then:

In other words: the combined sum of the (non-zero) -th powers of the elements of is zero.

Pick , such that , which exists since and is a coset of a cyclic subgroup. Since is a coset we have , so: Rearranging: Since , we have , therefore since is an integral domain.

Observe that the proof above only relies on the existence of such that . We can generalize this proof to polynomials (not just monomials), by simply observing that all monomials indidually will sum to zero, except the constant term:

Let be a multiplicative coset of the integral domain and let be a polynomial of . Then:

Let be the coefficients of .

Then:

Interactive Reduction

The theorem above gives raise to a natural protocol for proving that a polynomial evaluates to zero over a multiplicative subgroup of . Suppose the prover has of degree greater than and claims that . The trick behind the reduction is to ask the prover to split into provided and , with such that: Where is the polynomial of degree that vanishes on . Observe that: Because, by definition, for all . Now, observe that is a polynomial of degree and hence, by the previous theorem: So we simply "put" the sum divided by the cardinality of "into" the constant term of . The verifier checks that the polynomial is decomposed correctly by quering all the polynomials involved at a random point , i.e check:

Input.

Output.

Protocol

  1. Prover computes , st.
  2. Verifier samples and checks:

Small Characteristic Sum-Check

The following proofs occured originally in "Power Sums over Finite Subspaces of a Field [BC99], but was included in the Aurora paper [BSCRSVW18] in which this sumcheck was introduced. The following details an efficient sumcheck over subspaces of : vector spaces over spanned by a set of vectors/elements . These techniques are efficient when is small, for instance, .

Let be an affine subspace of and let , then:

In other words, summing any sufficiently small power of elements in an affine subspace of yields zero.

The generalized derivative of a polynomial is defined as:

For we inductively define the derivative in the direction as:

Observe that the summation is over the finite field , not the whole field , where as the "direction" is from the whole field. In other words, the direction is a vector (extension field element), and we consider all steps (scalar multiples) in the direction of this vector. When there are multiple directions, we consider the sum over all the combinations:

The relevance to the question at hand is clear: if are a basis, then:

Which is exactly the sum of over all elements in the affine space .

Next, we define a notion of "weight". The trick is going to be induction over this "metric": it measures the "size" of a polynomial and we will prove by induction that the statement holds up to a given "size", which happens to contain all polynomials of degree less than .

The -nary digit sum of a number is the sum of the digits in its -nary representation. Let and write it as:

Where . Then the -nary digit sum of is defined as:

So, we the induction is going to be over the "size" of the exponents in the polynomial, where "size" is measured by the -nary digit sum of the degree of the polynomial. We introduce the notion of "weight" for a polynomial, which is simply the maximum -nary digit sum of its exponents of any (non-zero) monomial.

The weight of a polynomial is the maximum -nary digit sum of its exponents of any (non-zero) monomial. Let:

Where . Then:

Our first claim is that applying reduces the "weight" of any polynomial:

With the max simply being there, because the weight of the polynomial is always non-negative.

We also claim that if , then .

Let

The rewrites are as follows:

  1. Expanding the definition of .
  2. Is the binomial expansion of some .
  3. Rearranging sums.
  4. A
  5. Removes the in the exponents: since , for all .
  6. When then :

The theorem trivially extends to polynomials of degree less than : since the sum over the affine space of every monomial of degree less than is zero, then so must the sum of the sum of monomials: the sum of the polynomial over the affine space:

Arithmetization

In parlance, Arithmetization, is the process of reducing statements about some model of computation into algebraic relations between polynomials, which makes them suitable for

Multilinear Ext. of Branching Programs

The techniques in this section were first explored by Holmgren and Rothblum [HR18].

Introduction

For a general function, , we can evaluate its multilinear extension as:

This requires time, linear in the domain of the function, because we enumerate every possible input. For a black-box function this is the best we can do: the smallest possible description of the function may be its evaluation table. However, it turns out that for certain classes of functions, we can do better, much better. One such class is the class of read-once branching programs, which we will now explore.

Read-Once Branching Programs

Let be the Alphabet, with the (bit) size of a single symbol. Let be the length of the branching program. A Read-Once Branch Program is a function:

Implemented by "walking" through a directed graph: starting at a vertex designated the "source", until you reach the "sink" vertexes, each of which are labeled with a field element.

A picture is worth a thousand words.

Let b = 1, n = 4, in other words:

The program looks like this:

Read-once branching program generated from DOT, showing the same structure programmatically

The program has length 4 and width 2.

  • What is is the output of the program on 0 0 1 1?
  • What is is the output of the program on 1 0 1 0?
  • What does this program do?

Let b = 3, n = 2. In other words:

The program looks like this:

Read-once branching program with alphabet size b=3, showing multi-labeled edges between states over 2 steps

This simply means that there are e.g. 4 edges from the (teal) source node with the labels 000, 101, 011, 110 going to the top green node. We omit these to avoid cluttering the diagram with a lot of edges. The program has length 2: because it takes two symbols from the alphabet .

  • What is the width of this Read-Once Branching Program?
  • What is the output of the braching program on 000 010?
  • What is the output of the braching program on 011 110?
  • What does this program do?

Matrix Branching Programs

To "arithmetize" the read-once braching programs, instead express them as Matrix Branching Programs.

For simplcity, we let , i.e. . The technique extends trivially to larger .

A matrix branching program consists of pairs of matrixes :

And sink vector .

To evaluate the Matrix Branching Program on compute:

The output of the MBP is , the first entry of . Observe that even though matrix multiplication is linear, Matrix Branching Programs (MBPs) are not linear in : the picking of each matrix from the pairs gives them some "discrete" structure.

Adjacency Matrixes: ROBP MBP

Walks in directed graphs can be expressed by application of an adjacency matrix , which has iff. there is an edge from node to and otherwise. Hence it should be no surprise that we can eeasily convert Read-Once Branching Programs to Matrix Branching Programs: the trick is to define pairs of matrixes:

Such that describes the transitions from the current stage to the next when input and describes the transitions from the current stage to the next when . Letting , meaning the "active" node is the first node in the stage, by computing:

Where has

An example and an image:

Recall this guy:

Read-once branching program generated from DOT, showing the same structure programmatically

If we look just at the 0-labelled edges:

Graph showing only the 0-labeled edge transitions in the branching program

We can describe the transition using this sequence of matrixes:

The way to read these: the row indicates the current node, the column is the next node. There is a iff. the current node, goes to the next node on input .

Similarly, we can look at the “1 edges”:

Graph showing only the 1-labeled edge transitions in the branching program

As a santity check, let’s check the output on 1010:

Step-by-step:

  1. The program is in the bottom state:
  2. Leaves the program in the bottom state:
  3. Changes the program state to the top:
  4. Leaves the program state in the top state:

By convention the Matrix Branching Program produces as output: as that is the first entry of the vector produced by the product we just computed.

  1. What if the label of the second sink was not 0? What if the label of the first sink was not 1? What if they were switched?
  2. What if my branching program had multiple sinks with the same label?
  3. What if some of the sink labels were not 0/1?
    e.g. how do I make the ROBP output instead of ?

Hint: Use “single row” matrixes, i.e.

Symbolic Evaluation

A note about Symbolic Evaluation of MBPs:

  1. By computing: And taking the first row, equivalently: Where .

  2. We can compute the output for any sink as

This means that for an input we can "precompute" a vector of length which allows us to evaluate the branching program for any sink vector: e.g. we can explore which node we would end up in if we "started" in another node than

Multilinear Basis Polynomials

All the "non-linearlity" of a Matrix Branching Program is "contained" in the selection of the correct matrix. To implement this section, we use multilinear Lagrange polynomials:

Such that for and we have:

And otherwise .

Low-Degree Extensions of Matrix Branching Programs

Let's start small, with an MBP of length 1. I claim that:

Is the low-degree extension of the MBP

  • Pause and think: that does this expression “do”?
  • Convince yourself: when and it is correct.
  • Why is the unique “multi“linear extension?

This trick extends to MBPs of length greater than :

  1. We compute the "mixed" matrixies:
  2. We compute their product:
  3. Compute and take the first component.

Another, completely equivalent method:

  1. Define: Where which has the effect of "taking" the first row.
  2. Iteratively compute:
  3. Output

Which allows you to compute the low-degree extension in a streaming way, if needed for your application.

Let’s compute the multilinear extension for the simple MBP from the earlier example:

Read-once branching program generated from DOT, showing the same structure programmatically

Recall the matrices are: for , and:

Let’s compute the multilinear extension and evaluate it at .

First, compute the mixed matrices :

For with :

For with :

Now compute using the streaming method with :

  1. Start:

Finally:

This makes sense! The multilinear extension at gives us the “average” of and .

Why is this the unique multilinear extension of ?

Hint, we need to check:

  • is multilinear
  • agrees with on

Protocols

Bibliography

[BSCRSVW18] Eli Ben-Sasson, Alessandro Chiesa, Michael Riabzev, Nicholas Spooner, Madars Virza, Nicholas P. Ward. Aurora: Transparent Succinct Arguments for R1CS. 2018.

[CHMMVW19] Alessandro Chiesa, Yuncong Hu, Mary Maller, Pratyush Mishra, Psi Vesely, Nicholas Ward. Marlin: Preprocessing zkSNARKs with Universal and Updatable SRS. 2019.

[BC99] Nigel P. Byott, Robin J. Chapman. Power Sums over Finite Subspaces of a Field. 1999.