venillalemon

January 20, 2026 · Notion export

Polynomial IOPs for Circuit SAT and PLONK


Polynomial IOP for Circuit SAT

In this lecture we are going to construct a poly-IOP for circuit satisfiability. CC is an arithmetic circuit with size SS. The prover wants to prove that it knows the solution ww to C(w)=yC(w)=y.

First, we label every gate of CC with a bit string of length logS\log S. Thus the computation of C(w)=yC(w)=y can be expressed in a form of function T:{0,1}logSFT:\{0,1\}^{\log S}\mapsto\mathbb{F}, which maps the label of some gate to the output of the gate with its output (notice that T(root)=yT(\text{root})=y). Let h:FlogSFh:\mathbb{F}^{\log S}\mapsto\mathbb{F} be the unique multilinear extension of TT, satisfying h(x)=T(x)h(x)=T(x) for all x{0,1}logSx \in \{0,1\}^{\log S} (the uniqueness is trivial by dynamic programming).

Why shall we extend the function TT to a multilinear polynomial hh? The necessity is shown in the part of the sum-check protocol.

Here VV should have verified the hh and TT are the same on {0,1}logS\{0,1\}^{\log S}. However VV only has the commitment of hh, so VV verifies this by another approach shown below.

We use labels to denote gates, and define the polynomial gh:F3logSFg_h:\mathbb{F}^{3\log S}\mapsto\mathbb{F} as follows:

