Or equivalently: Prove equality of two multi-sets

Given two length- lists and , we define:

and

These are equal if and only if and are permutations of each other. Equality of polynomials can be checked at a random point due to the Schwartz-Zippel Lemma.

The naive way to compute this would be to have two extra witness columns that compute the accumulated product. However, we can do this with only one extra column, constrained to be equal to:

Also, multiple permutation arguments can share the same accumulator (with independent challenges), at the cost of increasing the degree of the constraint.