[1, 2, 3]
and [3, 1, 2]
are a permutation of each other, but [1, 2, 3]
and [1, 2]
are not.
If you went through the previous section, you should have a good intuition for how to implement this.
First create two LogUp columns where the first column contains the values in the original set of values with multiplicity and the second column contains the values in the second set of values with multiplicity .
Then, check that the claimed_sum
, or the sum of the fractions in the two LogUp columns, is .
We can optimize further by batching the two columns into a single LogUp column so that a LogUp column row looks something like .
[0, 1 << log_size)
in order.
Then, we create a random permutation of the trace column values and set it as the second trace column.
Note that this is equivalent to “looking up” all values in the first trace column once.
And since all the values are looked up only once, we do not need a separate multiplicity column.
Then, we create a LogUp column that contains the values .