gh(a,b,c)={h(a)+h(b)h(c),if c is an add gate with input a,b,h(a)h(b)h(c),if c is an mult gate with input a,b,0,otherwise.g_h(a,b,c)=\begin{cases} h(a)+h(b)-h(c), & \text{if }c\text{ is an add gate with input }a,b, \\ h(a)h(b)-h(c), & \text{if }c\text{ is an mult gate with input }a,b,\\ 0,& \text{otherwise}. \end{cases}

which satisfies:

T is a correct assignment     (a,b,c){0,1}3logS,  gh(a,b,c)=0  (in F).T\text{ is a correct assignment }\iff \forall (a,b,c)\in\{0,1\}^{3\log S},\;g_h(a,b,c)=0\;(\text{in }\mathbb{F}).

We shall modify a little in ghg_h: we embed the result gh(a,b,c)g_h(a,b,c) into Z\mathbb{Z}. So the condition above is equivalent to x{0,1}3logSg~h(x)=0\sum_{x\in\{0,1\}^{3\log S}} \tilde{g}_h(x)=0 where g~h:F3logSZ\tilde{g}_h:\mathbb{F}^{3\log S}\mapsto\mathbb{Z} has the same values as ghg_h on all inputs. Then PP and VV interact to let VV believe that the sum is 00. If the sum is 00, VV believes that PP knows the correct TT.

Here comes the usage of the sum-check protocol.

Sum-Check Protocol

The goal of the protocol is to check the answer CC provided by prover satisfies:

C=x{0,1}ng(x)C=\sum_{x\in\{0,1\}^n}g(x)

where gg is an nn-variate polynomial over the field F\mathbb{F} and the sum is computed in Z\mathbb{Z} (i.e. add them up without taking the modulo).

In setup phase, PP sends the commitment of gg to VV. Then they interact for nn rounds, and in the end VV checks the final claim by querying the oracle of gg for one time at a random point.

ProverVerifierstart: “I know s0=x{0,1}ng(x)” s0round 1:“Please verify the last step to compute s0s1(X1) verify s1(0)+s1(1)=s0 and the next goal is to verify s1(X1)=x{0,1}n1g(X1,x)r1“If indeed, then for most rF,s1(r)=x{0,1}n1g(r,x). So I send a random r1.”round 2:“I will proof s1(r1)=x{0,1}n1g(r1,x), please verify...” s2(X2)  ......round n: “I will proof sn1(rn1)=x{0,1}g(r1,,rn1,x), please verify...” sn(Xn)   verify sn(0)+sn(1)=sn1(rn1) and the next goal is to verify sn(Xn)=g(r1,,rn1,Xn)  rn$F, obtaining sn(rn). Then query the oracle of g at (ri)i=1n. Accept iff g(r1,,rn)=sn(rn).\begin{align*} &\text{Prover}&&&\text{Verifier}\\ \text{start}:&\text{ ``I know }s_0=\sum_{x\in\{0,1\}^n}g(x)\text{'' }&\xrightarrow{s_0}&&\\ \text{round 1}:&\text{``Please verify the last step to compute }s_0\text{''}&\xrightarrow{s_1(X_1)}&&\text{ verify }s_1(0)+s_1(1)=s_0\text{ and the next goal is to verify }s_1(X_1)=\sum_{x\in\{0,1\}^{n-1}}g(X_1,x)\\ &&\xleftarrow{r_1}&&\text{``If indeed, then for most }r\in\mathbb{F},s_1(r)=\sum_{x\in\{0,1\}^{n-1}}g(r,x)\text{. So I send a random $r_1$.''}\\ \text{round 2}:&\text{``I will proof }s_1(r_1)=\sum_{x\in\{0,1\}^{n-1}}g(r_1,x)\text{, please verify...'' }&\xrightarrow{s_2(X_2)}&\;&...\\ &&...&&\\ \text{round }n:&\text{ ``I will proof }s_{n-1}(r_{n-1})=\sum_{x\in\{0,1\}}g(r_1,\dots,r_{n-1},x)\text{, please verify...'' }&\xrightarrow{s_{n}(X_{n})}&\;&\text{ verify }s_n(0)+s_n(1)=s_{n-1}(r_{n-1})\text{ and the next goal is to verify }s_{n}(X_n)=g(r_1,\dots,r_{n-1},X_{n})\\ &&&\;&r_n\xleftarrow{\$}\mathbb{F},\text{ obtaining }s_n(r_n).\text{ Then query the oracle of }g\text{ at }(r_i)_{i=1}^n.\text{ Accept iff }g(r_1,\dots,r_n)=s_n(r_n). \end{align*}

The probability that a cheating prover can make the verifier accept a false claim is at most ndeg(g)F\frac{n\deg(g)}{|\mathbb{F}|} (by Schwartz-Zippel lemma, deg\deg is the maximum degree in total, regardless of different variables). So we can make the soundness error negligible by choosing a large enough field.

Note that every polynomial from PP is sent in its coefficients. Let d=deg(g)d=\deg(g) and it takes TgT_g time to verify/evaluate any g(x)g(x), we have

TV=O(nd+Tg),TP=O(2ndTg)T_V=O(nd+T_g),T_P=O(2^ndT_g)

and the proof length is O(nd)O(nd) .

For dense polynomial gg , the time to evaluate its multilinear extension g~\tilde g on point xx is at most O(2n)O(2^n) . Thus our prover has quadratic time. The [Libra] puts forwards a linear time sum-check prover.

This sum-check protocol is also used in the proof that IP=PSPACE\mathbf{IP}=\mathbf{PSPACE}. Define the decisional counting problem of 3CNF as:

(#SAT)D:={φ,k:k=b1,,bn{0,1}φ(b1,,bn)}(\#\mathsf{SAT})_D:=\left\{\langle\varphi,k\rangle:k=\sum_{b_1,\dots,b_n\in\{0,1\}}\varphi(b_1,\dots,b_n)\right\}

so by translating the boolean formula into a multilinear polynomial, with the sum-check protocol we have (#SAT)DIP(\#\mathsf{SAT})_D\in\mathbf{IP}.

Suppose we have a TQBF\mathsf{TQBF} formula ψ=x1x2Qxn.φ(x1,x2,,xn)\psi=\forall x_1\exists x_2\dots Qx_n.\varphi(x_1,x_2,\dots,x_n) , if we directly make \forall into multiplication and \exists into addition, the degree will skyrocket. Define for a pF[X1,,Xn]p\in\mathbb{F}[X_1,\dots,X_n],

Lip:=(1Xi)pi0+Xipi1F[X1,Xn],Aip:=pi0pi1F[X1Xi1,Xi+1,,Xn],Eip:=1(1pi0)(1pi1)F[X1Xi1,Xi+1,,Xn],\begin{align*} &\mathsf{L}_ip:=(1-X_i)p^{i\leftarrow0}+X_ip^{i\leftarrow1}\in\mathbb{F}[X_1\dots,X_n],\\ &\mathsf{A}_ip:=p^{i\leftarrow0}p^{i\leftarrow1}\in\mathbb{F}[X_1\dots X_{i-1},X_{i+1},\dots,X_n],\\ &\mathsf{E}_ip:=1-(1-p^{i\leftarrow0})(1-p^{i\leftarrow1})\in\mathbb{F}[X_1\dots X_{i-1},X_{i+1},\dots,X_n], \end{align*}

these polynomials are all in F[X1,Xn]\mathbb{F}[X_1\dots,X_n].

In analogy to the sum-check protocol, we can also define Xip:=pi0+pi1F[X1Xi1,Xi+1,,Xn]\mathsf{X}_ip:=p^{i\leftarrow0}+p^{i\leftarrow1}\in\mathbb{F}[X_1\dots X_{i-1},X_{i+1},\dots,X_n].

The idea is to linearize the polynomial after each multiplication. So the formula is described by the polynomial

A1L1E2L1L2A3L1L2L3QnL1L2Lnpφ=1\mathsf{A}_1\mathsf{L}_1\mathsf{E}_2\mathsf{L}_1\mathsf{L}_2\mathsf{A}_3\mathsf{L}_1\mathsf{L}_2\mathsf{L}_3\dots\mathsf{Q}_n\mathsf{L}_1\mathsf{L}_2\dots\mathsf{L}_np_{\varphi}=1

then the prover and verifier go through a O(n2)O(n^2) interaction to establish the protocol. Thus TQBFIP\mathsf{TQBF}\in\mathbf{IP} and IP=PSPACE\mathbf{IP}=\mathbf{PSPACE}.

PLONK IOP

Based on the lecture 4, we can encode a circuit problem into a polynomial. The sum-check protocol uses multi-variable polynomials with a large proof size (linear to nlogCn\sim\log |C| even if we send commitments of polynomials instead of coefficients). PLONK is also used for circuit SAT with a different encoding, which uses univariate polynomials and has a proof size independent of nn.

Small gadgets to build PLONK IOP

Let Ω=ωFp\Omega=\langle\omega\rangle\subset\mathbb{F}_p be a multiplicative subgroup of size kφ(p)k\mid\varphi(p). And we want to provide protocols to prove that a committed polynomial ff has some properties on Ω\Omega. The properties of given f,gFp[X]f,g\in\mathbb{F}_p[X] include:

  • Zeroness: f(x)=0f(x)=0 for all xΩx\in\Omega
  • Sum/Product over Ω\Omega: xΩ(f(x)g(x))=0\sum_{x\in\Omega}\left(f(x)-g(x)\right)=0 or xΩf(x)g(x)=1\prod_{x\in\Omega}\frac{f(x)}{g(x)}=1
  • Permutation: (f(ωi))i=0k1(f(\omega^i))_{i=0}^{k-1} is a permutation of (g(ωi))i=0k1(g(\omega^i))_{i=0}^{k-1} . Warning: it is not enough to check xΩf(x)g(x)=1\prod_{x\in\Omega}\frac{f(x)}{g(x)}=1 ! The soundness relies on the random challenge by the verifier.
  • Prescribed permutation: f(y)=g(W(y))f(y)=g(W(y)) for some known permutation W:ΩΩW:\Omega\to\Omega

Encoding a circuit into a polynomial

We again take C(x,w)C(x,w) as the circuit satisfiability problem. Let d=3C+x+wd=3|C|+|x|+|w|, and label each gate with a integer. And we have the dd-th root ω\omega, which satisfies ωd=1\omega^d=1.

Setup phase outputs polynomial SS and permutation WW. The prover wants to prove that it knows ww such that C(x,w)=0C(x,w)=0, so it interpolates a polynomial TFpd[X]T\in\mathbb{F}_p^{\leq d}[X] such that

  • T(ωj)=T(\omega^{-j})= the value of the jj-th input
  • T(ω3i),T(ω3i+1),T(ω3i+2)T(\omega^{3i}),T(\omega^{3i+1}),T(\omega^{3i+2}) are the left-input/right-input/output of the ii-th gate, i=0,1,,C1i=0,1,\dots,|C|-1

using FFT in time O(dlogd)O(d\log d).

Then the prover proves the following:

  • The inputs are correct: T(ωj)=xjT(\omega^{-j})=x_j for j=0,1,,x1j=0,1,\dots,|x|-1
  • The math operations are correct: Use a public S(ω3i)=1S(\omega^{3i})=1 iff ii-th gate is multiplicative; then, prove for all y{ω3i:i<C}y\in\{\omega^{3i}:i<|C|\},
S(y)T(y)T(yω)+(1S(y))(T(y)+T(yω))T(yω2)=0.S(y)\cdot T(y)\cdot T(y\omega)+(1-S(y))\cdot(T(y)+T(y\omega))-T(y\omega^{2})=0.
  • Wiring is correct: Use a public WW to rotate the wires that share the same value; then, prove T(y)=T(W(y))T(y)=T(W(y)) for all y{ωi:i<d}y\in\{\omega^{i}:i<d\}
  • The output is 00 : T(ω3C1)=0T(\omega^{3|C|-1})=0

using the gadgets mentioned above.