[{"content":"Introduction Arithmetization refers to the process of converting computations into mathematical objects and then proving them using zero-knowledge proofs.\nPlonkish Arithmetization is a unique arithmetization method specific to the Plonk proof system. Before the advent of Plonkish, the dominant circuit representation was R1CS, which was widely adopted by systems like Pinocchio, Groth16, and Bulletproofs. In 2019, the Plonk scheme introduced a seemingly retro style of circuit encoding. However, since Plonk pushed polynomial encoding to its limits, it is no longer confined to arithmetic circuits with just \u0026ldquo;addition gates\u0026rdquo; and \u0026ldquo;multiplication gates\u0026rdquo;; it can also support more flexible custom gates and lookup gates.\nIn this article, we’ll dive straight into the topic, first gaining an understanding of the Plonkish arithmetization scheme, exploring the components of a circuit and the underlying logic of its operations. Finally, we’ll compare the differences between Plonkish and R1CS arithmetization(as an appendix), allowing you to appreciate their distinctions and gain a deeper understanding of the significance of Plonkish encoding.\nPlonkish Arithmetic Gates Let’s begin by understanding the basic structure of a circuit and examine the components of an empty circuit in a static state. Below is an example circuit:\nIn the image above, \u0026ldquo;Circuit 1\u0026rdquo; consists of several parts: arithmetic gates, left and right input wires, output wires, and wire.\nWe’ve labeled three arithmetic gates as #1, #2, and #3, where:\n#1 is a multiplication gate with inputs $x_5$ (left input) and $x_6$ (right input), and the output is $out$. #2 is an addition gate with inputs $x_1$ (left input) and $x_2$ (right input), and the output is $x_5$. #3 is another multiplication gate with inputs $x_3$ (left input) and $x_4$ (right input), and the output is $x_6$. Note: Both $x_5$ and $x_6$ serve as inputs to gate #1 and outputs for gates #2 and #3, respectively.\nBeyond the visible components, there are also implicit mathematical relationships that must hold for the circuit to function correctly. These are the constraint relations that the circuit must satisfy:\n$$ \\begin{array}{c} x_1+ x_2 = x_5\\ x_3\\cdot x_4=x_6\\ x_5\\cdot x_6=out \\end{array} $$\nWith these concrete constraints, we can convert the relationships into a matrix form, which can be represented in a table format to facilitate subsequent calculations.\nSo, how exactly do we do this?\nFirst, we define a matrix $W\\in\\mathbb{F}^{n\\times 3}$ (don’t worry about what $\\mathbb{F}$ is for now, just know it operates within a certain range; $n$ represents the number of arithmetic gates, corresponding to rows, and 3 represents the number of polynomial variables, corresponding to columns). Using this matrix, the constraint relations can be expressed as:\n$$ \\begin{array}{c|c|c|c} \\text{i} \u0026amp; w_a \u0026amp; w_b \u0026amp; w_c \\\\ \\hline \\text{1} \u0026amp; x_5 \u0026amp; x_6 \u0026amp; \\text{out} \\\\ \\text{2} \u0026amp; x_1 \u0026amp; x_2 \u0026amp; x_5 \\\\ \\text{3} \u0026amp; x_3 \u0026amp; x_4 \u0026amp; x_6 \\end{array} $$\nNote: Here, $i$ represents the index of each gate in the circuit, starting from 1 and increasing row by row. It is used to identify the position of each gate in the circuit.\nIn Plonkish, if the Prover wants to prove to the Verifier that they know a secret, they need to use a fixed constraint equation to verify whether the constraints of the circuit are satisfied. As long as the fixed constraint equation holds, the correctness of the circuit can be verified without revealing any secret information. The fixed constraint equation is as follows:\n$$ q_L \\circ w_a + q_R \\circ w_b + q_M\\circ(w_a\\cdot w_b) + q_C - q_O\\circ w_c \\overset{?}{=} 0 $$\nNote: Typically, all constraints are moved to one side of the equation. For example, in an arithmetic circuit, we often need to verify an equation in the form: Left input + Right input + Multiplication term + Constant = Output. To express this, we move everything to the left side of the equation and set it equal to zero: Left input + Right input + Multiplication term + Constant − Output = 0, which helps simplify the construction and verification process of the proof system. For example, when constructing the constraint matrix $Q$, the coefficients of the selector vectors can be easily determined by this fixed arithmetic relationship, without adjusting signs. You can refer to the matrix $Q\\in\\mathbb{F}^{n\\times5}$ below for an example.\nIn the fixed constraint equation above:\n$q_L$, $q_R$, $q_M$, $q_C$, and $q_O$ are selector vectors used to select specific variables or operations: $q_L$: left input selector $q_R$: right input selector $q_M$: multiplication selector $q_C$: constant selector $q_O$: output selector $w_a$, $w_b$, and $w_c$ are variables (or values on the wires) in the circuit: $w_a$: left input wire of each gate $w_b$: right input wire of each gate $w_c$: output wire of each gate $\\circ$ denotes element-wise multiplication, also known as the Hadamard product. $\\cdot$ denotes regular multiplication. To verify the circuit, we need to construct the constraint matrix $Q$ based on the existing relationships.\nHow do we construct the constraint matrix $Q$?\nStep one: move all constraints to one side of the equation, so:\nGate #1: The original constraint $x_3\\cdot x_4 = x_6$ becomes $x_3\\cdot x_4 - x_6=0$. Gate #2: The constraint $x_1 + x_2 =x_5$ becomes $x_1 + x_2 - x_5=0$. Gate #3: The constraint $x_5 \\cdot x_6 = out$ becomes $x_5 \\cdot x_6 - out=0$. Why move everything to one side of the equation?\nIt standardizes all constraint equations into the form $f(x) = 0$, simplifying the process of handling and verifying these equations. It clarifies the role and coefficients of each selector polynomial, avoiding confusion with signs. During verification, the uniform equation form simplifies the process of checking and verifying polynomials. Simple, right? Now, let’s move on to the next step.\nStep two: based on the fixed constraint equation and the three transformed equations, determine the coefficients for the selector polynomials. We’ll likely use 0, 1, and -1 (where a coefficient of 0 represents an \u0026ldquo;off\u0026rdquo; state, and 1 or -1 represents an \u0026ldquo;on\u0026rdquo; state).\nFor gate #1:\nSince $x_3\\cdot x_4 - x_6=0$ must satisfy $q_L \\circ w_a + q_R \\circ w_b + q_M\\circ(w_a\\cdot w_b) + q_C - q_O\\circ w_c = 0$, its left input selector $q_L=0$, right input selector $q_R=0$, multiplication selector $q_M=1$, constant selector $q_C=0$, and output selector $q_O=1$.\nWe can determine the values of the selectors based on the constraint relationships, and we can also verify whether a constraint is enforced by checking the specific values of the selectors. The process works both ways.\nWe can verify the chosen selector values by plugging them into the fixed constraint equation $q_L \\circ w_a + q_R \\circ w_b + q_M\\circ(w_a\\cdot w_b) + q_C - q_O\\circ w_c = 0$. For example, substituting the selector values for gate #1, the calculation looks like this:\n$$ \\begin{split} 0 \\circ w_a + 0 \\circ w_b + 1 \\circ(w_a\\cdot w_b) + 0 - 1\\circ w_c \u0026amp; = 0\\\\ 1 \\circ(w_a\\cdot w_b) + 0 - 1\\circ w_c \u0026amp; = 0 \\end{split} $$\n$\\circ$ specifically denotes the Hadamard product. Any matrix multiplied element-wise by the zero matrix results in zero.\nSubstituting the corresponding selector values (0 or 1, or -1) into the equation:\n$$ \\begin{split} 0 \\circ w_a + 0 \\circ w_b + 1 \\circ(w_a\\cdot w_b) + 0 - 1\\circ w_c \u0026amp; = 0\\\\ 1 \\circ(w_a\\cdot w_b) + 0 - 1\\circ w_c \u0026amp; = 0\\\\ 1\\circ(w_a\\cdot w_b) \u0026amp; = 1\\circ w_c\\\\ x_5 \\cdot x_6 \u0026amp; = out \\end{split} $$\nSee! The final result $x_5 \\cdot x_6 = out$ is consistent with the constraint relationship in the original circuit when substituting the selector values into the fixed equation.\nBy now, you should be able to apply what you’ve learned. We recommend you follow the steps above to derive the rest of the content:\nFor gate #2: The constraint is $x_1+x_2-x_5=0$, so $q_L=1$, $q_R=1$, $q_M=0$, $q_C=0$, and $q_O=1$. For gate #3: The constraint is $x_5 \\cdot x_6 = out$, so $q_L=0$, $q_R=0$, $q_M=1$, $q_C=0$, and $q_O=1$. If you look closely, you’ll notice that for a multiplication gate, like $x_5 \\cdot x_6 = out$, both the addition selectors are \u0026ldquo;off\u0026rdquo; (selector coefficients are 0). For an addition gate, like $x_1+x_2-x_5=0$, the selectors on the right side are either 1 or -1, and they must be \u0026ldquo;on\u0026rdquo;, rather than \u0026ldquo;off.\u0026rdquo;\nNow, let’s organize the data into a table, just like we did with $W$. We represent the constraint matrix $Q\\in\\mathbb{F}^{n\\times5}$ (where $n$ is the number of arithmetic gates, corresponding to rows, and 5 represents the number of selector polynomials, corresponding to columns).\nHere’s the key part!\nNow that we have the constraint matrices $Q$ and $W$, we can verify whether the calculations from these two matrices satisfy the initial equation:\n$$ q_L \\circ w_a + q_R \\circ w_b + q_M \\circ (w_a \\cdot w_b) + q_C - q_O \\circ w_c = 0 $$\nSubstituting the given constraints into the above fixed equation and expanding it, we get the following:\n$$ \\left[ \\begin{array}{c} 0\\ 1 \\ 0\\ \\end{array} \\right] \\circ \\left[ \\begin{array}{c} x_5 \\ x_1 \\ x_3\\ \\end{array} \\right] + \\left[ \\begin{array}{c} 0\\ 1 \\ 0\\ \\end{array} \\right] \\circ \\left[ \\begin{array}{c} x_6 \\ x_2 \\ x_4\\ \\end{array} \\right] + \\left[ \\begin{array}{c} 1\\ 0 \\ 1\\ \\end{array} \\right] \\circ \\left[ \\begin{array}{c} x_5\\cdot x_6 \\ x_1\\cdot x_2 \\ x_3\\cdot x_4\\ \\end{array} \\right]=\\left[ \\begin{array}{c} 1\\ 1 \\ 1\\ \\end{array} \\right] \\circ \\left[ \\begin{array}{c} out \\ x_5 \\ x_6\\ \\end{array} \\right] $$\nHere’s the step-by-step simplification:\n$$ \\left[ \\begin{array}{c} 0 \\ x_1 \\ 0\\ \\end{array} \\right] + \\left[ \\begin{array}{c} 0 \\ x_2 \\ 0\\ \\end{array} \\right] + \\left[ \\begin{array}{c} x_5\\cdot x_6 \\ 0 \\ x_3\\cdot x_4\\ \\end{array} \\right]=\\left[ \\begin{array}{c} out \\ x_5 \\ x_6\\ \\end{array} \\right] $$\nAfter further simplification:\n$$ \\left[ \\begin{array}{c} x_5\\cdot x_6 \\ x_1+x_2 \\ x_3\\cdot x_4\\ \\end{array} \\right]=\\left[ \\begin{array}{c} out \\ x_5 \\ x_6\\ \\end{array} \\right] $$\nBy comparing the simplified result with the initial constraints, you can see that we have already reached the result—the proof is complete. The simplified result matches the original constraints, and the final result corresponds to the operations of the three gates.\nHowever, the content of the $Q$ matrix alone is not sufficient to fully describe the example circuit above; we need additional elements.\nCopy Constraints Let’s compare the two circuits below. They yield identical $Q$ matrices, but their circuit structures are completely different.\nThe difference between the two circuits is whether $x_5$ and $x_6$ are connected to gate #1.\nReferring to the circuit comparison diagram and matrix $W$, if the Prover directly fills the circuit values into matrix $W$, an honest Prover will input the same value in positions $(w_a,1)$ (first row, first column) and $(w_c,2)$ (second row, third column). However, a malicious Prover could input different values. If the malicious Prover also inputs different values in $(w_b,1)$ and $(w_c,3)$, they are effectively proving the circuit on the right rather than the agreed-upon circuit on the left.\nTo prevent a malicious Prover from cheating, we need to introduce additional constraints, forcing an equivalence between variables, like $x_5 = x_7$ and $x_6 = x_8$ in the right-hand circuit, as shown below. This is equivalent to requiring the Prover to input identical values for the same variable in multiple places in the table.\nThis introduces a new type of constraint—Copy Constraints. In Plonk, permutation proofs are used to ensure that multiple positions in matrix $W$ satisfy these copy constraints. Let’s use the same circuit example to explain the basic idea.\nImagine we arrange all the positions in the $W$ table into a vector:\n$$ \\vec{\\sigma_0}=(\\boxed{(w_a,1)}, (w_a,2), (w_a,3), \\underline{(w_b,1)}, (w_b,2), (w_b,3), (w_c,1), \\boxed{(w_c,2)}, \\underline{(w_c,3)}) $$\nWe then swap the positions that should be equal. For example, in the circuit above, we require $(w_a,1) = (w_c,2)$ and $(w_b,1) = (w_c,3)$. After swapping, we get the following vector:\n$$ \\vec\\sigma=(\\boxed{(w_c,2)}, (w_a,2), (w_a,3), \\underline{(w_c,3)}, (w_b,2), (w_b,3), (w_c,1), \\boxed{(w_a,1)}, \\underline{(w_b,1)}) $$\nWe then require the Prover to prove that the $W$ matrix remains the same after this permutation. The equality of values at swapped positions ensures that the Prover cannot cheat.\nHere’s another example: when the values in three (or more) positions in a vector must be equal, we can simply cyclically shift these positions (left or right) and prove that the shifted vector is identical to the original.\nFor instance:\n$$ A = (b_1, b_2, \\underline{a_1}, b_3, \\underline{a_2}, b_4, \\underline{a_3}) $$\nTo prove that $a_1 = a_2 = a_3$, we only need to prove:\n$$ A\u0026rsquo; = (b_1, b_2, \\underline{a_3}, b_3, \\underline{a_1}, b_2, \\underline{a_2}) \\overset{?}{=} A $$\nIn the permuted $\\vec{A\u0026rsquo;}$, $a_1$, $a_2$, and $a_3$ are shifted to the right: $a_1$ moves to the position of $a_2$, $a_2$ moves to the position of $a_3$, and $a_3$ moves to the position of $a_1$.\nIf $\\vec{A\u0026rsquo;} = \\vec{A}$, then all corresponding positions in $\\vec{A\u0026rsquo;}$ and $\\vec{A}$ should have equal values, giving us: $a_1 = a_3$, $a_2 = a_1$, and $a_3 = a_2$, which implies $a_1 = a_2 = a_3$. This method can be applied to any number of equality constraints. (For how to prove vector equality, refer to Section 3).\nHow do we describe the swapping operations in the circuit value table? We only need to record $\\vec{\\sigma}$, which tracks the mapping of the swapped positions. In other words, it shows which variable is swapped to which new position. We just need to record $\\vec{\\sigma}$, then we can descirbe the process. Also, $\\vec{\\sigma}$ can be written in table form:\nLet\u0026rsquo;s explain what the Matrix $T\\in\\mathbb{F}^{n\\times3}$ above means:\nInitial order ($i$ column):\nThe element in row 1 was initially in position 1. The element in row 2 was initially in position 2. The element in row 3 was initially in position 3. $σ_a$ column:\n$w_c$ was initially in position 1 and was swapped to position 2. $w_a$ was initially in position 2 and remained in position 2. $w_a$ was initially in position 3 and remained in position 3. $σ_b$ column:\n$w_c$ was initially in position 1 and was swapped to position 3. $w_b$ was initially in position 2 and remained in position 2. $w_b$ was initially in position 3 and remained in position 3. $σ_c$ column:\n$w_c$ was initially in position 1 and remained there. $w_a$ was initially in position 2 and was swapped to position 1. $w_b$ was initially in position 3 and was swapped to position 1. If you don\u0026rsquo;t understand, I hope this figure blow will help you to feel the change of position:\nTo summarize, the position matrix $T\\in\\mathbb{F}^{n\\times3}$ reflects the mapping relationship. The specific position changes can be seen in the figure above. With this method, you don’t need to record how each variable is swapped, but only need to record the mapping relationship after the swap, which can simplify the description of complex swap operations.\nAs mentioned earlier, constructing only the constraint matrix $Q$ and the assignment matrix $W$ is not enough to fully describe the example circuit in the picture 「example: Circuit 1」. However, now that we’ve included the permutation vector $\\vec\\sigma$, together they can jointly describe and verify the circuit. The entire circuit can be described as $(Q, \\sigma)$, and the circuit\u0026rsquo;s values are represented by $W$.\n$$ \\mathsf{Plonkish}_0 \\triangleq (Q, \\sigma; W) $$\nCircuit Verification Protocol Framework Now that we have the description of the circuit’s structure and values, we can outline the Plonk protocol framework.\nThe protocol’s computational process is as follows:\nFirst, the Prover and Verifier agree on a common circuit — $(Q, \\sigma)$. Assume the circuit’s public output is $out = 99$, and $(x_1, x_2, x_3, x_4)$ are secret inputs.\nThe Prover fills in the $W$ matrix (which the Verifier cannot see):\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; w_a \u0026amp; w_b \u0026amp; w_c \\\\ \\hline 1 \u0026amp; \\boxed{x_5} \u0026amp; \\underline{x_6} \u0026amp; [out] \\\\ 2 \u0026amp; x_1 \u0026amp; x_2 \u0026amp; \\boxed{x_5} \\\\ 3 \u0026amp; x_3 \u0026amp; x_4 \u0026amp; \\underline{x_6} \\\\ 4 \u0026amp; 0 \u0026amp; 0 \u0026amp; [out] \\\\ \\end{array} $$\nThe additional fourth row introduces an extra arithmetic constraint to ensure $out = 99$, emphasizing that the value of $out$ appears in the $Q$ matrix.\nThe agreed-upon $Q$ matrix between the Prover and Verifier is:\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; q_L \u0026amp; q_R \u0026amp; q_M \u0026amp; q_C \u0026amp; q_O \\\\ \\hline 1 \u0026amp; 0 \u0026amp; 0 \u0026amp; 1 \u0026amp; 0 \u0026amp; 1 \\\\ 2 \u0026amp; 1 \u0026amp; 1 \u0026amp; 0 \u0026amp; 0 \u0026amp; 1 \\\\ 3 \u0026amp; 0 \u0026amp; 0 \u0026amp; 1 \u0026amp; 0 \u0026amp; 1 \\\\ 4 \u0026amp; 0 \u0026amp; 0 \u0026amp; 0 \u0026amp; 99 \u0026amp; 1 \\\\ \\end{array} $$\nIn the fourth row, the constraint $out = 99$ is enforced by substituting $(q_L = 0, q_R = 0, q_M = 0, q_C = 99, q_O = 1)$ into the arithmetic constraint equation, yielding $99 - w_c = 0$, which means $(W_c, 4) = 99$ (indicating that the value at $(q_c, 4)$ in the $Q$ matrix is $99$).\n$$ q_L \\circ w_a + q_R \\circ w_b + q_M \\circ (w_a \\cdot w_b) + q_C - q_O \\circ w_c = 0 $$\nTo ensure that $w_c$ in the first row of the $W$ matrix also equals $99$ (ensuring that the output $out$ is correctly reflected in all relevant positions), we need to add an additional copy constraint into the $\\sigma$ vector, ensuring that the value of $out$ at position $w_{(c,1)}$ is swapped with the value of $out$ at $w_{(c,4)}$:\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; \\sigma_a \u0026amp; \\sigma_b \u0026amp; \\sigma_c \\\\ \\hline 1 \u0026amp; \\boxed{w_{(c,2)}} \u0026amp; \\underline{w_{(c,3)}} \u0026amp; [{w_{(c,4)}}] \\\\ 2 \u0026amp; {w_{(a,2)}} \u0026amp; {w_{(b,2)}} \u0026amp; \\boxed{w_{(a,1)}} \\\\ 3 \u0026amp; {w_{(a,3)}} \u0026amp; {w_{(b,3)}} \u0026amp; \\underline{w_{(b,1)}} \\\\ 4 \u0026amp; {w_{(a,4)}} \u0026amp; {w_{(b,4)}} \u0026amp; [{w_{(c,1)}}]\\\\ \\end{array} $$\nIf the Prover is honest, the following arithmetic constraint equation holds for each $i \\in (1, 2, 3, 4)$:\n$$ q_{L,i} \\circ w_{(a,i)} + q_{R,i} \\circ w_{(b,i)} + q_{M,i}\\circ(w_{(a,i)}\\cdot w_{(b,i)}) + q_{C,i} - q_{O,i}\\circ w_{(c,i)} = 0 $$\nThe general idea of the verification protocol is as follows:\nProtocol start: The Prover honestly fills in the $W$ table, encoding each column of the $W$ table and applying polynomial encoding. The encoded result is then sent to the Verifier. Verification phase: The Verifier and Prover interact further to check whether the following equation holds: $$ q_{L}(X) \\cdot w_{a}(X) + q_{R}(X) \\cdot w_{b}(X) + q_{M}(X) \\cdot (w_{a}(X) \\cdot w_{b}(X)) + q_{C}(X) - q_{O}(X) \\cdot w_{c}(X) \\overset{?}{=} 0 $$\n$$ q_{L,i} \\circ w_{a,i} + q_{R,i} \\circ w_{b,i} + q_{M,i} \\circ (w_{a,i} \\cdot w_{b,i}) + q_{C,i} - q_{O,i} \\circ w_{c,i} = 0 $$\nand\n$$ q_L(X) \\cdot w_a(X) + q_R(X) \\cdot w_b(X) + q_M(X) \\cdot (w_a(X) \\cdot w_b(X)) + q_C(X) - q_O(X) \\cdot w_c(X) = 0 $$\nThese two equations essentially represent the same idea. Here’s how they compare:\nIndex vs. Polynomial notation: The first equation uses the index $i$ to represent specific points, meaning it applies to constraints at specific positions. The second equation uses $(X)$ to represent polynomials, meaning it applies to the constraints over the entire domain. Variables and coefficients: $q_{L,i}, q_{R,i}, q_{M,i}, q_{C,i}, q_{O,i}$ correspond to $q_L(X), q_R(X), q_M(X), q_C(X), q_O(X)$. These represent the same constraint coefficients, but one is in terms of specific values, and the other is in polynomial form. Similarly, $w_{a,i}, w_{b,i}, w_{c,i}$ correspond to $w_a(X), w_b(X), w_c(X)$. These represent the same input values, but one is in specific values, and the other is in polynomial form. Operators: The first equation uses \u0026quot; $\\circ$ \u0026quot; to denote multiplication. The second equation uses \u0026quot; $\\cdot$ \u0026quot; to denote multiplication. This method allows the Verifier to ensure that all computations in the circuit are correct, thereby verifying the entire computational process.\nHowever, verifying only the equation:\n$$ q_{L}(X) \\cdot w_{a}(X) + q_{R}(X) \\cdot w_{b}(X) + q_{M}(X) \\cdot (w_{a}(X) \\cdot w_{b}(X)) + q_{C}(X) - q_{O}(X) \\cdot w_{c}(X) \\overset{?}{=} 0 $$\nis not sufficient. We also need to verify the relationship between $(\\sigma_a(X), \\sigma_b(X), \\sigma_c(X))$ and $(w_a(X), w_b(X), w_c(X))$.\nAs for how the Verifier uses polynomials to verify the circuit operations and ensure the relationship between $(\\sigma_a(X), \\sigma_b(X), \\sigma_c(X))$ and $(w_a(X), w_b(X), w_c(X))$, this will be covered in later sections.\n","permalink":"/posts/1-arithmetization/","summary":"\u003ch1 id=\"introduction\"\u003eIntroduction\u003c/h1\u003e\n\u003cp\u003eArithmetization refers to the process of converting computations into mathematical objects and then proving them using zero-knowledge proofs.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePlonkish Arithmetization\u003c/strong\u003e is a unique arithmetization method specific to the Plonk proof system. Before the advent of Plonkish, the dominant circuit representation was \u003cstrong\u003eR1CS\u003c/strong\u003e, which was widely adopted by systems like Pinocchio, Groth16, and Bulletproofs. In 2019, the Plonk scheme introduced a seemingly retro style of circuit encoding. However, since Plonk pushed polynomial encoding to its limits, it is no longer confined to arithmetic circuits with just \u0026ldquo;addition gates\u0026rdquo; and \u0026ldquo;multiplication gates\u0026rdquo;; it can also support more flexible \u003cstrong\u003ecustom gates\u003c/strong\u003e and \u003cstrong\u003elookup gates\u003c/strong\u003e.\u003c/p\u003e","title":"Understanding PLONK (Part 1): Plonkish Arithmetization"},{"content":"Introduction In the previous article, we mentioned that to implement the protocol verification process, the Prover initially encodes each column of the $W$ table using polynomial coding and sends the encoded results to the Verifier for verification. Through further interaction, we can verify whether the equation\n$$ q_{L}(X) \\cdot w_{a}(X) + q_{R}(X) \\cdot w_{b}(X) + q_{M}(X)\\cdot(w_{a}(X)\\cdot w_{b}(X)) + q_{C}(X) - q_{O}(X)\\cdot w_{c}(X) \\overset{?}{=} 0 $$\nholds.\nThis verifies the correctness of a circuit only when the Prover is honest. However, the Prover might misbehave. To prevent this and ensure the circuit\u0026rsquo;s correctness and security while satisfying constraints, we need to verify the relationship between $(\\sigma_a(X),\\sigma_b(X),\\sigma_c(X))$ and $(w_a(X),w_b(X),w_c(X))$.\nWhere:\n$(\\sigma_a(X),\\sigma_b(X),\\sigma_c(X))$ are permutation polynomials used to describe copy constraints between variables at different positions in the circuit, ensuring consistency of variables (whether inputs or intermediate results) across different locations.\nLet\u0026rsquo;s review how permutation polynomials work as discussed in the previous section:\nAssume the circuit has three columns $w_a,w_b,w_c$, each row in these columns might represent a value of a variable. The permutation polynomials $\\sigma_a(X),\\sigma_b(X),\\sigma_c(X)$ describe the mapping relationships between variables in the columns, ensuring that the same variable has the same value in different positions.\nFor example, if variable $x$ appears in the third row of the first column and the fifth row of the second column, the permutation polynomial ensures these two positions have equal values.\nNow, $(w_a(X),w_b(X),w_c(X))$ are polynomials representing the input and output values for each gate in the circuit, defining specific assignments for each gate\u0026rsquo;s left input, right input, and output.\nSimply put, the verification process ultimately converts circuit correctness checks into a set of polynomial constraints involving addition and multiplication.\nWhy do this? It\u0026rsquo;s to improve efficiency and reduce costs.\nFirst,\nUsing the matrix $W$ table form \u0026ldquo;able 1-1\u0026rdquo; from \u0026ldquo;Plonkish Arithmetization\u0026rdquo; as an example, it follows the principle of vertical encoding, meaning each column can be represented by a polynomial to describe the calculation rules for the contents under that column.\nCurrently, there are only three columns, so even checking row by row doesn\u0026rsquo;t take much time. However, if the number of rows increases to 100, checking each row becomes labor-intensive, requiring significant computational power from the Verifier.\nTherefore, encoding the three columns with one or several polynomials can transform a 3×100 table into 3 polynomials. (This is similar to understanding Excel spreadsheet formulas.)\nSecondly, transforming into polynomials offers an inherent advantage. If the matrix $W$ table can be successfully represented by polynomials, the Verifier doesn\u0026rsquo;t need to verify all points in the domain to confirm the circuit\u0026rsquo;s correctness.\nSpecifically:\nAssume the circuit constraints can be represented as a 3×100 table, with each row representing a constraint. Using polynomial encoding, compress this 3×100 table into three polynomials $w_a(X),w_b(X),w_c(X)$. These polynomials can be constructed from the original points using methods like Lagrange interpolation. The Verifier only needs to check if these three polynomials satisfy the constraint at a random point $X=z$. Specifically, if the circuit needs to satisfy $w_a(X)⋅w_b(X)=w_c(X)$, the Verifier can check: $$ w_a(z)⋅w_b(z)=w_c(z) $$\nIf this equation holds at the random point $X=z$, it can be assumed with high probability that the contents of the 3×100 table hold across the entire domain.\nLet\u0026rsquo;s revisit the example to see the calculation process:\nUsing \u0026ldquo;Table 1-1\u0026rdquo; as an example, currently the table is only 3×3. The indices $i$ and their corresponding interpolation points are as follows:\nIndices: $i = 1,2,3$ Interpolation points: $w_a$: $x_5,x_1,x_3$ $w_b$: $x_6,x_2,x_4$ $w_c$: $out,x_5,x_6$ Next, we begin constructing the Lagrange basis functions:\nFor each $i$, the Lagrange basis function ${l_i}{(X)}$ is defined as:\n$$ {l_i}{(X)}=\\prod_{j\\neq i}^{} \\frac{X-j}{i-j} $$\nFor the interpolation points: $\\omega_i$, compute ${l_1}{(X)},{l_2}{(X)},{l_3}{(X)}$:\nNote that $\\omega$ and $w$ represent different meanings. When representing interpolation points, we usually use $\\omega_i$, especially in polynomial interpolation or FFT (Fast Fourier Transform) scenarios; $w$ typically denotes witness, which may refer to different parts or variables of the witness, provided by the prover and unrelated to interpolation nodes.\n${\\textstyle \\prod_{j\\ne i}^{}}$ calculates the product for all $j \\ne i$. For example,\nFor $i = 1$, $j$ takes 2 and 3, $$ {l_1}{(X)}=\\frac{(X-2)(X-3)}{(1-2)(1-3)} =\\frac{(X-2)(X-3)}{2} $$\nFor $i = 2$, $j$ takes 1 and 3, $$ {l_2}{(X)}=\\frac{(X-1)(X-3)}{(2-1)(2-3)} = -(X-1)(X-3) $$\nFor $i = 3$, $j$ takes 1 and 2, $$ {l_3}{(X)}=\\frac{(X-1)(X-2)}{(3-1)(3-2)} =\\frac{(X-1)(X-2)}{2} $$\nNext, using the content from \u0026ldquo;Table 1-1\u0026rdquo; and the Lagrange basis functions computed above for each $i$, we start constructing the interpolation polynomials $w_a(X)$, $w_b(X)$, $w_c(X)$:\nFor $w_a$:\n$$ w_a(X)=x_5 \\cdot l_1(X)+x_1 \\cdot l_2(X) +x_3 \\cdot l_3(X) $$\nSubstitute ${l_1}(X)$, ${l_2}(X)$, ${l_3}(X)$:\n$$ \\begin{aligned} w_a(X) \u0026amp;= x_5 \\cdot l_1(X) + x_1 \\cdot l_2(X) + x_3 \\cdot l_3(X) \\\\ \u0026amp;= x_5 \\cdot \\frac{(X-2)(X-3)}{2} - x_1 \\cdot (X-1)(X-3) + x_3 \\cdot \\frac{(X-1)(X-2)}{2} \\end{aligned} $$ For $w_b$:\n$$ w_b(X)=x_6 \\cdot l_1(X)+x_2 \\cdot l_2(X) +x_4 \\cdot l_3(X) $$\nSubstitute ${l_1}(X)$, ${l_2}(X)$, ${l_3}(X)$:\n$$ \\begin{split} w_b(X) \u0026amp; = x_6 \\cdot l_1(X)+x_2 \\cdot l_2(X) +x_4 \\cdot l_3(X)\\\\ \u0026amp; = x_6 \\cdot \\frac{(X-2)(X-3)}{2} - x_2 \\cdot (X-1)(X-3) +x_4 \\cdot \\frac{(X-1)(X-2)}{2} \\end{split} $$\nFor $w_c$:\n$$ w_c(X)=out \\cdot l_1(X)+x_5 \\cdot l_2(X) +x_6 \\cdot l_3(X) $$\nSubstitute ${l_1}(X)$, ${l_2}(X)$, ${l_3}(X)$:\n$$ \\begin{split} w_c(X) \u0026amp; = out \\cdot l_1(X)+x_5 \\cdot l_2(X) +x_6 \\cdot l_3(X)\\\\ \u0026amp; = out \\cdot \\frac{(X-2)(X-3)}{2} - x_5 \\cdot (X-1)(X-3) +x_6 \\cdot \\frac{(X-1)(X-2)}{2} \\end{split} $$\nAfter constructing the interpolation polynomials, if you want to check whether the resulting $w_a(X)$, $w_b(X)$, $w_c(X)$ correspond to the values in the table, you can verify by substituting values of $X$. For example, for $w_c(X)$:\nWhen $X=1$, check if $w_c(1) \\overset{?}{=} out$: $$ \\begin{split} w_c(1) \u0026amp; = out \\cdot \\frac{(1-2)(1-3)}{2} - x_5 \\cdot (1-1)(1-3) +x_6 \\cdot \\frac{(1-1)(1-2)}{2} \\\\ \u0026amp; = out \\end{split} $$\nWhen $X=2$, check if $w_c(2) \\overset{?}{=} x_5$: $$ \\begin{split} w_c(2) \u0026amp; = out \\cdot \\frac{(2-2)(2-3)}{2} - x_5 \\cdot (2-1)(2-3) +x_6 \\cdot \\frac{(2-1)(2-2)}{2} \\\\ \u0026amp; = x_5 \\end{split} $$\nWhen $X=3$, check if $w_c(3) \\overset{?}{=} x_6$: $$ \\begin{split} w_c(3) \u0026amp; = out \\cdot \\frac{(3-2)(3-3)}{2} - x_5 \\cdot (3-1)(3-3) +x_6 \\cdot \\frac{(3-1)(3-2)}{2} \\\\ \u0026amp; = x_6 \\end{split} $$\nYou can similarly verify $w_a(X)$ and $w_b(X)$.\nIf verification passes, it confirms the calculations are correct, and the preliminary work is complete.\nIn summary, all the above essentially involves constructing interpolation polynomials $w_a(X)$ based on known relationships in \u0026ldquo;Table 1\u0026rdquo;. \u0026ldquo;Table 2\u0026rdquo; illustrates the substitution process, while \u0026ldquo;Table 3\u0026rdquo; shows the interpolation polynomials $w_a(X)$ constructed from the interpolation $i=\\{1,2,3\\}$.\nIn \u0026ldquo;Table 1\u0026rdquo;, the domain is $i\\in \\{1,2,3\\}$, which becomes clearer in \u0026ldquo;Table 2\u0026rdquo;. Once the interpolation polynomial $w_a(X)$ is constructed in \u0026ldquo;Table 3\u0026rdquo;, the range of values that the variable $X$ can take is no longer limited to the original $\\{1,2,3\\}$, and can be extended to the finite field $\\mathbb{F}$.\nWe constructed the Lagrange interpolation polynomial in \u0026ldquo;3\u0026rdquo; with the existing three interpolation points. With it, we can substitute unknown points for numerical computation to verify if $w_a(X)\\cdot w_b(X)=w_c(X)$. If a randomly selected $X$ from $\\mathbb{F}$ satisfies $w_a(X)\\cdot w_b(X)=w_c(X)$, and if $\\mathbb{F}$ is sufficiently large, it can prove with high probability that the Prover did not cheat. How is this ensured? This is where the Schwartz-Zippel lemma comes in.\nProbabilistic Check of Polynomials If you understood the introduction, the following content will be easy to grasp.\nIn many cryptographic protocols and verification processes of complex computations, circuits (Boolean or algebraic) are used to describe and implement computational logic. Verifying the correctness of these computations is crucial, but directly verifying each computation step is usually impractical due to high computational costs. The Schwartz-Zippel lemma offers an efficient probabilistic verification method.\nWhat is the Schwartz-Zippel lemma?\nBy introducing random challenge values, we can merge multiple conditions needing individual verification into a simplified verification step. This method leverages the theory of \u0026ldquo;random polynomial challenges\u0026rdquo;, meaning that by verifying a polynomial\u0026rsquo;s value at a random point, one can, with high probability, determine the equality of two polynomials over the entire domain.\nSpecifically, if there are two polynomials $f(X)$ and $g(X)$, both of degree not exceeding $d$, the Verifier only needs to provide a random challenge value $\\zeta \\in \\mathbb{F}$ and check if $f(\\zeta) = g(\\zeta)$. This can determine with high probability that $f(X) = g(X)$, with an error probability $\\leq \\frac{d}{|\\mathbb{F}|}$. As long as $\\mathbb{F}$ is large enough, the probability of a check failing can be ignored.\nThis principle is known as the Schwartz-Zippel lemma.\nSuppose you want to verify two vectors $\\vec{a} + \\vec{b} \\overset{?}{=} \\vec{c}$. To enable verification in one step, we first encode the three vectors into polynomials.\nHow to encode vectors into polynomials?\nOne straightforward method is to treat vectors as \u0026ldquo;coefficients\u0026rdquo; of polynomials:\nAssume:\n$$ \\begin{split} \\vec{a} = [a_0, a_1, \\ldots, a_{N-1}]\\ \\vec{b} = [b_0, b_1, \\ldots, b_{N-1}]\\ \\vec{c} = [c_0, c_1, \\ldots, c_{N-1}] \\end{split} $$\nThen,\n$$ \\begin{split} a(X) \u0026amp;= a_0 + a_1X+a_2X^2 + \\cdots + a_{n-1}X^{n-1}\\\\ b(X) \u0026amp;= b_0 + b_1X+b_2X^2 + \\cdots + b_{n-1}X^{n-1}\\\\ c(X) \u0026amp;= c_0 + c_1X+c_2X^2 + \\cdots + c_{n-1}X^{n-1} \\end{split} $$\nClearly, if $a_i+ b_i = c_i$, then $a(X)+b(X)=c(X)$. Then, by challenging with a random number $\\zeta$, we verify the three polynomials\u0026rsquo; values at $X=\\zeta$:\n$$ a(\\zeta)+b(\\zeta)\\overset{?}{=}c(\\zeta) $$\nIf the equation holds, then $\\vec{a} + \\vec{b}=\\vec{c}$.\nLagrange Interpolation and Evaluation Form However, if we need to verify $\\vec{a}\\circ\\vec{b} =\\vec{c}$, (where $\\circ$ denotes the Hadamard product, meaning component-wise multiplication of the vectors), using \u0026ldquo;coefficient encoding\u0026rdquo; becomes challenging. This is because $a(X)\\cdot b(X)$ will generate many cross terms, with coefficients coming from various terms of different powers of $a(X)$ and $b(X)$.\nLet\u0026rsquo;s calculate specifically, assume:\n$$ \\begin{split} a(X)=a_0 + a_1X+a_2X^2\\ b(X)=b_0 + b_1X+b_2X^2\\ c(X)=c_0 +c_1X+c_2X^2+c_3X^3+c_4X^4 \\end{split} $$\nThen\n$$ \\begin{split} a(X)\\cdot b(X) \u0026amp; = (a_0 + a_1X+a_2X^2)\\cdot(b_0 + b_1X+b_2X^2) \\\\ \u0026amp; = a_0b_0+(a_0b_1+b_0a_1)X+(a_0b_2+a_1b_1+a_2b_0)X^2+\\cdots \\end{split} $$\nObserve that $a_i\\cdot b_i$ and $c_i$ terms do not correspond to the $X^i$ coefficient. For instance, $a_1\\cdot b_1$ contributes to the $X^2$ term, along with coefficients like $a_0b_2$ and $a_2b_0$. Meanwhile, $c_1$ is the coefficient of $X^1$.\nThus, we need another polynomial encoding scheme using the Lagrange Basis. If we want to construct a polynomial $a(X)$ such that it takes a specific set of values on $H=\\{w_0, w_1, \\ldots w_{N-1}\\}$, assuming this set of values is $\\vec{a}$, representing the polynomial $a(X)$ over a finite field $H$:\n$$ \\begin{split} a(w_0) \u0026amp;= a_0 \\\\ a(w_1) \u0026amp;= a_1 \\\\ \u0026amp;\\vdots \\\\ a(w_{N-1}) \u0026amp;= a_{N-1} \\\\ \\end{split} $$\nWhich means:\n$$ \\vec{a} = [a(w_0), a(w_1), \\ldots, a(w_{N-1})] = [a_0, a_1, \\ldots, a_{N-1}] $$\nConstructing the interpolation polynomial requires the basis function set: ${L_i(X)}_{i\\in[0,N-1]}$, where $L_i(w_i)=1$, and for $j\\neq i$, $L_i(w_j)=0$.\nNote: $w_i$ is an interpolation point, $w_i \\in {H}$.\nThen, the interpolation polynomial $a(X)$ can be expressed as a linear combination of the basis functions $L_i(X)$ and the corresponding value vector $\\vec{a}$:\n$$ a(X)=a_0\\cdot L_0(X) + a_1\\cdot L_1(X)+ a_2\\cdot L_2(X) + \\cdots + a_{N-1}\\cdot L_{N-1}(X) $$\nA more concrete example, suppose we want to construct an interpolation polynomial $a(X)$ such that it takes the values $\\vec{a}=(a_0,a_1,a_2)=(4,5,6)$ over the domain $H\u0026rsquo;=\\{1,2,3\\}$.\nThis means we want to construct a polynomial $h(X)$ such that $h(1)=4$, $h(2)=5$, $h(3)=6$; that is, we have three known interpolation points $(1,4),(2,5),(3,6)$, from which we build the interpolation polynomial $h(X)$. Here, because $H\u0026rsquo;= \\{1,2,3\\}$, i.e., $X\\in \\{1,2,3\\}$, $z_0=1, z_1=2, z_2=3$.\nNote:\n$z_i$ denotes the x-coordinate of the interpolation points, i.e., interpolation nodes; The definition of the Lagrange basis function $L_i{(X)}$ is related to the order of interpolation points, not the specific order in the sequence. Therefore, even if you change the order of nodes in the list, as long as the node values themselves remain unchanged, the form of $L_i(X)$ will not change. As long as the interpolation points and the corresponding function values are consistent during calculation, the specific values of interpolation points will not affect the correctness of Lagrange interpolation. The key is to ensure that each interpolation point $w_i$ correctly corresponds to the function value at that point, and the form and result of the interpolation polynomial depend on these correspondences. The Lagrange interpolation polynomial $h(X)$ can be expressed as:\n$h(X)={\\textstyle \\sum_{i=0}^{N-1}} h_iL_i(X)$\n1. Next, we calculate the Lagrange basis functions:\nWhen $i=0$, i.e., at the interpolation node $z_0=1$:\n$L_0(X)=\\frac{(X-2)(X-3)}{(1-2)(1-3)}=\\frac{(X-2)(X-3)}{2}$\nWhen $i=1$, i.e., at the interpolation node $z_1=2$:\n$L_1(X)=\\frac{(X-1)(X-3)}{(2-1)(2-3)}=-(X-1)(X-3)$\nWhen $i=2$, i.e., at the interpolation node $z_2=3$:\n$L_2(X)=\\frac{(X-1)(X-2)}{(3-1)(3-2)}=\\frac{(X-1)(X-2)}{2}$\n2. Constructing the interpolation polynomial $h(X)$:\nSince at $z_0=1$, $h(z_0)=a(1)=4$, at $z_1=2$, $h(z_1)=a(2)=5$, at $z_2=3$, $h(z_2)=a(3)=6$,\nWe can use this relationship to construct the interpolation polynomial $h(X)$:\n$$ \\begin{split} h(X) \u0026amp;= 4L_0(X)+5L_1(X)+6L_2(X) \\\\ \u0026amp;= 4\\cdot \\frac{(X-2)(X-3)}{2}-5\\cdot (X-1)(X-3)+3\\cdot \\frac{(X-1)(X-2)}{2} \\\\ \u0026amp;= 2(X-2)(X-3)-5(X-1)(X-3)+3(X-1)(X-2) \\\\ \u0026amp;= X+3 \\end{split} $$\nIf $H$ is larger, for example, $H\u0026rsquo;\u0026rsquo;=\\{1,2,3,4\\}$, with $z\u0026rsquo;_i=\\{0,1,2,3\\}$, $\\vec{a\u0026rsquo;}=(4,5,6,7)$. We can construct $h(X) = 4\\cdot L_0{(X)}+ 5\\cdot L_1{(X)} + 6\\cdot L_2{(X)} + 7\\cdot L_3{(X)}$. This is not calculated here, but the point is:\nAs long as the interpolation points and corresponding function values are consistent during calculation, the specific values of interpolation points will not affect the correctness of Lagrange interpolation. When constructing interpolation polynomials, it is usually necessary to use all given interpolation points. This ensures that the polynomial accurately takes the corresponding value at each interpolation point. If only part of the interpolation points are used, the polynomial might not accurately pass through all points. 3. Verify the polynomial $h(X)$\nWe take $X=\\{1,2,3\\}$ and substitute it into the constructed interpolation polynomial $h(X)$ to see if the resulting values are as expected:\n$$ \\begin{align} a(1)=1+3=4\\ a(2)=2+3=5\\ a(3)=3+3=6 \\end{align} $$\nThe verification results are consistent with the value vector $\\vec{a}=(4,5,6)$. We constructed the polynomial $h(X)$ and verified its value at interpolation nodes is correct.\nIt seems that $L_i(X)$ acts like a selector, meaning:\nWhen $X=w_i$, only $L_i(w_i)=1$, while all other $L_i(w_j) = 0 (j\\neq i)$.\nNote: Both $i$ and $j$ are indices in the set of interpolation nodes. The indices $i$ and $j$ are used to identify different interpolation nodes, but only at $i$ does the interpolation node value equal 1, while at $j$, the interpolation node value is 0. This duality—having values at interpolation nodes either as 0 or 1—is the selective property of Lagrange basis functions.\nNow, returning to the step of constructing $a(X)$:\n$$ a(X)=a_0\\cdot L_0(X) + a_1\\cdot L_1(X)+ a_2\\cdot L_2(X) + \\cdots + a_{N-1}\\cdot L_{N-1}(X) $$\nUsing the same method, we can construct $b(X)$ and $c(X)$:\n$$ \\begin{split} b(X)=b_0\\cdot L_0(X) + b_1\\cdot L_1(X)+ b_2\\cdot L_2(X) + \\cdots + b_{N-1}\\cdot L_{N-1}(X) \\\\ c(X)=c_0\\cdot L_0(X) + c_1\\cdot L_1(X)+ c_2\\cdot L_2(X) + \\cdots + c_{N-1}\\cdot L_{N-1}(X) \\\\ \\end{split} $$\nIf $\\vec{a} \\circ \\vec{b} = \\vec{c}$ is true at the nodes, this means at each node $w_i$, $a(w_i) \\cdot b(w_i) = c(w_i)$. Since the interpolation polynomials match the given values at these nodes, and the polynomials\u0026rsquo; form remains consistent between nodes, it follows that $a(X) \\cdot b(X) = c(X)$ will also hold over the given domain $H$.\nLet\u0026rsquo;s verify if $\\vec{a} \\circ \\vec{b} = \\vec{c}$, $a(X) \\cdot b(X) \\overset{?}{=} c(X), \\quad \\forall X\\in H$.\nThe specific calculation process is:\n$$ \\begin{split} \\vec{a} \\circ \\vec{b} \u0026amp; = \\vec{c}\\\\ [a_0, a_1, \\ldots, a_{N-1}] \\circ [b_0, b_1, \\ldots, b_{N-1}] \u0026amp; =[c_o,c_1, \\ldots,c_{N-1}]\\\\ [a_0 \\cdot b_0 , a_1\\cdot b_1 , a_2\\cdot b_2 \\ldots ,a_{N-1}\\cdot b_{N-1}]\u0026amp;=[c_o,c_1,\\ldots,c_{N-1}] \\end{split} $$\nClearly, in the above equation, $a_0 \\cdot b_0=c_0$, $a_1 \\cdot b_1=c_1$, $\\ldots$, $a_{N-1} \\cdot b_{N-1} = c_{N-1}$.\nTherefore, $a_i \\cdot b_i =c_i$, which implies $a(w_i)\\cdot b(w_i) =c(w_i)$, $a(X)\\cdot b(X)=c(X), \\quad \\forall X\\in H$.\nWe\u0026rsquo;ve now translated the element-wise multiplication problem of two vectors into the relationship between three polynomials. The next question is how to perform a random challenge verification.\nWe realize that if the Verifier directly sends a random number $\\zeta$ to challenge the equation above, $\\zeta$ can only belong to $H$. If there exists only one $j$ such that $a_j\\cdot b_j\\neq c_j$, the probability of the Verifier\u0026rsquo;s challenge detecting this error is only $\\frac{1}{N}$. Thus the Verifier needs to challenge multiple times to reduce the probability of missing an error. However, this doesn\u0026rsquo;t meet our requirement; we hope to detect Prover\u0026rsquo;s cheating with a single challenge.\nWe can change the range of $X$ in the equation above by using the following equation:\n$$ a(X)\\cdot b(X) - c(X) = q(X)\\cdot z_H(X), \\quad\\forall X\\in \\mathbb{F} $$\nThis equation holds over the entire domain $\\mathbb{F}$. Why is this?\nFirst, consider the left-hand polynomial: $a(X)\\cdot b(X)-c(X)$, let\u0026rsquo;s define it as $f(X)$.\nWe can see that $f(X)$ equals zero over $X\\in H$, meaning $H$ is exactly the \u0026ldquo;root set\u0026rdquo; of $f(X)$. Therefore, $f(X)$ can be expressed as the product of the vanishing polynomial $z_H(X)$ and a quotient polynomial $q(X)$. We can use the known properties of $z_H(X)$ to simplify the problem handling. Thus, $f(X)$ can be factored as follows:\n$$ f(X)=(X-w_0)(X-w_1)(X-w_2)\\cdots(X-w_{N-1})\\cdot q(X) $$\nIn other words, $f(X)$ can be divided by the polynomial $z_H(X)=(X-w_0)(X-w_1)(X-w_2)\\cdots(X-w_{N-1})$, resulting in a quotient polynomial $q(X)$, representing the result of dividing $f(X)$ by $z_H(X)$. The vanishing polynomial $z_H(X)$ is also known as the Vanishing Polynomial, capturing all roots of $f(X)$.\nNote:\n$H = \\{w_0, w_1, \\ldots, w_{N-1}\\}$ is the set of interpolation nodes. The vanish polynomial $Z_H(X)$ is a polynomial whose roots are all nodes in the set $H$. The right $z_H(X)$ is a node polynomial, meaning this polynomial $z_H(X)$ has roots at all interpolation nodes $w_{i}$, i.e., for all $w_i\\in H$, $Z_H(w_i)=0$. This polynomial can be defined as: $z_H(X)=(X-w_0)(X-w_1)(X-w_2)\\cdots(X-w_{n-1})$. Definition of polynomial divisibility: Suppose there are two polynomials $A(X)$ and $B(X)$. If there exists a polynomial $Q(X)$ such that $A(X)=B(X)\\cdot Q(X)$, then we say polynomial $A(X)$ is divisible by $B(X)$, or $B(X)$ is a factor of $A(X)$. If we let the Prover calculate this $Q(X)$ and send it to the Verifier, and since $H$ is a known system parameter, the Verifier can compute $z_H(X)$ itself. Then the Verifier only needs a single random check to determine if $a(X)\\cdot b(X)-c(X)$ equals zero at $H$, based on the Schwartz-Zippel lemma.\nIf $P(X)=a(X)\\cdot b(X)-c(X)$ is a non-zero polynomial, assuming its degree is $d$, then the probability of a randomly chosen number yielding a result of zero $\\le \\frac{d}{|F|}$, where $F$ is the finite field. Provided $F$ is large enough, the probability of the result being 0 is negligible.\nIn simple terms, the probability that the polynomial equals 0 is already less than a very very small probability, roughly equivalent to it being impossible to randomly select that \u0026ldquo;lucky number\u0026rdquo; that coincidentally equals 0. We can then confidently conclude it\u0026rsquo;s the vanishing polynomial.\n$$ a(\\zeta)\\cdot b(\\zeta)-c(\\zeta) \\overset{?}{=} q(\\zeta)\\cdot z_H(\\zeta) $$\nMoreover, if we use Polynomial Commitment, the Verifier can let the Prover calculate the values of these polynomials at $X=\\zeta$ and generate a proof to confirm the correctness of the values. For the Verifier, it only needs to check this proof\u0026rsquo;s validity by randomly choosing a number, rather than calculating the polynomial values itself, thereby minimizing the Verifier\u0026rsquo;s workload.\nHowever, the Verifier\u0026rsquo;s calculation of $z_H(\\zeta)$ requires $O(n)$ computation, as it involves n multiplication operations.\nSupplement: In computational complexity, $O(n)$ indicates that as the input size $n$ increases, the algorithm\u0026rsquo;s running time or required resources (such as calculation steps) will increase linearly. In simple terms, if an algorithm is $O(n)$, doubling the input data will double the algorithm\u0026rsquo;s running time.\nCan the Verifier further reduce workload? The answer is yes, by choosing a special $H\\subset \\mathbb{F}$, specifically if $H$ is a well-structured set, enabling efficient computation of the vanishing polynomial $z_H(X)$ and its values using fast Fourier transform (FFT) algorithms.\nRoots of Unity If we choose roots of unity as $H$, the computation of $z_H(\\zeta)$ reduces to $O(\\log{n})$.\nFor any finite field $\\mathbb{F}_p=\\{0,1,\\ldots,p-1\\}$, where the order $p$ is a prime. Removing zero, the remaining elements form a multiplicative group $\\mathbb{F}_p^\\ast=\\{1,\\ldots,p-1\\}$ of order $p-1$. Since $p-1$ is even, its prime factorization includes several 2s, noted as $\\lambda$ 2s. Thus, $\\mathbb{F}_p^\\ast$ contains a multiplicative subgroup of order $2^\\lambda$. Let $N=2^{k}, k\\leq\\lambda$, then there must exist a multiplicative subgroup of order $N$, denoted as $H$. This subgroup necessarily has a generator, denoted as $\\omega$, with $\\omega^N=1$. This is akin to taking the $N$th root of 1, hence called a root of unity. However, there isn\u0026rsquo;t just one $\\omega$, as $\\omega^2,\\omega^3,\\ldots,\\omega^{N-1}$ all satisfy the property of roots of unity, i.e., $(\\omega^k)^N=1, k\\in(2,3,\\ldots,N-1)$. All these roots of unity generated by $\\omega$ form the multiplicative subgroup $H$:\n$$ H=(1,\\omega,\\omega^2,\\omega^3,\\ldots,\\omega^{N-1}) $$\nNote: $\\omega = e^{2\\pi i / N}$. This expression reveals some patterns.\nThese elements satisfy certain symmetries: for example, $\\omega^{\\frac{N}{2}} = e^{2\\pi i \\cdot \\frac{N/2}{N}} = e^{\\pi i} = -1$,\nFrom $\\omega^{\\frac{N}{2}} = -1$, we have $\\omega^{\\frac{N}{2} + 1} = \\omega \\cdot \\omega^{\\frac{N}{2}} = \\omega \\cdot (-1) = -\\omega$. Hence, $\\omega = -\\omega^{\\frac{N}{2} + 1}$.\nFor any exponent $i$, $\\omega^{\\frac{N}{2}} = -1$. Thus $\\omega^{\\frac{N}{2} + i} = \\omega^{\\frac{N}{2}} \\cdot \\omega^i = (-1) \\cdot \\omega^i = -\\omega^i$.\nMoreover, summing all the roots of unity yields zero:\n$$ \\sum_{i=0}^{N-1}\\omega^i=0 $$\nA simple example: we can find a subgroup of order 4 in $\\mathbb{F}_{13}$.\n$$ \\mathbb{F}_{13}=\\{0,1,2,3,4,5,6,7,8,9,10,11,12\\} $$\nThe generator of the multiplicative group is given as $g=2$. Since $13-1=3 \\times 2 \\times 2$, there exists a multiplicative subgroup of order 4 with generator $\\omega=5$:\nIf $g$ is a generator of $\\mathbb{F}_p^\\ast$, then $g^{p-1}=1$, and $\\mathbb{F}_p^\\ast = {g^0,g^1,\\ldots,g^{p-2}}$\n$$ H={\\omega^0=1,\\omega^1=5,\\omega^2=12,\\omega^3=8} $$\nAnd $\\omega^4=1=\\omega^0$.\nIn practical applications, we choose a larger finite field that can have a large powers-of-2 multiplicative subgroup. For example, the scalar field of the elliptic curve BN254 contains a multiplicative subgroup of order $2^{28}$, and BLS-12-381 contains a subgroup of order $2^{32}$.\nOn the multiplicative subgroup $H$, the following property holds:\n$$ z_H(X)=\\prod_{i=0}^{N-1}(X-\\omega^i)=X^N-1 $$\nWe can simply derive, assuming $N = 4$. Due to the symmetry of $\\omega^i$, $\\omega^4=1$ means $\\omega$ could be (1,i,-1,-i). This calculation process can be continuously simplified:\nHow to understand the symmetry of $\\omega^i$? $\\omega_i \\times \\omega^{N-i}=1$ (mutual inverses); $\\omega^N=1$ ensures they are periodic on the unit circle (repeat every $N$).\n$$ \\begin{split} \u0026amp;(X-\\omega^0)(X-\\omega^1)(X-\\omega^2)(X-\\omega^3) \\\\ =\u0026amp; (X-1)(X-i)(X+1)(X+i) \\\\ =\u0026amp; (X^2-1)(X^2+1) \\\\ =\u0026amp; (X^4-1) \\\\ \\end{split} $$\nLagrange Basis For the Lagrange polynomial, $L_i(\\omega_i)=1$, and $L_i(\\omega_j)=0, (j\\neq i)$. Next, we give the construction of $L_i(X)$.\nTo construct $L_i(X)$, first construct the non-zero polynomial part. Since $L_i(\\omega_j)=1, j = i$, it must contain the polynomial factor $\\prod_{j,j\\neq i}(X-\\omega_j)$. However, this factor may not equal 1 at $X=\\omega_i$, i.e., $\\prod_{j, j\\neq i}(\\omega_i-\\omega_j)\\neq 1$. Then, we just need to divide this factor by this potentially non-1 value, thus $L_i(X)$ is defined as:\n$$ L_i(X) = \\frac{\\prod_{j\\in H\\backslash{i}}(X-\\omega_j)}{\\prod_{j\\in H\\backslash{i}}(\\omega_i-\\omega_j)} = \\prod_{j\\in H\\backslash{i}}^{} \\frac{X-\\omega_j}{\\omega_i-\\omega_j} $$\nIt is easy to find that $L_i(X)$ equals 1 at $X=\\omega_i$ and equals 0 at other locations $X=\\omega_j, j\\neq i$.\nFor any polynomial $f(X)$ of degree less than $N$, it can be uniquely expressed as:\n$$ f(X)=a_0\\cdot L_0(X)+a_1\\cdot L_1(X)+a_2\\cdot L_2(X)+ \\cdots + a_{N-1}\\cdot L_{N-1}(X) $$\nWe can represent $f(X)$ by its values on $H$ as $(a_0,a_1,a_2,\\ldots,a_{N-1})$. This is called the evaluation form of the polynomial, as different to the coefficient form.\nThe two forms can be converted on $H$ using the (Inverse) Fast Fourier Transform algorithm with a computational complexity of $O(N\\log{N})$.\nPolynomial Constraints Using the Lagrange basis, we can easily impose constraints on various vector calculations.\nFor example, if we want to constrain the first element of the vector $\\vec{a}=(h,a_1,a_2,\\ldots,a_{N-1})$ to be $h$, we can encode this vector to get $a(X)$ and impose the following constraint:\n$$ L_0(X)(a(X)-h) = 0, \\quad \\forall X\\in H $$\nThe verifier can challenge the following polynomial equation:\n$$ L_0(X)(a(X)-h) = q(X)\\cdot z_H(X) $$\nFor instance, if we want to constrain the first element of $\\vec{a}=(h_1,a_1,a_2,\\ldots,a_{N-2},h_2)$ to be $h_1$, and the last element to be $h_2$, with other elements arbitrary, then $a(X)$ should satisfy the following two constraints:\n$$ \\begin{split} L_0(X)\\cdot (a(X)-h_1) \u0026amp;= 0, \\quad \\forall X\\in H\\\\ L_{N-1}(X)\\cdot(a(X)-h_2) \u0026amp;= 0, \\quad \\forall X\\in H \\end{split} $$\nThrough a random challenge number ( $\\alpha$ ) given by the verifier, the above two constraints can be merged into one polynomial constraint:\n$$ L_0(X)\\cdot (a(X)-h_1) + \\alpha\\cdot L_{n-1}(X)\\cdot(a(X)-h_2) = 0, \\quad \\forall X\\in H $$\nNext, verifier only needs to challenge the following polynomial equation:\n$$ L_0(X)\\cdot (a(X)-h_1) + \\alpha\\cdot L_{n-1}(X)\\cdot(a(X)-h_2) = q(X)\\cdot z_H(X) $$\nIf we want to verify that two vectors $\\vec{a}$ and $\\vec{b}$ of equal length have the same elements except for the first, how to constrain them? Assuming $a(X)$ and $b(X)$ are the polynomial encodings of the two vectors, they should satisfy:\n$$ (X-\\omega^0)(a(X)-b(X))=0 $$\nWhen $X=\\omega^0$, the first factor on the left is 0, and when $X\\in H\\backslash{\\omega^0}$, the second factor is 0, meaning all values must be equal except the first element.\nIt can be seen that using Lagrange polynomials, we can flexibly constrain relationships between multiple vectors and combine multiple constraints together, allowing the verifier to verify multiple vector constraints with only a few random challenges.\nCoset In the multiplicative group of a prime finite field, for each multiplicative subgroup $H$, there are multiple cosets of the same length. These cosets share similar properties with $H$ and are also used in PlonK. Here, we introduce some of their properties.\nTaking $\\mathbb{F}_{13}$ as an example, choose $H=\\{1,5,12,8\\}$, and the generator of the multiplicative group is $g=2$. We can obtain the following two cosets:\n$$ \\begin{split} H_1 \u0026amp;= g\\cdot H = {g, g\\omega, g\\omega^2, g\\omega^3} \\\u0026amp;= (2,10,11,3) \\end{split} $$\n$$ \\begin{split} H_2 \u0026amp;= g^2\\cdot H = {g^2, g^2\\omega, g^2\\omega^2, g^2\\omega^3} \\\u0026amp;= (4,7,9,6) \\end{split} $$\nIt can be seen that $\\mathbb{F}^*_{13}=H\\cup H_1 \\cup H_2$, and they have no overlap. Their Vanishing Polynomials can be quickly calculated:\n$$ z_{H_1}(X)=X^N-g^N, \\quad z_{H_2}(X)=X^N-g^{2N} $$\nReferences Schwartz–Zippel lemma: https://en.wikipedia.org/wiki/Schwartz%E2%80%93Zippel_lemma\n","permalink":"/posts/2-lagrange-basis/","summary":"\u003ch1 id=\"introduction\"\u003eIntroduction\u003c/h1\u003e\n\u003cp\u003eIn the previous article, we mentioned that to implement the protocol verification process, the Prover initially encodes each column of the $W$ table using polynomial coding and sends the encoded results to the Verifier for verification. Through further interaction, we can verify whether the equation\u003c/p\u003e\n\u003cp\u003e$$\nq_{L}(X) \\cdot w_{a}(X) + q_{R}(X) \\cdot w_{b}(X) + q_{M}(X)\\cdot(w_{a}(X)\\cdot w_{b}(X)) + q_{C}(X) -  q_{O}(X)\\cdot w_{c}(X) \\overset{?}{=} 0\n$$\u003c/p\u003e\n\u003cp\u003eholds.\u003c/p\u003e\n\u003cp\u003eThis verifies the correctness of a circuit only when the Prover is honest. However, the Prover might misbehave. \u003cstrong\u003eTo prevent this and ensure the circuit\u0026rsquo;s correctness and security while satisfying constraints, we need to verify\u003c/strong\u003e the relationship between $(\\sigma_a(X),\\sigma_b(X),\\sigma_c(X))$ and $(w_a(X),w_b(X),w_c(X))$.\u003c/p\u003e","title":"Understanding PLONK (Part 2): Lagrange-basis"},{"content":"Plonkish circuit encoding uses two matrices, $(Q, \\sigma)$, to describe the circuit\u0026rsquo;s scaffold, where $Q$ represents the operation selectors and $\\sigma$ represents permutation constraints. These constraints enforce that certain positions in the $W$ matrix must hold identical values. This article focuses on explaining the principles of the permutation argument.\nReviewing Copy Constraints The permutation $\\sigma$ represents the relationship between positions before and after rearrangement. But what does $\\sigma$ actually look like?\nLet’s consider an example: suppose we have two evaluation vectors of polynomials, $\\vec{a}$ and $\\vec{a}\u0026rsquo;$, where the elements of $\\vec{a}\u0026rsquo;$ are obtained by permuting the corresponding positions of $\\vec{a}$.\nFor instance, let $\\vec{a} = [a_1, a_2, a_3]$ and $\\vec{a}\u0026rsquo; = [a_3, a_1, a_2]$, along with a permutation $\\sigma = (1 \\to 2, 2 \\to 3, 3 \\to 1)$. Here, $\\sigma$ represents a reordering of elements:\n$\\sigma(1) = 2$, meaning $\\vec{a}(1) = \\vec{a\u0026rsquo;}(2)$; $\\sigma(2) = 3$, meaning $\\vec{a}(2) = \\vec{a\u0026rsquo;}(3)$; $\\sigma(3) = 1$, meaning $\\vec{a}(3) = \\vec{a\u0026rsquo;}(1)$. Let’s revisit the Plonkish $W$ table, which has three columns, and the rows are aligned to $2^2$.\nNote: In Plonkish protocols, \u0026ldquo;rows aligned to $2^2$\u0026rdquo; means that the total number of rows in the table is a multiple of $2^2 = 4$. That is, the table rows are padded or constructed to be a multiple of 4, which simplifies the subsequent computation and proof processes. Below is an example table:\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; w_{a,i} \u0026amp; w_{b,i} \u0026amp; w_{c,i} \\\\ \\hline 1 \u0026amp; {\\color{red}x_5} \u0026amp; {\\color{blue}x_6} \u0026amp; {\\color{green}out} \\\\ 2 \u0026amp; x_1 \u0026amp; x_2 \u0026amp; {\\color{red}x_5} \\\\ 3 \u0026amp; x_3 \u0026amp; x_4 \u0026amp; {\\color{blue}x_6} \\\\ 4 \u0026amp; 0 \u0026amp; 0 \u0026amp; {\\color{green}out} \\\\ \\end{array} $$\nWe aim to constrain the Prover while filling out the $W$ table, ensuring the following copy constraints are satisfied: $w_{a,1} = w_{c,2}$, $w_{b,1} = w_{c,3}$, and $w_{c,1} = w_{c,4}$. In other words:\nThe value in $w_{a,1}$ must be copied to $w_{c,2}$; The value in $w_{b,1}$ must be copied to $w_{c,3}$; The value in $w_{c,1}$ must be copied to $w_{c,4}$. The challenge here lies in the fact that the Verifier cannot directly view the $W$ table. Besides, the proof of multiple copy constraints in the $W$ table must be achieved through a single random challenge.\nIn Plonk, the \u0026ldquo;copy constraints\u0026rdquo; are implemented using the permutation argument, which essentially rearranges the values in the table that need to be equal and then proves that the rearranged table is equivalent to the original table. This is why we introduce $\\sigma$ to represent the permutation relationship.\nWith $\\sigma$, the problem can be reduced to proving:\nTwo equal-length vectors, $\\vec{a}$ and $\\vec{a}\u0026rsquo;$, satisfy a known permutation $\\sigma$; $\\vec{a} = \\vec{a}\u0026rsquo;$, i.e., $$ a_i = a\u0026rsquo;_{\\sigma(i)} $$\nAnother Example: Cyclic Permutation Suppose $\\vec{a} = (a_0, a_1, a_2, a_3)$ and $\\vec{a}\u0026rsquo; = (a_1, a_2, a_3, a_0)$, where the two vectors follow a \u0026ldquo;left cyclic permutation\u0026rdquo;. Then $\\sigma = {0 \\to 1, 1 \\to 2, 2 \\to 3, 3 \\to 0}$. If we can prove $\\vec{a} = \\vec{a}\u0026rsquo;$, then the values at corresponding positions of the two vectors must be equal:\n$$ \\begin{array}{c|c|c|c|c} \\vec{a} \u0026amp; a_0 \u0026amp; a_1 \u0026amp; a_2 \u0026amp; a_3 \\\\ \\hline \\vec{a}\u0026rsquo; \u0026amp; a_1 \u0026amp; a_2 \u0026amp; a_3 \u0026amp; a_0 \\end{array} $$\nThus, $a_0 = a_1$ , $a_1 = a_2$ , $a_2 = a_3$ , and $a_3 = a_0$. This leads to the conclusion that $a_0 = a_1 = a_2 = a_3$, i.e., all elements in $\\vec{a}$ are equal.\nIn summary, for the $W$ table, we only need to rearrange the positions that need to be equal, then let the Prover prove that the $W$ table and its rearranged version $W\u0026rsquo;$ are equivalent. To prove these two tables are equal, we can encode them into polynomials and then use a probabilistic check. The remaining task is to ensure that the Prover proves $W\u0026rsquo;$ is honestly rearranged according to the pre-agreed permutation.\nNext, let’s explore how the Prover can prove that two vectors satisfy a specific permutation relationship. The permutation argument is the core of the Plonk protocol. To explain its mechanism, we start with a foundational protocol — the Grand Product Argument.\nA Cold Start: Grand Product Suppose we want to prove the following \u0026ldquo;grand product\u0026rdquo; relationship:\n$$ p = q_0 \\cdot q_1 \\cdot q_2 \\cdot \\cdots \\cdot q_{n-2}. $$\nTo handle the grand product, the basic idea is to let the Prover construct proofs for a series of single-product computations and then encode these into polynomials for probabilistic verification by the Verifier.\nKey Insight: The critical idea is to convert a grand product computation into multiple single-product computations.\nAnalogy: Think of this process like building a tower of blocks:\nThe \u0026ldquo;grand product computation\u0026rdquo; is like stacking all the blocks at once to form a tall tower. The \u0026ldquo;single-product computations\u0026rdquo; are like stacking one block at a time, gradually building the same tower. For example, consider computing $a \\cdot b \\cdot c \\cdot d$:\nCompute $a \\cdot b = e$; Multiply the result $e$ by $c$ to get $e \\cdot c = f$; Multiply the result $f$ by $d$ to get the final result $f \\cdot d$. In this way, the grand product computation is completed through three separate multiplication steps, each adding a \u0026ldquo;block\u0026rdquo; to the existing tower.\nTo break a grand product into multiple single-product computations, we introduce an auxiliary vector (denoted as $\\vec{r}$). This vector records the intermediate results after each multiplication step:\n$$ \\begin{array}{c|c|l} q_i \u0026amp; r_i \u0026amp; \\ \\ r_{i+1} = q_i \\cdot r_i \\\\ \\hline q_0 \u0026amp; r_0 = 1 \u0026amp; r_1 = q_0 \\\\ q_1 \u0026amp; r_1 \u0026amp; r_2 = q_0 \\cdot q_1 \\\\ q_2 \u0026amp; r_2 \u0026amp; r_3 = q_0 \\cdot q_1 \\cdot q_2 \\\\ \\vdots \u0026amp; \\vdots \u0026amp; \\vdots \\\\ q_{n-3} \u0026amp; r_{n-3} \u0026amp; r_{n-2} = q_0 \\cdot q_1 \\cdot q_2 \\cdots q_{n-3} \\\\ q_{n-2} \u0026amp; r_{n-2} \u0026amp; r_{n-1} = p \\\\ \\end{array} $$\nThe table above represents the computation trace of the grand product. Each row corresponds to a single-product computation, starting from the top and ending with the final result $p$. The vector $(q_0, \\cdots, q_{n-2})$ essentially serves as a sequence of intermediate steps.\nThe leftmost column contains the vector ${q_i}$ for the grand product. The middle column ${r_i}$ is the auxiliary vector that records intermediate values. The rightmost column represents the intermediate results after each multiplication. It’s easy to see that the middle column $\\vec{r}$, shifted up by one row, matches the rightmost column $\\vec{q_i \\cdot r_i}$ almost exactly, except for the last element $r_{n-1} = p$. The first element of $\\vec{r}$ is initialized to 1, while its last element records the final result.\nThe vector $\\vec{r}$ serves as an accumulator, recording each intermediate result in the grand product computation:\n$$ r_k = \\prod_{i=0}^{k-1} q_i $$\nNext, we encode $\\vec{q}$ and $\\vec{r}$ as polynomials over the multiplicative subgroup $H$:\n$$ \\begin{array}{c|c|c} H \u0026amp; q_i \u0026amp; r_i \\\\ \\hline \\omega^0 \u0026amp; q_0 \u0026amp; r_0 = 1 \\\\ \\omega^1 \u0026amp; q_1 \u0026amp; r_1 \\\\ \\omega^2 \u0026amp; q_2 \u0026amp; r_2 \\\\ \\vdots \u0026amp; \\vdots \u0026amp; \\vdots \\\\ \\omega^{N-2} \u0026amp; q_{N-2} \u0026amp; r_{N-2} \\\\ \\omega^{N-1} \u0026amp; q_{N-1} = 0 \u0026amp; r_{N-1} = p \\\\ \\end{array} $$\nPolynomials $q(X)$ and $r(X)$ are used to encode $\\vec{q}$ and $\\vec{r}$, respectively.\nWe can derive the following recurrence relation:\n$$ r_0 = 1, \\qquad r_{k+1} = q_k \\cdot r_k $$\nThus, the three columns of the table, when encoded into polynomials, must satisfy the following three constraints:\nFirst Constraint is $$ L_0(X) \\cdot (r(X) - 1) = 0, \\qquad \\forall X \\in H $$\nThis constraint is constructed using Lagrange interpolation to ensure that the initial value of $r(X)$ is $1$.\nSecond Constraint is the recursive multiplication relationship: $$ q(X) \\cdot r(X) = r(\\omega \\cdot X), \\qquad \\forall X \\in H \\setminus {\\omega^{-1}} $$\nNotes:\nThe purpose of this constraint is to verify the recursive relationship by calculating $q(X) \\cdot r(X)$ and $r(\\omega \\cdot X)$ and ensuring the results are equal. The term $\\omega \\cdot X$ represents a scaling or shift of $X$. Here, $\\omega$ is a fixed value known as a primitive root of unity, used to shift within the cyclic group; $X$ is the current point. Multiplying by $\\omega$ moves $X$ to a new point in the group. Why multiply $X$ by $\\omega$? The primary reason is that it ensures each shift (or scaling) is proportional, maintaining uniform spacing between points in the cyclic group. For instance, $\\omega = e^{\\frac{2\\pi i}{n}}$ (an $n$ th root of unity) corresponds to a fixed rotation angle on the complex plane. Multiplying $X$ by $\\omega$ rotates points by a fixed angle, ensuring even distribution in the cycle. Why exclude $X = \\omega^{-1}$? This exclusion avoids potential issues: At $X = \\omega^{-1}$, calculations may involve singularities or undefined behavior (e.g., division by zero). In Fast Fourier Transforms (FFT) or Discrete Fourier Transforms (DFT), this can cause overlapping or confusion between frequency points. In polynomial interpolation, this may lead to repeated roots or reduced interpolation precision. Numerical instability or rounding errors may accumulate. In this context, $q_{N-1} = 0$ serves as a special condition to enforce $r_{N-1} = p$. This ensures that the grand product result $p$ is properly encoded as part of $r(X)$. Third Constraint is to ensure that $r(X)$ evaluates to $p$ at the endpoint: $$ L_{N-1}(X) \\cdot (r(X) - p) = 0, \\qquad \\forall X \\in H $$\nHow to address the Exclusion of $X = \\omega^{-1}$?\nThe second constraint does not cover the entire set $H$ (it excludes $\\omega^{-1}$). To address this, we can rewrite it as the following constraint equation, ensuring the polynomial constraint now fully covers $H$:\n$$ \\big(q(X) \\cdot r(X) - r(\\omega \\cdot X) \\big) \\cdot \\big(X - \\omega^{-1} \\big) = 0, \\qquad \\forall X \\in H. $$\nSimplifying and Combining Constraints We can use a small trick to simplify and combine the three constraints into a single polynomial constraint.\nBy adding an additional row to the grand product computation table and setting $q_{N-1} = \\frac{1}{p}$ (where $p$ is the grand product of the vector $\\vec{q}$):\n$$ \\begin{array}{c|c|c} q_i \u0026amp; r_i \u0026amp; q_i \\cdot r_i \\\\ \\hline q_0 \u0026amp; 1 \u0026amp; r_0 \\\\ q_1 \u0026amp; r_0 \u0026amp; r_1 \\\\ q_2 \u0026amp; r_1 \u0026amp; r_2 \\\\ \\vdots \u0026amp; \\vdots \u0026amp; \\vdots \\\\ q_{N-2} \u0026amp; r_{N-2} \u0026amp; r_{N-1} \\\\ q_{N-1} = \\frac{1}{p} \u0026amp; r_{N-1} = p \u0026amp; r_{N} = r_0 = 1 \\\\ \\end{array} $$\nThis ensures $r_N = r_0 = 1$. The rightmost column now represents a cyclic shift of $\\vec{r}$. Additionally, every row in the table satisfies the multiplicative relationship!\nRecursive Grand Product Representation Using this setup, the recursive grand product can now be expressed as:\n$$ q(X) \\cdot r(X) = r(\\omega \\cdot X), \\qquad \\forall X \\in H $$\nNote:\nUsing the above trick, we modified the original constraint: $q(X)\\cdot r(X) = r(\\omega\\cdot X), \\qquad \\forall X\\in H\\backslash\\{\\omega^{-1}\\} \\qquad \\to \\qquad q(X)\\cdot r(X)=r(\\omega\\cdot X), \\qquad \\forall X\\in H$\nThis means that the point $\\omega^{-1}$, which was previously excluded, now satisfies the constraint over the entire $H$.\nFinal Constraints After applying these simplifications, the final polynomial constraints are:\n$$ L_{N-1}(X)\\cdot(r(X)-p)=0, \\qquad \\forall X\\in H $$\n$$ q(X)\\cdot r(X) = r(\\omega\\cdot X), \\qquad \\forall X\\in H\\backslash\\{\\omega^{-1}\\} $$\n$$ q(X)\\cdot r(X)=r(\\omega\\cdot X), \\qquad \\forall X\\in H $$\nVerifier\u0026rsquo;s Challenge Now, verifier can challenge the Prover with the following aggregated polynomial equation:\n$$ L_0(X) \\cdot (r(X) - 1) + \\alpha \\cdot (q(X) \\cdot r(X) - r(\\omega \\cdot X)) = h(X) \\cdot z_H(X) $$\nwhere:\n$\\alpha$ is a random challenge used to combine multiple polynomial constraints. $h(X)$ is the quotient polynomial. $z_H(X)$ is the vanishing polynomial defined as: $z_H(X) = (X - 1)(X - \\omega)\\cdots(X - \\omega^{n-1})$ Verifying with the Schwartz-Zippel Lemma Using the Schwartz-Zippel Lemma, the Verifier can provide a random challenge $\\zeta$ to check whether the polynomial equation holds.\nSteps: Construct the difference polynomial: $$ A(X) = L_0(X) \\cdot (r(X) - 1) + \\alpha \\cdot (q(X) \\cdot r(X) - r(\\omega \\cdot X)) $$\n$$ B(X) = h(X) \\cdot z_H(X) $$\nDefine $R(X) = A(X) - B(X)$, where $d$ is the degree of $R(X)$.\nUse the Schwartz-Zippel Lemma to verify:\nSelect a random point $\\zeta$ from $H$. Compute $R(\\zeta)$: If $R(\\zeta) = 0$, then $A(X) = B(X)$, and the equation holds. If $R(\\zeta) \\neq 0$, the equation does not hold, and the proof is invalid. Notes:\nThe equation $q_L \\circ w_a + q_R \\circ w_b + q_M \\circ (w_a \\cdot w_b) - q_C + q_O \\cdot w_c = 0$ is typically used to establish constraint relations, often referred to as a constraint polynomial, which is designed to express specific arithmetic circuit constraints.\nOn the other hand, the equation $L_0(X) \\cdot (r(X) - 1) + \\alpha \\cdot (q(X) \\cdot r(X) - r(\\omega \\cdot X)) = h(X) \\cdot z_H(X)$ commonly appears in the construction of polynomial equations to verify certain algebraic properties. For instance, it is used in polynomial commitment schemes to prove the integrity and correctness of the entire circuit or protocol.\nAfter understanding how to prove a grand product, the next step is to use the Grand Product Argument to implement the Multiset Equality Argument. This will allow us to verify that two multisets are equivalent in terms of their elements and multiplicities.\nFrom Grand Product to Multiset Equality Suppose we have two vectors, where $\\vec{B}$ is a permutation of $\\vec{A}$:\n$$ \\vec{A} = [1, 2, 3], \\qquad \\vec{B} = [3, 1, 2] $$\nHow do we prove that they are equivalent in the sense of a multiset (i.e., unordered sets)?\nFirstly, we cannot simply prove that the polynomials encoded by the two vectors are equal to determine Multiset Equality. Here are the reasons:\nIf the elements in the vectors are in a different order, the resulting polynomials will also differ. For example, consider:\n$$ \\vec{A} = [1, 2, 3], \\quad \\vec{B} = [3, 1, 2] $$\nConverting the vectors to polynomials by treating the elements as coefficients gives:\n$$ \\begin{aligned} A(X) \u0026amp;= 1 + 2X + 3X^2 \\ B(X) \u0026amp;= 3 + 1X + 2X^2 \\end{aligned} $$\nClearly, $A(X) \\neq B(X)$ because the coefficients of the polynomials differ.\nEven if the polynomials differ, they could represent the same multiset. For example, $A(X) \\neq B(X)$, i.e., $1 + 2X + 3X^2 \\neq 3 + X + 2X^2$. However, both polynomials represent the same multiset ${1, 2, 3}$.\nThis demonstrates Multiset Equality, even though the polynomials themselves are not equal.\nNote: Encoding vectors as polynomials is a mathematical technique to represent information about the elements and their positions. You don’t need to dive too deeply into this—it’s enough to understand that simply comparing polynomials is insufficient for proving Multiset Equality.\nHow to Prove Multiset Equality To prove Multiset Equality (unordered and with duplicates allowed), we essentially need to show that both vectors contain the same elements with the same multiplicities.\nThe most straightforward approach is to iterate over each element in one vector and verify that it exists in the other vector. However, this method has limitations:\nIt fails if the vectors contain duplicate elements.\nFor example, ${1, 1, 2}$ is a multiset that is not equal to ${1, 2, 2}$ or ${2, 1}$. A Direct Multiset Method Using Products One another simple solution is to compute the product of all elements in both vectors, then check if the two products are equal. However, this approach has a major limitation:\nVector elements must be prime numbers.\nFor example, $3 \\times 6 = 9 \\times 2$, but ${3, 6} \\neq {9, 2}$. A Better Approach: Compare the Root Sets of Polynomials Instead of relying on the product of elements, we compare the root sets of polynomials derived from the vectors.\nStep 1: Define the Root Set of a Polynomial Let ${q_i}$ be the root set of a polynomial $q(X)$. For any element $q_i$ in the vector, $q(q_i) = 0$. The polynomial $q(X)$ is defined as:\n$$ q(X) = (X - q_0)(X - q_1)(X - q_2) \\cdots (X - q_{n-1}). $$\nStep 2: Compare Root Sets If there exists another polynomial $p(X)$ such that $p(X) = q(X)$, then the root sets ${q_i}$ and ${p_i}$ must be identical. For example:\n$$ \\prod_{i}(X - q_i) = q(X) = p(X) = \\prod_{i}(X - p_i). $$\nStep 3: Multiset Equality If $p(X) = q(X)$, the two vectors satisfy Multiset Equality:\n$$ {q_i} =_{\\text{multiset}} {p_i}. $$\nWhy This Works Let’s break down why this method proves Multiset Equality:\nStep 1: Generate Polynomials\nEach vector is represented as a polynomial, with its elements encoded as the roots of the polynomial. This step encodes the elements without considering their order.\nStep 2: Compute Root Sets\nThe root set of each polynomial is determined. This step captures the relationship between the elements of the vector and their multiplicities, while ignoring their order.\nStep 3: Compare Root Sets\nIf the root sets are identical, the vectors satisfy Multiset Equality.\nUsing the Schwartz-Zippel Lemma for Verification To further verify Multiset Equality, we use the Schwartz-Zippel Lemma. Here’s the steps:\nThe Verifier sends the Prover a random number $\\gamma$.\nThe Prover computes and sends back the following product for both vectors:\n$$ \\prod_{{i \\in [n]}} (\\gamma - p_i) = \\prod_{{i \\in [n]}} (\\gamma - q_i). $$\nNotes:\n$\\prod$ denotes a product. $\\gamma$ is a random constant or variable. $p_i$ and $q_i$ are elements of the two vectors. $i \\in [n]$ means $i$ iterates from 1 to $n$. Key Points The equation $\\prod_{i}(X - q_i) = q(X) = p(X) = \\prod_{i}(X - p_i)$ ensures that the polynomials $p(X)$ and $q(X)$ are equivalent.\nThe equation $\\prod_{{i \\in [n]}} (\\gamma - p_i) = \\prod_{{i \\in [n]}} (\\gamma - q_i)$ ensures that the polynomials evaluate to the same value for the random challenge $\\gamma$.\nIf this holds, it confirms that the two vectors are Multiset Equality.\nAddressing Copy Constraints At this stage, we have demonstrated that the root sets ${p_i}$ and ${q_i}$ are Multiset Equality. This provides a foundation for verifying copy constraints. Specifically, we can ensure that the zero sets (roots) of $W(X)$ and $W\u0026rsquo;(X)$ contain the same elements.\nHowever, this alone is insufficient because it does not capture the exact correspondence between the roots, i.e., whether $p_i$ and $q_j$ align according to a predefined rule. To address this, we refer back to the Grand Product Argument to extend the proof and validate that the roots follow a specific permutation rule $\\sigma$.\nNotes: Two separate products can also be combined into a single product:\n$$ \\prod_{{i \\in [n]}} (\\gamma - p_i) = \\prod_{{i \\in [n]}} (\\gamma - q_i) $$\ncan be rewritten as:\n$$ \\prod_{{i \\in [n]}} \\frac{(\\gamma - p_i)}{(\\gamma - q_i)} = 1 $$\nWhy This Works:\nThe first equation states that the two products are equal. Each product is a polynomial evaluated at $\\gamma$, with roots ${p_i}$ and ${q_i}$, respectively. By moving the right-hand side to the left and combining via division, we form a single grand product: $$ \\frac{\\prod_{i \\in [n]} (\\gamma - p_i)}{\\prod_{i \\in [n]} (\\gamma - q_i)} = 1. $$\nUsing the properties of grand products, the combined equation simplifies to: $$ \\prod_{{i \\in [n]}} \\frac{(\\gamma - p_i)}{(\\gamma - q_i)} = 1 $$\nThis approach leverages the inherent properties of products to reduce the verification to a single product.\nNow that we understand how to prove Multiset Equality, the next step is to construct the Permutation Argument. This will allow us to implement the Copy Constraints required by the Plonk protocol.\nFrom Multiset Equality to Permutation Argument In general, constructing a permutation argument requires more than just proving Multiset Equality, as it cannot capture the exact ordering of elements. A grand product or product check is necessary to verify the specific permutation relationship between elements.\nStep 1: Multiset Equality As discussed earlier, the first step is to verify Multiset Equality between the roots $p_i$ and $q_i$, ensuring:\n$$ \\prod_{{i \\in [n]}} \\frac{(\\gamma - p_i)}{(\\gamma - q_i)} = 1 $$\nNote: The grand product method is a computational technique that can be applied multiple times.\nStep 2: Verifying Permutation Consistency Next, we need to verify whether $q_i = p(\\sigma(i))$, i.e., whether the elements of $q_i$ are a permutation of $p_i$ under a specific mapping $\\sigma$. This is typically done as follows:\nPermutation Polynomial Encoding:\nIn PLONK, a special permutation polynomial $\\sigma(X)$ is used to encode the permutation relationship, explicitly describing how $p_i$ maps to $q_i$.\nConsistency Check:\nTo verify the permutation consistency, the following relationship is checked: $p(X) = q(\\sigma(X))$,\nwhere $p(X)$ and $q(X)$ are the polynomials interpolated from $p_i$ and $q_i$, and $\\sigma(X)$ is the permutation polynomial.\nProduct Check:\nTo ensure the correctness of the permutation, a grand product check is used:\n$$ \\prod_{{i \\in [n]}} (\\gamma - p_i) = \\prod_{{i \\in [n]}} (\\gamma - q_{\\sigma(i)}) $$\nThe above product equation inherently captures both Multiset Equality and the specific permutation relationship.\nHowever, in some cases, Multiset Equality can be considered a special case of Permutation Argument. This is because Multiset Equality verifies that two sets are related by some permutation, without identifying the exact permutation. In other words, Multiset Equality ensures that the two vectors ${p_i}$ and ${q_i}$ are related by an unknown permutation.\nWhat we need, however, is a proof and verification of a known permutation relationship. This requires proving a specific, publicly defined reordering of an ordered vector, such as locally cyclic shifts within subsets.\nExample: Odd-Even Permutation Let’s consider an example where the Prover needs to prove that two vectors satisfy an odd-even swap permutation:\n$$ \\begin{aligned} \\vec{a} \u0026amp;= (a_0, a_1, a_2, a_3, \\ldots, a_{n-1}, a_n) \\ \\vec{b} \u0026amp;= (a_1, a_0, a_3, a_2, \\ldots, a_n, a_{n-1}) \\end{aligned} $$\nWe encode both vectors into polynomials $a(X)$ and $b(X)$, respectively. To describe the odd-even swap, we use a position vector $\\vec{i}$ and a permutation function $\\sigma$:\n$$ \\vec{i} = (0, 1, 2, 3, \\ldots, n-1, n), \\quad \\sigma = (1, 0, 3, 2, \\ldots, n, n-1). $$\nEach element $i$ in $\\vec{i}$ represents the initial position of an element. The permutation $\\sigma$ describes how the positions are rearranged. We then align the position vector $\\vec{i}$ with $\\vec{a}$ and $\\vec{b}$:\n$$ \\begin{array}{|c|c|c|c|} a_i \u0026amp; i \u0026amp; b_i \u0026amp; \\sigma(i) \\\\ \\hline a_0 \u0026amp; 0 \u0026amp; b_0 = a_1 \u0026amp; 1 \\\\ a_1 \u0026amp; 1 \u0026amp; b_1 = a_0 \u0026amp; 0 \\\\ a_2 \u0026amp; 2 \u0026amp; b_2 = a_3 \u0026amp; 3 \\\\ a_3 \u0026amp; 3 \u0026amp; b_3 = a_2 \u0026amp; 2 \\\\ \\vdots \u0026amp; \\vdots \u0026amp; \\vdots \u0026amp; \\vdots \\\\ a_{n-1} \u0026amp; n-1 \u0026amp; b_{n-1} = a_n \u0026amp; n \\\\ a_n \u0026amp; n \u0026amp; b_n = a_{n-1} \u0026amp; n-1 \\\\ \\end{array} $$\nNext, we fold the left two columns and the right two columns into paired elements. That is, represent $(a_i, i)$ as a single element and $(b_i, \\sigma(i))$ as another. The resulting table looks like this:\n$$ \\begin{array}{|c|c|} a\u0026rsquo;_i=(a_i, i) \u0026amp; b\u0026rsquo;_i=({b}_i, \\sigma(i)) \\\\ \\hline (a_0, 0) \u0026amp; (b_0=a_1, 1) \\\\ (a_1, 1) \u0026amp; (b_1=a_0, 0) \\\\ \\vdots \u0026amp; \\vdots \\\\ (a_{n-1}, n-1) \u0026amp; (b_{n-1}=a_{n}, n) \\\\ (a_n, n) \u0026amp; (b_n=a_{n-1}, n-1) \\\\ \\end{array} $$\nIf vectors $\\vec{a}$ and $\\vec{b}$ satisfy the permutation $\\sigma$, then the merged vectors $\\vec{a}\u0026rsquo;$ and $\\vec{b}\u0026rsquo;$ will satisfy Multiset Equality.\nWhy Odd-Even Permutation Can Be Reduced to Multiset Equality is because Odd-even Permutation can leverage Multiset Equality, as their defining property—swapping odd and even positions—depends only on the content of the set, not the exact details of the permutation:\nIf we only care about whether the permutation is an Odd-even Permutation, we focus on the consistency of the elements’ content (i.e., Multiset Equality). The odd-even nature describes a high-level property of the permutation without requiring verification of specific arrangements. Thus, verifying an odd-even permutation only requires proving Multiset Equality, without checking specific positional relationships. Handling Pairs with Folding One issue arises when the table’s left and right columns consist of pairs (e.g., $(a_i, i)$ and $(b_i, \\sigma{(i)})$ ). Such pairs cannot directly serve as roots of a univariate polynomial.\nTo resolve this, we apply a folding technique: ask the Verifier for a random number $\\beta$ and combine the pairs into single values:\n$$ \\begin{array}{|c|c|} a\u0026rsquo;_i=(a_i+\\beta\\cdot i) \u0026amp; b_i\u0026rsquo;=(b + \\beta\\cdot \\sigma(i)) \\\\ \\hline (a_0 + \\beta\\cdot 0) \u0026amp; (b_0 + \\beta\\cdot 1) \\\\ (a_1 + \\beta\\cdot 1) \u0026amp; (b_1 + \\beta\\cdot 0) \\\\ \\vdots \u0026amp; \\vdots \\\\ (a_{n-1} + \\beta\\cdot n-1) \u0026amp; (b_{n-1} + \\beta\\cdot n) \\\\ (a_n + \\beta\\cdot n) \u0026amp; (b_n + \\beta\\cdot (n-1))\\\\ \\end{array} $$\nThis transforms the paired elements into single values, enabling polynomial encoding.\nNote: In the third step of the diagram above, addition is used because it is the simplest operation. However, could other algorithms (such as multiplication, division, or more complex functions) be used instead? The answer is no, and the key reason is security. To ensure security, randomness must be introduced. If randomness is not included, the Prover could potentially construct a fraudulent proof that bypasses verification. By introducing a random challenge $\\beta$ from the Verifier, the Prover is forced to encode the pair $(a_i, i)$ securely into a single value as: $\\vec{a}\u0026rsquo;_ i = a_{i} + \\beta \\cdot {i}$.\nAfter folding, the Prover can now prove that $\\vec{a}\u0026rsquo;$ and $\\vec{b}\u0026rsquo;$ satisfy Multiset Equality, thereby proving that the original vectors $\\vec{a}$ and $\\vec{b}$ follow the specific permutation relationship.\nComplete Permutation Protocol Let’s describe the entire permutation protocol step by step:\nAssumptions Let $\\mathbb{F}_p$ be a finite field containing a multiplicative subgroup $H = \\{1, \\omega, \\omega^2, \\ldots, \\omega^{N-1}\\}$, where $\\omega$ is a generator of $H$. Inputs Public Inputs:\nThe permutation relationship $\\sigma$. Secret Inputs:\nTwo vectors $\\vec{a}$ and $\\vec{b}$ of length $N$. Preprocessing Prover and Verifier construct polynomials $[id(X)]$ and $[\\sigma(X)]$, where:\n$id(X)$ encodes the sequence $(0, 1, 2, \\ldots, N-1)$. $\\sigma(X)$ encodes the permutation ${\\sigma(0), \\sigma(1), \\ldots, \\sigma(N-1)}$. Note: [] presents commit, means the purpose of $[id(X)]$ and $[\\sigma(X)]$ are to allow Prover and Verifier can verify without disclosing the complete polynomial.\nProtocol Steps Prover Constructs and sends Polynomials:\nThe Prover computes and sends $[a(X)]$ and $[b(X)]$, encoding $\\vec{a}$ and $\\vec{b}$.\nVerifier’s Challenges:\nThe Verifier sends random challenges $\\beta \\leftarrow \\mathbb{F}_p$ and $\\gamma \\leftarrow \\mathbb{F}_p$.\nProver Computes Grand Product:\nThe Prover constructs an auxiliary vector $\\vec{z}$: $z_0 = 1, \\qquad z_{i+1} = \\prod_{i=0}^{N-1} \\frac{a_i + \\beta \\cdot i + \\gamma}{b_i + \\beta \\cdot \\sigma(i) + \\gamma}$\nand polynomial $z(X)$ satisfies:\n$$ L_0(X)\\cdot(z(X)-1)=0, \\qquad \\forall X\\in H $$\n$$ \\frac{z(\\omega\\cdot X)}{z(X)} = \\frac{a(X)+\\beta\\cdot id(X) + \\gamma}{b(X)+\\beta\\cdot \\sigma(X) + \\gamma}, \\qquad \\forall X\\in H $$\nThen, the Prover sends $[z(X)]$. Verifier’s Final Challenge:\nThe Verifier sends another random challenge $\\alpha \\leftarrow \\mathbb{F}_p$.\nProver Constructs Final Polynomials:\nThe Prover constructs:\nA combined constraint polynomial $f(X)$. A quotient polynomial $h(X)$, satisfying: $f(X)= L_0(X)(z(X)-1) + \\alpha\\cdot \\big(z(\\omega\\cdot X)(b(X)+\\beta\\cdot\\sigma(X)+\\gamma)-z(X)(a(X)+\\beta\\cdot id(X)+\\gamma)\\big)$\n$h(X) = \\frac{f(X)}{z_H(X)}$\nThe Prover sends $[h(X)]$.\nVerifier Checks Consistency:\nThe Verifier queries evaluations of $[a(X)]$, $[b(X)]$, $[z(X)]$, $[h(X)]$, $[\\sigma(X)]$, and $[id(X)]$ at specific points and checks the following equation:\nQuery the values ​​of the three polynomials $[a(X)],[b(X)],[h(X)]$ at $X=\\zeta$ to get $a(\\zeta)$, $b(\\zeta)$, $h(\\zeta)$; Query the values ​​of the two positions $X=\\zeta and X=\\omega\\cdot\\zeta$ at $[z(X)]$ to get $z(\\zeta)$ and $z(\\omega\\cdot\\zeta)$; Send the evaluation query $X=\\zeta$ to the two polynomials $[\\sigma(X)]$ and $[id(X)]$ to get $id(\\zeta)$ and $\\sigma(\\zeta)$; Verifier calculates the value of Vanishing Polynomial $z_H(\\zeta)$ at $X=\\zeta$ by itself, and compares it with Lagrange Polynomial $L_0(X)$ at $X=\\zeta$ takes the value $L_0(\\zeta)$ Final verification: According to values of polynomials, verify the constraint below:\n$L_0(\\zeta)(z(\\zeta)-1) + \\alpha\\cdot (z(\\omega\\cdot \\zeta)(b(\\zeta)+\\beta\\cdot\\sigma(\\zeta)+\\gamma)-z(\\zeta)(a(\\zeta)+\\beta\\cdot id(\\zeta)+\\gamma)) \\overset{?}{=} h(\\zeta)z_H(\\zeta)$\nNote: this constraint we had already known initially.\nSummary The core of the Permutation Argument lies in Multiset Equality Argument, which is extended by incorporating Grand Product Argument to handle specific mappings and permutations. By introducing random challenges, the protocol ensures correctness and prevents malicious behavior. This forms the foundation for implementing copy constraints in the Plonk protocol.\nReferences: [WIP] Copy constraint for arbitrary number of wires. https://hackmd.io/CfFCbA0TTJ6X08vHg0-9_g Alin Tomescu. Feist-Khovratovich technique for computing KZG proofs fast. https://alinush.github.io/2021/06/17/Feist-Khovratovich-technique-for-computing-KZG-proofs-fast.html#fn:FK20 Ariel Gabizon. Multiset checks in PLONK and Plookup. https://hackmd.io/@arielg/ByFgSDA7D ","permalink":"/posts/3-permutation/","summary":"\u003cp\u003ePlonkish circuit encoding uses two matrices, $(Q, \\sigma)$, to describe the circuit\u0026rsquo;s scaffold, where $Q$ represents the operation selectors and $\\sigma$ represents permutation constraints. These constraints enforce that certain positions in the $W$ matrix must hold identical values. This article focuses on explaining the principles of the \u003cstrong\u003epermutation argument\u003c/strong\u003e.\u003c/p\u003e\n\u003c/br\u003e\n\u003ch2 id=\"reviewing-copy-constraints\"\u003eReviewing Copy Constraints\u003c/h2\u003e\n\u003cp\u003eThe permutation $\\sigma$ represents the relationship between positions before and after rearrangement. But what does $\\sigma$ actually look like?\u003c/p\u003e","title":"Understanding PLONK (Part 3): Permutation Argument"},{"content":"Recap of Permutation Argument In the previous section, we discussed how the Prover proves that two vectors $\\vec{a}$ and $\\vec{b}$ of length $n$ satisfy a pre-defined (public) permutation relationship $\\sigma(\\cdot)$, i.e.,\n$$ a_i = b_{\\sigma(i)}. $$\nThe basic idea involves requesting a random challenge $\\beta$ from the Verifier, combining the \u0026ldquo;original vectors\u0026rdquo; ($\\vec{a}$ and $\\vec{b}$) with their \u0026ldquo;position vectors\u0026rdquo; ($\\vec{i}$ and $\\sigma$), and generating two new vectors, denoted as $\\vec{a}\u0026rsquo;$ and $\\vec{b}\u0026rsquo;$:\n$$ a\u0026rsquo;_i = a_i + \\beta \\cdot i, \\qquad b\u0026rsquo;_i = b_i + \\beta \\cdot \\sigma(i) $$\nThe second step involves requesting another random challenge $\\gamma$ from the Verifier to encode the multisets of $\\vec{a}\u0026rsquo;$ and $\\vec{b}\u0026rsquo;$ through a product, resulting in $A$ and $B$:\n$$ A = \\prod(a\u0026rsquo;_i + \\gamma), \\qquad B = \\prod(b\u0026rsquo;_i + \\gamma) $$\nThe third step asks the Prover to prove that $A/B = 1$, i.e.,\n$$ \\prod_i \\frac{(a\u0026rsquo;_i + \\gamma)}{(b\u0026rsquo;_i + \\gamma)} = 1 $$\nTo prove this product, we introduce an auxiliary vector $\\vec{z}$ that records the intermediate results of the product computation:\n$$ z_0 = 1, \\qquad z_{i+1} = z_i \\cdot \\frac{(a\u0026rsquo;_i + \\gamma)}{(b\u0026rsquo;_i + \\gamma)} $$\nSince $z_n = \\prod \\frac{a\u0026rsquo;_i + \\gamma}{b\u0026rsquo;_i + \\gamma} = 1$, and $\\omega^n = 1$, we can encode $\\vec{z}$ using $z(X)$ and transform the Permutation Argument into a relationship involving $z(X)$, $a(X)$, and $b(X)$.\nFinally, the Verifier sends a challenge $\\zeta$ and queries $z(\\zeta)$, $z(\\omega \\cdot \\zeta)$, $a(\\zeta)$, and $b(\\zeta)$. The Verifier then checks the relationships between these values.\nNote: At this stage, we are only proving the existence of Multiset Equality. This means that $\\vec{a}$ and $\\vec{b}$ must contain the same elements, with the same multiplicities, without considering their specific positions or order.\nCopy Constraints Within a Single Vector Copy constraints are conditions that require certain elements in a vector to be equal at multiple positions. Let’s start with a simple example:\n$$ \\vec{a} = (a_0, a_1, a_2, a_3) $$\nAssume we want the Prover to prove that $a_0 = a_2$. This can be achieved by swapping the positions of $a_0$ and $a_2$, forming a permutation relationship. If we use $(0, 1, 2, 3)$ to record the original positions of the elements, the new position vector after permutation is denoted as $\\sigma$, and the permuted vector is $\\vec{a}_\\sigma$:\n$$ \\sigma = (2, 1, 0, 3), \\quad \\vec{a}_\\sigma = (a_2, a_1, a_0, a_3). $$\nClearly, as long as the Prover can prove that the original vector and the permuted vector are identical ($\\vec{a} = \\vec{a}_\\sigma$), we can conclude that $a_0 = a_2$.\nThis method can be extended to prove that multiple elements in a vector are equal. For example, to prove that the first three elements of $\\vec{a}$ are equal, we construct a permutation by cyclically shifting these three elements to the right:\n$$ \\sigma = (2, 0, 1, 3), \\quad \\vec{a}_\\sigma = (a_2, a_0, a_1, a_3). $$\nFrom $\\vec{a} = \\vec{a}_\\sigma$, it is straightforward to conclude that $a_0 = a_1 = a_2$.\nCopy Constraints Across Multiple Vectors In the PLONK protocol, copy constraints often span multiple columns in the $W$ table. Since the protocol requires the Prover to encode each column into a polynomial, we need to extend the permutation argument to support equivalence between elements across multiple vectors.\nFor example, consider the $W$ table for the circuit below:\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; w_a \u0026amp; w_b \u0026amp; w_c \\\\ \\hline 0 \u0026amp; 0 \u0026amp; 0 \u0026amp; {\\color{green}out} \\\\ 1 \u0026amp; {\\color{red}x_5} \u0026amp; {\\color{blue}x_6} \u0026amp; {\\color{green}out} \\\\ 2 \u0026amp; x_1 \u0026amp; x_2 \u0026amp; {\\color{red}x_5} \\\\ 3 \u0026amp; x_3 \u0026amp; x_4 \u0026amp; {\\color{blue}x_6} \\\\ \\end{array} $$\nwe need:\n$w_{a,1} = w_{c,2}$ $w_{b,1} = w_{c,3}$ $w_{c,0} = w_{c,1}$ To support cross-vector permutations, we introduce global unique identifiers for elements across vectors. For instance, the three columns of $W$ are assigned unique position identifiers:\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; id_{a,i} \u0026amp; id_{b,i} \u0026amp; id_{c,i} \\\\ \\hline 0 \u0026amp; 0 \u0026amp; 4 \u0026amp; {\\color{green}8} \\\\ 1 \u0026amp; {\\color{red}5} \u0026amp; {\\color{blue}1} \u0026amp; {\\color{green}9} \\\\ 2 \u0026amp; 2 \u0026amp; 6 \u0026amp; {\\color{red}11} \\\\ 3 \u0026amp; 3 \u0026amp; 7 \u0026amp; {\\color{blue}10} \\\\ \\end{array} $$\nNote: $id_{x,i}$ is a globally unique identifier for each element, used to unify cross-vector permutation relationships. These identifiers are assigned sequentially, starting from $0$.\nThe permuted vectors $\\sigma_a$, $\\sigma_b$, and $\\sigma_c$ are:\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; \\sigma_{a,i} \u0026amp; \\sigma_{b,i} \u0026amp; \\sigma_{c,i} \\\\ \\hline 0 \u0026amp; 0 \u0026amp; 4 \u0026amp; {\\color{green}9} \\\\ 1 \u0026amp; {\\color{red}11} \u0026amp; {\\color{blue}10} \u0026amp; {\\color{green}8} \\\\ 2 \u0026amp; 2 \u0026amp; 6 \u0026amp; {\\color{red}5} \\\\ 3 \u0026amp; 3 \u0026amp; 7 \u0026amp; {\\color{blue}1} \\\\ \\end{array} $$\nThe Prover combines vectors $(\\vec{w}_a, \\vec{id_a})$, $(\\vec{w}_b, \\vec{id_b})$, $(\\vec{w}_c, \\vec{id_c})$, and their permuted counterparts $(\\vec{w}\u0026rsquo;_a, \\sigma_a)$, $(\\vec{w}\u0026rsquo;_b, \\sigma_b)$, $(\\vec{w}\u0026rsquo;_c, \\sigma_c)$ using a random challenge $\\beta$ (provided by the Verifier). Then, using another random challenge $\\gamma$, the Prover computes the multisets $W$ and $W\u0026rsquo;$, denoted as $f_i$ and $g_i$:\n$$ \\begin{split} f_i \u0026amp;= (w_{a,i}+\\beta\\cdot id_{a,i}+\\gamma)(w_{b,i}+\\beta\\cdot id_{b,i}+\\gamma)(w_{c,i}+\\beta\\cdot id_{c,i}+\\gamma) \\\\ g_i \u0026amp;= (w\u0026rsquo;_{a,i}+\\beta\\cdot \\sigma_{a,i}+\\gamma)(w\u0026rsquo;_{b,i}+\\beta\\cdot \\sigma_{b,i}+\\gamma)(w\u0026rsquo;_{c,i}+\\beta\\cdot \\sigma_{c,i}+\\gamma) \\end{split} $$\nSince the copy constraint requires the permuted vectors to be equal to the original ones, we have $w_a = w\u0026rsquo;_a$, $w_b = w\u0026rsquo;_b$, and $w_c = w\u0026rsquo;_c$.\nIf we encode $\\vec{w}_a,\\vec{w}_b,\\vec{w}_c,\\vec{id}_a,\\vec{id}_b,\\vec{id}_c,\\sigma_a, \\sigma_b, \\sigma_c$ into polynomials, we will get $w_a(X),w_b(X), w_c(X), id_a(X),id_b(X),id_c(X),\\sigma_a(X),\\sigma_b(X),\\sigma_c(X)$. So $f(X)$, $g(X)$ will satisfy the following constraint relationships:\n$$ \\begin{aligned} f(X) \u0026amp;= \\Big(w_a(X) + \\beta \\cdot id_a(X) + \\gamma\\Big)\\Big(w_b(X) + \\beta \\cdot id_b(X) + \\gamma\\Big)\\Big(w_c(X) + \\beta \\cdot id_c(X) + \\gamma\\Big), \\ g(X) \u0026amp;= \\Big(w_a(X) + \\beta \\cdot \\sigma_a(X) + \\gamma\\Big)\\Big(w_b(X) + \\beta \\cdot \\sigma_b(X) + \\gamma\\Big)\\Big(w_c(X) + \\beta \\cdot \\sigma_c(X) + \\gamma\\Big). \\end{aligned} $$\nIf the two multisets are equal, i.e., $f(X)$ and $g(X)$ satisfy Multiset Equality, then:\n$$ \\prod_{X \\in H} f(X) = \\prod_{X \\in H} g(X) $$\nNote: If two multisets are equal, their product is invariant to the order of elements due to the commutative and associative properties of multiplication. For instance, if ${f_i} = {2,3,2}$, ${g_i} = {3,2,2}$, then $\\prod{f_i}=2 \\times 3 \\times 2 =12$; $\\prod{g_i}=3 \\times 2 \\times 2 =12$, so their products are the same.\nConstructing the Accumulator Vector If the equation above is slightly deformed, we can get:\n$$ \\prod_{X\\in H}\\frac{f(X)}{g(X)} = 1 $$\nWe define an auxiliary accumulator vector $\\vec{z}$ to represent the intermediate results of the product computation:\n$$ z_0 = 1, \\qquad z_{i+1} = z_i \\cdot \\frac{f_i}{g_i} $$\nWhere, the initial value of $z_0$ is $1$ and Prover computes $\\vec{z}$ as follows:\n$$ \\begin{array}{|c|c|c|} i \u0026amp; H_i \u0026amp; z_i \\\\ \\hline 0 \u0026amp; \\omega^0 = 1 \u0026amp; 1 \\\\ 1 \u0026amp; \\omega^1 \u0026amp; 1 \\cdot \\frac{f_0}{g_0} \\\\ 2 \u0026amp; \\omega^2 \u0026amp; \\frac{f_0}{g_0} \\cdot \\frac{f_1}{g_1} \\\\ 3 \u0026amp; \\omega^3 \u0026amp; \\frac{f_0 f_1}{g_0 g_1} \\cdot \\frac{f_2}{g_2} \\\\ \\vdots \u0026amp; \\vdots \u0026amp; \\vdots \\ n-1 \u0026amp; \\omega^{n-1} \u0026amp; \\frac{f_0 f_1 \\cdots f_{n-3}}{g_0 g_1 \\cdots g_{n-3}} \\cdot \\frac{f_{n-2}}{g_{n-2}} \\\\ n \u0026amp; \\omega^n = 1 \u0026amp; \\frac{f_0 f_1 \\cdots f_{n-1}}{g_0 g_1 \\cdots g_{n-1}} = 1 \\\\ \\end{array} $$\nNote: $H_i$ in the above table represents the point set on a certain finite field $\\mathbb{F}$, which are the \u0026ldquo;evaluation points\u0026rdquo; of polynomials $f(X)$ and $g(X)$. More specifically, the sampling points used in the discrete Fourier transform (DFT) over a finite field. These points are usually raised to the power of some $n$ unit root, that is, the value of $\\omega^i$, where $\\omega$ is an $n$ unit root. $H_i=\\omega^i$\nIn the table, $z_i$ is the recursive product calculated from the values ​​of $f(X)$ and $g(X)$ at point $H_i=\\omega^i$. For example:\n$z_1 = z_0 \\times \\frac{f_0}{g_0} = 1 \\times \\frac{f_0}{g_0}$; $z_2 = z_1 \\times \\frac{f_1}{g_1} = \\frac{f_0}{g_0} \\times \\frac{f_1}{g_1}$\nAnd so on until $z_n = \\frac{{f_0}{f_1} \\ldots {f_{n-1}}}{{g_0}{g_1} \\dots {g_{n-1}}}$\nFinally, $z_n =1$ in the table is verified by the cumulative relationship of all points on $H$.\nIf $\\vec{f}$ can be equal to $\\vec{g}$ by product multiplication, then the last row $z_{n}$ is exactly equal to $1$, that is:\n$$ z_n = z_0 = 1. $$\nSince $\\omega^{n} = 1$, which just allows us to completely encode $(z_0, z_1, z_2, \\ldots, z_{n-1})$ on the multiplicative subgroup $H$. Therefore, if it satisfies the following two polynomial constraints, we can derive $z_{n} = 1$ based on mathematical induction, which is the \u0026ldquo;copy constraint\u0026rdquo; we ultimately want:\n$$ z(\\omega^0) = 1, \\quad z(\\omega \\cdot X)g(X) = z(X)f(X). $$\nPermutation Relation $\\sigma$ Before constructing copy constraints, the permutation relation $\\sigma$ must be agreed upon and made public. The $W$ table contains all the inputs and outputs of arithmetic gates, but it does not describe whether the gates are connected by wires. The permutation relation $\\sigma$ serves to supplement this information by describing which arithmetic gates are connected.\nThus, for a circuit in an \u0026ldquo;unwired state,\u0026rdquo; it can be described using two tables: $(Q, \\sigma)$, where $Q$ consists of selector vectors, and $\\sigma$ consists of \u0026ldquo;permutation vectors.\u0026rdquo;\nBelow is the $Q$ table:\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; q_L \u0026amp; q_R \u0026amp; q_M \u0026amp; q_C \u0026amp; q_O \\\\ \\hline 0 \u0026amp; 0 \u0026amp; 0 \u0026amp; 0 \u0026amp; 99 \u0026amp; 1 \\\\ 1 \u0026amp; 0 \u0026amp; 0 \u0026amp; 1 \u0026amp; 0 \u0026amp; 1 \\\\ 2 \u0026amp; 1 \u0026amp; 1 \u0026amp; 0 \u0026amp; 0 \u0026amp; 1 \\\\ 3 \u0026amp; 0 \u0026amp; 0 \u0026amp; 1 \u0026amp; 0 \u0026amp; 1 \\\\ \\end{array} $$\nBelow is the $S$ table, which describes the positions where permutations occur:\n$$ \\begin{array}{c|c|c|c|} i \u0026amp; \\sigma_{a,i} \u0026amp; \\sigma_{b,i} \u0026amp; \\sigma_{c,i} \\\\ \\hline 0 \u0026amp; 0 \u0026amp; 4 \u0026amp; [9] \\\\ 1 \u0026amp; \\boxed{11} \u0026amp; \\underline{10} \u0026amp; [8] \\\\ 2 \u0026amp; 2 \u0026amp; 6 \u0026amp; \\boxed{5} \\\\ 3 \u0026amp; 3 \u0026amp; 7 \u0026amp; \\underline{1} \\\\ \\end{array} $$\nHandling Public Inputs For the simple circuit example above, suppose we want to prove the existence of an assignment such that the output value out equals a specific public value, e.g., $out = 99$. The simplest way to achieve this is to use the $q_C$ column in the $Q$ table and add a constraint row where $q_L = q_R = q_M = 0$. This satisfies the following equation:\n$$ q_C(X) - q_O(X)w_c(X) = 0 $$\nThe Problem with Fixed Public Inputs The issue with this approach is that these public values (i.e., input and output values) are hardcoded as constants. If the public value changes, the polynomial $q_C(X)$ must be recalculated. If the $W$ table has a large number of rows, this recalculation process can lead to significant performance overhead.\nIntroducing Parameters for Public Inputs To address this, we can introduce a parameter in the table to distinguish constant columns in the circuit. This parameter should allow changes to the public input values without affecting other parts of the circuit. To achieve this, we add a new column specifically for storing public parameters, denoted as $\\phi$. With this addition, the arithmetic constraint becomes:\n$$ q_L(X)w_a(X) + q_R(X)w_b(X) + q_M(X)w_a(X)w_b(X) - q_O(X)w_c(X) + q_C(X) + \\phi(X) = 0 $$\nWe can also introduce public parameters by modifying the copy constraints.\n[!TODO]\nOptimizing Position Vectors When constructing the three $\\sigma$ vectors, we previously used natural numbers $(0, 1, 2, \\cdots)$. This approach requires the Verifier to construct three polynomials ${id_a}(X)$, ${id_b}(X)$, and ${id_c}(X)$ before the protocol begins, and to query the Oracle in the final step to obtain the evaluations of these polynomials at the challenge point $X = \\zeta$, i.e., $({id_a}(\\zeta), {id_b}(\\zeta), {id_c}(\\zeta))$.\nSimplifying $\\sigma$ Using Non-Natural Identifiers Instead of using sequential natural numbers $(0, 1, 2, \\cdots)$, the $\\sigma$ vectors can be simplified by assigning unique, non-overlapping values for identifiers. For instance, if we use $H = (1, \\omega, \\omega^2, \\cdots)$ (a multiplicative subgroup), the polynomials ${id_a}(X)$, ${id_b}(X)$, and ${id_c}(X)$ can be simplified as follows:\n$$ \\begin{aligned} \\vec{id}_a \u0026amp;= (1, \\omega, \\omega^2, \\omega^3) \\ \\vec{id}_b \u0026amp;= (k_1, k_1 \\omega, k_1 \\omega^2, k_1 \\omega^3) \\ \\vec{id}_c \u0026amp;= (k_2, k_2 \\omega, k_2 \\omega^2, k_2 \\omega^3) \\end{aligned} $$\nwhere $k_i$ are distinct quadratic non-residues.\nNote:\nQuadratic Residue: Given an odd prime $p$, an integer $a$ is a quadratic residue modulo $p$ if there exists an integer $x$ such that: $x^2 \\equiv a \\pmod{p}$. In other words, $a$ is a quadratic residue if it is the square of some number modulo $p$.\nQuadratic Non-Residue: If no such $x$ exists, $a$ is a quadratic non-residue modulo $p$.\nFor $k_1$ and $k_2$, we select distinct values from the set of quadratic non-residues, ensuring $k_1 \\neq k_2$. For more details, refer to Plonk Course - Lecture 4 - Arithmetic Constraints and Copy Constraints.\nSimplified Polynomials Using the above identifiers, the polynomials become:\n$$ id_a(X) = X, \\quad id_b(X) = k_1 \\cdot X, \\quad id_c(X) = k_2 \\cdot X. $$\nThis drastically simplifies the construction of these polynomials, as well as their evaluation at $X = \\zeta$. The Verifier can directly compute these values without additional complexity.\nThis optimization skill was first proposed by Vitalik. The use of $k_1$ and $k_2$ is intended to generate cosets of $(1, \\omega, \\omega^2, \\omega^3)$ while ensuring that the cosets do not overlap. As mentioned earlier, $H = (1, \\omega, \\omega^2, \\omega^3)$ is a multiplicative subgroup of $\\mathbb{F}$. The cosets of $H$ are $H_1$ and $H_2$. If $H_1 = k_1 \\cdot H$ and $H_2 = k_2 \\cdot H$ have a non-empty intersection, then $H_1 = H_2$.\nThis statement can be proven as follows:\nIf they have an intersection, then $k_1 \\omega^i = k_2 \\omega^j$, which implies $k_1 = k_2 \\cdot \\omega^{j-i}$. Since $\\omega^{j-i} \\in H$, it follows that $k_1 \\in H_2$. Therefore, $\\forall i \\in [n], k_1 \\cdot \\omega^i \\in H_2$, which implies $H_1 \\subseteq H_2$. Similarly, it can be shown that $H_2 \\subseteq H_1$, so $H_1 = H_2$.\nNote:\nIn other words, we have two sets: $H_1 = k_1 \\cdot H$ and $H_2 = k_2 \\cdot H$. Suppose $H_1$ and $H_2$ share at least one element, such as $k_1 \\cdot \\omega^i = k_2 \\cdot \\omega^j$.\nWe can rewrite this equation as $k_1 = k_2 \\cdot \\omega^{j-i}$. Since $\\omega^{j-i}$ is an element of $H$, and $H_2 = k_2 \\cdot H$, it follows from $k_1 = k_2 \\cdot \\omega^{j-i}$ that $k_1$ is an element of $H_2$, i.e., $k_1 \\in H_2$.\nThe statement $\\forall i \\in [n], k_1 \\cdot \\omega^i \\in H_2$ means that for every $i$ in the set $[n]$ (the set of integers from 0 to $n-1$), $k_1 \\cdot \\omega^i$ is an element of $H_2$. This implies $H_1 \\subseteq H_2$ because:\n$H_1 = {k_1 \\cdot \\omega^0, k_1 \\cdot \\omega^1, \\cdots, k_1 \\cdot \\omega^{n-1}}$, which is the set obtained by multiplying $k_1$ with all powers of $\\omega$. Since $\\forall i \\in [n], k_1 \\cdot \\omega^i \\in H_2$, all elements of $H_1$ are contained in $H_2$. Thus, if every element of $H_1$ belongs to $H_2$, $H_1$ is a subset of $H_2$. Similarly, it can be shown that $H_2$ is a subset of $H_1$, and therefore, $H_1 = H_2$. If the number of columns in $\\sigma$ increases, we need to select multiple $k_1, k_2, k_3, \\ldots$ such that $(k_i / k_j)^n \\neq 1$ to generate disjoint cosets. A straightforward way to achieve this is to select $k_1, k_2, k_3, \\ldots = g^1, g^2, g^3, \\ldots$, where $g$ is the generator of the multiplicative subgroup $T$, and $|T| \\cdot 2^\\lambda = p-1$.\nProtocol Framework [] represents a commitment. The Verifier only knows the encrypted or hashed value $[z(X)]$, without knowing the actual content of $z(X)$ (this will be explained in the next section). $\\phi(X)$ represents public inputs and outputs, which are known to both the Verifier and Prover. During the verification process, the Verifier uses these public values to ensure the correctness of the Prover\u0026rsquo;s proof. preprocessing phase\nThe Prover and Verifier construct the commitments, including $[q_L(X)]$, $[q_R(X)]$, $[q_O(X)]$, $[q_M(X)]$, $[q_C(X)]$, $[{\\sigma_a}(X)]$, $[{\\sigma_b}(X)]$, $[{\\sigma_c}(X)]$\nStep 1:\nThe Prover constructs $[w_a(X)]$, $[w_b(X)]$, $[w_c(X)]$, and $\\phi(X)$ for each column of the $W$ table such that:\n$$ q_L(X)w_a(X)+q_R(X)w_b(X)+ q_M(X)w_a(X)w_b(X) - q_O(X)w_c(X)+q_C(X) + \\phi(X) = 0 $$\nStep 2:\nThe Verifier sends random challenges $\\beta$ and $\\gamma$.\nStep 3:\nThe Prover constructs $[z(X)]$ such that:\n$$ \\begin{split} L_0(X)(z(X)-1) \u0026amp;= 0 \\\\ z(\\omega\\cdot X)g(X) - z(X)f(X) \u0026amp;= 0 \\end{split} $$\nStep 4:\nThe Verifier sends another random challenge $\\alpha$.\nStep 5:\nThe Prover calculates $h(X)$ and constructs the quotient polynomial $[t(X)]$ such that:\n$$ \\begin{split} h(X) = \u0026amp;\\ q_L(X)w_a(X)+q_R(X)w_b(X)+ q_M(X)w_a(X)w_b(X) - q_O(X)w_c(X)+q_C(X) + \\phi(X) \\\\ \u0026amp; + \\alpha(z(\\omega X)\\cdot g(X)-z(X)\\cdot f(X)) + \\alpha^2(L_0(X)\\cdot(z(X)-1)) \\end{split} $$\nWhere:\n$$ \\begin{split} f(X)\u0026amp;=\\Big(w_a(X)+\\beta\\cdot {id_a}(X)+\\gamma\\Big)\\Big(w_b(X)+\\beta\\cdot {id_b}(X)+\\gamma\\Big)\\Big(w_c(X)+\\beta\\cdot {id_c}(X)+\\gamma\\Big)\\\\ g(X)\u0026amp;=\\Big(w_a(X)+\\beta\\cdot {\\sigma_a}(X)+\\gamma\\Big)\\Big(w_b(X)+\\beta\\cdot {\\sigma_b}(X)+\\gamma\\Big)\\Big(w_c(X)+\\beta\\cdot {\\sigma_c}(X)+\\gamma\\Big)\\\\ \\end{split} $$\nThe quotient polynomial $t(X)$ is defined as: $t(X) = \\frac{h(X)}{z_H(X)}$\nStep 6:\nThe Verifier sends a final random challenge $\\zeta$ and queries the following values from the oracles:\n$\\bar{w}_a=w_a(\\zeta)$， $\\bar{w}_b=w_b(\\zeta)$， $\\bar{w}_c=w_c(\\zeta)$ $\\bar{q}_L=q_L(\\zeta)$， $\\bar{q}_R=q_R(\\zeta)$， $\\bar{q}_M=q_M(\\zeta)$， $\\bar{q}_O=q_O(\\zeta)$， $\\bar{q}_C=q_C(\\zeta)$ $\\bar{\\sigma}_a=\\sigma_a(\\zeta)$， $\\bar{\\sigma}_b=\\sigma_b(\\zeta)$， $\\bar{\\sigma}_c=\\sigma_c(\\zeta)$ $\\bar{z}_{(\\omega\\cdot\\zeta)}=z(\\omega\\cdot\\zeta)$， $\\bar{z}_{(\\zeta)}=z(\\zeta)$ $\\bar{t}=t(\\zeta)$ The Verifier also computes the following values:\n$\\bar{f}_{(\\zeta)} = (\\bar{w}_a + \\beta \\cdot \\zeta + \\gamma)(\\bar{w}_b + \\beta \\cdot k_1 \\cdot \\zeta + \\gamma)(\\bar{w}_c + \\beta \\cdot k_2 \\cdot \\zeta + \\gamma)$ $\\bar{g}_{(\\zeta)} = (\\bar{w}_a + \\beta \\cdot \\bar{\\sigma}_a + \\gamma)(\\bar{w}_b + \\beta \\cdot \\bar{\\sigma}_b + \\gamma)(\\bar{w}_c + \\beta \\cdot \\bar{\\sigma}_c + \\gamma)$ $L_0(\\zeta)$ $z_H(\\zeta)$ $\\phi(\\zeta)$ Verification Step\nThe Verifier checks the following equation:\n$$ \\begin{split} \u0026amp; \\bar{q}_L\\bar{w}_a+\\bar{q}_R\\bar{w}_b+ \\bar{q}_M\\bar{w}_a\\bar{w}_b - \\bar{q}_O\\bar{w}_c+\\bar{q}_C + \\phi(\\zeta) + \\alpha(\\bar{z}_{(\\omega\\cdot\\zeta)}\\cdot \\bar{g}_{(\\zeta)}-\\bar{z}_{(\\zeta)}\\cdot \\bar{f}_{(\\zeta)})+ \\alpha^2(L_0(\\zeta)\\cdot(\\bar{z}_{(\\zeta)}-1))\\overset{?}{=}\\bar{t}\\cdot z_H(\\zeta) \\end{split} $$\nIf the equation holds, the proof is accepted; otherwise, it is rejected.\n","permalink":"/posts/4-constraints/","summary":"\u003ch2 id=\"recap-of-permutation-argument\"\u003eRecap of Permutation Argument\u003c/h2\u003e\n\u003cp\u003eIn the previous section, we discussed how the Prover proves that two vectors $\\vec{a}$ and $\\vec{b}$ of length $n$ satisfy a pre-defined (public) permutation relationship $\\sigma(\\cdot)$, i.e.,\u003c/p\u003e\n\u003cp\u003e$$\na_i = b_{\\sigma(i)}.\n$$\u003c/p\u003e\n\u003cp\u003eThe basic idea involves requesting a random challenge $\\beta$ from the Verifier, combining the \u0026ldquo;original vectors\u0026rdquo; ($\\vec{a}$ and $\\vec{b}$) with their \u0026ldquo;position vectors\u0026rdquo; ($\\vec{i}$ and $\\sigma$), and generating two new vectors, denoted as $\\vec{a}\u0026rsquo;$ and $\\vec{b}\u0026rsquo;$:\u003c/p\u003e","title":"Understanding PLONK (Part 4): Arithmetic Constraints and Copy Constraints"},{"content":"What is a Polynomial Commitment? A commitment is a way to \u0026ldquo;lock\u0026rdquo; a message, resulting in a commitment value. This value is referred to as the commitment to the object.\n$$ c = commit(x) $$\nThis commitment satisfies two essential properties: Hiding and Binding.\nHiding: $c$ does not reveal any information about $x$. Binding: It is computationally infeasible to find some $x\u0026rsquo; \\neq x$ such that $c = commit(x\u0026rsquo;)$. The simplest commitment mechanism is a hash function. Note that such a hash function must provide cryptographic security, such as SHA256 or Keccak. Besides hash functions, there are also schemes like Pedersen commitments.\nAs the name suggests, a polynomial commitment is a commitment to a polynomial. If we express a polynomial in the following form:\n$$ f(X) = a_0 + a_1X + a_2X^2 + \\cdots + a_nX^n $$\nIt can be uniquely identified by its coefficient vector:\n$$ (a_0, a_1, a_2, \\ldots, a_n) $$\nHow to Commit to a Polynomial?\nFirst method: Hash the coefficient vector to get a unique value that binds the commitment to the polynomial.\n$$ C_1 = \\textrm{SHA256}(a_0 \\parallel a_1 \\parallel a_2 \\parallel \\cdots \\parallel a_n) $$\nFor example, consider a polynomial $f(x) = 3 + 4x + 5x^2$. Its coefficient vector is $[3, 4, 5]$. Convert this vector into a string and concatenate the coefficients: \u0026quot;3\\parallel 4\\parallel 5\u0026quot;. Then, hash this string using SHA256. Suppose the hash output is:\na1f4d3b3c6e4b7d5d6e4f5c6a7b8c9d0e1f2a3b4c5d6e7f8g9h0i1j2k3l4m5n6o7p8q9r0\nThis hash value uniquely represents the polynomial $f(x) = 3 + 4x + 5x^2$.\nSecond method: Use Pedersen commitments. Compute an elliptic curve point using a set of randomly chosen bases:\n$$ C_2 = a_0 G_0 + a_1 G_1 + \\cdots + a_n G_n $$\nIf the Prover commits to a polynomial, the Verifier can evaluate the polynomial based on the commitment and request proof of the correctness of the evaluation. Suppose $C = Commit(f(X))$. The Verifier may query the Prover for the value of the polynomial at $X = \\zeta$. The Prover then provides not only the computed value (e.g., $f(\\zeta) = y$) but also a proof $\\pi$ to demonstrate that $C$ corresponds to a polynomial $f(X)$ whose value at $X = \\zeta$ is indeed $y$.\nThis property of \u0026ldquo;evaluating with proof\u0026rdquo; makes polynomial commitments highly useful. It can be seen as a lightweight form of verifiable computation. That is, the Verifier delegates the computation of the polynomial $f(X)$ to a remote machine (the Prover) and verifies the correctness of the result $y$ with less computational effort than directly computing $f(X)$. Polynomial commitments can also be used to prove properties of secret data (provided by the Prover), such as satisfying a polynomial equation, without revealing the data itself.\nAlthough this verifiable computation is limited to polynomial operations, general-purpose computation can be reduced to polynomial computation in various ways, enabling general-purpose verifiable computation based on polynomial commitments.\nUsing the Pedersen commitment method described above for polynomial coefficients, we can employ the Bulletproof-IPA protocol to construct evaluation proofs, resulting in another polynomial commitment scheme. Additionally, there are other schemes like KZG10, FRI, Dark, and Dory.\nKZG10 Construction Compared to the random bases used in Pedersen commitments (which are randomly generated points without internal relationships), KZG10 polynomial commitments require a set of bases with internal algebraic structure. These structured bases are derived from a random secret $\\chi$, known as the structured reference string (SRS), which forms the foundation of KZG10. Here are the details:\nGiven the polynomial:\n$$ f(X) = a_0 + a_1 X + a_2 X^2 + \\dots + a_{d-1} X^{d-1} $$\nwhere $a_0, a_1, a_2, \\ldots, a_{d-1}$ are the coefficients of the polynomial.\nSet $X = \\chi$, and substitute into the polynomial:\n$$ f(\\chi) = a_0 + a_1 \\chi + a_2 \\chi^2 + \\dots + a_{d-1} \\chi^{d-1} $$\nKey Notes:\n$\\chi$ is a special secret random number provided by a trusted third party. It is also referred to as the trapdoor and is only used during the initialization phase (Setup) to generate system parameters. Neither the Prover nor the Verifier should know $\\chi$. After the Setup phase, $\\chi$ must be completely destroyed to ensure the system\u0026rsquo;s security. Thus, the public parameters —— Structured Reference String(SRS) are:\n$$ \\mathsf{srs} = (G_0, G_1, G_2, \\dots, G_{d-1}, H_0, H_1) $$\nWhere:\n$$ G_0 = G,\\quad G_1 = \\chi G,\\quad G_2 = \\chi^2 G,\\quad \\dots,\\quad G_{d-1} = \\chi^{d-1} G,\\quad H_0 = H,\\quad H_1 = \\chi H $$\nNotes:\n$G$ and $H$ are the generators of elliptic curve groups $\\mathbb{G}$ and $\\mathbb{H}$, respectively. The powers of $\\chi$ are embedded into elliptic curve points via scalar multiplication with the generators (e.g., $G_2 = \\chi^2 G$ is computed by adding $G$ to itself $\\chi^2$ times on the elliptic curve). Besides $G \\in \\mathbb{G}$ and $H \\in \\mathbb{H}$, the two groups are linked by a bilinear map $e: \\mathbb{G} \\times \\mathbb{H} \\to \\mathbb{G}_T$ (where $\\mathbb{G}_T$ is another elliptic curve group). Some important properties of the bilinear map are: Bilinearity: For all $G \\in \\mathbb{G}, H \\in \\mathbb{H}$, and integers $a, b$, $e(a \\cdot G, b \\cdot H) = e(G, H)^{ab}$. Non-degeneracy: If $G$ is a generator of $\\mathbb{G}$ and $H$ is a generator of $\\mathbb{H}$, then $e(G, H)$ is a generator of $\\mathbb{G}_T$. Efficient Computability: The bilinear map $e$ can be computed in polynomial time. Returning to the SRS:\n$$ \\mathsf{srs} = (G_0, G_1, G_2, \\dots, G_{d-1}, H_0, H_1) $$\nAfter initialization, these structured bases are indistinguishable from random bases from an external perspective. This achieves our goal.\nSetup Phrase The SRS is divided into two parts during Setup Phase:\n$\\mathbb{G}$ Basis Vectors: $\\mathsf{srs}_ {\\mathbb{G}} = (G_0, G_1, G_2, \\dots, G_{d-1})$ where $G_i = \\chi^i G$ ( $i$ is the index, $0 \\leq i \u0026lt; d$ ). $\\mathbb{H}$ Basis Vectors: $\\mathsf{srs}_{\\mathbb{H}} = (H_0, H_1)$ where $H_i = \\chi^i H$ (used for auxiliary verification, such as divisibility checks). When using Groth\u0026rsquo;s notation:\n$$ [1]_1 \\triangleq G,\\quad [1]_2 \\triangleq H $$\nThe KZG10 system parameters (SRS) can be expressed as:\n$$ \\begin{align} \\mathsf{srs} \u0026amp; = ({\\color{Violet} [} {\\color{Red} 1} {\\color{Violet} ]_1} ,{\\color{Violet} [} {\\color{Red} \\chi} {\\color{Violet} ]_1} ,{\\color{Violet} [} {\\color{Red} \\chi^2} {\\color{Violet} ]_1} ,{\\color{Violet} [} {\\color{Red} \\chi^3} {\\color{Violet} ]_1} ,\\ldots,{\\color{Violet} [} {\\color{Red} \\chi^{d-1}} {\\color{Violet} ]_1} ,{\\color{Green} [}{\\color{Brown} 1} {\\color{Green} ]_2} ,{\\color{Green} [} {\\color{Brown} \\chi} {\\color{Green} ]_2} )\\ \u0026amp; = ({\\color{Red} 1} \\cdot {\\color{Violet} G} ,{\\color{Red} \\chi} {\\color{Violet} G} ,{\\color{Red} {\\chi^2}} {\\color{Violet} G} ,{\\color{Red} {\\chi^3}}{\\color{Violet} G} ,\\ldots ,{\\color{Red} {\\chi^{d-1}}}{\\color{Violet} G} ,{\\color{Brown} 1} \\cdot {\\color{Green} H} , {\\color{Brown} \\chi}{\\color{Green} H}) \\end{align} $$\nAfter this Setup phase, the Prover can use the SRS to commit to a polynomial $f(X)$.\nPolynomial Commitment For a polynomial:\n$$ f(X) = a_0 + a_1 X + a_2 X^2 + \\dots + a_{d-1} X^{d-1} $$\nThe Prover commits to the coefficient vector $[a_0, a_1, a_2, \\dots, a_{d-1}]$ using the $\\mathbb{G}$ part of the SRS:\n$$ C_{f(X)} = a_0 G_0 + a_1 G_1 + \\cdots + a_{d-1} G_{d-1} $$\nSubstituting $G_i = \\chi^i G$:\n$$ C_{f(X)} = a_0 G + a_1 (\\chi G) + a_2 (\\chi^2 G) + \\cdots + a_{d-1} (\\chi^{d-1} G) $$\nFactoring out $G$:\n$$ C_{f(X)} = (a_0 + a_1 \\chi + a_2 \\chi^2 + \\cdots + a_{d-1} \\chi^{d-1}) G $$\nThis simplifies to:\n$$ C_{f(X)} = f(\\chi) \\cdot G $$\nIf using Groth\u0026rsquo;s notation:\n$$ C_{f(X)} = [f(\\chi)]_1 $$\nIn summary:\n$C_{f(X)}$, $[f(\\chi)]_1$, and $f(\\chi) G$ all represent the same thing: embedding the finite field element $f(\\chi)$ (the evaluation of the polynomial $f(X)$ at the secret point $\\chi$) into the elliptic curve group $\\mathbb{G}$.\nIn $C_{f(X)} = [f(\\chi)]_1$, the notation $[f(\\chi)]_1$ indicates that the Prover commits to the value $f(\\chi)$ at the secret point $\\chi$ using the generator $[1]_1$ (i.e., $G$).\nEvaluation Proofs Next, let us construct an Open proof for $f(\\zeta) = y$. The core objective is to make the verification process simpler and more efficient. The approach is to transform the direct verification of $C_{f(X)}$ into an indirect verification of $f(\\zeta) = y$, which involves using $C_q$. Here are the key steps:\n1. Decomposing Using the Polynomial Remainder Theorem Based on the Polynomial Remainder Theorem (which states that if a polynomial $f(X)$ is divided by a linear polynomial $(X-\\zeta)$, the remainder is $f(\\zeta)$ ), we can decompose the polynomial $f(X)$ as follows:\n$$ f(X) = q(X) \\cdot (X-\\zeta) + y $$\nWhere:\n$(X-\\zeta)$ is a linear polynomial; $q(X)$ is the quotient polynomial; $y$ is the remainder, which is a constant; If $f(\\zeta) \\neq y$, then $g(X) = f(X) - y$ cannot be divided evenly by $(X-\\zeta)$. This equation shows that any polynomial $f(X)$ can be expressed as the product of a quotient polynomial $q(X)$ and $(X-\\zeta)$, plus a remainder, which is the constant $y$.\nWhen $X = \\zeta$, $(X-\\zeta) = 0$, so the term $q(X) \\cdot (X-\\zeta)$ becomes $0$, reducing the equation to $f(\\zeta) = y$.\nLet us reverse-engineer the above equation: $f(X) = q(X) \\cdot (X-\\zeta) + y$. Assume $f(\\zeta) = y$, and construct a new polynomial $g(X)$, defined as $g(X) = f(X) - y$.\nWhen $X = \\zeta$, $f(\\zeta) = y$, so $g(X)$ evaluates to $g(\\zeta) = f(\\zeta) - y = 0$, meaning that $\\zeta$ is a root of $g(X)$. If $\\zeta$ is a root of $g(X)$, then $g(X)$ must be divisible by $(X-\\zeta)$, which is an irreducible linear polynomial. Therefore, $g(X)$ can be expressed as $g(X) = q(X) \\cdot (X-\\zeta)$, where $q(X)$ is the quotient polynomial. Substituting $g(X)$ back into $g(X) = f(X) - y$, we get: $q(X) \\cdot (X-\\zeta) = f(X) - y$. Rearranging gives: $f(X) = q(X) \\cdot (X-\\zeta) + y$. 2. Proving $f(\\zeta) = y$ The Prover can provide a commitment to the quotient polynomial $q(X)$, denoted as $C_q$ (where $C_q$ is defined as $C_q = q(\\chi) \\cdot G$), as proof that $f(\\zeta) = y$. The Verifier can then check whether $[q(\\chi)]_1$ satisfies the divisibility condition to validate the proof. If $f(\\zeta) \\neq y$, then $g(X)$ cannot be divided evenly by $(X-\\zeta)$, and the commitment $C_q$ provided by the Prover will fail the divisibility check:\n$$ (f(X) - y) \\cdot 1 \\overset{?}{=} q(X) \\cdot (X-\\zeta) $$\nKey notes:\nWhy Include the $\\cdot 1$ in the Verification Equation?\nThis is because pairing (bilinear mapping) is used, specifically $e: \\mathbb{G} \\times \\mathbb{H} \\to \\mathbb{G}_T$. Here:\n$\\mathbb{G}$ and $\\mathbb{H}$ are two groups defined over the domain; $\\mathbb{G}_T$ is the target group of the bilinear map. Pairing requires inputs to appear in pairs, such as $(a, b)$ or $(c, d)$, and cannot accept a single input.\nLet us first examine the right-hand side of the equation. The commitment $C_q = [q(\\chi)]_1$, and $(X-\\zeta)$ can be expressed using the structured reference string (SRS) as $[\\chi-\\zeta]_1$, i.e., $(\\chi-\\zeta) \\cdot G$. Therefore: $q(X) \\cdot (X-\\zeta) \\quad \\rightarrow \\quad C_q \\cdot [\\chi-\\zeta]_1$\nAs mentioned earlier, pairing requires inputs to appear in pairs. The left-hand side must also have two components. The $\\cdot 1$ on the left-hand side can be seen as a placeholder. Here, $1$ corresponds to a group element on the elliptic curve, denoted as $[1]_ 1$, which is the generator $g$ of the group $\\mathbb{G}$. Thus: $(f(X)-y) \\cdot 1 \\quad \\leftrightarrow \\quad C_{f(X)} - y \\cdot g$\nIn summary:\nThe $\\cdot 1$ ensures that the input components and their positions are aligned, so pairing can correctly apply the bilinear map. The $\\cdot 1$ does not affect the overall computation result. 3. Divisibility Verification Using Pairing The commitment $C_{f(X)}$ is an element in group $\\mathbb{G}$. Through the additive homomorphic property of commitments and the bilinear map $e: \\mathbb{G} \\times \\mathbb{H} \\to \\mathbb{G}_T$, the Verifier can validate the divisibility condition in $\\mathbb{G}_T$ as follows:\n$$ e(C_{f(X)} - y[1]_ 1, [1]_ 2) \\overset{?}{=} e(C_{q(X)}, [\\chi]_ 2 - \\zeta [1]_ 2) $$\nExplanation of the Above Equation\nLeft-Hand Side: $e(C_{f(X)} - y[1]_1, [1]_2)$ pairs the commitment of $f(X) - y$ with the generator of $\\mathbb{H}$, producing a result in the target group $\\mathbb{G}_T$. This can be decomposed based on the groups involved:\n$C_{f(X)} - y[1]_1$ is in group $\\mathbb{G}$. $[1]_2$ is the generator of group $\\mathbb{H}$. Specifically:\n$C_{f(X)}$ is the commitment to the polynomial $f(X)$: $C_{f(X)} = [f(\\chi)]_1$. $y[1]_1$ is the commitment to the constant $y$: $y[1]_1 = y \\cdot G$. $[1]_2$ is the generator of group $\\mathbb{H}$. Right-Hand Side: $e(C_{q(X)}, [\\chi]_2 - \\zeta [1]_2)$ pairs the commitment of the quotient polynomial $q(X)$ with the commitment of $(\\chi-\\zeta)$, producing a result in the target group $\\mathbb{G}_T$.\nThis can also be decomposed:\n$C_{q(X)}$ is in group $\\mathbb{G}$. $[\\chi]_2 - \\zeta[1]_2$ is in group $\\mathbb{H}$. Specifically:\n$C_{q(X)}$ is the commitment to $q(X)$: $C_{q(X)} = [q(\\chi)]_1$. $[\\chi]_2$ represents the secret $\\chi$ in group $\\mathbb{H}$: $[\\chi]_2 = \\chi \\cdot H$. $\\zeta[1]_2$ represents the constant $\\zeta$ in group $\\mathbb{H}$: $\\zeta[1]_2 = \\zeta \\cdot H$. This effectively validates the divisibility condition:\n$$ f(\\chi) - y \\overset{?}{=} q(\\chi) \\cdot (\\chi - \\zeta) $$\n4. Reducing Computation Complexity The above verification requires the Prover to compute the division of the polynomial:\n$$ q(X) = \\frac{f(X) - y}{X-\\zeta} $$\nPolynomial division can be computationally expensive, especially when $f(X)$ is a high-degree polynomial. To reduce the computational cost, the verification equation:\n$$ (f(X)-y) \\cdot 1 \\overset{?}{=} q(X) \\cdot (X-\\zeta) $$\ncan be transformed into:\n$$ f(X) + \\zeta \\cdot q(X) - y = q(X) \\cdot X $$\nThis transformation simplifies the computation in the KZG commitment verification process, aligning elliptic curve point calculations with the existing system parameters (SRS). By doing so, the Verifier avoids expensive scalar multiplications (e.g., computing $\\zeta[1]_2$).\nAfter transformation, we can further understand the role of pairing:\n$$ f(X) + \\zeta \\cdot q(X) - y = q(X) \\cdot X $$\n$$ e(C_{f(X)} + \\zeta \\cdot C_{q(X)} - y \\cdot [1]_ 1, [1]_ 2) \\overset{?}{=} e(C_{q(X)}, [\\chi]_ 2) $$\nBy analyzing the relationship between the transformed equation and the pairing-based verification process above, we can revisit and clarify some key concepts:\nPairing $e(\\cdot, \\cdot)$:\nPairing is a bilinear map defined as $e: \\mathbb{G} \\times \\mathbb{H} \\to \\mathbb{G_T}$, where:\n$\\mathbb{G}$ and $\\mathbb{H}$ are two distinct elliptic curve groups. $\\mathbb{G_T}$ is the target group resulting from the bilinear map. Commitments $C_{f(X)}$ and $C_{q(X)}$:\nThese are the polynomial commitments for $f(X)$ and $q(X)$, respectively. Typically, these commitments are generated using schemes like Pedersen commitments, which map polynomials to specific points on an elliptic curve.\nLeft Side of the Pairing Equation:\nIn the pairing equation: $e(C_{f(X)} + \\zeta \\cdot C_{q(X)} - y \\cdot [1]_ 1, [1]_ 2)$,\nthe term $C_{f(X)} + \\zeta \\cdot C_{q(X)} - y \\cdot [1]_ 1$ represents the commitment to the polynomial $f(X) + \\zeta \\cdot q(X) - y$. Meanwhile, the right-hand side $e(C_{q(X)}, [\\chi]_ 2)$ corresponds to the commitment $q(X)$ paired with the structured reference string (SRS) element $[\\chi]_2$.\nNotes:\nIf you look closely at the left side of the pairing equation, you\u0026rsquo;ll notice that only $y$ is explicitly multiplied by $[1]_ 1$ (the generator of group $\\mathbb{G}$ ). You might wonder why $C_{f(X)}$ and $\\zeta \\cdot C_{q(X)}$ do not also include $\\cdot 1$. Here\u0026rsquo;s why:\nWhat is $y \\cdot [1]_1$?\nThe term $y \\cdot [1]_ 1$ represents the constant $y$ embedded into the elliptic curve group $\\mathbb{G}$. In pairing-based proof systems, constants like $y$ cannot be directly added to other elliptic curve elements (such as $C_{f(X)}$ or $C_{q(X)}$). Before addition, the constant $y$ must first be mapped into the curve by multiplying it with the generator $[1]_1$. Why Don’t $C_{f(X)}$ and $\\zeta \\cdot C_{q(X)}$ Require This? $C_{f(X)}$ and $\\zeta \\cdot C_{q(X)}$ are already elements in the group $\\mathbb{G}$ because they are commitments derived from polynomials $f(X)$ and $q(X)$. These commitments are elliptic curve points and naturally reside in the same group. Constants like $y$, however, are scalar values (not curve points) and need to be explicitly converted into elliptic curve elements by multiplying with $[1]_1$. Ensuring Compatibility:\nIn order to perform addition within the group $\\mathbb{G}$, all terms must be in the same domain. Thus, $y$ must be multiplied by $[1]_ 1$ to become a group element, ensuring it can be added to $C_{f(X)}$ and $\\zeta \\cdot C_{q(X)}$. If you understand the reasoning behind the left side of the equation, you should have no difficulty grasping the right side as well. This concludes the explanation of the pairing operation in this context!\nProof Aggregation for Open at the Same Point In a larger security protocol, when multiple polynomial commitments are used simultaneously, their Open operations can be aggregated into a single process. This is achieved by combining multiple polynomials into a single larger polynomial, allowing batch verification of the original polynomials by opening just one point.\nSuppose we have multiple polynomials, $f_1(X)$ and $f_2(X)$. The Prover wants to prove to the Verifier that $f_1(\\zeta) = y_1$ and $f_2(\\zeta) = y_2$. These can be expressed as:\n$$ \\begin{array}{l} f_1(X) = q_1(X) \\cdot (X-\\zeta) + y_1\\ f_2(X) = q_2(X) \\cdot (X-\\zeta) + y_2 \\end{array} $$\nUsing a random scalar $\\nu$, the Prover can combine $f_1(X)$ and $f_2(X)$ into a single temporary polynomial $g(X)$:\n$$ g(X) = f_1(X) + \\nu \\cdot f_2(X) $$\nThen, based on the Polynomial Remainder Theorem, we can derive the following equality for verification:\n$$ g(X) - (y_1 + \\nu \\cdot y_2) = (X - \\zeta) \\cdot (q_1(X) + \\nu \\cdot q_2(X)) $$\nTo understand how this equality is derived, let’s revisit the earlier concepts:\nSince we know $f_1(X) = q_1(X) \\cdot (X-\\zeta) + y_1$, $f_2(X) = q_2(X) \\cdot (X-\\zeta) + y_2$, and $g(X) = f_1(X) + \\nu \\cdot f_2(X)$, we can substitute $f_1(X)$ and $f_2(X)$ into $g(X)$:\n$$ \\begin{align} g(X) \u0026amp;= q_1(X) \\cdot (X-\\zeta) + y_1 + \\nu \\cdot (q_2(X) \\cdot (X-\\zeta) + y_2)\\\\ g(X) \u0026amp;= q_1(X) \\cdot (X-\\zeta) + y_1 + \\nu \\cdot q_2(X) \\cdot (X-\\zeta) + \\nu \\cdot y_2\\\\ g(X) \u0026amp;= q_1(X) \\cdot (X-\\zeta) + \\nu \\cdot q_2(X) \\cdot (X-\\zeta) + y_1 + \\nu \\cdot y_2\\\\ g(X) - (y_1 + \\nu \\cdot y_2) \u0026amp;= q_1(X) \\cdot (X-\\zeta) + \\nu \\cdot q_2(X) \\cdot (X-\\zeta)\\\\ g(X) - (y_1 + \\nu \\cdot y_2) \u0026amp;= (X-\\zeta) \\cdot (q_1(X) + \\nu \\cdot q_2(X)) \\end{align} $$\nHere, $q_1(X) + \\nu \\cdot q_2(X)$ can be regarded as the \u0026ldquo;quotient polynomial,\u0026rdquo; denoted as $q(X)$. That is:\n$$ q(X) = q_1(X) + \\nu \\cdot q_2(X) $$\nProof Aggregation Using Homomorphism Now, suppose the proof of $f_1(X)$ at $X = \\zeta$ is $\\pi_1$, and the proof of $f_2(X)$ at $X = \\zeta$ is $\\pi_2$. By leveraging the additive homomorphism of the group, the Prover can obtain the commitment to the quotient polynomial $q(X)$:\n$$ [q(\\chi)]_1 = \\pi = \\pi_1 + \\nu \\cdot \\pi_2 $$\nAdditive Homomorphism: For two groups $\\mathbb{G}$ and $\\mathbb{H}$, if a mapping $\\phi: \\mathbb{G} \\to \\mathbb{H}$ satisfies the condition $\\forall a, b \\in \\mathbb{G}$, $\\phi(a + b) = \\phi(a) + \\phi(b)$, then $\\phi$ is a homomorphism. (Note: Depending on the group definition, the operation could be addition or multiplication.)\nThus, as long as the Verifier sends the Prover an additional random scalar $\\nu$, both parties can fold two (or even multiple) polynomial commitments into a single commitment $C_g$:\n$$ C_g = C_1 + \\nu \\ast C_2 $$\nWhy use the operator $\\ast$ ? In practice, this is equivalent to $C_g = C_1 + \\nu \\cdot C_2$. The $\\ast$ symbol is used to represent the computational implementation of the operation (e.g., a scalar multiplication function in code), rather than the mathematical scalar multiplication symbol.\nThe folded commitment $C_g$ can then be used to verify the evaluations of multiple polynomials at a single point:\n$$ y_g = y_1 + \\nu \\cdot y_2 $$\nHere, $y_1$ and $y_2$ are the values of the polynomials $f_1(X)$ and $f_2(X)$ at a specific point.\nThrough folding, multiple evaluation proofs are aggregated into one. The Verifier only needs to verify whether $C_g$ equals $y_g$ at the given point to simultaneously confirm that $f_1(X)$ and $f_2(X)$ evaluate to $y_1$ and $y_2$ at the specified point:\n$$ e(C_g - y \\ast G_0, H_0) \\overset{?}{=} e(\\pi, H_1 - \\zeta \\ast H_0) $$\nThis greatly simplifies the verification process.\nSecurity Analysis Using Schwartz-Zippel Lemma The Schwartz-Zippel Lemma states that for a non-zero polynomial $P(X)$ of degree $d$, the probability that $P(\\nu) = 0$ for a randomly chosen $\\nu$ in a finite field $\\mathbb{F}_p$ is at most $\\frac{d}{p}$.\nFrom this, we derive the following:\nHigher degree increases forgery probability: If the degree $d$ of $P(X)$ is large, the probability of $P(X) = 0$ increases. Larger finite field decreases forgery probability: If the size of the finite field $p$ is sufficiently large, the probability of $P(X) = 0$ becomes very small. For two different polynomials $f_1(X)$ and $f_2(X)$, if the Prover tries to forge new polynomials $f_1\u0026rsquo;(X)$ and $f_2\u0026rsquo;(X)$ such that the folded result remains the same, i.e.:\n$$ f_1(X) + \\nu f_2(X) = f_1\u0026rsquo;(X) + \\nu f_2\u0026rsquo;(X), $$\nthis is equivalent to:\n$$ (f_1(X) - f_1\u0026rsquo;(X)) + \\nu (f_2(X) - f_2\u0026rsquo;(X)) = 0 $$\nLet:\n$$ \\Delta_1(X) = f_1(X) - f_1\u0026rsquo;(X), \\quad \\Delta_2(X) = f_2(X) - f_2\u0026rsquo;(X) $$\nthen:\n$$ \\Delta_1(X) + \\nu \\Delta_2(X) = 0 $$\nTo satisfy this equation, the Prover must find a specific $\\nu$, meaning $\\nu$ must be a solution to the linear relationship between $\\Delta_1(X)$ and $\\Delta_2(X)$. If $\\Delta_1(X)$ and $\\Delta_2(X)$ are non-zero polynomials, their degree is:\n$$ \\max(\\deg(\\Delta_1), \\deg(\\Delta_2)), $$\nand the probability of $\\Delta_1(X) + \\nu \\cdot \\Delta_2(X) = 0$ is at most:\n$$ \\frac{\\max(\\deg(\\Delta_1), \\deg(\\Delta_2))}{p} $$\nLow-degree case:\nSuppose $\\deg(\\Delta_1) = 2$ and $\\deg(\\Delta_2) = 3$, then $\\max(\\deg(\\Delta_1), \\deg(\\Delta_2)) = 3$. For a finite field of size $p = 2^{256}$, the forgery probability is: $\\frac{3}{2^{256}}$\nThis is an extremely small probability, making forgery nearly impossible.\nHigh-degree case:\nSuppose $\\deg(\\Delta_1) = 100$ and $\\deg(\\Delta_2) = 200$, then $\\max(\\deg(\\Delta_1), \\deg(\\Delta_2)) = 200$. For a finite field of size $p = 2^{256}$, the forgery probability is: $\\frac{200}{2^{256}}$.\nWhile the probability increases slightly, it is still negligible.\nConclusion The probability of a randomly chosen $\\nu$ leading to a successful forgery is extremely small, effectively zero. Moreover, introducing the random scalar $\\nu$ only involves a linear combination of existing commitments, which does not leak any information about the secret $\\chi$.\nInstead, $\\nu$ ensures the uniqueness of the random linear combination, preventing the Prover from forging polynomials. As a result, the aggregation of polynomials does not compromise the binding property of the commitments, as guaranteed by the Schwartz-Zippel Lemma.\nProtocol: Public Inputs:\n$C_{f_1} = [f_1(\\chi)]_ 1$, $C_{f_2} = [f_2(\\chi)]_ 1$, $\\zeta$, $y_1$, $y_2$ Private Inputs:\n$f_1(X)$, $f_2(X)$ Proof Goal:\nProve that $f_1(\\zeta) = y_1$ and $f_2(\\zeta) = y_2$\nProtocol Steps: Step 1: Verifier issues a challenge scalar $\\nu$.\nStep 2: Prover computes $q(X) = q_1(X) + \\nu \\cdot q_2(X)$ and sends $\\pi = [q(\\chi)]_1$ to the Verifier.\nStep 3: Verifier computes $C_g = C_{f_1} + \\nu \\cdot C_{f_2}$ and $y_g = y_1 + \\nu \\cdot y_2$, then verifies the following pairing equation:\n$$ e(C_g - [y_g]_1, [1]_2) \\overset{?}{=} e(\\pi, [\\chi-\\zeta]_2) $$\nLet’s demonstrate the execution of this protocol with the following specific values:\nPrivate Inputs(known only to the Prover):\n$f_1(X) = 3X + 1$ $f_2(X) = 5X + 6$ Public Inputs:\n$C_{f_1} = [f_1(\\chi)]_1 = [3]_1$ (commitment to $f_1(\\chi)$ ) $C_{f_2} = [f_2(\\chi)]_1 = [5]_1$ (commitment to $f_2(\\chi)$ ) $\\zeta = 2$ (evaluation point) $y_1 = f_1(\\zeta) = 7$ (value of $f_1$ at $\\zeta$) $y_2 = f_2(\\zeta) = 16$ (value of $f_2$ at $\\zeta$) Proof Goal: Prove that $f_1(\\zeta) = y_1$ and $f_2(\\zeta) = y_2$.\n(1) Step 1: Verifier issues a challenge scalar $\\nu$. Assume that $\\nu = 4$.\n(2) Step 2: Prover computes $q(X)$ and sends $\\pi = [q(\\chi)]_1$.\nCompute $q_1(X)$ and $q_2(X)$:\nFor $q_1(X)$:\n$q_1(X) = \\frac{f_1(X) - y_1}{X - \\zeta}$, Substitute $f_1(X) = 3X + 1$ and $y_1 = 7$: $q_1(X) = \\frac{(3X + 1) - 7}{X - 2} = \\frac{3X - 6}{X - 2} = 3$\nFor $q_2(X)$:\n$q_2(X) = \\frac{f_2(X) - y_2}{X - \\zeta}$, Substitute $f_2(X) = 5X + 6$ and $y_2 = 16$: $q_2(X) = \\frac{(5X + 6) - 16}{X - 2} = \\frac{5X - 10}{X - 2} = 5$\nCombine $q_1(X)$ and $q_2(X)$ using $\\nu$:\nCompute $q(X) = q_1(X) + \\nu \\cdot q_2(X)$: $q(X) = 3 + 4 \\cdot 5 = 3 + 20 = 23$\nCompute $\\pi$:\nSince $q(X)$ is constant ($q(X) = 23$), $\\pi = [q(\\chi)]_1 = [23]_1$, Prover sends $\\pi = [23]_1$ to the Verifier.\n(3) Step 3: Verifier performs the verification.\nThe Verifier checks the pairing equation: $e(C_g - [y_g]_1, [1]_2) \\overset{?}{=} e(\\pi, [\\chi-\\zeta]_2)$\nCompute $C_g$ (commitment to the combined polynomial) and $y_g$ (combined evaluation value):\n$C_g = C_{f_1} + \\nu \\cdot C_{f_2}$:\nSubstitute $C_{f_1} = [3]_ 1$, $C_{f_2} = [5]_ 1$, and $\\nu = 4$: $C_g = [3]_1 + 4 \\cdot [5]_1 = [3 + 20]_1 = [23]_1$.\n$y_g = y_1 + \\nu \\cdot y_2$:\nSubstitute $y_1 = 7$, $y_2 = 16$, and $\\nu = 4$: $y_g = 7 + 4 \\cdot 16 = 7 + 64 = 71$.\nVerify the left-hand pairing:\nCompute $C_g - [y_g]_1$:\nSubstitute $C_g = [23]_1$ and $[y_g]_1 = [71]_1$: $C_g - [y_g]_1 = [23]_1 - [71]_1 = [-48]_1$\nPair with $[1]_2$: $e(C_g - [y_g]_1, [1]_2) = e([-48]_1, [1]_2)$\nVerify the right-hand pairing:\nCompute $e(\\pi, [\\chi - \\zeta]_2)$:\nSubstitute $\\pi = [23]_1$ and $\\chi - \\zeta = \\chi - 2$: $e(\\pi, [\\chi - \\zeta]_2) = e([23]_1, [\\chi - 2]_2)$\nCheck if both pairings are equal:\nIf: $e([-48]_1, [1]_2) = e([23]_1, [\\chi - 2]_2)$,\nthen the proof is valid, confirming that $f_1(\\zeta) = y_1$ and $f_2(\\zeta) = y_2$.\nNotes:\nIn the above explanation, there are some important distinctions in terminology:\n$q(\\chi)$: Represents the evaluation proof. KZG Commitment of $q(X)$: Refers to $[q(\\chi)]_1$, which is the commitment to the polynomial $q(X)$. Polynomial Constraints and Linearization Assume that $[f(\\chi)]_1$, $[g(\\chi)]_1$, and $[h(\\chi)]_1$ are the KZG10 commitments of the polynomials $f(X)$, $g(X)$, and $h(X)$, respectively. If the Verifier wants to verify the following polynomial constraint:\n$$ f(X) + g(X) \\overset{?}{=} h(X) $$\nthe Verifier simply adds the commitments of the first two polynomials and checks whether the result equals $[h(\\chi)]_1$:\n$$ [f(\\chi)]_1 + [g(\\chi)]_1 \\overset{?}{=} [h(\\chi)]_1 $$\nIf the polynomial relation involves multiplication, such as:\n$$ f(X) \\cdot g(X) \\overset{?}{=} h(X) $$\nThe most direct approach is to utilize the properties of bilinear groups and verify the multiplicative relationship in $\\mathbb{G}_T$ by checking the following equation:\n$$ e([f(\\chi)]_1, [g(\\chi)]_2) \\overset{?}{=} e([h(\\chi)]_1, [1]_2) $$\nDo you fully understand the above equation? Let’s emphasize its underlying rules: The pairing $e: (\\mathbb{G}, \\mathbb{H}) \\to \\mathbb{G}_T$ implies that:\n$[f(\\chi)]$ must be in group $\\mathbb{G}$, denoted as $[f(\\chi)]_1$; $[g(\\chi)]$ must be in group $\\mathbb{H}$, denoted as $[g(\\chi)]_2$. The result of $e([f(\\chi)]_1, [g(\\chi)]_2)$ will always lie in group $\\mathbb{G}_T$.\nHowever, if the Verifier only has the commitment $[g(\\chi)]_1$ in group $\\mathbb{G}$ (instead of $[g(\\chi)]_2$ in group $\\mathbb{H}$), then the Verifier cannot use the bilinear pairing operation to verify the multiplication constraint.\nAn alternative method is to open all three polynomials at the same challenge point $X = \\zeta$ and verify whether the opened values satisfy the multiplication constraint. Suppose the Verifier wants to verify:\n$$ f(X) \\cdot g(X) \\overset{?}{=} h(X). $$\nThe Prover sends the values $f(\\zeta)$, $g(\\zeta)$, and $h(\\zeta)$. The Prover provides three evaluation proofs $\\pi_{f(\\zeta)}$, $\\pi_{g(\\zeta)}$, and $\\pi_{h(\\zeta)}$, proving that these values match their respective commitments. The Verifier then:\nChecks whether $f(\\zeta) \\cdot g(\\zeta) \\overset{?}{=} h(\\zeta)$. Verifies the correctness of the three evaluation proofs. This approach allows the verification of more complex polynomial constraints, such as:\n$$ f_1(X)f_2(X) + h_1(X)h_2(X)h_3(X) + g(X) = 0 $$\nSuppose the Verifier already has the KZG10 commitments of these polynomials: $[f_1(\\chi)]_1$, $[f_2(\\chi)]_1$, $[h_1(\\chi)]_1$, $[h_2(\\chi)]_1$, $[h_3(\\chi)]_1$, and $[g(\\chi)]_1$. The most straightforward approach is for the Prover to open these six commitments at the challenge point $X = \\zeta$, sending the six values and their corresponding evaluation proofs:\n$$ (f_1(\\zeta), \\pi_{f_1}), (f_2(\\zeta), \\pi_{f_2}), (h_1(\\zeta), \\pi_{h_1}), (h_2(\\zeta), \\pi_{h_2}), (h_3(\\zeta), \\pi_{h_3}), (g(\\zeta), \\pi_{g}) $$\nThe Verifier:\nVerifies the six evaluation proofs. Checks whether: $$ f_1(\\zeta)f_2(\\zeta) + h_1(\\zeta)h_2(\\zeta)h_3(\\zeta) + g(\\zeta) \\overset{?}{=} 0 $$\nOptimizing the Verification Process If many polynomials are involved, the Prover must send multiple evaluation values and proofs, leading to high communication and computation costs. Is there a way to optimize this? Yes!\nTo reduce the number of opened polynomials, the Prover can introduce an auxiliary polynomial. Additionally, by leveraging the additive homomorphism of KZG10 commitments, the Verifier can validate complex multiplication relations without increasing communication costs.\nOptimized Protocol Step 1: Define an Auxiliary Polynomial Define an auxiliary polynomial:\n$$ L(X) = \\bar{f} \\cdot g(X) - h(X), $$\nwhere $\\bar{f} = f(\\zeta) = c$ is the specific value of $f(X)$ at $X = \\zeta$. If $f(X) \\cdot g(X) = h(X)$ holds, then at $X = \\zeta$, we have:\n$$ L(\\zeta) = c \\cdot g(\\zeta) - h(\\zeta) = \\bar{f} \\cdot g(\\zeta) - h(\\zeta) = 0. $$\nStep 2: Prover’s Operations Open $f(X)$ at $X = \\zeta$:\nThe Prover sends $\\bar{f} = f(\\zeta)$ and the corresponding evaluation proof $\\pi_{f(\\zeta)}$ to the Verifier. Construct the Commitment for $L(X)$:\nCompute $[L(\\chi)]_1 = \\bar{f} \\cdot [g(\\chi)]_1 - [h(\\chi)]_1$. The Prover does not need to send this commitment to the Verifier, as the Verifier can construct it directly using the additive homomorphism of KZG10 commitments after receiving $\\bar{f}$. Open $L(X)$ at $X = \\zeta$:\nThe Prover proves that $L(\\zeta) = 0$ by providing an evaluation proof $\\pi_{L(\\zeta)}$. Step 3: Verifier’s Operations Verify the evaluation proof for $f(\\zeta)$:\n$e([f(\\chi)]_ 1 - \\bar{f} \\cdot [1]_ 1, [1]_ 2) \\overset{?}{=} e(\\pi_{f(\\zeta)}, [\\chi - \\zeta]_ 2)$\nVerify that $L(X)$ evaluates to zero:\n$e([L(\\chi)]_ 1, [1]_ 2) \\overset{?}{=} e(\\pi_{L(\\zeta)}, [\\chi - \\zeta]_ 2)$\nIf the verification passes, this implies that $f(X) \\cdot g(X) = h(X)$.\nAdvantages of the Optimized Protocol Originally, the Prover needed to open three polynomials ($f(X)$, $g(X)$, and $h(X)$ ). With this optimization, only two openings are required:\nThe first opening is $\\bar{f}$, which provides the value $f(\\zeta)$ to ensure accurate subsequent calculations. The second opening is $L(X)$, with the value $L(\\zeta) = 0$, which indirectly verifies the multiplication constraint. Extending to Multiple Polynomial Constraints We can further optimize the protocol for verifying constraints involving multiple polynomials, such as:\n$$ f_1(X)f_2(X) + h_1(X)h_2(X)h_3(X) + g(X) = 0 $$\nUsing aggregation techniques and leveraging the homomorphic properties of KZG10 commitments, the Prover can combine the constraints into a single polynomial using a random challenge scalar $\\nu$. This allows the Verifier to validate complex constraints with minimal communication overhead.\nProtocol: Public Inputs: $C_{f_1} = [f_1(\\chi)]_ 1$, $C_{f_2} = [f_2(\\chi)]_ 1$, $C_{h_1} = [h_1(\\chi)]_ 1$, $C_{h_2} = [h_2(\\chi)]_ 1$, $C_{h_3} = [h_3(\\chi)]_ 1$, $C_g = [g(\\chi)]_ 1$\nPrivate Inputs: $f_1(X)$, $f_2(X)$, $h_1(X)$, $h_2(X)$, $h_3(X)$, $g(X)$\nProof Goal: To prove: $f_1(X)f_2(X) + h_1(X)h_2(X)h_3(X) + g(X) = 0$\nStep 1: Verifier sends $X = \\zeta$ Step 2: Prover computes and sends three Openings: $\\bar{f}_1 = f_1(\\zeta)$, $\\bar{h}_1 = h_1(\\zeta)$, $\\bar{h}_2 = h_2(\\zeta)$\nWhy does the Prover choose to send $\\bar{f}_1 = f_1(\\zeta)$, $\\bar{h}_1 = h_1(\\zeta)$, and $\\bar{h}_2 = h_2(\\zeta)$ instead of other values?\n$h_1(X)h_2(X)h_3(X)$ is a product term. Knowing two of the values (e.g., $\\bar{h}_1$ and $\\bar{h}_2$) is sufficient for the Verifier to deduce $\\bar{h}_3$ using the equation:\n$$\\bar{h}_3 = \\frac{\\text{known product value}}{h_1 \\cdot h_2}$$\nCan other values (e.g., $\\bar{h}_3$) be sent instead?\nYes, sending any two values (e.g., $\\bar{h}_1$ and $\\bar{h}_3$) is equivalent. However, choosing different values may complicate the Verifier’s verification logic and make the process less efficient. For example, if the Prover sends $\\bar{f}_1$, $\\bar{h}_2$, and $\\bar{h}_3$, while verification is still possible, it would involve:\nIncreased verification complexity: The Verifier would need to deduce $\\bar{h}_1$ from $\\bar{h}_2$ and $\\bar{h}_3$, making the process less intuitive. Potential redundant communication: If $\\bar{h}_1$ is not sent, the Verifier might need to reconstruct it, adding extra computation and verification steps to the protocol. Conclusion: Choose the simplest approach.\nStep 3: Verifier sends a random scalar $\\nu$. Step 4: Prover folds the commitments $(L(X), f_1(X), h_1(X), h_2(X))$, computes $L(X)$ and the quotient polynomial $q(X)$, and sends the commitment $[q(\\chi)]_1$ as the proof of the folded polynomial evaluation at $X = \\zeta$.\n$$ L(X) = \\bar{f}_1 \\cdot f_2(X) + \\bar{h}_1\\bar{h}_2 \\cdot h_3(X) + g(X) $$\nExplanation of $L(X)$:\n$\\bar{f}_1 = f_1(\\zeta)$, $\\bar{h}_1 = h_1(\\zeta)$, and $\\bar{h}_2 = h_2(\\zeta)$ are the Opening values sent by the Prover in Step 2. $L(X)$ serves to split the proof goal into two parts: Fixed values $\\bar{f}_1$, $\\bar{h}_1$, $\\bar{h}_2$ (already provided by the Prover and directly usable by the Verifier). Remaining polynomial components $f_2(X)$, $h_3(X)$, and $g(X)$, unified under $L(X)$. $$ \\begin{align} q(X) \u0026amp; = \\frac{F(X)}{X-\\zeta} \\ \u0026amp; = \\frac{L(X) + \\nu \\cdot (f_1(X) - \\bar{f}_1) + \\nu^2 \\cdot (h_1(X) - \\bar{h}_1) + \\nu^3 \\cdot (h_2(X) - \\bar{h}_2)}{X-\\zeta} \\end{align} $$\nHow to understand the above equation for $q(X)$?\nFrom previous discussions, the quotient polynomial $q(X)$ is defined as:\n$$q(X) = \\frac{f(X) - y}{X-\\zeta}$$\nHere, $f(X) - y$ is a polynomial that evaluates to $0$ at $X = \\zeta$ (since $f(\\zeta) = y$). Consequently, $f(X) - y$ is divisible by $X-\\zeta$, and the quotient is $q(X)$. Our proof goal is $f_1(X)f_2(X) + h_1(X)h_2(X)h_3(X) + g(X) = 0$. To verify this, we introduce the auxiliary polynomial $L(X)$. To reduce communication overhead, the protocol uses a folding technique. The Verifier applies a random challenge scalar $\\nu$ to linearly combine multiple polynomials $(L(X), f_1(X), h_1(X), h_2(X))$ into a single polynomial: $F(X) = L(X) + \\nu \\cdot (f_1(X) - \\bar{f}_1) + \\nu^2 \\cdot (h_1(X) - \\bar{h}_1) + \\nu^3 \\cdot (h_2(X) - \\bar{h}_2)$. This $F(X)$ contains all the polynomial information related to the proof goal. Since $F(X)$ is divisible by $(X-\\zeta)$, the quotient is $q(X)$. Step 5: Verifier computes the commitment to the auxiliary polynomial $L(X)$: $$ [L(X)]_1 = \\bar{f}_1 \\cdot [f_2(\\chi)]_1 + \\bar{h}_1\\bar{h}_2 \\cdot [h_3(\\chi)]_1 + [g(\\chi)]_1 $$\nThe Verifier then computes the commitment to the folded polynomial:\n$$ [F(X)]_1 = [L(X)]_1 + \\nu \\cdot [f_1(\\chi)]_1 + \\nu^2 \\cdot [h_1(\\chi)]_1 + \\nu^3 \\cdot [h_2(\\chi)]_1 $$\nDoes the equation for $[F(X)]_1$ seem strange?\nWhy does the formula for the commitment of the folded polynomial $[F(X)]_1$ differ from the right-hand side of $F(X)$?\nCan $F(X)$ be written as $F(X) = L(X) + \\nu \\cdot f_1(X) + \\nu^2 \\cdot h_1(X) + \\nu^3 \\cdot h_2(X)$?\nYes, we can reverse-engineer this representation:\nAccording to the Polynomial Remainder Theorem, if a polynomial $F(X)$ is divided by a linear polynomial $(X-\\zeta)$, the remainder is $F(\\zeta)$. Rearranging gives: $q(X) = \\frac{F(X) - F(\\zeta)}{X-\\zeta}$.\nSince the Verifier’s validation depends on $q(X)$, the quotient polynomial $q(X)$ already enforces the correctness of the Opening values. Thus, an alternative representation of $F(X)$ and $q(X)$ is: $F(X) = L(X) + \\nu \\cdot f_1(X) + \\nu^2 \\cdot h_1(X) + \\nu^3 \\cdot h_2(X)$, $q(X) = \\frac{F(X) - F(\\zeta)}{X - \\zeta}$.\nThe Verifier computes the evaluation of the folded polynomial at $X = \\zeta$:\n$$ E \\overset{?}{=} F(\\zeta) = \\nu \\cdot \\bar{f}_1 + \\nu^2 \\cdot \\bar{h}_1 + \\nu^3 \\cdot \\bar{h}_2 $$\nHere, $E$ is a concrete value computed by the Verifier, used to validate the correctness of $F(\\zeta)$.\nThe Verifier checks the following pairing equation:\n$$ e([F(X)]_1 - [E]_1 + \\zeta [q(\\chi)]_1, [1]_2) \\overset{?}{=} e([q(\\chi)]_1, [\\chi]_2) $$\nOptimized Protocol Summary Using this optimized protocol, the Prover only needs to send three Openings and one evaluation proof, compared to the original approach requiring six Openings and six evaluation proofs. This greatly reduces communication overhead (i.e., proof size).\n","permalink":"/posts/5-polycom/","summary":"\u003ch2 id=\"what-is-a-polynomial-commitment\"\u003eWhat is a Polynomial Commitment?\u003c/h2\u003e\n\u003cp\u003eA \u003cstrong\u003ecommitment\u003c/strong\u003e is a way to \u0026ldquo;lock\u0026rdquo; a message, resulting in a commitment value. This value is referred to as the \u003cstrong\u003ecommitment\u003c/strong\u003e to the object.\u003c/p\u003e\n\u003cp\u003e$$\nc = commit(x)\n$$\u003c/p\u003e\n\u003cp\u003eThis commitment satisfies two essential properties: \u003cstrong\u003eHiding\u003c/strong\u003e and \u003cstrong\u003eBinding\u003c/strong\u003e.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eHiding\u003c/strong\u003e: $c$ does not reveal any information about $x$.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eBinding\u003c/strong\u003e: It is computationally infeasible to find some $x\u0026rsquo; \\neq x$ such that $c = commit(x\u0026rsquo;)$.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThe simplest commitment mechanism is a hash function. Note that such a hash function must provide cryptographic security, such as SHA256 or Keccak. Besides hash functions, there are also schemes like Pedersen commitments.\u003c/p\u003e","title":"Understanding Plonk (Part 5): Polynomial Commitments"},{"content":"As the title suggests, I really went there just to idle the time away.\nPhoto: Sitting on a chair by the lake, dazing in the sun. If I didn\u0026rsquo;t have to worry about finding a restroom, I could have dazed there all day.\nBariloche, officially known as San Carlos de Bariloche, is located in the Patagonia region. Compared to the glaciers further south, Bariloche is famous for its stunning lakes and mountains, earning it the nickname \u0026ldquo;The Little Switzerland of South America\u0026rdquo; (though my friend insists it looks nothing like Switzerland).\nThe earliest immigrants to Bariloche were primarily German-speakers from Central Europe—Germany, Switzerland, and Austria—later joined by people from many other regions. Undoubtedly, those first immigrants laid the cultural foundation of the town. The wooden cabins and chocolate shops are echoes of Europe, but the ferocious winds and the lupines lining the roads are pure, unadulterated Patagonian soul.\nPhoto: Strolling along the lakeshore.\nI spent five days in Bariloche at the end of last November. While my friends were back in Buenos Aires watching the rain and dodging dog poop, I was in sunny Bariloche, windswept and soaking in the lake views. Aside from the wind, everything here is gentle.\n![](inline skating.png) Photo: Watching local kids skate along the lakeshore.\nTo be honest, compared to Ushuaia, Bariloche is a relatively \u0026ldquo;niche\u0026rdquo; destination within the Chinese travel community, though it\u0026rsquo;s a favorite for European and American tourists. I first heard of it through a friend in Spain who told me he wanted to stay there for a while and sent me a travel intro on Instagram. After some research, I was sold—mostly because I wanted to \u0026ldquo;lie flat\u0026rdquo; (relax completely). I was very insistent on this destination from the start. Plus, my friend V said she was going to Bariloche for rock climbing (though she spent most of her days up on the mountains), so we agreed to meet there. In the end, Iguazu and Bariloche were the two most \u0026ldquo;certain\u0026rdquo; stops on my Argentina itinerary.\nWhat makes Bariloche unforgettable, however, was the blow to my wallet. First, I missed my flight because I stopped to buy water at the airport and arrived at the gate less than a minute after the jet bridge door closed—the first time in my life I\u0026rsquo;ve ever missed a flight. Then, as I was leaving, I realized I had lost my relatively new Sony XM4 headphones (the blue ones!), and I had no idea where I left them. When I tried to buy them again back home, I found they were discontinued and the price had actually risen. I was fuming at my own stupidity. Well, I\u0026rsquo;ll just consider it \u0026ldquo;spending money to ward off bad luck\u0026rdquo; (破财消灾) 🙏.\nPhoto: 💸 A silent loss.\nAnyway, back to the trip. On the day I arrived, I discovered another Singaporean friend was also in Bariloche. To make it to a steak dinner with him, I took an Uber directly from the airport to my Airbnb, which cost about ¥100. The driver spoke great English; he was originally from BA but had moved his whole family to Bariloche to escape the big city for the mountains, water, and better weather. On the way from the airport to the center, you can see massive fields of lupines in full bloom.\nPhoto: On the way to the airport.\n\u0026ldquo;The stars in the sky don\u0026rsquo;t speak, the children on earth miss their mothers\u0026hellip; the eyes in the sky blink, a mother\u0026rsquo;s heart is a lupine flower.\u0026rdquo; This childhood song suddenly started playing in my head. I finally know what a lupine looks like.\nI suspect that once I switched into \u0026ldquo;Bariloche mode,\u0026rdquo; I started doing silly things—entirely my own fault, not a slight on the city. I think because I just wanted to veg out after so much traveling, my mental gears were slipping, resulting in constant brain fog. The most direct evidence: after arriving at my Airbnb, I looked at the Google Maps link for the restaurant my friend sent me and walked to a steakhouse with a line outside. I just assumed that was the place. Even more bizarrely, I didn\u0026rsquo;t feel anything was wrong. When my friend texted saying he had arrived and I replied I was already there, yet we couldn\u0026rsquo;t see each other, I still didn\u0026rsquo;t catch on. It wasn\u0026rsquo;t until he asked, \u0026ldquo;Did you go to a different one?\u0026rdquo; that I realized—Oh crap!!\nWell, the steak was still delicious, and my friend treated me, so I was happy! To my surprise, the only two other Chinese men I had seen on my flight were sitting at the table right next to us. So, in that entire steakhouse, all four Chinese faces were gathered at two adjacent tables. When I locked eyes with them, I bet they were just as astonished.\nPhoto: Looking up at the blue sky and white clouds.\nAfter dinner, something interesting happened. On the walk back to my Airbnb, I stopped at a small supermarket across the street. The owner tried to communicate with me in very broken English, but I couldn\u0026rsquo;t understand him at first. Eventually, I realized he was asking if I had any Chinese RMB banknotes—small denominations were fine. He likes to collect banknotes from different countries. I felt bad because, aside from Pesos, I hadn\u0026rsquo;t brought a single cent of RMB with me (and you never need cash in China anyway). I could see his disappointment; Bariloche probably doesn\u0026rsquo;t see many Chinese tourists in a year. After this, I realized it might be a good idea to carry a few small RMB bills when traveling to remote places.\nPhoto: I forget if this was the \u0026ldquo;Anonymous Supermarket,\u0026rdquo; but it was a large local one. So many Chinese seasonings! Lee Kum Kee dark soy sauce was even more expensive here than in BA 😂\nPhoto: The supermarket line was so long!\nThe friend I had dinner with told me he had booked an 8-hour hiking tour and asked if I wanted to join. My \u0026ldquo;lying flat\u0026rdquo; soul firmly declined. Instead, I spent the next two days lounging in the Airbnb, doing a \u0026ldquo;city walk\u0026rdquo; in town when I went to the supermarket, and dazing by the river.\nPhoto: The streets. Unlike Buenos Aires, the houses here don\u0026rsquo;t have heavy anti-theft bars installed.\nEventually, I felt like I couldn\u0026rsquo;t stay a \u0026ldquo;waste of space\u0026rdquo; forever; I had to explore the mountains at least once. So, I took a bus to the cable car (Aerosilla Cerro Campanario). This is a chairlift style, like at a ski resort, so it\u0026rsquo;s open-air. When the wind is strong, you can hear the friction between the cable and the chair, and there\u0026rsquo;s a slight swaying.\nPhoto: On the way down.\nActually, you can hike up instead of taking the chairlift; it takes about half an hour. But I was lazy. The round-trip ticket was 20,000 Pesos (about $14) for a ten-minute ride. Looking back, it was a bit pricey, but I had time to kill. The benefit is the view: as you ascend (or return), you see the emerald lake and the deep blue sky, connected by lush green mountains. There\u0026rsquo;s a photographer near the drop-off point. If you want a photo, pose early and decide later if you want to buy it. I figured since I was only visiting this one spot, I might as well have a memento, so I bought it. I can\u0026rsquo;t say I\u0026rsquo;m thrilled with the shot, but it has commemorative value. One photo was about ¥40.\nPhoto: Well, this is the result. Showing you the first paid \u0026ldquo;tourist photo\u0026rdquo; of my life, which cost me $6.\nAfter getting off the chairlift, there are several observation decks nearby where you can take photos and look out over the mountain ranges.\nPhoto: View from Observation Deck 1.\nPhoto: Another deck, where you can see even further.\nI was back down quite early; the chairlift and sightseeing took less than an hour. So, I took the bus to the Llao Llao Hotel area. Walking down from the hotel, I met a girl from the US. We chatted for a bit, and I realized I’ve met a lot of Americans on the road, even though they say not many Americans choose Argentina for vacation—most go to Europe.\nOn the way, I kept running into local dogs who were very interested in the chips in my hand. The scenery in that area is truly lovely—lakes and mountains that aren\u0026rsquo;t as \u0026ldquo;shocking\u0026rdquo; as the glaciers in El Calafate, but more delicate and exquisitely carved by nature. I think that\u0026rsquo;s why it\u0026rsquo;s called \u0026ldquo;Little Switzerland.\u0026rdquo;\nPhoto: From left to right: a church, a dog begging for pets, and Hotel Llao Llao (arranged as they appeared).\nSince V was coming down from the mountain that evening and we had dinner plans, I didn\u0026rsquo;t linger and took the bus back to the center. Interestingly, the bus played music, and the driver was a local man with a white beard—a real veteran driver, haha. He seemed to know everyone in town. I also saw many tourists from other parts of Argentina. I was once again struck by how Mate is truly their national drink; I saw a 12-year-old girl with a Mate cup tucked into her bag.\nThat night, V and I went to the steakhouse the Singaporean friend had originally recommended. It was excellent. Honestly, the baseline for steak in Argentina is consistently high. After dinner, we headed back to our respective accommodations—there isn\u0026rsquo;t much nightlife there. For the final two days, I found a café where the cakes were amazing. To be fair, I didn\u0026rsquo;t have much great coffee during my 20+ days in Argentina, but this place was decent—perhaps only because the competition was weak—but at least the milk foam was even and they gave me latte art. But the cake was the star. V ordered a Hawaiian White Chocolate one, which was a bit too sweet for me. For me, the highest praise for a dessert is \u0026ldquo;it\u0026rsquo;s not too sweet.\u0026rdquo;\nPhoto: I fell in love with this cake the moment I saw it! 😍\nPhoto: It\u0026rsquo;s a bit sad that this was the first latte with a heart I had in Argentina.\nAdditionally, I had my first Peruvian meal in Bariloche. V recommended I try the purple corn juice (Chicha Morada), and it was quite good! Peruvian food feels like fusion cuisine. I never got around to trying it in BA, so I had it here. While the flavor was good, V and I both agreed it wasn\u0026rsquo;t cheap. Overall, perhaps because it\u0026rsquo;s a tourist hub, the prices in Bariloche felt comparable to Europe.\n![](Chicha morada.png) Photo: I thought it was fruit juice at first, but it\u0026rsquo;s made from corn. In Peru, it\u0026rsquo;s called Chicha Morada.\nPhoto: Halfway through I remembered to take a photo of my first Peruvian meal. The sauce was sweet and sour, very refreshing—honestly, a bit like the Eastern European food V and I had in Berlin.\nPhoto: The fried rice wasn\u0026rsquo;t great; the rice was a bit hard. Neither of us liked it much.\nOne last thing: taking the bus in Bariloche. If you have a SUBE card, you can just tap it, but top-up points are scarce, so it\u0026rsquo;s better to load a lot at once. The common bus lines also accept credit cards directly (Visa or Mastercard are usually fine). Just tell the driver your destination when you board, they will enter the price, and you tap your card on the machine. The fare is significantly higher than in BA. There are no stop announcements, so you have to keep an eye on your location.\nSummary: My biggest takeaway from Bariloche? The education in solitude that taught me to cherish my friends even more. That concludes my Argentina series. 👋 Until the next journey!\n","permalink":"/posts/argentina-bariloche/","summary":"\u003cp\u003eAs the title suggests, I really went there just to idle the time away.\u003c/p\u003e\n\u003cp\u003e\u003cimg loading=\"lazy\" src=\"/posts/argentina-bariloche/sitting_on_the_chair.png\"\u003e\n\u003cem\u003ePhoto: Sitting on a chair by the lake, dazing in the sun. If I didn\u0026rsquo;t have to worry about finding a restroom, I could have dazed there all day.\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eBariloche, officially known as San Carlos de Bariloche, is located in the Patagonia region. Compared to the glaciers further south, Bariloche is famous for its stunning lakes and mountains, earning it the nickname \u0026ldquo;The Little Switzerland of South America\u0026rdquo; (though my friend insists it looks nothing like Switzerland).\u003c/p\u003e","title":"Argentina Travelogue (Final): In Bariloche, Wasting Time Amidst Lakes and Mountains"},{"content":"✍️ Foreword To be completely honest, Ushuaia is a bit\u0026hellip; boring. This \u0026ldquo;boring\u0026rdquo; is specifically directed at how \u0026ldquo;over-hyped\u0026rdquo; it is under the heavy filter of social media. However, the place does have its own character. After spending four days there, I realized that Ushuaia used to be Argentina\u0026rsquo;s \u0026ldquo;Ninguta\u0026rdquo; (a legendary place of exile). If people today associate Ushuaia with keywords like End of the World, Lighthouse, Antarctica, and King Crab, my observation is that the old keywords were: Loneliness, Prison, and Antarctica.\n🐎 Itinerary 1️⃣ Day 1: Arrive at the guesthouse in the afternoon; after check-in, take a taxi to the town center to book a penguin tour.\n💡 Tip 1: Only one tour operator in the entire town is allowed to actually set foot on the penguin island (Piratour), so that specific tour needs to be booked well in advance. All other local tours only view the penguins from the boat and cannot land on the island. (Personally, I don\u0026rsquo;t think there\u0026rsquo;s a massive difference unless you are specifically looking for \u0026ldquo;the perfect shot,\u0026rdquo; because many boats get close enough to the island to see the penguins clearly.)\nThe exclusive Penguin Island tour\n💡 Tip 2: If you are traveling solo or in a pair, keep an eye out for last-minute cancellations. When our group of six asked about Piratour for the following three days, it was fully booked. However, a friend of mine traveling solo went the next day and snagged a spot at half-price. I suspect someone canceled last minute, and with only one seat left, they offered a \u0026ldquo;fire sale\u0026rdquo; price. 🤣\n2️⃣ Day 2: Took a taxi to Tierra del Fuego National Park for a day trip.\n💡 Tip 1: You can use cash or a credit card to buy tickets for Tierra del Fuego. Once you\u0026rsquo;ve paid, you can take a bus inside the park. The bus accepts Mercado Pago, but I suggest just bringing cash. Drivers often prefer to avoid taxes and might tell you they \u0026ldquo;only accept cash.\u0026rdquo;\nHa, we walked a full loop around this part of the island\nWe actually ran into this situation. We spent all our cash on the entrance tickets. When we tried to board the bus, the driver insisted on cash. We tried to go back to the ticket office to refund the cash and pay for the entrance with a credit card instead, but they refused. The ticket office staff said the bus does support Mercado Pago QR codes; the driver argued it didn\u0026rsquo;t. Eventually, after the staff intervened, the driver—likely not wanting to lose the fare for six people—magically produced a Mercado Pago machine for us to scan.\n💡 Tip 2: Basically, there is no signal at the entrance of Tierra del Fuego, and even less once you\u0026rsquo;re inside. However, I had a brilliant friend who brought a Starlink, so they were probably the only two people in the park with internet. 😆\nPhoto borrowed from my friend\u0026rsquo;s social media feed\n3️⃣ Day 3: Penguin Tour + Prison Museum\n💡 Tip: If you don\u0026rsquo;t finish the Prison Museum in one day, you can return the next day for free with the same ticket. The ticket costs roughly ¥160 (RMB).\nThe penguin island near the lighthouse\nThe famous lighthouse\nThis specific building is a part of the original prison that has had zero renovations. When I walked in, it was completely empty and felt incredibly eerie. Do you know that feeling of stepping out of a heated room into the bone-chilling wind of a derelict prison? It\u0026rsquo;s hard to imagine how the inmates survived year after year in this literal \u0026ldquo;Ninguta.\u0026rdquo;\n4️⃣ Day 4: Hiking the Glacier + Town Bus Tour\n💡 Tip 1: Ushuaia has its own glacier called Glacier Martial. When we went, it was under maintenance. Entry is free after 5:00 PM; otherwise, it\u0026rsquo;s about ¥50 per person.\nPhoto from someone else—the view looked great, so a friend and I decided on a \u0026ldquo;shallow\u0026rdquo; hike. Little did we know the weather on the mountain changes in the blink of an eye.\nMe in front of Glacier Martial: I have no idea why my silhouette looks so sketchy here; I don\u0026rsquo;t even know what I was doing. 🤷\n💡 Tip 2: The town bus also requires a ticket, which is around ¥50–60. There is also a train option. The bus tour ends with a voucher for a small cup of hot cocoa, which you can redeem at a designated shop nearby.\nWind was so strong I just wanted to dance like a maniac hhhh\n🤔 Random Reflections Exploring Ushuaia\u0026rsquo;s sites—from the National Park to the Prison Museum—I finally saw information about the local indigenous people, the Yaghan (Yámana). They were nomadic hunter-gatherers who adapted to the extreme cold, but their numbers plummeted due to disease and cultural shock following European colonization. Intellectually, this history filled a void in my understanding of the Americas before \u0026ldquo;discovery.\u0026rdquo;\nA corner of the Prison Museum\nAnother corner of the Prison Museum\nLooking out from the Prison Museum\nTierra del Fuego is where the indigenous people lived, so if you go there, you\u0026rsquo;ll see many exhibits explaining their way of life. Even the Prison Museum has extensive displays on them. But like many other civilizations, their traditional social structures and languages are on the brink of extinction.\nPerhaps most people choose Ushuaia for the romance of the \u0026ldquo;End of the World\u0026rdquo; and want to send a meaningful postcard from the End of the World Post Office. Unfortunately, the post office was temporarily closed. I heard from friends that the 80-year-old gentleman who runs it is still fighting to get it reopened.\nThe view from the Tierra del Fuego Visitor Center\nFrom Buenos Aires to Iguazu, El Calafate to Ushuaia, and later Bariloche—the more I experience these cities, the more I realize Argentina is a textbook \u0026ldquo;immigrant nation.\u0026rdquo; Its population and culture were deeply shaped by massive waves of European migration (especially from Italy and Spain) in the late 19th and early 20th centuries.\nThe view from the town bus\nIf you\u0026rsquo;re interested in Ushuaia\u0026rsquo;s history and community, I think the town bus is a great choice. It\u0026rsquo;s about an hour long on a double-decker bus with audio guides in different languages. It gives you a general layout of the local neighborhoods and stops at a few photo spots. I quite enjoyed it, and it even taught me a new Cantonese phrase—\u0026ldquo;游车河\u0026rdquo; (yau che hoh, meaning a leisurely drive).\nTrying to look artsy on the bus\nThe food in Ushuaia felt mediocre, possibly because we spent most of our time in the tourist-heavy town center. There is one extremely popular restaurant that has a line forming as soon as it opens at 7:30 PM. I forget if you can book in advance, but it seems likely. We tried to go at 8:00 PM on the first day, but the queue was so long we gave up.\nWe were so silly; we ordered six small bowls of seafood soup like this. It worked out to $15 per bowl—honestly, wouldn\u0026rsquo;t it have been better to just buy a big plate of meat?\nSince we were usually outdoors at attractions, we noticed that Ushuaia is absolutely packed with Chinese tourists. In those four days, I saw more Chinese people than in BA, El Calafate, and Iguazu combined. Most were there for Antarctica. A couple in front of us in line, who had come from Shanghai, told us their Antarctic cruise tickets cost $14,000 per person.\nThe pier has tour boats and those massive ships heading to Antarctica 🚢\nKing Crab is the big business for these restaurants. Every time an Antarctic cruise docks, it brings a surge of tourists. I remember a video of Yu Minhong (a famous Chinese entrepreneur) treating people to king crab in Ushuaia went viral while we were there, but we missed that wave. Regarding Chinese food, there are several Chinese restaurants in town. We visited one for lunch; the prices are higher than local spots, but the advantage is that you can have king crab prepared in a traditional Chinese style. At the time, a king crab was about $140, plus a processing fee for the cooking, though we didn\u0026rsquo;t order a whole one—just heard about it from friends.\nIn terms of thrill and \u0026ldquo;playability,\u0026rdquo; Ushuaia isn\u0026rsquo;t nearly as impactful as El Calafate (which, in my eyes, holds the same status in Patagonia as Huangshan does in China). However, I did leave that southernmost city with some very special memories. Beyond the sights, it was more about the shared experiences with friends. It was also there that I had a realization: it\u0026rsquo;s okay to feel lonely; it\u0026rsquo;s just part of being human. I feel like I\u0026rsquo;ve grown in how I handle my emotions, seeing the \u0026ldquo;lonely side\u0026rdquo; of people and viewing relationships with a more inclusive perspective (I feel different every time I look back at a new stage of life).\nIn short, my biggest takeaway from this city was an education in solitude. It made me cherish the fact that even in a lonely place, I still have friends.\n","permalink":"/posts/argentina-ushuaia/","summary":"\u003ch1 id=\"-foreword\"\u003e✍️ Foreword\u003c/h1\u003e\n\u003cp\u003eTo be completely honest, Ushuaia is a bit\u0026hellip; boring. This \u0026ldquo;boring\u0026rdquo; is specifically directed at how \u0026ldquo;over-hyped\u0026rdquo; it is under the heavy filter of social media. However, the place does have its own character. After spending four days there, I realized that Ushuaia used to be Argentina\u0026rsquo;s \u0026ldquo;Ninguta\u0026rdquo; (a legendary place of exile). If people today associate Ushuaia with keywords like \u003cem\u003eEnd of the World\u003c/em\u003e, \u003cem\u003eLighthouse\u003c/em\u003e, \u003cem\u003eAntarctica\u003c/em\u003e, and \u003cem\u003eKing Crab\u003c/em\u003e, my observation is that the old keywords were: \u003cem\u003eLoneliness\u003c/em\u003e, \u003cem\u003ePrison\u003c/em\u003e, and \u003cem\u003eAntarctica\u003c/em\u003e.\u003c/p\u003e","title":"Argentina Travelogue (IV): Ushuaia—In the Lonely End of the World, There are Still Friends"},{"content":"🔥 Key Takeaways After this trip to Argentina, I’ve realized that to truly save money, I must force myself to become a meticulous planner for future long-distance travels;\nBe more direct when speaking; foreigners often don\u0026rsquo;t understand subtext or \u0026ldquo;hidden meanings\u0026rdquo;;\nThe glacier is absolutely worth seeing; the actual sight is incredibly breathtaking and worth every penny;\nThe local roasted lamb is excellent; it\u0026rsquo;s a paradise for carnivores;\nWhen flying in South America, always leave plenty of buffer time;\nArgentina maintains a high level of focus and widespread commemoration regarding the Malvinas Islands (known as the Falkland Islands in the UK).\n💨 \u0026ldquo;Betrayal\u0026rdquo; After the Initial Plan Shattered Originally, several friends and I had been saying for a long time that we wanted to travel through Argentina together. But in a group full of \u0026ldquo;P-type\u0026rdquo; personalities (MBTI), only one person actually did any planning—a polite, hardworking Singaporean friend who carefully listened to everyone\u0026rsquo;s ideas. Due to various factors, we eventually scrapped our original plan for a self-drive tour through El Calafate and El Chaltén, deciding instead to visit Iguazu Falls first and then head to Ushuaia together.\nHowever, looking back at that decision, the conclusion to skip El Calafate seems absurd. Ironically, most of us ended up succumbing to \u0026ldquo;FOMO\u0026rdquo; (Fear Of Missing Out) and went to see the glaciers anyway, despite our schedules being last-minute and convoluted.\nI was the first one to \u0026ldquo;betray\u0026rdquo; the group, for which I was mercilessly mocked by my friends. Before the trip, I had argued in our group chat that El Calafate and the glacier tours were too expensive, suggesting that if time was limited, we should prioritize Bariloche and Ushuaia instead. It’s true that flights from BA to El Calafate and the tour prices are high, but the glacier really is worth it. Perito Moreno is special because it’s one of the few \u0026ldquo;living\u0026rdquo; glaciers still advancing. Plus, after being \u0026ldquo;sold\u0026rdquo; on it by a video from the creator Video Hurricane, I was willing to let my wallet take the hit.\nAnyway, the group had originally agreed to give up on El Calafate, and I was undoubtedly the one who took the \u0026ldquo;fall\u0026rdquo; for that decision. The final consensus was: aside from Iguazu and Ushuaia, all other stops would be arranged individually.\n🧊 An Impulse Move: The Call of the Glacier Well, humans are followers. During our days in Buenos Aires, two of my friends (the \u0026ldquo;R-sisters\u0026rdquo;) left for four days to visit El Calafate. When they returned, seeing their photos and hearing their descriptions of the scenery made my heart itch. Combined with the fact that life in BA felt a bit monotonous, my desire for the outdoors grew stronger. As it turns out, I wasn\u0026rsquo;t the only one suffering from FOMO; \u0026ldquo;Teacher G,\u0026rdquo; a middle-aged gentleman in our group, had it even worse than I did. So, one night:\nG: \u0026ldquo;Wanna go?\u0026rdquo;\nMe: \u0026ldquo;Go where?\u0026rdquo;\nG: \u0026ldquo;El Calafate. The glaciers. If we miss this chance, who knows when the next one will be? I heard it\u0026rsquo;s mind-blowing. We have to go!\u0026rdquo;\nMe: \u0026ldquo;But it\u0026rsquo;s so expensive T_T\u0026rdquo;\nG: \u0026ldquo;Hey, we\u0026rsquo;re already here! Wouldn\u0026rsquo;t it be a shame? The scenery is definitely worth it. Time is tight, buy the tickets now and we can still make it back in time.\u0026rdquo;\n\u0026hellip;\nAfter a few rounds of this, I completely abandoned my stance and bought the tickets immediately (the price of being a \u0026ldquo;Special Forces\u0026rdquo; traveler—last-minute tickets are indeed pricey). For the next three days, the round-trip flight cost $580. I would spend one afternoon, one morning, and one full day in El Calafate—roughly 48 hours. Once I calmed down, my foreign friend teased and scolded me: \u0026ldquo;You said you weren\u0026rsquo;t going, and now you are? You let G give you FOMO 😓.\u0026rdquo; I was speechless—my friend\u0026rsquo;s Chinese isn\u0026rsquo;t great, so he doesn\u0026rsquo;t catch the nuances; from now on, I need to be direct with \u0026ldquo;yes\u0026rdquo; or \u0026ldquo;no.\u0026rdquo;\n⛰️ In El Calafate We flew with Aerolineas Argentinas, but it was delayed, so we arrived an hour and a half late—checking into our hotel around 4:30 PM.\nA word of advice: when flying in South America, leave as much buffer time as possible and keep a close eye on flight status. I have to vent about South American airlines again—delays are the norm, and everyone claps when the plane finally lands. Aerolineas Argentinas is only \u0026ldquo;good\u0026rdquo; depending on who you compare them to. Even though we didn\u0026rsquo;t have checked luggage (just one backpack each), we faced massive lines for check-in at AEP airport because their website crashed and the self-service kiosks weren\u0026rsquo;t working. The return trip was equally frustrating; El Calafate airport had no self-service machines and didn\u0026rsquo;t support online check-in, so we were forced to wait in a long queue.\nPhoto: The check-in line from El Calafate back to BA\nEl Calafate is great for driving, and there are rental counters at the airport, but since neither of us had processed our licenses, we skipped it. We took a shuttle bus from the airport to the hotel, which cost 12,000 Pesos one way. We were a bit slow; we should have bought the round-trip bus ticket since we already had our return flight booked. A round-trip ticket is cheaper—20,000 Pesos—but you can only pay in cash 💰.\nDon\u0026rsquo;t even think about getting an Uber; it\u0026rsquo;s mostly taxis. I heard there are only four Uber drivers in the whole town 😂. Since we were late in booking our return shuttle, it was fully booked, and we were forced to take a taxi. The hotel staff gave me a taxi driver\u0026rsquo;s contact, and he quoted 33,000 Pesos to the airport. Later, I asked the \u0026ldquo;R-sisters,\u0026rdquo; and they only paid 30,000 😑.\n🪄 Summary: If you are alone, book the round-trip bus at the airport 🚌; if there are 2 or more people, take a taxi 🚕.\nThe shuttle is a van with room for luggage, has heating, and is quite comfortable. While waiting, I met two Slovakian guys who were also on a \u0026ldquo;Special Forces\u0026rdquo; trip from BA. Seeing them wearing only shorts, I couldn\u0026rsquo;t help but ask if they were cold. Turns out, they were! 🤣 Interestingly, we chatted about the tight housing market in BA over the weekend. One guy told me he had booked his BA accommodation a year in advance just to see a concert, so his price was very low. I truly admired that level of planning.\nEl Calafate in mid-November is still very cold, especially with the high winds. A windproof outer layer and thermal inner layers are essential. It was cloudy the day we arrived. G was ambitious and wanted to book a tour immediately, but the reality of howling winds and rain made that impossible. We dropped our stuff at the hotel and headed out to find food and a tour.\nPhoto: Just got on the bus; dark clouds over the town, a sense of vastness and desolation\nPhoto: On the bus, heading to the hotel\nMaybe because mid-November isn\u0026rsquo;t peak season, I found the hotel prices quite reasonable. I booked on Agoda, about a 7-minute walk from the town\u0026rsquo;s main street. I recommend staying near the main street for easier access to food. The town center is small enough that most places are convenient. The \u0026ldquo;R-sisters\u0026rdquo; stayed at a five-star hotel but felt it wasn\u0026rsquo;t really necessary. It makes sense—just like when I visited the Maldives, you spend most of your time outside, so as long as the hotel is livable, it\u0026rsquo;s fine.\nOne thing: if you\u0026rsquo;re taking the airport shuttle, I don\u0026rsquo;t recommend an Airbnb. Stick to hotels. Airbnbs can be tricky for shuttle pickups, whereas every shuttle driver knows the local hotels by name.\nThe hotel turned out to be quite nice, costing about 350 RMB per night. G and I each had a family-sized room with full facilities. The only issues were the weak Wi-Fi and the dim lighting—the latter seems to be a common theme in South America. Even in our BA apartments, the lights were mostly dim yellow—great for sleeping, but terrible for working.\nBecause of the glaciers and its location in Patagonia, El Calafate is a dedicated tourist town, so the industry is very well-developed. The town center is packed with travel agencies offering glacier tours. Prices vary slightly depending on the package, but they are generally consistent with market rates, with some agencies offering small discounts.\nIn the end, we booked with the agency the \u0026ldquo;R-sisters\u0026rdquo; recommended because their office looked more professional, and we thought their boats might be more luxurious. We booked a boat tour plus a basic walking tour on the shore. With the agency discount, it came to about 265,000 Pesos per person.\nPhoto: The boat we took\nSide note: while booking, I learned that the name \u0026ldquo;El Calafate\u0026rdquo; comes from the Calafate bush. It\u0026rsquo;s a hardy, thorny shrub (Berberis buxifolia) with yellow flowers and deep blue berries often used for jam.\nThe guy at the agency gave us a drink made from these berries; it tasted like a sweet mix of honey and jam. He told us: \u0026ldquo;Whoever eats the Calafate berry will inevitably return here.\u0026rdquo; While it sounds more like a beautiful legend about the land\u0026rsquo;s charm than a strict prophecy, I do find this land incredibly captivating. I’ll likely go back if I get the chance.\nG and I were lucky. Although it was rainy the afternoon we arrived, we paid our money and went to rest with heavy hearts. The next day, however, was perfectly clear and sunny. I felt like I had used up all my good luck for November right then! It\u0026rsquo;s an hour\u0026rsquo;s drive from the town to the pier, but the scenery is incredible. The richness of the Patagonian dry steppe ecosystem looks dazzling under the bright sun.\nPhoto: The distant lake looks blue due to the sunlight\nPhoto: From the bus window—the wind blows through the grass (but no cows or sheep in sight)\nOnly people from the south understand the excitement of seeing snow, let alone a glacier. The last time my threshold for natural scenery was raised was at Jade Dragon Snow Mountain, but this time, the bar was raised even higher. It was funny: at first, everyone was ecstatic. Almost the entire boat was on the deck, snapping photos of even the smallest, scattered icebergs. By the return trip, there were only a few people left on deck; the scattered ice could no longer hold anyone\u0026rsquo;s interest. Human nature—I was no different.\nPhoto: Some scattered ice appearing on the lake at first, though they are likely deep underwater\nPhoto: Encountering larger ice chunks; my megalophobia flared up as we got closer\nPhoto: Not sure why the top left is black; perhaps silt was trapped when it formed?\nOur tour stopped at Puesto Las Vacas, where the trees are massive with gnarled branches. Even so, many were snapped by lightning or uprooted, making me shudder at the thought of the past weather here. Standing among those trees was pure awe.\nThe place is called Puesto Las Vacas, which means \u0026ldquo;Cow Post.\u0026rdquo; As soon as we stepped onto the grass, we found cow dung everywhere. The guide later told us that the cows were originally brought in from outside. Their numbers weren\u0026rsquo;t high initially, but because they have no natural predators here and the grass is excellent, the population exploded.\nThis led to ecological damage: the cows overgraze the grass, leading to soil degradation and erosion. Due to high transportation costs and bureaucratic red tape, the cow problem remains difficult to solve, much to the frustration of the local government.\nPhoto: Marveling at nature\u0026rsquo;s wonders and the powerful vitality of plants\nPhoto: The lake\u0026rsquo;s color, formed by the high altitude, is strikingly similar to Blue Moon Valley at Jade Dragon Snow Mountain\nOur tour claimed to show three glaciers, but we only got close to two: Perito Moreno and Glaciar Spegazzini.\nGlaciar Spegazzini in the distance. I stood at the bow here and got blasted by the wind like an idiot\nBehind it is: Cerro Peineta\nA quick word on the boats—facilities vary by company. Ours had three levels: the first had a restaurant, restrooms, and seating; the second was all seating; and the third was the bridge and deck. The boat provided free Wi-Fi and the heating was strong.\nThe restaurant sold pastries, coffee, and alcohol at prices almost identical to those in town. Given Argentina\u0026rsquo;s current inflation, it felt \u0026ldquo;friendly\u0026rdquo; to tourists. The only issue was the limited number of restrooms and long lines. Later, on our Ushuaia boat, there were plenty of restrooms and cheap food, but no Wi-Fi.\nCaptured from the boat—truly too beautiful!!\nOh, and the entrance fee for Los Glaciares National Park is separate and not included in the tour. We paid by card at the entrance—45,000 Pesos per person. So, including the boat tour, the glacier trip cost about 310,000 Pesos per person, which is roughly ¥1550. Since I might only do this once, I found the price acceptable, even though it has risen significantly compared to the past.\nFull view of Perito Moreno—from the boat\nPerito Moreno—from the catwalks; you can occasionally hear the distant crack of the glacier\nThe restaurants in town are mostly near the main street, along with souvenir shops. I bought a sheep 🐑 magnet because the design and quality were nice, for 4500 Pesos.\nI suggest bringing both cash and a credit card to El Calafate as a double insurance. Mercado Pago is also a good choice if you have it, but prioritize cash. Most restaurants prefer cash and some even offer a 10% discount for cash payments. Argentina is a tipping country, and restaurants in El Calafate expect it, usually around 10%.\nPhoto: The sign in the middle says 10% off for cash payments\nEl Calafate has unique local food influenced by the Andes, the Patagonian terroir, and European immigrants (especially Italians and Spaniards). It focuses on highland livestock, wild ingredients, and charcoal grilling—a carnivore\u0026rsquo;s heaven.\nPhoto: But for me, the beef is still better\nPhoto: Table bread + a dip made from some kind of bean\nThe roasted lamb (Cordero Patagónico) is famous here. It\u0026rsquo;s actually a type of lamb I can actually eat (I\u0026rsquo;ve tried hotpot lamb, \u0026ldquo;Cangshu\u0026rdquo; lamb in Suzhou, and lamb in Turkey, but usually find the gamey smell—\u0026ldquo;shan wei\u0026rdquo;—overpowering and nauseating). Here, the gamey smell is only about 3%. I suspect I\u0026rsquo;m genetically sensitive to lamb, so even at 3%, I could only eat a little.\nPhoto: A massive portion; the tray almost spanned the entire table\nTrout and salmon are also local specialties, but to be honest, I\u0026rsquo;m not a fan of the heavy cream and mashed potato preparation. It was too rich, and I couldn\u0026rsquo;t even finish the fish, regretting my choice. We also ordered Guanaco meat, a local specialty.\nA huge plate, but so rich I couldn\u0026rsquo;t finish it\nSource Wikipedia: Guanaco\nPhoto: Three ways of preparing Guanaco meat (from left to right: meatballs, smoked, and pickled in vinegar)\nAside from the tours, there are some nearby parks to explore. We walked to a meadow where both G and my foreign friend (who traveled there alone later) sat to contemplate life and found some clarity.\nAbout a 1.6km walk from the town center\nWalking back to the hotel from the meadow, we passed a square commemorating the Falklands War (known as the Malvinas War in Argentina). The loss of the 1982 war is a collective trauma in their national memory, and the sovereignty issue is a point of national consensus. If you\u0026rsquo;re interested, it\u0026rsquo;s worth reading up on this history.\nThe Malvinas are \u0026ldquo;personified\u0026rdquo; here as a female warrior\n#💰 Summary This \u0026ldquo;Special Forces\u0026rdquo; glacier trip cost a total of approximately: ¥7000, including round-trip flights to El Calafate, accommodation, food, tours, and airport transfers.\nThat’s all for this one. 👋 See you in the Ushuaia and Bariloche chapters.\n","permalink":"/posts/argentina-el-calafate/","summary":"\u003ch1 id=\"-key-takeaways\"\u003e🔥 Key Takeaways\u003c/h1\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eAfter this trip to Argentina, I’ve realized that to truly save money, I must force myself to become a meticulous planner for future long-distance travels;\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eBe more direct when speaking; foreigners often don\u0026rsquo;t understand subtext or \u0026ldquo;hidden meanings\u0026rdquo;;\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eThe glacier is absolutely worth seeing; the actual sight is incredibly breathtaking and worth every penny;\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eThe local roasted lamb is excellent; it\u0026rsquo;s a paradise for carnivores;\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eWhen flying in South America, always leave plenty of buffer time;\u003c/p\u003e","title":"Argentina Travelogue (III): Spending $1000  in 48 Hours: My Perito Moreno Glacier 'Special Forces' Trip"},{"content":"🧳 Preparation The trip to Iguazu Falls was finalized two months before we even set foot in Argentina. It was the first part of our itinerary to be locked in, so we reaped the rewards of early planning—cheap flight tickets.\nWe bought tickets for Flybondi, only to discover afterward that \u0026ldquo;Red Flag\u0026rdquo; posts about them are all over social media. Apparently, this airline has a reputation for being quite chaotic. But what could we do? The tickets were already paid for and non-refundable, so we just kept a positive attitude and hoped for the best🤷.\nAs it turns out, airlines in Argentina—and South America in general—aren\u0026rsquo;t particularly reliable. This was just the beginning of our \u0026ldquo;stories\u0026rdquo; with various airlines. Over the two months following our purchase, Flybondi changed our flight time three times, eventually delaying the departure by eight hours. Fortunately, we hadn\u0026rsquo;t planned to do much on our arrival day anyway; otherwise, our short trip (one night and one full day) would have been severely compromised.\nTransportation in Iguazu mostly consists of buses or driving. Our guesthouse offered a shuttle service, so we coordinated directly with their staff for pickups. If you prefer the bus, there are plenty of guides available online. I recall the round-trip price between the airport and our guesthouse for four people was 38,000 Pesos (if I remember correctly).\n🗺️ Itinerary We saw some travelers online sharing that you can hire a private car to go to the Brazilian side of the falls and back on the same day without a visa. However, we also saw posts mentioning random spot checks. Since three out of the four of us hold Chinese passports and none of us had a Brazilian visa, we decided to play it safe. We chose to visit only the Argentine side of the falls and skipped the Brazilian side.\nOur plan: Rest well after arriving at the guesthouse, head to the falls at 8:00 AM the next day, and catch a 3:30 PM flight back to Buenos Aires.\nTickets were purchased online via the official website, costing 35,000 Pesos per person for foreign tourists. A friend accidentally bought an extra ticket thinking identity info was required for each, but it turns out you just need the QR code. Besides standard tickets, you can also book various \u0026ldquo;tours\u0026rdquo; through travel sites depending on your needs.\nOfficial ticketing website: https://ventaweb.apn.gob.ar/reserva/parques\n🏞 Reaching the Falls The Argentine side of the falls is located within Iguazu National Park. Once inside, you can take a small train, which requires an additional fee. The train follows a schedule, stopping at a few stations along the way, with the final stop being the \u0026ldquo;Garganta del Diablo\u0026rdquo; (Devil\u0026rsquo;s Throat) station.\nAfter getting off the train, it’s a 15-20 minute walk to reach the falls. The path crosses several rivers, and if you\u0026rsquo;re lucky, you\u0026rsquo;ll spot local wildlife, like the Coatimundi (commonly known as a Coati).\nYou\u0026rsquo;ll also see various butterflies, such as the \u0026ldquo;88 Butterfly.\u0026rdquo; While we were waiting to board the train to leave, one of these butterflies even landed on my bag.\nTruly, the world\u0026rsquo;s widest waterfall is breathtaking. Looking down into the abyss, you feel as though you could be swallowed by the rushing torrents at any moment.\nIt\u0026rsquo;s worth noting: if you go to Iguazu, keep your food well-stored and do not feed the local animals. As we were leaving the falls, the Coatis seemed to have memorized the train schedule, knowing that passengers often have stray food. During the passenger changeover, they scurry onto the seats to scavenge and even get into fights with each other.\nCoatis have a very keen sense of smell, which can lead to aggressive behavior (like scratching or biting tourists to grab food). While my friend and I were sitting on a wooden bench waiting for the train, a Coati walked right up to her bag and started sniffing—she did indeed have a pack of candy inside. My friend thought it was cute and didn\u0026rsquo;t move at first, but a local woman nearby quickly pulled her away, signaling us to stay clear of these animals.\n🍚 About Dining I don\u0026rsquo;t remember much about what we ate in Iguazu because our stay was so brief. Due to the flight delay, we didn\u0026rsquo;t take off until night. Dinner was basically instant noodles cooked at the guesthouse. By the time we reached the airport and finally made it to Iguazu, it was nearly 2:00 AM before we got to sleep. We could hear the wind howling outside in the middle of the night and feared it would rain the next day, but it turned out to be perfectly sunny—what a relief!\nBreakfast was eaten at the entrance of Iguazu National Park. There are cafes, bakeries, and snack shops near the gate. The food wasn\u0026rsquo;t great, but it was edible. There are also several souvenir shops and stalls selling local handicrafts nearby.\nThe only proper restaurant meal we had was after our tour. Since we didn\u0026rsquo;t do the \u0026ldquo;Great Adventure\u0026rdquo; boat ride into the falls, we just took the train to the main lookout and left, so we had plenty of time. If you have the energy, you can get off at the middle station and hike the Upper or Lower circuits.\nWe heard there was a great local fish restaurant nearby. Since we finished early, were starving, and knew the airport wouldn\u0026rsquo;t have many options, we paid our shuttle driver a little extra to take us to the restaurant and then to the airport. The restaurant is shown below.\nWe ordered a grilled fish and a risotto, among other things I\u0026rsquo;ve forgotten. Overall, it was quite good. The grilled fish featured a passion fruit sauce combined with other roasted vegetables. My only complaint was that the fish skin was a bit too charred and bitter. For four people, including the default 10% tip, it came to about 30,000+ Pesos per person.\n💡 Important Notes We went in early-to-mid November. Personally, I didn\u0026rsquo;t encounter many mosquitoes, but another group of friends went the very next day and reported being swamped by them. I suspect it depends on exactly which trails you take.\nIf you are visiting during the local spring or summer, definitely bring mosquito repellent. The mosquitoes there are fierce. I got bitten once in Buenos Aires; I woke up in the middle of the night to one buzzing in my ear. I slapped it—leaving a massive bloodstain—and my hand swelled up for nearly a week.\nAdditionally, the path to the falls is an iron catwalk. Halfway through, we encountered a large foreign man who had tripped and gashed his forehead. He was sitting on the side with blood streaming down. Please be careful while walking!\nSummary That\u0026rsquo;s it for Iguazu for now! See you in the next post👋.\n","permalink":"/posts/argentina-iguazu/","summary":"\u003ch1 id=\"-preparation\"\u003e🧳 Preparation\u003c/h1\u003e\n\u003cp\u003eThe trip to Iguazu Falls was finalized two months before we even set foot in Argentina. It was the first part of our itinerary to be locked in, so we reaped the rewards of early planning—cheap flight tickets.\u003c/p\u003e\n\u003cp\u003eWe bought tickets for Flybondi, only to discover afterward that \u0026ldquo;Red Flag\u0026rdquo; posts about them are all over social media. Apparently, this airline has a reputation for being quite chaotic. But what could we do? The tickets were already paid for and non-refundable, so we just kept a positive attitude and hoped for the best🤷.\u003c/p\u003e","title":"Argentina Travelogue (II): Stepping into Iguazu, Enveloped by Roaring Waters, Lush Greens, and Wild Creatures"},{"content":"The Argentina series is expected to be quite lengthy, so I’ll be breaking it down into several posts. The journey covers the capital, Buenos Aires, Iguazu on the Brazilian border, El Calafate in Patagonia, Ushuaia—the gateway to Antarctica, and Bariloche, often called South America’s Little Switzerland. My posts will essentially cover everything from food and accommodation to transportation and general survival in Argentina.\nThis first installment focuses on my pre-trip preparations and my memories of the capital, Buenos Aires. I want to document as much as possible, so bear with me—it’s a long one.\nNote: This article reflects my personal views and totals approximately 12,000 words.\nI. Planning \u0026amp; Preparation I started planning the trip in October. Originally, I was dying to go to Mexico because early November coincides with the Day of the Dead. I was in Chiang Mai around that time last year and happened to watch Coco, which left me completely obsessed with experiencing the festival firsthand.\nMexico’s visa policy allows entry for those holding valid US visas, long-term Schengen visas, or Japanese visas valid for three years or more. However, I’d heard stories of people being deported even with the three-year Japanese visa (which turned out to be true—a girl I know later tried to enter Mexico from Argentina with that exact visa and was sent back). Plus, for South America, transiting through the US offers more flight options and cheaper prices. So, I tried my luck and applied for a US visa again. Well, I was rejected. Again.\nIt’s honestly kind of hilarious. If you’re a woman and don\u0026rsquo;t have much self-confidence, go apply for a US visa. The rejection reason is almost always the same: they don’t think you have enough \u0026ldquo;binding ties\u0026rdquo; to your home country, implying you’re likely looking for a green card marriage. When I told my friends back home, they joked that my style and vibe alone make me look like someone heading out to do exactly that—I was literally laughing through the tears. Later, chatting with V in Argentina, she mentioned how expensive New York is. I told her I had stubbornly tried for the visa again and failed, jokingly saying the US Immigration Bureau must have known I was broke and was just trying to save me money lol.\nI asked V if green card marriages were really that common in the US. Her answer was a resounding yes. She told me that since many local men struggle to find partners, there’s an entire industry built around it. It’s a bit like the \u0026ldquo;Vietnamese bride\u0026rdquo; phenomenon—on a global scale, the logic is similar. Population flows with the economy. As women in developed countries become more self-aware and selective, men who still have traditional partner needs but average means look toward other countries.\nBack to the visa: despite the US rejection, I had a backup. I had bought tickets for a conference where the organizers partnered with the government to provide a one-month visa waiver—similar to the waiver granted to US visa holders. This waiver let me stay for a month. Since it was too late to apply for a Mexican visa, I scrapped the Day of the Dead plans and flew straight to Argentina.\nChina Eastern recently launched a Shanghai-Auckland-Buenos Aires route, but the timing didn\u0026rsquo;t work for my schedule. I chose Turkish Airlines: Shanghai to Istanbul, a 17-hour layover, then Istanbul to Buenos Aires with a stop in São Paulo. Total travel time: 12 + 17 + 18 = 47 hours. In all my years of flying, this was the first time my feet actually swelled up. It was funny—on the second leg from Istanbul to BA, I tried to change shoes and wondered why they felt so tight. I realized it wasn\u0026rsquo;t the shoes; my feet had turned into little steamed buns.\nI made a mistake. Before the trip, a friend warned me about poor circulation and the risk of blood clots on long flights. So, I bought compression socks for the first time. However, I think the swelling was actually caused by wearing them wrong. I bought the footless kind (ankle to thigh). I later learned that due to gravity, hydrostatic pressure is highest at the ankle. Compression socks should cover the ankle, not have the cuff digging into it. Naturally, I did the latter. Learn from my mistake: if you’re traveling long distances, don\u0026rsquo;t get fancy and end up making things worse.\nThe green part is my socks🤣\nThis was my first time flying Turkish Airlines (I took China Southern to Turkey previously). Honestly, the experience was great. The food was good, and the amenity kit included socks, slippers, a toothbrush, toothpaste, and an eye mask. Also, because my layover was so long, Turkish Airlines provides free meal vouchers every five hours for connecting passengers. You just go to the service desk and then take the voucher to the food court. It’s mostly fast food—pizza, sandwiches, burgers—but you can\u0026rsquo;t complain when it\u0026rsquo;s free.\nThe free airport transit meal they were offering included an extra piece of bread for me to try! 🤣\nAdditionally, Turkish Airlines provides 4 or 5-star hotel stays for layovers exceeding a certain duration, but our itinerary didn\u0026rsquo;t meet the rules. Hotel opportunities are fewer and come with more constraints, and you need to leave the airport and apply for a Turkish e-visa. If you\u0026rsquo;re interested or your schedule fits, you can check the Turkish Airlines official website or contact their customer service directly.\nTransiting through Istanbul reminded me of my first time traveling abroad. I remember being at this airport with no internet, sleeping on the floor, and sprinting for ten minutes from one end to the other to catch a flight—it feels like a lifetime ago. Two years later, the difference is that I’m no longer afraid to travel alone, and this time I wasn\u0026rsquo;t alone anyway. Because of those past struggles, I knew the layout of the airport like a fish in water. For instance, while waiting with my friend, I mentioned how I once slept outside security. Because of my previous experience going to the wrong gate, I knew exactly which areas had lounge chairs, charging ports, and fewer people. I even walked to the old gate and described to my friend how I once navigated the entire airport to make my flight. All those memories felt so vivid yet the feeling was completely different—that\u0026rsquo;s growth.\nSince we were heading to Argentina, there was some lingering anxiety—not about South American safety (opinions on that vary wildly, but friends in BA told me Palermo was fine)—but about whether my special waiver letter would actually get me through immigration.\nA week before leaving, I heard that a colleague of my friend (Russian or Serbian) was flying Turkish Airlines from Belgrade to BA. During his Istanbul layover, the airline refused to let him board the second leg despite him providing proof of accommodation. The poor guy ended up \u0026ldquo;healing\u0026rdquo; his broken heart in Thailand instead. Then, two other people I know were questioned three times: at check-in, security, and the gate. The staff scrutinized their flight and hotel booking dates to verify their \u0026ldquo;intent.\u0026rdquo; Luckily, they argued their way onto the plane.\nNaturally, I was terrified we’d get rejected at the gate too. But it was much smoother than expected. Leaving Shanghai was a breeze; the check-in agent showed my waiver to a Spanish-speaking colleague and cleared me immediately.\nI think part of it was that my documentation was solid, and the Argentine Immigration office had conveniently posted about the special waiver on their website just days before. If the airport staff don\u0026rsquo;t know the rules, they won\u0026rsquo;t let you through, as airlines face heavy fines for transporting passengers who get deported. Still, there was one last check before boarding where I had to show proof of accommodation and a return flight. My internet was acting up, and I was so nervous that my hands were shaking as I showed the documents to an agent whose English was limited. Looking back, it was pretty dramatic for no reason.\nOur flight had a stop in São Paulo. I saw people getting off and thought we had to deplane too, as is common in China. Plus, a friend had told me a horror story about Brazilian ground staff being so incompetent that he missed his connection. Wary of South American efficiency, I double-checked with a flight attendant and found out we stayed on board for the BA leg. The 90-minute wait on the tarmac was pretty miserable though—you\u0026rsquo;re just stuck there, and the smell of refueling isn\u0026rsquo;t exactly great. I’m glad my return flight takes a different route.\nII. Buenos Aires: First Impressions I didn\u0026rsquo;t expect to love Buenos Aires (BA) as much as I did. The reason is simple: Jacarandas. They made me feel like this was \u0026ldquo;my\u0026rdquo; city. I landed at BA in the early hours of the 6th, so I didn\u0026rsquo;t see much besides the dark outlines of the city.\nFrom Ezeiza Airport to the city center, it’s about a 40-minute drive. Taxis might take the \u0026ldquo;scenic\u0026rdquo; route, so I recommend Uber, DiDi, or Cabify. Uber is usually the priciest; Cabify is more localized. It’s worth comparing.\nAt first, looking out the car window, the road from the airport looked like the urban sprawl of Southeast Asia. But once we hit the city—specifically Palermo—it felt very European. The plane trees lining the streets and the vintage architecture actually gave me a massive flashback to Nanjing. I posted a photo on WeChat with the caption \u0026ldquo;I\u0026rsquo;m in Nanjing,\u0026rdquo; and half my friends actually thought I had already flown back to China.\n*The street view is really similar to Nanjing *\nI discovered the city was covered in Jacarandas one day while walking to the supermarket with my friend V. We turned a corner onto a main road, and a canopy of purple hit me. Under the sunlight, the lush green leaves paired with thick purple blossoms against the bright blue sky and pale yellow walls were breathtaking. It reminded me of the flame trees in Chiang Mai—but while those are full of \u0026ldquo;life-orange\u0026rdquo; energy, the Jacarandas of BA are all about \u0026ldquo;elegant-purple\u0026rdquo; tranquility.\nlove it💜\nIII. Living in Buenos Aires: Food, Housing, \u0026amp; Transport 🏠 Accommodation Palermo is the neighborhood all the locals recommend. The streets feel European—cobblestones, classic architecture, and sidewalk cafes/bars that give the area a distinct vibe. The famous writer Jorge Luis Borges grew up here. Our Airbnb was right near a restaurant mentioned in his stories; we passed it every day but somehow never managed to eat there lol.\nWith Argentina’s inflation, prices are skyrocketing. However, while food prices now rival or exceed those in Europe, housing is still relatively cheap—especially Airbnbs. We stayed in Palermo for about 100–200+ RMB per person per night. To put that in perspective, a decent dinner out will easily cost you 20,000+ Pesos (over 100 RMB) per person. However, the issue with Airbnbs is the soundproofing. Honestly, I think it’s a city-wide problem with the older buildings.\nI started in a hostel my friend booked for an event; the room was like a courtyard setup, and I could hear every single person walking or chatting outside. One morning, I woke up to the surround-sound snoring of the guy in the next room. After my trip to Iguazu, I ditched the free housing and moved in with two other friends. I thought the hostel was just a one-off, but the Airbnb we moved to—which was literally at street level—was no better. You could hear pedestrians\u0026rsquo; conversations through the window as if they were in the room with us.\nLater, I visited V at her apartment in Palermo Hollywood (a pricier area). She complained about the same thing. I was sitting on her sofa working while she napped upstairs, and I could hear the neighbors chatting outside with crystal clarity. Sadly, I don\u0026rsquo;t speak Spanish, or I would have definitely eavesdropped.\n🛍️ Shopping They say food is heaven, and I take that literally. Because BA is expensive and my Airbnb had a kitchen, I picked up my chef’s knife again. I’m not exaggerating: 70% of my luggage was food—instant noodles, rice vermicelli, sauces, and miscellaneous \u0026ldquo;useful\u0026rdquo; snacks.\nMy friends mocked me at first, thinking I overpacked. They were wrong. I brought a box of dried plums (hua mei), which became a crowd favorite. Then there’s my friend \u0026ldquo;Sister F,\u0026rdquo; the typical \u0026ldquo;big talker but weak stomach.\u0026rdquo; She thought bringing 20 packs of noodles was ridiculous, arguing we should be eating out. But by the end, she was the one craving noodles the most after getting tired of all the meat.\nThere was one hilarious night when Sister F wanted to hit the bars. We went out, had one cocktail each and some fried mushrooms. As soon as we stepped out, she turned pale and told me she couldn\u0026rsquo;t walk. I was worried she was going to keel over, but I also really needed to find a bathroom. I asked if she could hang on, but she was dizzy and nauseous. The other three of us were fine. Since she’s notoriously fragile when it comes to alcohol, I ended up piggybacking her for a stretch. The sight of it made her laugh so hard she regained enough strength to stumble home. Once back, she felt sick again until she ate one of my dried plums. Pro-tip: dried plums are a lifesaver for nausea.\nGrocery shopping became my main entertainment. Supermarkets and wet markets are the best way to understand local life. I loved wandering around Coto because it’s affordable and has everything. Most supermarkets sell pre-cut meat, but at Coto, you can pick your cut and have the butcher slice and weigh it for you. I also tried Jumbo and some Chinese grocery stores, but Coto won on variety and price.\nIf you want cheap produce, the local fruit and veg shops are better, though quality varies. Some sell stuff that’s clearly past its prime, so you have to be picky. If you’re not a total carnivore, finding high-quality fresh veg in BA requires some research.\n![](Asadao + mix salade.png) classic combination，Asadao + mix salade\nHere’s the breakdown on grocery prices: Meat is relatively cheap. I got a 1kg ribeye for 16,000 Pesos (about 80 RMB). Pork bones and ribs are a steal—700g of ribs cost me about 10–15 RMB. Milk is also cheap, similar to Europe. Interestingly, the fat content is color-coded: green is lowest, then orange, then red. Wine is also incredibly cheap—sometimes the same price as water. The expensive stuff? Industrial processed goods like chips and candy. A bag of Lay’s (148g) was about 25 RMB, whereas it would be 10 RMB in China.\n![](Fernet con cola.png) Specific drink，Fernet con cola\nMy biggest complaint? The coffee. I expected greatness from a country that neighbors major bean producers, but the coffee in BA was generally terrible. I usually drink black coffee, but I was forced to switch to milk-based drinks because the black coffee was so bad. And even the lattes were hit-or-miss—the foam was often coarse and soapy rather than silky.\nOverall, except for the meat, my friends and I gave BA food a pretty low rating.\n🚶 Safety \u0026amp; Transportation If Istanbul is the city of cats, Buenos Aires is the capital of dogs. You see professional dog walkers everywhere—sometimes one person wrangling 15 dogs at once. It’s a spectacle. But while BA loves dogs, not all owners pick up the poop. Walking the streets (especially at night) is a constant game of \u0026ldquo;dodge the landmine.\u0026rdquo;\nAuntie was absolutely overjoyed!\nSpeaking of safety, we developed a weird theory: the more dog poop there is, the safer the neighborhood. It means people have the leisure time to walk their pets. My friends who go for morning runs in the park confirmed there’s poop everywhere, and Palermo is the same.\nCommon travel advice says to stay in the city center for safety, but in BA, it’s the opposite. The city center (near Plaza de Mayo) can get sketchy, especially at night. Palermo is the gold standard for safety. It’s where the middle/upper class, expats, and young professionals live. There’s a heavy police presence; seeing security guards in bulletproof vests is normal. That said, it\u0026rsquo;s not perfect. I saw a security guard chasing a thief once, and V told me about a guy who got punched and robbed in broad daylight.\nFor transport, we mostly used apps. Uber is okay, but Cabify and DiDi are popular too. Base fares start around 15 RMB. Because of the one-way street system and constant red lights, walking is sometimes faster than driving. I also tried moto-taxis (booked via apps) twice. They provide helmets and are faster at weaving through traffic. That said, they aren\u0026rsquo;t nearly as \u0026ldquo;wild\u0026rdquo; as the moto-taxis in Bangkok. Thailand still holds the crown for chaotic biking 😹.\nPublic transport involves the SUBE card. You can get one at kiosks, though they charge a premium. I just used Apple Pay for the buses in BA—super easy.\n☎️ SIM Cards \u0026amp; Payments My phone is a Chinese model, so no eSIM for me. In BA, I found that buying a SIM card locally is about 1/3 the price of buying one on Taobao.\nI bought a Claro card at a kiosk. The pricing was baffling: V bought one for 2000 Pesos. Three days later, I took a friend to a different kiosk and it was 2000. Two days after that, it was 1700. Another two days later, 1200. It was the exact same \u0026ldquo;Tourist SIM.\u0026rdquo; But hey, this is Argentina—the land of magical realism and hyperinflation.\nA 15GB + 1000 mins plan for one month cost about 9600 Pesos. Total cost (including the card) was about 11600 Pesos (60 RMB).\nDigital payments are advanced, though bugs are frequent. Mercado Pago is the \u0026ldquo;Alipay of Latin America.\u0026rdquo; I brought US dollars as a backup. Since April 2025, the gap between the \u0026ldquo;Blue Dollar\u0026rdquo; and the official rate has narrowed significantly, making it easier to get dollars through official channels.\nYou can exchange cash at Chinese supermarkets or official exchange houses. People on the street will also shout \u0026ldquo;Cambio!\u0026rdquo; at you. Be careful with street exchanges; some people report getting shortchanged. Cash is still king in many restaurants, often getting you a 10% discount. If you worry about the Peso\u0026rsquo;s devaluation, bringing USD cash is never a bad idea.\n⛰️ Sightseeing \u0026amp; Attractions Over my stay, I hit the big ones: the Obelisco, Teatro Colón, Recoleta Cemetery, El Ateneo Grand Splendid, El Rosedal Garden, and the National Historical Museum.\nThe Obelisco is the icon of the city, sitting on 9 de Julio Avenue. It was built in 1936 and has become the symbol of Argentina.\nIt started raining when I got off the bus, around 6 p.m.\nTeatro Colón is world-class. We took a guided tour (book online). It takes about 90 minutes and shows you the incredible architecture and decor before letting you sit in the auditorium.\nThis is a replica; apparently, due to improper transport, a finger of the statue was broken off.\nA panoramic view of the entire hall; it\u0026rsquo;s said you can even go to the top floor for an experience.\nRecoleta Cemetery was a highlight. I stumbled upon it while waiting for a Mate tea class. It’s a famous cemetery for the elite, including former presidents and the famous Eva Perón (Evita). Her face is on the 100 Peso note.\n![]100.png) Luckily, I still had a 100 in my wallet.\n这个家族墓碑门插了一朵🌹引发了我的好奇；这里葬着 Juan Manuel de Rosas——阿根廷19世纪的强权领导人；联邦派标志性颜色是深红色，红色玫瑰花就成为了对罗萨斯本人及其政治运动 (Rosismo) 的一种强烈的、非官方但普遍被理解的致敬和怀念的符号。\nI stood before Evita’s family tomb and noticed blue tickets—apparently wish tickets. The blue ones are supposedly more expensive.\nThe contrast between the pristine, grand tombs and the crumbling, abandoned ones is striking. It makes you wonder if these famous people knew they’d be a tourist attraction one day. Now, some tombs are just bird nests, while others have trees growing out of the cracks. Nature taking its course.\nThis is Domingo Faustino Sarmiento, the seventh president of Argentina, whose symbol is the bald eagle.\nV and I discussed what we’d want on our own tombstones. I said \u0026ldquo;Rebellious.\u0026rdquo; She laughed and said hers would be: \u0026ldquo;If you are reading this, I will hit you.\u0026rdquo; I suggested: \u0026ldquo;If you are reading this, I am watching you.\u0026rdquo; We both cracked up.\nEl Ateneo Grand Splendid is the famous bookstore in a converted theater. It’s pretty, but they had just repainted when I went and the smell was overwhelming, so we just snapped a few photos and left.\nEl Rosedal Garden was a pleasant surprise. I joined a morning run nearby (and failed miserably, walking after 1km). The park is full of locals exercising. With the Jacarandas in bloom, green grass, and geese everywhere, it was incredibly peaceful. Just watch out for the goose poop.\nAround 8 a.m., many people were running and walking their dogs.\nThe National Historical Museum was a bit of a letdown. My friend and I realized that Argentine history basically starts in the 19th century. The indigenous history has largely been erased. It’s a nation of European immigrants. Even our Uber driver in Bariloche later lamented how short their national history feels.\nI really like this kind of media color scheme that has a strong visual impact.\nIt seems like celebrities being made into merchandise really has a powerful promotional effect, lol.\nBased on my knowledge of ACM in Singapore, this is indeed a tortoiseshell product, a women\u0026rsquo;s accessory, where large/tall is considered beautiful.\nI missed out on La Boca, which is a shame. A friend of mine wandered off the tourist path in La Boca looking for a bathroom. A local stopped him and warned him to turn back because it was too dangerous. He narrowly avoided trouble.\nA corner of Chinatown\nAnother \u0026ldquo;brave\u0026rdquo; move: don\u0026rsquo;t wear the wrong jersey. The same friend bought a River Plate jersey and wore it in the Boca neighborhood until someone warned him to take it off. Football is life-and-death here.\nDespite the warnings, I met so many kind people: a lady who helped me translate my grocery list for the butcher, and an old grandmother who asked if we needed help while we were waiting for our Airbnb host. BA has a real warmth to it.\nFinally, the Mate (🧉) experience. It’s the national drink. We took a class near Recoleta. We learned the ritual: the cebador (server) prepares the tea in a mate (cup) with a bombilla (metal straw) and passes it around the circle. Traditionally, everyone shares the same straw. I didn\u0026rsquo;t mind, though I was the first one to drink anyway.\nThe key is the yerba (tea leaves). You fill the cup 2/3 full, shake out the dust, tilt the leaves, insert the straw (never move it!), and add hot water. We tried original, berry, and chocolate-coconut flavors. The chocolate one was surprisingly addictive.\nMate tasting class location：https://maps.app.goo.gl/N8VZ37GpwCvLCszr7?g_st=it\nFinal Thoughts I never expected to spend so much of this year on the road. After Berlin, Argentina was the big one. During my last few days in Bariloche, I realized I’ve found what I truly want to do, and I plan to stay in China for most of next year. My friends call me a \u0026ldquo;travel natural\u0026rdquo; because I can eat and sleep anywhere, but mentally, I’m ready for a break.\nThis series will be long because I want to remember everything. This was Buenos Aires; next up: Iguazu, El Calafate, Ushuaia, and Bariloche. I hope these insights help you on your own journey. Thanks for reading. See you in the next one.\n","permalink":"/posts/argentina-buenos-aires/","summary":"\u003cp\u003eThe Argentina series is expected to be quite lengthy, so I’ll be breaking it down into several posts. The journey covers the capital, \u003cstrong\u003eBuenos Aires\u003c/strong\u003e, \u003cstrong\u003eIguazu\u003c/strong\u003e on the Brazilian border, \u003cstrong\u003eEl Calafate\u003c/strong\u003e in Patagonia, \u003cstrong\u003eUshuaia\u003c/strong\u003e—the gateway to Antarctica, and \u003cstrong\u003eBariloche\u003c/strong\u003e, often called South America’s Little Switzerland. My posts will essentially cover everything from food and accommodation to transportation and general survival in Argentina.\u003c/p\u003e\n\u003cp\u003eThis first installment focuses on my pre-trip preparations and my memories of the capital, Buenos Aires. I want to document as much as possible, so bear with me—it’s a long one.\u003c/p\u003e","title":"Argentina Travelogue (I): Buenos Aires, South America’s Purple City"},{"content":"I never expected to find myself in Guangdong again. Without any prior planning, I’ve somehow ended up visiting Guangdong four times in the less than six months since I returned to China in April.\nThe first time was early April, staying in Shenzhen after coming from Hong Kong. The second was in May, visiting Shanwei with friends after returning from Dubai. The third was a layover at Baiyun Airport on my way back from Budapest via Guangzhou. Just a few days later, while \u0026ldquo;funemployed,\u0026rdquo; I helped a friend organize an event, which turned into a two-week tour of Guangzhou and Shenzhen.\nThis post focuses on my impressions of Guangzhou over those two weeks.\n🐔🍜🍷 About the Food This trip gave me a fresh perspective on Guangzhou. The food being delicious is a given, but what really stuck with me was something a friend kept repeating while tipsy: \u0026ldquo;In Guangzhou, chicken tastes like chicken, and fish tastes like fish.\u0026rdquo;\nEvery city has its specialty: you eat duck in Nanjing, and you eat chicken in Guangzhou. As a chicken lover, Guangdong is paradise. The poultry here is truly on another level. While I haven\u0026rsquo;t made it to Qingyuan (the holy grail of chicken) yet, Guangzhou is already impressive. No matter what restaurant we visited, ordering White Cut Chicken was a mandatory ritual.\nPersonally, I love a \u0026ldquo;Q-bounce\u0026rdquo; (springy) texture—intestines and offal are my favorites! Aside from the chicken, the real joy on my tongue came from Cheung Fun (steamed vermicelli rolls) and Sheng Chang (pig’s fallopian tubes). If my time in Chiang Mai was an endless quest for the best Guay Tiao, my time in Guangzhou was an exploration of rice noodle rolls. My current favorite? The green bean, egg, and minced meat roll. The smooth, elastic roll meets the crunch of the beans—pure bliss! Also, the popularity of Sheng Chang in Guangzhou is incredible. When you chew on stir-fried Sheng Chang, it feels like it’s dancing on your tongue—crisp, tender, and perfectly seasoned.\nI am a total Rice Noodle Roll head ;)\nThe Winner of this Trip: Tian Tian Wu (Sweet House). It fits my taste perfectly—unbeatable value without sacrificing flavor. Aside from the stir-fried Sheng Chang, I had the most tender White Cut Chicken of the entire trip there. It’s a local spot at the mouth of an alley. Rumor has it the boss lady didn\u0026rsquo;t speak a word of Mandarin until the influx of tourists forced her to learn. We had to wait for a table and ended up sharing a spot on the second floor with a couple. I realized I really love chicken paired with ginger-scallion oil. (Sorry, it was so good I forgot to take photos).\nMy Singaporean \u0026ldquo;bro\u0026rdquo; also shared his thoughts. He isn\u0026rsquo;t a picky eater at all, but even he has begun to appreciate the level of Cantonese chicken. He admitted it\u0026rsquo;s a total win over Singaporean Hainanese Chicken Rice. He also went out on his own to explore Wonton noodles and finally understood why I was so \u0026ldquo;picky\u0026rdquo; before. This reminds me of when he took me to a Michelin-starred Wonton noodle stall in Singapore. He expected high praise, but I just said, \u0026ldquo;It\u0026rsquo;s okay.\u0026rdquo; It was average—neither bad nor amazing. He later sent me a review from a famous Singaporean influencer who raved about that same spot. Sorry, I can\u0026rsquo;t lie—\u0026ldquo;it\u0026rsquo;s okay\u0026rdquo; was a generous rating, especially compared to the stall run by the auntie at the Chiang Mai University Social Sciences faculty.\nI also didn\u0026rsquo;t expect that the most diverse range of cocktails I’d ever drink in a single night would be in Guangzhou. The day before leaving, I had dinner with friends I hadn\u0026rsquo;t seen in two years. Everyone had changed, and through their eyes, I saw my own growth—apparently, I look much more confident and extroverted now. Great!\nWe started with a light meal and a drink at Chui in the Rosewood Hotel. The vibe is nice; you can choose the terrace or stay inside for the live band. There was a Black band playing the night we went, and the lead singer was incredible. Chill atmosphere, but the drinks were just mediocre.\nFor the second round, we walked through the Guangzhou Tower area to the Wuyangcun neighborhood. The quality here was significantly higher. I had a crushed-ice drink—I think it was called \u0026ldquo;Crimson Desert\u0026rdquo;? My memory is a bit fuzzy.\nWe planned to go to Hope \u0026amp; Sesame (Miao Qian Bing Shi) for the third round but stumbled upon a quiet, charming spot on the way. We took a gamble on it. They specialize in tea-and-liquor fusions, and their Kombucha series was surprisingly good.\nWe were the only ones there; the decor was gorgeous.\nThe most ordinary-looking drink turned out to be the best.\nFinally, we reached Hope \u0026amp; Sesame. Since it was less than an hour before closing, there was no line. It’s expensive, but undeniably good—many flavors were a pleasant surprise. By the end, my \u0026ldquo;legendary\u0026rdquo; friend was definitely buzzed, constantly muttering: \u0026ldquo;Chicken tastes like chicken, fish tastes like fish.\u0026rdquo; We calculated that the four of us finished 22 cocktails that night. A bit insane, but a very memorable experience.\nWe drank a lot. Honestly, the most surprising one was the unassuming \u0026lsquo;Black Box\u0026rsquo;.\nOn another night, we found a fantastic non-smoking bar, which I absolutely loved. We originally tried another spot, but the moment I stepped in, a wall of cigarette smoke hit me, and I bolted. On the way back, we saw a place that looked like a cafe from the outside. The door said \u0026ldquo;No Smoking,\u0026rdquo; it had seats available, and it was filled with girls—perfection! I sincerely hope more non-smoking bars pop up in China.\nA responsible driver doesn\u0026rsquo;t drink. Yeah!\nIn Huadu, I also visited a coffee-by-day, bar-by-night spot called Knock Knock Log, located inside a residential compound.\nA corner of the shop that looks like a tiny fishing village.\nThe \u0026ldquo;Manager\u0026rdquo; is a dog (I forgot the breed). He had just been neutered that day, so he wasn\u0026rsquo;t very happy lol. The dog was so distracting I don\u0026rsquo;t even remember if the drinks were good—they were fine, and the most important thing was that it was smoke-free.\nThis is the Manager after recovery, looking much happier lol (stolen from the owner\u0026rsquo;s WeChat).\nI suspect the typos on their menu were intentional.\nThe biscuits were quite abstract—they looked and smelled like Play-Doh. The owner made them for fun and let us play with them, but my friend actually ate one and liked it. Fascinating Cantonese people lol.\nThis one is a bit abstract.\nThis one was modeled after the Manager 🍪; it tasted okay.\nI strongly suspect that the combination of great food, late nights, and Guangzhou\u0026rsquo;s humidity caused me to break out severely. My skin really felt the \u0026ldquo;Chao\u0026rdquo;—a pun in Chinese meaning both \u0026ldquo;trendy/hip\u0026rdquo; and \u0026ldquo;damp.\u0026rdquo; It was so damp it felt like I was developing rheumatism.\n🎠 Chimelong Safari Park When was the last time I went to a zoo? I can\u0026rsquo;t remember—maybe when I was 11. This time we drove to Chimelong. The five of us could have bought discounted tickets, but we missed the booking window because we stayed up too late. Oh well.\nI only realized once I got there that Chimelong is privately owned. A friend told me that during the pandemic, the owner sold a piece of surrounding land just to afford to feed the animals. There’s construction for residential buildings everywhere now. It’s a bit poignant; definitely worth supporting.\nThe living conditions for the animals seemed quite good. Compared to other zoos, the management and environmental design allow the animals more freedom. Having recently visited Disney, I feel Chimelong could learn a thing or two from Disney or Universal in terms of merchandise design and IP collaborations to help fund even better care for the animals.\nIt was scorching hot, but the weather was beautiful.\n🚗 Skill Level Up Most importantly: I finally mastered driving in Guangzhou!\nI got my license back in 2020, but like many of my friends, I hadn\u0026rsquo;t touched a car since the exam. I’ve always wanted to practice, but I never had a strong enough reason—until my trip to Norway. If I could drive proficiently, I’d have more rental options abroad, making travel much more enjoyable. So, I asked my sister and aunt to accompany me for a couple of days of practice until I could manage the basics.\nWhen planning the Guangzhou trip, a friend told me her dad’s car was available for us to drive to Shenzhen. The original plan was for my Singaporean and Taiwanese friends to swap their licenses for temporary ones because I wasn\u0026rsquo;t confident. However, on the first day, my trial run was great, and my friend praised me. That positive feedback was all I needed. I got hooked. I ended up being the designated driver for the entire trip—navigating daily meals, the crowded city center, and even the highway to Shenzhen.\nIt’s like what I mentioned in a previous post: when you aren\u0026rsquo;t a great swimmer, jump into the sea. When you get back to the 1.9m pool, you realize it’s nothing; you won\u0026rsquo;t drown. Surfing is the same—the more you fall, the faster you learn. Driving is no different. Even as a total \u0026ldquo;blank slate,\u0026rdquo; I handled night-time highway driving and the chaotic mix of electric bikes and complex traffic in Guangzhou. When problems arise, you face them. Prepare the basics, but remember that practice is the best teacher. (I\u0026rsquo;m not encouraging recklessness; I did do my homework and practice first!)\nNow I’m looking forward to using my driving skills when I head to South America at the end of the year. Hehe.\n","permalink":"/posts/guangzhou/","summary":"\u003cp\u003eI never expected to find myself in Guangdong again. Without any prior planning, I’ve somehow ended up visiting Guangdong four times in the less than six months since I returned to China in April.\u003c/p\u003e\n\u003cp\u003eThe first time was early April, staying in Shenzhen after coming from Hong Kong. The second was in May, visiting Shanwei with friends after returning from Dubai. The third was a layover at Baiyun Airport on my way back from Budapest via Guangzhou. Just a few days later, while \u0026ldquo;funemployed,\u0026rdquo; I helped a friend organize an event, which turned into a two-week tour of Guangzhou and Shenzhen.\u003c/p\u003e","title":"Guangzhou: Delicious, Refreshing, and So Damp!"},{"content":"Recently, a close friend\u0026rsquo;s boyfriend came to Chiang Mai. They were planning to rent a car and drive to Chiang Rai, and invited me to join them. The itinerary was extremely simple and straightforward: the White Temple, the Blue Temple, and the Black House. Once we finished visiting the three places, we\u0026rsquo;d head straight back.\nMy willpower, unfortunately, was weak. I let myself get dragged into the trip, abandoning the articles I was supposed to read and the work waiting for me. And just like that, I became the shining third wheel.\nWe set off early this morning from Chiang Mai toward Chiang Rai. Our driver was a very nice guy named Thep. He could speak Chinese, and during our conversation he revealed that he had previously worked in Suzhou and Shanghai for a period of time, where he learned the language. Besides Thai and Chinese, he studied English in university, so he speaks three languages.\nAlthough he modestly claimed that he only knew \u0026ldquo;a little Chinese,\u0026rdquo; his pronunciation was actually one of the clearest I’ve heard since arriving in Chiang Mai. His main limitation was vocabulary, and occasionally there were small word order issues.\nWhile driving, Thep recommended a roadside café that he said was quite good. We stopped there for about twenty minutes before continuing directly to the White Temple.\nA brief summary of our itinerary:\nWe left Nimman Road around 8:20 in the morning and arrived at the White Temple at about 11:30 AM. We had lunch near the temple and then drove to the Blue Temple, arriving around 1:30 PM. After wandering around the Blue Temple, we headed to the Black House and arrived there around 2:40 PM. We left the Black House at about 5 PM, stopped by a roadside hot spring for half an hour, and finally returned to Nimman around 8 PM.\nAfter visiting the White Temple, Blue Temple, and Black House—especially the Black House—I felt a strong urge to write something down. Otherwise, by tomorrow, I might forget everything.\nWhite Temple: Life and Death in a Cultural Crucible On the way to the White Temple, while we were stopping at the roadside café, we looked up some information about it.\nAt first, I agreed to join my friend and her boyfriend simply because it felt like a rare opportunity. After all, I hadn’t been to Chiang Rai yet, and I was curious to see how it differed from Chiang Mai.\nBut once I agreed, the social media algorithms that constantly monitor us immediately started pushing related content to me. And that’s when an interesting connection appeared.\nPreviously, I had seen a couple of posts on Instagram from a Ukrainian guy I knew. One of them was rather eerie yet highly artistic: a close-up shot of hands reaching out from hell, along with enlarged fragments of scattered skulls and carved faces. Because of the filter he used, the scene looked somewhat sinister.\nAt the time, however, I didn’t realize that the footage came from the White Temple. Remembering that post made me feel both excited and slightly uneasy about visiting the place.\nThe clip I had seen focused on the outstretched hands of hell and scattered skeletal carvings. I could interpret it as a symbolic reflection on life and death—it made sense. But the atmosphere on site felt completely different from the impression in the video.\nIt didn’t feel gloomy at all.\nOn the contrary, the White Temple was almost blindingly bright. Its dazzling white walls and countless silver ornaments reflected the blue sky above, making the entire structure glow with a kind of overwhelming purity.\nThe scenes from the Ukrainian guy’s video actually came from the section of the bridge that visitors must cross before entering the main hall.\nwhite temple\nAt first I assumed that the White Temple, like many temples in Chiang Mai, must have been built centuries ago. But that assumption was wrong.\nWhile researching during the drive, I discovered that the White Temple was actually built in 1998 by Thai artist Chalermchai Kositpipat, who both designed and funded the project himself. The temple is still under construction today and is expected to be completed around 2070.\nBefore visiting, I had only casually seen photos of the temple’s outer areas. But once I saw it in person, I could immediately understand why people describe it as stylish.\nIt combines the architectural framework of traditional temples with modern elements, while blending multiple cultural and artistic influences together.\nSeveral details particularly stood out to me:\nThe “hell” imagery at the entrance to the main hall, where visitors cross a bridge symbolizing the journey of rebirth from which there is no turning back.\nThe black and white floor tiles forming a Yin–Yang pattern, reflecting Chinese Taoist philosophy, while the decorative motifs themselves are distinctly Thai.\nIt incorporates the Yin and Yang elements of Taoism\nThe artificial rock formations reminded me of the Water Curtain Cave from the legend of the Monkey King, and some of the rocks even resembled the shape of the Chinese character for “ghost.”\nIn the pond near the rock formations, there were small elephant sculptures with fish tails. The fish tail remained in the water while the elephant’s body rose above the surface in a dynamic leap. I imagine this symbolizes the idea of a carp leaping over the Dragon Gate.\nStrange Rock Fountain\nBetween the temple and the road runs a small river, where a strange statue resembling demons and mythical beasts stands. Its color scheme strongly resembles the palette often generated by modern AI art tools. Combined with the statue’s surreal shape, it almost looks like a cyberpunk version of hell.\nAnd many more examples.\nAs mentioned earlier, we didn’t have enough time to explore the entire temple complex. But even from the parts we saw, it was clear that many Chinese cultural elements were present.\nOnly then did I realize that the designer of the White Temple is Thai-Chinese. Considering that the temple was built only a little over twenty years ago—and is still under construction today—it makes sense that it continues to absorb new influences.\nThe result is a strange but fascinating cultural mixture. Traditions, religions, and artistic styles quietly overlap here. There are undoubtedly many connections and artistic ideas that I still failed to notice.\nBlue Temple: The Cyberpunk Blue of Alienation It is said that the designer of the Blue Temple was once a student of the White Temple’s creator. Therefore, its design philosophy also revolves around emphasizing a single dominant color.\nAmong the three places we visited, the Blue Temple was the one that impressed me the least in terms of shock or novelty.\nCompared with the White Temple, the Blue Temple appeared less refined. The craftsmanship felt somewhat rougher, and the complex itself was smaller in scale. I suspect financial resources may have something to do with that difference.\nThe most striking part of the Blue Temple is the enormous statues guarding its entrances. Anyone with megalophobia might feel slightly uneasy standing before them.\n![](blue _temple.png) Blue temple\nInterestingly, on that day I happened to be wearing an entirely blue outfit, which matched the temple’s color palette perfectly—layers of dazzling blues everywhere.\nThe Blue Temple is also still under construction. When we entered, another statue was currently being built. I suspect many of these sculptures are funded by wealthy donors, because I noticed that one of them had a specific person’s name engraved on it.\nBlue temple\nTo be honest, among the three places, the Blue Temple gave me the most superficial impression of “life and death\u0026quot;. Its symbolism felt direct, almost unavoidable. Perhaps this is because its artistic approach emphasizes sheer scale.\nThe four massive statues at the entrances loudly declare the presence of gods and hell in an almost unavoidable way. Their symbolism is extremely direct.\nAnother reason might be that I personally still struggle to fully accept heavily “alienated” artistic forms. The deep blue color—especially on the gigantic statues—gave me a slightly demonic feeling. The overall aesthetic felt strange and otherworldly.\nYet this eerie quality made me feel that the Blue Temple carries the most cyberpunk spirit of the three places.\nOn one hand, the roughness I mentioned earlier can be interpreted as a kind of populist rebellion, something less polished and more defiant—similar to punk or hippie culture, which stands apart from the refined elegance of the elite.\nOn the other hand, the color palette feels very similar to the visual style often generated by modern AI image tools. Much like the demon statue in the river at the White Temple, its colors seem to resonate with contemporary digital aesthetics.\nBlack House: Green and Black — An Altar of Animal Sacrifice The Black House had the strongest impact on me out of the three places. In fact, it was the main reason I felt compelled to write this article.\nWhen we arrived and were about to step out of the car, it suddenly began to rain.\nPerhaps it was the rain that did it—but the thin misty veil it created made the already mysterious atmosphere feel even more enigmatic.\nBlack House Museum\nAlthough some people group the Black House together with the White Temple and Blue Temple as “temples”, I personally prefer to simply call it the Black House.\nArchitecturally, it follows traditional Thai style. The site consists of a cluster of buildings: the largest is the exhibition hall, surrounded by many smaller structures of different types. All of them are painted black.\nIn the past, I thought red and black was the most striking color combination: passionate red and the deepest black. Blood-red eventually darkens into black—an ending of decay and death, while the process itself remains intense and vibrant.\nBut at the Black House, I experienced for the first time the collision between green and black.\nThe black wooden buildings, built in traditional Thai style, looked almost like coffins. And surrounding them was an overwhelming sea of green. Towering trees, emerald lakes, fresh grass — everywhere life was bursting with color. Yet inside the buildings, death was carefully preserved and displayed.\nThroughout the Black House complex, there are many remains of animals. The most common are cow horns. I don’t know what species they originally came from, nor whether they are real or replicas, but I strongly suspect most of them are real.\nThey have been assembled into various forms—chairs, towering ladders, and other strange constructions.\nBesides the abundance of horns, several things initially shocked me:\nDried animal skulls hanging on the walls of the exhibition hall.\nPreserved heads and skins of wolves, giant crocodiles, and pythons placed on tables.\n![](main house.png)\nPaintings depicting animals in violent, bloodthirsty scenes.\nAnd later I learned that the ashes of the Black House’s creator are also displayed in the exhibition hall.\n![](main house2.png)\nAfter seeing everything, I said to my friend:\nThis feels like an altar of animal sacrifice.\nElephants kneeling in submission, animal heads and skins displayed on human dining tables—perhaps their bodies have already been consumed, leaving only skulls and hides.\nWhen these images are placed alongside the realities of domination, exploitation, and humanity’s relationship with nature, it becomes difficult not to reflect. The feeling grows heavy almost unconsciously.\nAs for the sculptures and exhibits related to fertility worship, those are actually quite common in many museums. The Black House does have some, but not an overwhelming amount, so they didn’t shock me as much.\nHowever, they did offer something to think about.\nIn this museum, the symbols representing male sexuality are extremely exaggerated: one sculpture depicts a wild man with an enormous phallus, while another shows a woman lying on top of a gigantic one.\nI’ve seen many exhibits related to fertility worship before, and many of them emphasize maternal power. But the creator of the Black House clearly seemed more focused on male reproductive power.\n![](Fertility worship.png)\nTo summarize, the Black House left a profound impression on me. It made me experience the collision between green and black in a powerful and somewhat frightening way.\nYet fundamentally, it is still a museum. Its installations are deliberately curated, so the creator’s intentions and biases inevitably shape what we see. I accept that, though I don’t entirely like it.\nStill, I would recommend visiting it. Especially in the rain. The quiet atmosphere and sparse crowds add an extra layer of eerie tension, making it easy to scare yourself.\nThere are also several stone formations where cow horns are arranged into structures resembling ladders to the sky, evoking ancient sacrificial altars.\nAnother interesting detail: inside the Black House there is a small station dedicated to donations for stray cats. I’ve actually noticed many similar initiatives throughout Thailand. For example, when I buy coffee at the language school, I often see information about shelters for stray cats and dogs.\n","permalink":"/posts/chiang-rai/","summary":"\u003cp\u003eRecently, a close friend\u0026rsquo;s boyfriend came to Chiang Mai. They were planning to rent a car and drive to Chiang Rai, and invited me to join them. The itinerary was extremely simple and straightforward: the White Temple, the Blue Temple, and the Black House. Once we finished visiting the three places, we\u0026rsquo;d head straight back.\u003c/p\u003e\n\u003cp\u003eMy willpower, unfortunately, was weak. I let myself get dragged into the trip, abandoning the articles I was supposed to read and the work waiting for me. And just like that, I became the shining third wheel.\u003c/p\u003e","title":"Three Colors in Chiang Rai: White, Blue, and Black"},{"content":"Introduction My curiosity about Da Nang, Vietnam, was sparked last year when a friend visited Suzhou and raved about the city. Later, I stumbled upon posts comparing Da Nang to Chiang Mai, which piqued my interest even further. Last month in Chiang Mai, locals told me that many people were moving to Da Nang due to the lower cost of living and the \u0026ldquo;burning season\u0026rdquo; in northern Thailand. Da Nang seemed like the next ideal haven for digital nomads.\nBefore heading to Argentina, I chatted with my best friends about our Lunar New Year plans. Without much hesitation, I suggested Da Nang. We compared a few other options, but nothing matched Da Nang—and given their lingering concerns about last year\u0026rsquo;s incidents in Thailand, Da Nang became our final choice. And so, our journey into becoming \u0026ldquo;sitting ducks\u0026rdquo; began.\nAs someone who is always on the road, I had a momentary lapse in judgment—I completely forgot how overwhelming the crowds can be during the holidays and underestimated how insane the flight and hotel prices would become. I vow: never again will I travel during peak holiday seasons!\n✈️ The First Trial: Flights and Accommodations I flew to Da Nang from Chiang Mai, while my friends flew from Shanghai. We all thought we were being \u0026ldquo;smart\u0026rdquo; by waiting, but I grossly underestimated the collective power of holiday travelers and overestimated my own luck. As a \u0026ldquo;wait-and-see\u0026rdquo; traveler, the holiday flight prices gave me a humbling reality check.\nRegarding our Airbnb: we ran into an extremely deceptive situation. I\u0026rsquo;m detailing it here in hopes that others can stay alert. Since one of my friends insisted on a villa and we booked our flights before finalizing accommodation, our options in Da Nang during Tết were limited. A week before our trip, seeing that most decent hotels were sold out, we settled on a homestay for about 6,000 RMB for six nights.\nTo our surprise, just as I landed and finished my visa process, I received a message from my friends saying the homestay had major issues—too many geckos and outdated facilities. I initially dismissed it as a standard Southeast Asian living experience, thinking my friends were overreacting. But when I arrived, they told me they had already negotiated a full refund with the landlord. As a long-time Airbnb user, I was stunned: a full refund during the peak holiday season? My friends told me they had offered to pay for the first night, but the host declined and promised a full refund. As it turns out, in a foreign land, when something seems too good to be true, there’s usually a scam behind it. Always keep evidence—we were indeed being played.\nImage: Son Tra Peninsula, near Linh Ung Pagoda\nImage: Son Tra Peninsula, near Linh Ung Pagoda\nImage: Son Tra Peninsula, Southeast Asia\u0026rsquo;s tallest white Lady Buddha statue\nLet me break down the players: The real host (A) used his agent’s identity to register the Airbnb account. We were communicating with the host (A) on the platform, but he told us to add his agent (B) on WeChat, effectively moving the communication to a third-party platform. Host A never appeared, and Agent B claimed the host was away traveling with family for the New Year. Agent B only showed us the place in person, and because the host used his own photo on the profile, my friends thought Agent B was Host A. Later, dealing with the gecko issue, Agent B delegated to another guy (C), whom I met upon arrival. C had been a middleman coordinating between my friends and the host team. He told my friends that the host agreed to a full refund, and my friends even took a photo of the translated message. So when I arrived, I simply confirmed with them that the refund was guaranteed, and we rushed to book a hotel. The booking process was rushed due to lack of availability and our exhaustion from red-eye flights. Before leaving, I added C on WeChat, thinking he could help us with cheaper bookings next time.\nThere were several issues here:\nLanguage barriers leading to cognitive bias No recorded proof of C’s promise of a refund Host A\u0026rsquo;s identity was hidden, and we were all out of sync—my friends thought B was the host, while I thought C was B’s agent. None of us were right. 😂 The next morning, the host informed us he wouldn\u0026rsquo;t refund us, claiming geckos were normal and that he never made such a promise—it was just a \u0026ldquo;misunderstanding.\u0026rdquo; We felt scammed. We reported it to Airbnb, but they replied that bugs and geckos are \u0026ldquo;normal\u0026rdquo; and they couldn\u0026rsquo;t do anything if the host refused.\nI reached out to C. His response confirmed my suspicions: Host A was not the person in the profile photo; he was simply manipulating the account using B’s identity. C confirmed that they had promised a full refund and even suggested that A’s behavior was dishonest and not the first time he had done this. He urged me to report the host\u0026rsquo;s lack of integrity and safety issues to Airbnb.\nAt that time, we were in Hoi An, a famous international trading port known for its well-preserved architecture. During the New Year, the ancient town was glowing with lanterns and crowded with tourists. The Airbnb ordeal cast a shadow over my interest in Hoi An; the bustling crowd suddenly felt hollow.\nThe \u0026ldquo;smoking gun\u0026rdquo; proving platform fraud came when I saw the homestay re-listed by the host for the exact same dates we had already booked. The host\u0026rsquo;s greed was his undoing. We went back to Airbnb support, highlighted the fraudulent activity, and eventually the host offered a Plan B—a partial refund for four nights. We refused, escalated the issue, and finally, the next day, we received a full refund.\nTo be honest, I’ve used Airbnb countless times, but this was a first. Given my stereotypes and later experiences with some locals, this kind of behavior in Vietnam felt strangely \u0026ldquo;reasonable\u0026rdquo; in a warped way.\n💰 The Second Trial: Being Fleeced We were prepared for shops to be closed during Tết, but the extent of the closures was absolute. Only tourist-centric spots were open, and naturally prices were inflated. A bowl of beef pho near My Khe Beach cost 95k VND, while the same dish near Cho Con market was only 30k–50k. A lemon tea at Mixue, normally 15k, was marked up to 18k—a 20% increase.\nI can understand \u0026ldquo;tourist pricing\u0026rdquo; and holiday surcharges, but this was excessive. Still, compared to domestic prices in China, 18k VND is only about 5 RMB. Let’s just treat it as a \u0026ldquo;digital red envelope\u0026rdquo; for the workers who couldn’t go home. Besides, Vietnamese law mandates triple pay for public holidays, so a 20% markup is actually relatively restrained.\nBut compared to Chiang Mai, Da Nang loses hands down. Chiang Mai’s commercial maturity, price transparency, and service attitude are far superior. Even as a leader in Vietnam\u0026rsquo;s tourism industry, Da Nang’s tourism management often feels like short-sighted utilitarianism—a \u0026ldquo;grab the money and run\u0026rdquo; mentality that, under the extreme pressure of the New Year, devolves into blatant profiteering.\nI usually avoid tourist traps, but I was traveling with two childhood friends who insisted on them. The experience was underwhelming, especially in Hoi An.\nImage: Hoi An Ancient Town, boat ride and floating lanterns\nUnlike Da Nang, where you can walk out of a tourist zone into a local neighborhood, Hoi An is essentially a \u0026ldquo;dead-end\u0026rdquo; scenic destination. During the holidays, supply and demand were completely out of balance. Many people working in Hoi An aren\u0026rsquo;t locals; they are fortune-seekers from other regions. They have no emotional connection to the land—Tết for them isn’t a festival, it’s an annual harvest season. As a result, price gouging and greed become amplified here.\nImage: A street in Hoi An Ancient Town\nA small detail: tipping in Vietnam is not mandatory. For the basket boat ride, 20k–50k VND (approx. 6–15 RMB) is considered generous. We negotiated the price down to 200k VND for four people.\nImage: Basket boat entrance\nThe ride includes various \u0026ldquo;tipping stations\u0026rdquo;—performances like boat spinning, photo opportunities, and singing.\nImage: Coconut forest\nImage: Floating karaoke station\nImage: Floating karaoke station - Korean songs\nMy friends were first-time travelers abroad. While I had researched appropriate tipping ranges with Gemini, our boatman began playing the victim—showing us the calluses on his hands and praising China in an attempt to guilt us into giving more money. My other friend’s boatman directly demanded a 100k VND tip. I was speechless.\nIn an immature tourism market, excessive kindness often breaks the rules, making things harder for the next traveler. It’s not that I’m unwilling to tip—but I hate this kind of moral coercion disguised as hardship. Asking for a 100k tip when the whole ride costs only 200k is simply absurd.\nImage: Commercial street in Hoi An targeting Korean tourists\nWe intended to visit a trendy \u0026ldquo;paddy field cafe\u0026rdquo; found on social media, only to discover it was closed. Yet while taking taxis around, I glimpsed a much truer side of Hoi An: magnificent family tombs with Fujian-style aesthetics scattered throughout the vast rice fields.\nTo tourists, this \u0026ldquo;proximity of life and death\u0026rdquo; might feel eerie, but to locals it represents ancestral pride—something they fiercely protect, even while squeezing extra money from tourists during the holidays.\nThe boatmen begging for tips at every corner might be guarding such a tomb, built with a family\u0026rsquo;s lifetime of savings. This strange mixture of extreme materialism (scamming) and extreme traditionalism (tomb building) formed the most absurd yet authentic undertone of Central Vietnam.\nIt reminded me of the graveyards in Arashiyama, Kyoto. The root is the same: the Confucian obsession with filial piety and final resting places. But while Arashiyama’s tombs exude Zen-like serenity, Hoi An’s tombs shimmer with the anxiety of the living.\n🤢 The Third Trial: Food Poisoning Luck is precious; misfortune, however, rarely travels alone. My \u0026ldquo;iron stomach\u0026rdquo; finally gave out in Da Nang.\nOn our last morning, after snorkeling, we headed to Cho Con market hoping for some good food. But the market was largely closed, with only a few street vendors still operating. The environment looked questionable, but we were hungry.\nImage: Cho Con market, Feb 20th, 1:00 PM\nThe market felt a bit like Chiang Mai, only much less hygienic.\nImage: Familiar power lines and market, but cleanliness left much to be desired\u0026hellip;\nWe wanted one last bowl of pho. A grandmotherly vendor signaled 50k VND for a bowl, which I suspected was a tourist price. Sure enough, 300 meters away at a proper restaurant, a bowl with premium toppings cost exactly the same.\nMenu translation (top to bottom): Mỳ xíu (Char siu noodles, yellow alkaline noodles); HOÀNH THÁNH KHÔ (Dry wonton); PHỞ TÁI - BÒ VIÊN (Beef pho + beef balls); HỦ TIẾU KHÔ (Dry rice noodles).\nI thought it would be soup noodles, but the vendor served dry noodles instead. Later I noticed a group of Chinese tourists who were much more cautious, confirming every detail before ordering. We were simply too eager to pay—lesson learned. 🤣\nThe noodles were cold, which was strange. I mixed in the vegetables and lime, but the sauce was overly sweet and cloying. The fish balls were rubbery. Not great.\nImage: Dry char siu noodles\nAfterward, we passed a famous old-school fish cake noodle shop, Bà Lữ.\nImage: Famous fish cake noodle shop Bà Lữ\nIt was packed with locals. We ordered two bowls of the \u0026ldquo;all-in\u0026rdquo; fish noodle soup. The shop had raised prices for the holiday, but reasonably. The auntie running the shop was lovely and even showed us how to eat it.\nImage: Fish noodle shop holiday pricing\nHalfway through the meal, I suddenly felt dizzy and nauseous.\nImage: The \u0026ldquo;all-in\u0026rdquo; fish noodle soup\nWhen I ate the crab paste, the nausea hit hard. This wasn\u0026rsquo;t like the fake fish balls in Chinese hotpot—this was dense, rich, and intensely seafood-heavy.\nBy the time we walked ten minutes toward a coffee shop, I couldn’t take it anymore. I grabbed a taxi back to the hotel and spent the rest of the day in the bathroom vomiting.\nIt was a miserable night. Luckily the vomiting stopped by morning, but I was still weak, sore, and fighting a cold. I couldn’t wait to get back to Chiang Mai and collapse in bed.\nI never figured out exactly what caused the food poisoning—but take my advice: always carry travel medicine.\n⌛️ The Fourth Trial: Endless Queues In Da Nang, queuing is a mandatory subject.\nIt started with immigration.\nI opted for a visa on arrival. Here are some tips: Vietnam uses loose-leaf visas for Chinese passports due to territorial disputes. You can apply for a visa on arrival (VOA) through a travel agency or online to obtain an approval letter. It’s best to print it in color. You\u0026rsquo;ll also need two 2-inch photos and cash for the visa fee at the airport.\nThe immigration queue took an hour.\nThe departure queue was even worse—about two hours.\nDa Nang airport is small, similar to Chiang Mai’s airport. If you don’t have checked baggage, do online check-in. I assumed there would be self-service kiosks to print boarding passes, but there weren’t. I had to queue at the counter anyway and then wait in another long security line.\nI arrived at 8:10 AM and didn’t reach the gate until two hours later. 💧\n🌱 Activities 1. Confucian Anxiety at Son Tra Peninsula Because I was sick, I spent half my time resting at the hotel. We visited Son Tra Peninsula and Linh Ung Pagoda. We walked two kilometers to a small temple before taking a taxi to the summit.\nImage: Sea view in front of a small temple\nSon Tra is beautiful. Unlike Hoi An, which is packed with foreign tourists, Son Tra felt more local.\nImage: Small stall on the mountain, 35k VND for a coconut\nI noticed many temples here. Although both Da Nang and Chiang Mai are filled with temples, they represent completely different branches of Buddhism.\nFirst, there is the difference between Mahayana (East Asian) Buddhism and Theravada Buddhism. Vietnam is the only Mahayana-majority country in Southeast Asia. The small temples I saw share cultural roots with those in Fujian and Guangdong. They emphasize transcendence and clan identity. They feel inward-looking, almost like ancestral halls, which is why they are small and solemn.\nThailand, on the other hand, is a typical Theravada Buddhist country. Temples in Chiang Mai are luxuriously gilded—a reflection of the tradition of \u0026ldquo;making merit.\u0026rdquo; They function as social centers for the community, almost like a shared living room. In contrast, Da Nang’s temples feel more like studies or ancestral halls.\nFinally, Chiang Mai’s secularization feels joyful—religion is integrated with daily life, consumption, and social interaction. Da Nang’s secularization feels anxious—steeped in pragmatism and a desire for protection. It feels very Confucian, very Chinese.\nIn short:\nIn Chiang Mai, temples are golden, lively community living rooms.\nIn Da Nang, they are quiet brick structures—the back study that shelters ancestral souls.\nOne blossoms into a grand bazaar; the other retreats into a heavy clan imprint.\nImage: A scooter accident on the way down\n2. Snorkeling Tragedy: A Dark Comedy of \u0026ldquo;Rowing the Boat\u0026rdquo; The snorkeling was disappointing. Compared to the Maldives, it was almost nonexistent.\nOur paddle board flipped before we even started because my friend\u0026rsquo;s husband was too heavy and inexperienced. Two sets of snorkeling gear sank into the four-meter-deep water.\nThe boatman just laughed at us. 🤷\nImage: View from the return boat\n3. Grab Driver’s \u0026ldquo;Commission Map\u0026rdquo; One piece of advice: don’t blindly trust Grab drivers.\nI used to think local drivers were the best food critics, but Da Nang completely updated my mental model.\nLocal restaurants and Grab drivers operate within a commission-based ecosystem. Every restaurant recommendation likely involves a cut for the driver.\nWhen we were dropped off at the jetty for snorkeling, the driver immediately made a phone call—almost certainly confirming whether we were his \u0026ldquo;commission customers.\u0026rdquo;\nEven when drivers ask you to cancel platform orders and pay privately, it’s often part of their survival strategy. It’s difficult to judge.\nImage: Tamarind-flavored blue crab, very sweet. Don\u0026rsquo;t recall the price, maybe 135k/kg.\n💬 Afterword When I finally lay down in Chiang Mai, I felt saved.\nDa Nang is great—but perhaps not during Chinese New Year. The city feels like a teenager: full of energy, but also restless and aggressively utilitarian.\nIf you ask when I’ll go again?\nMy answer: avoid all public holidays, or bring a much stronger stomach.\nOn the flight from Da Nang to Bangkok, I sat next to a German mother and daughter. The daughter shared her candies with me.\nImage: Candy shared by the German girl on the plane\nWe chatted about our travels.\nWhen you meet people from different countries in a foreign land and realize you’ve both visited the same places, sharing stories and impressions—it’s a beautiful moment.\nFeeling exhausted from illness and the constant rushing around, I had begun to feel tired of traveling.\nYet as we landed, the daughter and her mother said to me:\n\u0026ldquo;Never, never stop travelling!\u0026rdquo;\n","permalink":"/posts/da-nang/","summary":"This post covers practical lessons in avoiding tourist traps and navigating holiday chaos in Da Nang. It\u0026rsquo;s more than just a travelogue; it\u0026rsquo;s a hard-earned survival guide for traveling in Southeast Asia during Tết.","title":"Da Nang Tết Survival Guide: How I Learned the Hard Way to Avoid Becoming a 'Sitting Duck'"}]