plafer
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Zwischenablage
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Reines HTML
Menü Note settings Note Insights Versions and GitHub Sync Sharing URL Create Hilfe
Create Create new note Create a note from template
Menü
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Zwischenablage
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Reines HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Zwischenablage
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # LogUp-GKR: The Air constraints Recall from the previous article that running GKR on the LogUp circuit leaves us with the claims $\tilde{f}_0(\rho), \dots, \tilde{f}_{m-1}(\rho)$, for some randomly sampled $\rho \in \mathbb{F}^{\log n}$. We will be proving these claims in Air. Rather than proving $m$ separate claims, we will instead prove the random linear combination of these claims: $$ \sigma = \sum_{j = 0}^{m-1} \alpha_j \tilde{f}_j(\rho) $$ for randomly sampled $\alpha_j \in \mathbb{F}$, $0 \leq j < m$. Finally, let $g$ be the generator of a cyclic group $G$ of size $n$, where $G \subset \mathbb{F}$. ## Conventions Let $i \in \mathbb{F}$. Then, we will use $i^{\wedge}$ to denote the bit decomposition of $i$. For example, if $i = 4$, then $i^{\wedge} = (0, 0, 1)$. Note that when representing bit decompositions, the least significant bit comes first, and the most significant bit comes last. Given the trace length $n$, let $\mu = \log_2 n$. ## The columns We will first re-arrange the equation to better reflect how we will be proving $\sigma$. $$ \begin{align} \sigma &= \sum_{j = 0}^{m-1} \alpha_j \tilde{f}_j(\rho) \\ &= \sum_{j = 0}^{m-1} \alpha_j \sum_{x \in \{0, 1\}^{\mu}} \mathrm{eq}(x, \rho) f_j(x)\\ &= \sum_{x \in \{0, 1\}^{\mu}} \mathrm{eq}(x, \rho) \sum_{j = 0}^{m-1} \alpha_j f_j(x) \end{align} $$ We will use 2 auxiliary columns, called $l$ and $s$, to prove $\sigma$. We will also refer to the $l$ column as the "Lagrange kernel" column. ### The Lagrange kernel column Recall that the $\mathrm{eq}$ polynomial is defined as $$ \mathrm{eq}(x, \rho) = \prod_{k = 0}^{\mu - 1} (1 - x_k) (1 - \rho_k) + x_k \rho_k $$ for $x \in \mathbb{F}^{\mu}$ and $\rho \in \mathbb{F}^{\mu}$. Then, at row $i$, the Lagrange kernel column will store $\mathrm{eq}(i^{\wedge}, \rho)$. For example, if $\mu = 3$, then the column would be constructed as | $l$ | | ------------- | | $(1 - \rho_0)(1 - \rho_1)(1 - \rho_2)$ | | $\rho_0(1 - \rho_1)(1 - \rho_2)$ | | $(1 - \rho_0) \rho_1 (1 - \rho_2)$ | | $\rho_0 \rho_1 (1 - \rho_2)$ | | $(1 - \rho_0)(1 - \rho_1) \rho_2$ | | $\rho_0(1 - \rho_1)\rho_2$ | | $(1 - \rho_0) \rho_1 \rho_2$ | | $\rho_0 \rho_1 \rho_2$ | ### The $s$ column The $s$ column is defined as implementing a running sum of $$ \sum_{x \in \{0, 1\}^{\mu}} \mathrm{eq}(x, \rho) \sum_{j = 0}^{m-1} \alpha_j f_j(x). $$ > As we will see in later sections, since the Lagrange kernel column stores the expression $\mathrm{eq}(x, \rho)$, the transition constraint for the $s$ column will refer to $l$. Additionally, we need to remove $\frac{i \cdot \sigma}{n}$ from row $i$ to make the constraints work, as we will see in the last section. For example, if $\mu = 3$, then the column would be constructed as | $s$ | | ------------- | | $-\frac{\sigma}{8} + l(0) \sum_{j = 0}^{m-1} \alpha_j f_j(0^{\wedge})$ | | $-\frac{2\sigma}{8} + \sum_{i=0}^{1} l(i) \sum_{j = 0}^{m-1} \alpha_j f_j(i^{\wedge})$ | | $-\frac{3\sigma}{8} + \sum_{i=0}^{2} l(i) \sum_{j = 0}^{m-1} \alpha_j f_j(i^{\wedge})$ | | $-\frac{4\sigma}{8} + \sum_{i=0}^{3} l(i) \sum_{j = 0}^{m-1} \alpha_j f_j(i^{\wedge})$ | | $-\frac{5\sigma}{8} + \sum_{i=0}^{4} l(i) \sum_{j = 0}^{m-1} \alpha_j f_j(i^{\wedge})$ | | $-\frac{6\sigma}{8} + \sum_{i=0}^{5} l(i) \sum_{j = 0}^{m-1} \alpha_j f_j(i^{\wedge})$ | | $-\frac{7\sigma}{8} + \sum_{i=0}^{6} l(i) \sum_{j = 0}^{m-1} \alpha_j f_j(i^{\wedge})$ | | $0$ | Notice that the last row of the $s$ column contains $0$. Hence, by now we can see the whole picture of how $l$ and $s$ work together to prove $\sigma$. The sum that defines $\sigma$ is built row by row in $s$, which uses the values in the Lagrange kernel column. The last row of the $s$ column contains $\sigma$, which will be ensured using a boundary constraint. Next, we will look at the constraints that ensure $l$ and $s$ are well constructed. ## The constraints We will first define the Lagrange kernel column constraints, followed by the $s$ column constraints. ### The Lagrange kernel constraints The Lagrange kernel constraints are unusual in that the number of transition constraints varies with the length of the trace. Also, the transition constraints rely on more rows than only the typical "current" and "next" rows. We will first the constraints, and follow up with an example that provides an intuition for why the constraints make sense. The boundary constraints simply check that the first row is constructed correctly: $$ l(0) = \mathrm{eq}(0^{\wedge}, \rho) $$ As for the transition constraints, for each $\kappa \in \{1, \dots, \mu\}$, $$ \rho_{\mu - \kappa} \cdot l(x) - (1 - \rho_{\mu - \kappa}) \cdot l(g^{2^{\mu - \kappa}}) = 0 $$ holds on the first $2^{\kappa - 1}$ roots of unity. In other words, the transition constraint divisor is $x^{2^{\kappa - 1}}$. It's probably not immediately clear why these transition constraints make sense, and hence we will give an example where $\mu = 3$ (*i.e.* the trace length $n = 8$). #### Example To ensure that $l$ is properly built, we need the transition constraints to enforce the following 8 equations: $$ \begin{align} l(0) &= \mathrm{eq}(0^{\wedge}, \rho) = (1-\rho_2)(1-\rho_1)(1-\rho_0) \\ l(1) &= \mathrm{eq}(1^{\wedge}, \rho) = (1-\rho_2)(1-\rho_1)\rho_0 \\ l(2) &= \mathrm{eq}(2^{\wedge}, \rho) = (1-\rho_2)\rho_1(1-\rho_0) \\ l(3) &= \mathrm{eq}(3^{\wedge}, \rho) = (1-\rho_2)\rho_1\rho_0 \\ l(4) &= \mathrm{eq}(4^{\wedge}, \rho) = \rho_2(1-\rho_1)(1-\rho_0) \\ l(5) &= \mathrm{eq}(5^{\wedge}, \rho) = \rho_2(1-\rho_1)\rho_0 \\ l(6) &= \mathrm{eq}(6^{\wedge}, \rho) = \rho_2\rho_1(1-\rho_0) \\ l(7) &= \mathrm{eq}(7^{\wedge}, \rho) = \rho_2\rho_1\rho_0 \end{align} $$ The first equation is enforced using a boundary constraint. Hence, we will then explore how the 3 transition constraints enforce these remaining 7 equations. Notice that we can rewrite the 7 equations in terms of one another: $$ l(1) = \frac{\rho_0}{1-\rho_0}l(0) $$ $$ l(3) = \frac{\rho_0}{1-\rho_0}l(2) $$ $$ l(5) = \frac{\rho_0}{1-\rho_0}l(4) $$ $$ l(7) = \frac{\rho_0}{1-\rho_0}l(6) $$ $$ l(2) = \frac{\rho_1}{1-\rho_1}l(0) $$ $$ l(6) = \frac{\rho_1}{1-\rho_1}l(4) $$ $$ l(4) = \frac{\rho_2}{1-\rho_2}l(0) $$ Note that there are more than one way to write these constraints; any two rows can be written in terms of one another if their index differs by 1 bit (i.e. they have a Hamming distance of 1). We chose this way specifically to serve the rest of the argument. Recall the following key identity used in STARKs: $$x^n - 1 = \prod_{i=0}^{n-1} (x - g^i).$$ To make a long story short, if the enforcement domain of a transition constraint is $x^n - 1$, then the transition constraint applies to the domain points $\{g^0, g^1, ..., g^{n-1}\}$. > Note that the use of varying length enforcement domains is the key idea that enables us to enforce the $n$ equations using $\log n$ transition constraints. As a reminder the transition constraint formula is as follows (rewritten slightly for readability). For $\kappa \in \{1, ..., \mu \}$, $$ l(g^{2^{\mu - \kappa}} x) = \frac{\rho_{\mu - \kappa}}{1 - \rho_{\mu - \kappa}} l(x) $$ for $x \in \{ g^0, ..., g^{2^{\kappa - 1}}\}$. Let's build our intuition of why this works by going back to our $\mu = 3$ example. We have 3 constraints over the following domains: $$ \begin{align} \kappa = 1 & \rightarrow \{g^0 \}, \\ \kappa = 2 & \rightarrow \{g^0, g^4 \}, \\ \kappa = 3 & \rightarrow \{g^0, g^2, g^4, g^6 \} \\ \end{align} $$ Let's now evaluate the transition constraint formula for $\kappa=1$, where the enforcement domain is $\{g^0 \}$. If we plug in to the formula $x=g^0$ and $\kappa=1$, we get $$ l(4) = \frac{\rho_2}{1-\rho_2} l(0) $$ Notice that this is the 7th equation defined previously! For $\kappa=2$, the enforcement domain is $\{g^0, g^4 \}$. If we plug $x=g^0$ and $\kappa=2$ in the formula, we get $$ l(2) = \frac{\rho_1}{1-\rho_1} l(0) $$ and with $x=g^4$, we get $$ l(6) = \frac{\rho_1}{1-\rho_1} l(4) $$ our 5th and 6th equations! For $\kappa=2$, the enforcement domain is $\{g^0, g^2, g^4, g^6 \}$; we leave it as an exercise to show that we recover the remaining 4 equations. ### The $s$ column constraints The $s$ column has no boundary constraint - everything is encoded in the transition constraint. As for the transition constraint, it is unlike traditional transition constraints in that its enforcement domain is the entire $G$. That is, we can think of the transition constraint as "wrapping around" from $g^{n-1}$ back to $g^0$. The transition constraint is as follows: $$ s(i) = s(i-1) - \frac{\sigma}{n} + \sum_{j = 0}^{m-1} \alpha_j f_j(i^{\wedge}) $$ If we look back at how the $s$ column was built, you should verify that the constraint holds over all pairs subsequent rows. Specifically, referring back to [the example $s$ column](#The-column), you should verify that $$ s(0) = s(7) - \frac{\sigma}{n} + \sum_{j = 0}^{m-1} \alpha_j f_j(0^{\wedge}) $$ ## Conclusion This article is the conclusion of the book! Hopefully, you are now better equipped to understand how to offload the proving of LogUp to GKR. If you've spotted a mistake, or something still isn't clear, please drop a comment directly in the note, or [DM me on X](https://x.com/plafer2718). I will be happy to rework parts of the book.

    Importieren aus der Zwischenablage

    Markdown oder Website hier einfügen

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    Diese Notiz ist gesperrt

    Entschuldigung, nur der Besitzer darf die Notiz bearbeiten.

    Limit erreicht

    Entschuldigung, die maximale Länge der Notiz ist erreicht.
    Bitte reduzieren Sie den Inhalt oder nutzen zwei Notizen, danke.

    Aus GitHub Gist importieren

    Aus Snippet importieren

    oder

    Zu Snippet exportieren

    Sind sie sicher?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    Bitte laden Sie die Seite neu

    Ihre Client Version ist nicht mit dem Server kompatibel
    Neu laden zum Updaten.
    Neue Version verfügbar.
    Versionshinweise
    Neu laden für neue Funktionen
    Ihr Nutzerstatus hat sich geändert.
    Neu laden für neuen Nutzerstatus.

    Sign in

    Forgot password

    oder

    By clicking below, you agree to our terms of service.

    Einloggen über Facebook Einloggen über Twitter Einloggen über GitHub Einloggen über Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Hilfe

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Dokumente

    Help & Tutorial

    How to use Book mode

    Beispiel Präsentation

    API Docs

    Edit in VSCode

    Install browser extension

    Kontakte

    Feedback

    Discord

    Kontakt

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Beispiel Reference
    # Überschrift Überschrift 基本排版
    - Stichpunkte
    • Stichpunkte
    1. Nummeriert
    1. Nummeriert
    - [ ] To Do Liste
    • To Do Liste
    > Zitat
    Zitat
    **Fett** Fett
    *Kursiv* Kursiv
    ~~Durchgestrichen~~ Durchgestrichen
    19^th^ 19th
    H~2~O H2O
    ++Unterstrichen++ Unterstrichen
    ==Markiert== Markiert
    [link text](https:// "title") Link
    ![image alt](https:// "title") Foto
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Extern
    $L^aT_eX$ LaTeX
    :::info
    Hinweisfeld
    :::

    Hinweisfeld

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully