Permutation argument There’s one very important idea in
PLONK (opens new window)
that I didn’t mention last time – the permutation argument.
Remember, we are in the field
F p F_p F p
and we have the multiplicative subgroup
H = { 1 , w , w 2 , . . . , w n − 1 } H = \{1, w, w^2, ..., w^{n-1}\} H = { 1 , w , w 2 , . . . , w n − 1 } of F p F_p F p .
We also have the polynomial
Z H ( x ) , Z_H(x), Z H ( x ) ,
for which it holds:
Z H ( x ) = 0 f o r x ∈ H Z_H(x) = 0 \; \text{for} \; x \in H
Z H ( x ) = 0 f o r x ∈ H
We observed how the prover can prove that for each
x ∈ H x \in H x ∈ H :
a ( x ) b ( x ) + 1 = 0 a(x) b(x) + 1 = 0
a ( x ) b ( x ) + 1 = 0
( a ( 1 ) a ( ω ) . . . a ( ω n − 1 ) ) ( b ( 1 ) b ( ω ) . . . b ( ω n − 1 ) ) + ( 1 1 . . . 1 ) = ( 0 0 . . . 0 ) \begin{pmatrix} a(1) \\ a(\omega) \\ ... \\ a(\omega^{n-1}) \end{pmatrix} \begin{pmatrix} b(1) \\ b(\omega) \\ ... \\ b(\omega^{n-1}) \end{pmatrix} + \begin{pmatrix} 1 \\ 1 \\ ... \\ 1 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ ... \\ 0 \end{pmatrix}
⎝ ⎜ ⎜ ⎛ a ( 1 ) a ( ω ) . . . a ( ω n − 1 ) ⎠ ⎟ ⎟ ⎞ ⎝ ⎜ ⎜ ⎛ b ( 1 ) b ( ω ) . . . b ( ω n − 1 ) ⎠ ⎟ ⎟ ⎞ + ⎝ ⎜ ⎜ ⎛ 1 1 . . . 1 ⎠ ⎟ ⎟ ⎞ = ⎝ ⎜ ⎜ ⎛ 0 0 . . . 0 ⎠ ⎟ ⎟ ⎞
But sometimes the prover needs to prove additional relations, like:
a ( 1 ) = a ( ω 2 ) a(1) = a(\omega^2)
a ( 1 ) = a ( ω 2 )
a ( ω ) = a ( ω 3 ) . a(\omega) = a(\omega^3).
a ( ω ) = a ( ω 3 ) .
There is a very efficient way to do this, and it’s called a permutation argument.
Below is the basic idea of it.
Let’s define the function
σ \sigma σ
for elements from
H H H :
σ ( 1 ) = ω 2 \sigma(1) = \omega^2
σ ( 1 ) = ω 2
σ ( ω 2 ) = 1 \sigma(\omega^2) = 1
σ ( ω 2 ) = 1
σ ( ω ) = ω 3 \sigma(\omega) = \omega^3
σ ( ω ) = ω 3
σ ( ω 3 ) = ω \sigma(\omega^3) = \omega
σ ( ω 3 ) = ω
σ ( ω i ) = ω i f o r o t h e r i \sigma(\omega^i) = \omega^i \; \text{for} \; \text{other} \; i
σ ( ω i ) = ω i f o r o t h e r i
The function
σ \sigma σ
determines the equalities that should hold between
a ( ω i ) a(\omega^i) a ( ω i )
elements and is known to both – the prover and the verifier.
Let’s now observe the product (called the grand product):
( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) . . . ( a ( ω n − 1 ) + β ω n − 1 ) ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( w ) ) . . . ( a ( ω n − 1 ) + β σ ( w n − 1 ) ) \frac{(a(1) + \beta 1)(a(\omega) + \beta \omega) ... (a(\omega^{n-1}) + \beta \omega^{n-1})}{(a(1) + \beta\sigma(1))(a(\omega) + \beta\sigma(w))...(a(\omega^{n-1}) + \beta\sigma(w^{n-1}))}
( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( w ) ) . . . ( a ( ω n − 1 ) + β σ ( w n − 1 ) ) ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) . . . ( a ( ω n − 1 ) + β ω n − 1 )
Note that
$ \beta$
is a challenge computed by the verifier.
Actually, let’s observe the product only for
i ≤ 3 i \leq 3 i ≤ 3
(as for
i > 4 , i > 4, i > 4 ,
the factors are the same in the numerator and the denominator because we required only the equalities
a ( 1 ) = a ( ω 2 ) a(1) = a(\omega^2) a ( 1 ) = a ( ω 2 )
and
a ( ω ) = a ( ω 3 ) a(\omega) = a(\omega^3) a ( ω ) = a ( ω 3 ) ):
( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( ω 2 ) + β ω 2 ) ( a ( ω 3 ) + β ω 3 ) ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( w ) ) ( a ( ω 2 ) + β σ ( w 2 ) ) ( a ( ω 3 ) + β σ ( w 3 ) ) \frac{(a(1) + \beta 1)(a(\omega) + \beta \omega) (a(\omega^2) + \beta \omega^2) (a(\omega^3) + \beta \omega^3)}{(a(1) + \beta\sigma(1))(a(\omega) + \beta\sigma(w))(a(\omega^2) + \beta\sigma(w^2)) (a(\omega^3) + \beta\sigma(w^3))}
( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( w ) ) ( a ( ω 2 ) + β σ ( w 2 ) ) ( a ( ω 3 ) + β σ ( w 3 ) ) ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( ω 2 ) + β ω 2 ) ( a ( ω 3 ) + β ω 3 )
Note that:
a ( 1 ) + β 1 = a ( ω 2 ) + β σ ( ω 2 ) a(1) + \beta 1 = a(\omega^2) + \beta \sigma(\omega^2)
a ( 1 ) + β 1 = a ( ω 2 ) + β σ ( ω 2 )
a ( ω ) + β ω = a ( ω 3 ) + β σ ( ω 3 ) a(\omega) + \beta \omega = a(\omega^3) + \beta \sigma(\omega^3)
a ( ω ) + β ω = a ( ω 3 ) + β σ ( ω 3 )
We can see that these factors cancel out each other too.
It’s easy to see that when
σ \sigma σ
equalities hold, the grand product is 1.
That’s because the same factors appear in the numerator and the denominator.
The other way around, there is only a tiny probability that the prover can make up
a ( ω i ) a(\omega^i) a ( ω i )
for which
σ \sigma σ
equalities don’t hold, but such a product is still 1.
So, if the prover can prove that the grand product is 1, it will prove that
σ \sigma σ
equalities hold.
To prove this, the prover needs to prove that the grand product is properly constructed
and that it’s 1.
Let’s construct the polynomial
z : z: z :
z ( ω 2 ) = ( a ( 1 ) + β 1 ) ( a ( 1 ) + β σ ( 1 ) ) z(\omega^2) = \frac{(a(1)+\beta 1)}{(a(1) + \beta \sigma(1))}
z ( ω 2 ) = ( a ( 1 ) + β σ ( 1 ) ) ( a ( 1 ) + β 1 )
z ( ω 3 ) = ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( ω ) ) z(\omega^3) = \frac{ (a(1)+\beta 1)(a(\omega)+\beta \omega)}{ (a(1) + \beta \sigma(1))(a(\omega) + \beta \sigma(\omega))}
z ( ω 3 ) = ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( ω ) ) ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω )
z ( ω 4 ) = ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( ω 2 ) + β ω 2 ) ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( ω ) ) ( a ( ω 2 ) + β σ ( ω 2 ) ) z(\omega^4) = \frac{ (a(1)+\beta 1)(a(\omega)+\beta \omega)(a(\omega^2)+\beta \omega^2)}{ (a(1) + \beta \sigma(1))(a(\omega) + \beta \sigma(\omega))(a(\omega^2) + \beta \sigma(\omega^2))}
z ( ω 4 ) = ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( ω ) ) ( a ( ω 2 ) + β σ ( ω 2 ) ) ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( ω 2 ) + β ω 2 )
. . . ...
. . .
z ( ω n ) = z ( 1 ) = ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( ω 2 ) + β ω 2 ) . . . ( a ( ω n − 2 ) + β ω n − 2 ) ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( ω ) ) ( a ( ω 2 ) + β σ ( ω 2 ) ) . . . ( a ( ω n − 2 ) + β σ ( ω n − 2 ) ) z(\omega^n) = z(1) = \frac{ (a(1)+\beta 1)(a(\omega)+\beta \omega)(a(\omega^2)+\beta \omega^2)...(a(\omega^{n-2})+\beta \omega^{n-2})}{ (a(1) + \beta \sigma(1))(a(\omega) + \beta \sigma(\omega))(a(\omega^2) + \beta \sigma(\omega^2))...(a(\omega^{n-2}) + \beta \sigma(\omega^{n-2}))}
z ( ω n ) = z ( 1 ) = ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( ω ) ) ( a ( ω 2 ) + β σ ( ω 2 ) ) . . . ( a ( ω n − 2 ) + β σ ( ω n − 2 ) ) ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( ω 2 ) + β ω 2 ) . . . ( a ( ω n − 2 ) + β ω n − 2 )
z ( ω ) = ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( ω 2 ) + β ω 2 ) . . . ( a ( ω n − 1 ) + β ω n − 1 ) ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( ω ) ) ( a ( ω 2 ) + β σ ( ω 2 ) ) . . . ( a ( ω n − 1 ) + β σ ( ω n − 1 ) ) z(\omega) = \frac{ (a(1)+\beta 1)(a(\omega)+\beta \omega)(a(\omega^2)+\beta \omega^2)...(a(\omega^{n-1})+\beta \omega^{n-1})}{ (a(1) + \beta \sigma(1))(a(\omega) + \beta \sigma(\omega))(a(\omega^2) + \beta \sigma(\omega^2))...(a(\omega^{n-1}) + \beta \sigma(\omega^{n-1}))}
z ( ω ) = ( a ( 1 ) + β σ ( 1 ) ) ( a ( ω ) + β σ ( ω ) ) ( a ( ω 2 ) + β σ ( ω 2 ) ) . . . ( a ( ω n − 1 ) + β σ ( ω n − 1 ) ) ( a ( 1 ) + β 1 ) ( a ( ω ) + β ω ) ( a ( ω 2 ) + β ω 2 ) . . . ( a ( ω n − 1 ) + β ω n − 1 )
We can see that
z ( ω ) z(\omega) z ( ω )
is the grand product.
And we can see that for
x ∈ H x \in H x ∈ H :
z ( x ω ) = z ( x ) ( a ( x ) + β x ) ( a ( x ) + β σ ( x ) ) z(x\omega) = z(x) \frac{(a(x) + \beta x)}{(a(x) + \beta \sigma(x))}
z ( x ω ) = z ( x ) ( a ( x ) + β σ ( x ) ) ( a ( x ) + β x )
Thus, for
x ∈ H : x \in H: x ∈ H :
z ( x ω ) ( a ( x ) + β σ ( x ) ) − z ( x ) ( a ( x ) + β x ) = 0 z(x\omega)(a(x) + \beta \sigma(x)) - z(x) (a(x) + \beta x) = 0
z ( x ω ) ( a ( x ) + β σ ( x ) ) − z ( x ) ( a ( x ) + β x ) = 0
Now, to prove that the above equation holds, we observe the following polynomial:
r ( x ) = z ( x ω ) ( a ( x ) + β σ ( x ) ) − z ( x ) ( a ( x ) + β x ) Z H ( x ) r(x) = \frac{z(x\omega)(a(x) + \beta \sigma(x)) - z(x) (a(x) + \beta x)}{Z_H(x)}
r ( x ) = Z H ( x ) z ( x ω ) ( a ( x ) + β σ ( x ) ) − z ( x ) ( a ( x ) + β x )
The same trick is applied as described last time .
The prover commits to the polynomial
r ( x ) : [ r ( x ) ] 1 . r(x): [r(x)]_1. r ( x ) : [ r ( x ) ] 1 .
The verifier chooses a random challenge
χ \chi χ
and the prover opens
r r r
at
χ \chi χ .
That means the verifier checks:
e ( [ r ( s ) − r ¯ ] 1 , [ 1 ] 2 ) = e ( [ g r ( s ) ] 1 , [ ( s − χ ) ] 2 ) e([r(s) - \bar r]_1, [1]_2) = e([g_{r}(s)]_1, [(s - \chi)]_2)
e ( [ r ( s ) − r ¯ ] 1 , [ 1 ] 2 ) = e ( [ g r ( s ) ] 1 , [ ( s − χ ) ] 2 )
Note that the verifier computes
r ¯ \bar r r ¯
as:
r ¯ = r ( χ ) = z ( χ ω ) ( a ( χ ) + β σ ( χ ) ) − z ( χ ) ( a ( χ ) + β χ ) Z H ( χ ) \bar r = r(\chi) = \frac{z(\chi\omega)(a(\chi) + \beta \sigma(\chi)) - z(\chi) (a(\chi) + \beta \chi)}{Z_H(\chi)}
r ¯ = r ( χ ) = Z H ( χ ) z ( χ ω ) ( a ( χ ) + β σ ( χ ) ) − z ( χ ) ( a ( χ ) + β χ )
If the verification succeeds, the prover proves the grand product is constructed properly.
Finally, the prover needs to prove that
z ( ω ) = 1 z(\omega) = 1 z ( ω ) = 1 .
For this, the prover constructs the polynomial:
( z ( ω ) − 1 ) L 1 (z(\omega) - 1)L_1
( z ( ω ) − 1 ) L 1
where
L 1 L_1 L 1
is a polynomial such that:
L 1 ( w ) = 1 L_1(w) = 1
L 1 ( w ) = 1
L 1 ( x ) = 0 f o r x ≠ w , x ∈ H L_1(x) = 0 \; \text{for} \; x \neq w, x \in H
L 1 ( x ) = 0 f o r x ≠ w , x ∈ H
The prover then divides the polynomial
( z ( ω ) − 1 ) L 1 (z(\omega) - 1)L_1 ( z ( ω ) − 1 ) L 1
by
Z H Z_H Z H
and proceeds as above for the polynomial
r r r .
Note that multi-opening can be used to optimize the proof.