Skip to content

Commit 73633d4

Browse files
authored
Update 2023-02-07-R1CSQAP.md
1 parent e322474 commit 73633d4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

_posts/2023-02-07-R1CSQAP.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,13 @@ This has 6 left polynomials, one in each row.
272272

273273
Our solution vector $S = [1, out, x, var1, var2, var3]$ also has 6 elements. So we can do a dot product of $S\cdot Lm$ whose output again will be a polynomial. Likewise for the other 2 polynomial matrices.
274274

275+
275276
~~~ruby
276277
# We define the solution vector also in the field
277278
S = vector(Fp,[1, 35, 3, 9, 27, 30])
278279

279280
# Create the Lx, Rx & Ox polynomial
281+
# In the program, we use Fx to denote F(x)
280282
Lx = Rp(list(S*PolyM[0]))
281283
Rx = Rp(list(S*PolyM[1]))
282284
Ox = Rp(list(S*PolyM[2]))
@@ -290,9 +292,9 @@ Ox = 537*x^3 + 296*x^2 + 499*x + 600
290292

291293
~~~
292294

293-
So by taking a dot product of $S$ with each of $Lm$, $Rm$ and $Om$, we created 3 polynomials $Lx$, $Rx$ and $Ox$
295+
So by taking a dot product of $S$ with each of $Lm$, $Rm$ and $Om$, we created 3 polynomials $L(x)$, $R(x)$ and $O(x)$
294296

295-
We can define a new polynomial $T = Lx * Rx - Ox$.
297+
We can define a new polynomial $T(x) = L(x) * R(x) - O(x)$.
296298

297299
~~~ruby
298300
....: # New Polynomial T
@@ -322,7 +324,7 @@ T(4) = 0
322324
However, the Verifier doesn't know the polynomial $T$, nor can he compute it since he doesn't know the solution vector. So the Prover has to prove it to the Verifier that $T$ is zero at $x=1, x=2, x=3,x=4$.
323325
If $T$ is zero at $x=1, x=2, x=3,x=4$, then it means these are all roots of $T$. So we create a new polynomial $Z$ known by both the Prover & the Verifier.
324326

325-
$Z = (x-1)(x-2)(x-3)(x-4)$
327+
$Z(x) = (x-1)(x-2)(x-3)(x-4)$
326328

327329
If $T$ is divided by $Z$, then it will be perfectly divisible & will leave no remainder i.e. there must exist a Polynomial $H$ such that $T(x) = H(x) \cdot Z(x)$
328330

0 commit comments

Comments
 (0)