Before describing our main example, we discuss two basic techniques that will be used in it.
We describe a basic primitive that will be useful in the next section. Suppose we have two selectors We wish to enforce that, say, the first value in row , is equal to where is the second value in the same row. This can be obtained by the constraint
A convenient trick that we will use in the next section, is that in the special case where we wish to choose between two values, and their negations, e.g. according to the third row value being 1 or -1, we can do it using the equation .
After designing several PLONK transition gates (recall that a transition gate means a set of - variate polynomials, together with values for selector polynomials.) , one may wish to design a program that enforces a different subset of these constraints depending on the row. For example, given two gates we might want to enforce only on some row transitions, only on other row transitions, and both constraints on the rest. The generic way to achieve this is to add two selectors that will be zero or one according to whether we want the corresponding gate to be activated at a given row. Then we can multiply each constraint in by , and define the new gate's constraints to be the union of these constraints from both gates.