Skip to content

Commit

Permalink
Add 2024-09-14-From-AIR-to-Plonkish.md
Browse files Browse the repository at this point in the history
  • Loading branch information
keroro520 committed Sep 14, 2024
1 parent 903542e commit 3df2eb2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

- [📚 Finite Domain Terminology.md](./_posts/2024-08-04-Finite%20Domain%20Terminology.md)
- [📚 Swartz-Zippel Lemma.md](./_posts/2024-08-05-Swartz-Zippel%20Lemma.md)
- [📚 From%20AIR%20to%20Plonkish.md](./_posts/2024-09-14-From%20AIR%20to%20Plonkish.md)
42 changes: 42 additions & 0 deletions _posts/2024-09-14-From%20AIR%20to%20Plonkish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

#zkp

## From AIR to Plonkish
### Recap

AIR's **one constraint is bound to one frame of trace**.
Plonkish flattens the frame and makes **one constraint is bound to one raw of trace**, just like R1CS does.

### e.g. Fibonacci Constraints

![image](/assets/Fib-From-AIR-to-Plonkish.svg)


Each Plonkish constraint is bound to a single row. That makes thing simple!

### Plonkish's Copy Constraints and Permutation

In order to enforce that $X_i = Y_{i-1} = Z_{i-2} \quad \text{ when } i \gt 2$, Plonkish introduces **Copy Constraints**. Here is a simplified problem below.

$$\text{Set } \quad \vec{a} = [X_3, X_4, X_5], \quad \vec{b} =[Y_2, Y_3, Y_4]$$
We aim to enforce that $\vec{a}$ and $\vec{b}$ are **permutation**.

We add a new column $P$

$$
\begin{aligned}
& P_0 = 1 \\
& P_{i+1} = P_i \cdot \frac{X_i + \sigma}{Y_i + \sigma}
\end{aligned}
$$

and new copy constraints

$$
\begin{aligned}
& P_0 = 0 \\
& P_{i+1} \cdot (Y_i + \sigma) - P_i \cdot (X_i + \sigma) = 0
\end{aligned}
$$

Done! We translate the **permutation** into mathematical constraints!
Loading

0 comments on commit 3df2eb2

Please sign in to comment.