Skip to content

Commit

Permalink
Merge pull request #1354 from o1-labs/dw/explicitly-add-query-selecto…
Browse files Browse the repository at this point in the history
…r-value

Explictly add selector and coin exponent
  • Loading branch information
dannywillems authored Nov 30, 2023
2 parents 90438ea + f87c26a commit 5f1b518
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/src/kimchi/lookup.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $j$ and sum the individual elements of the list using powers of this coin.
The grand product argument for the lookup constraint will look like this at this point:

$$
\mathsf{acc}_i = \mathsf{acc}_{i-1} \cdot \frac{(1+\beta) \cdot {\color{green}(\gamma + w_0(g^i) + j \cdot w_2(g^i) + j^2 \cdot 2 \cdot w_1(g^i))} \cdot (\gamma(1 + \beta) + t_{i-1} + \beta t_i)}{(\gamma(1+\beta) + s_{i-1} + \beta s_{i})(\gamma(1+\beta) + s_{n+i-1} + \beta s_{n+i})}
\mathsf{acc}_i = \mathsf{acc}_{i-1} \cdot \frac{(1+\beta) \cdot {\color{green}(\gamma + j^0 \cdot 1 \cdot w_0(g^i) + j \cdot 1 \cdot w_2(g^i) + j^2 \cdot 2 \cdot w_1(g^i))} \cdot (\gamma(1 + \beta) + t_{i-1} + \beta t_i)}{(\gamma(1+\beta) + s_{i-1} + \beta s_{i})(\gamma(1+\beta) + s_{n+i-1} + \beta s_{n+i})}
$$

Not all rows need to perform queries into a lookup table. We will use a query selector in the next section to make the constraints work with this in mind.
Expand All @@ -122,7 +122,7 @@ where $\color{green}{\mathsf{query}}$ is constructed so that a dummy query ($0 \

$$
\begin{align}
\mathsf{query} := &\ \mathsf{selector} \cdot (\gamma + w_0(g^i) + j \cdot w_2(g^i) + j^2 \cdot 2 \cdot w_1(g^i)) + \\
\mathsf{query} := &\ \mathsf{selector} \cdot (\gamma + j^0 \cdot 1 \cdot w_0(g^i) + j \cdot 1 \cdot w_2(g^i) + j^2 \cdot 2 \cdot w_1(g^i)) + \\
&\ (1- \mathsf{selector}) \cdot (\gamma + 0 + j \cdot 0 + j^2 \cdot 0)
\end{align}
$$
Expand Down

0 comments on commit 5f1b518

Please sign in to comment.