Skip to content

Shifting

A virtual polynomial that circularly rotates a committed one

As we've already seen, we can think of multilinears as lists. Often, it's convenient to specify a virtual polynomial on the list side of things, and then to later recapture that operation on the algebraic side.

Describing how shifting operates on lists is not hard. Roughly, if we start with a list (ti)i=021(t_i)_{i = 0}^{2^\ell - 1}, we want to circularly rotate that thing downwards by oo steps, let's say. So the resulting list will be (tio(mod2))i=021(t_{i - o \pmod{2^\ell}})_{i = 0}^{2^\ell - 1}.

Actually, it will be convenient to refine this a bit. We are going to introduce a further block size parameter b{0,,}b \in \{0, \ldots , \ell\}. For such bb and for some offset parameter o{0,,2b1}o \in \{0, \ldots , 2^b - 1\}, the task will be to

  • chunk the list (ti)i=021(t_i)_{i = 0}^{2^\ell - 1} into size-2b2^b blocks;
  • circularly rotate each invdividual block (!) downward by oo steps.

If our initial multilinear is tt, we will write shiftb,o(t)\texttt{shift}_{b, o}(t) for the above thing.

Shifting Algebraically

Now, this is a perfectly valid description of something to do with a list. The much-harder question is: will the verifier have a way of evaluating shiftb,o(t)\texttt{shift}_{b, o}(t) efficiently? That is, let's assume that the verifier has the ability to efficiently evaluate t(r)t(r') for any given point rTτr' \in \mathcal{T}_\tau^\ell (for example, tt is simply committed). Can we devise a means by which the verifier might bootstrap tt-evaluation into shiftb,o(t)\texttt{shift}_{b, o}(t)-evaluation? That is, how might the verifier efficiently ascertain shiftb,o(t)(r)\texttt{shift}_{b, o}(t)(r), given the ability to evaluate the underlying polynomial tt?

Note here that we are already using the duality between lists and multilinears. At first, when we defined shiftb,o(t)\texttt{shift}_{b, o}(t), we did so as a list. Just above though, we're already understanding it as a multilinear polynomial. Indeed, how else would we make sense of evaluating it at a random rTτr \in \mathcal{T}_\tau^\ell (i.e., which isn't necessarily in the cube)?

So the first thing we need to do is write down an algebraic expression for shiftb,o(t)\texttt{shift}_{b, o}(t). In principle, this isn't hard, since we already know its values on the cube (we can just take its MLE). The problem though, will be to do this in such a way that the verifier may evaluate it efficiently.

The Shift Indicator

We'll begin with a slight detour (which is really not one at all!). As above, we fix a height parameter 0\ell \geq 0, a block size parameter b{0,,}b \in \{0, \ldots , \ell\}, and an offset o{0,,2b1}o \in \{0, \ldots , 2^b - 1\}. As usual, we are going to identify Bb\mathcal{B}_b with {0,,2b1}\{0, \ldots , 2^b - 1\} by sending v{v}i=0b12iviv \mapsto \{v\} \coloneqq \sum_{i = 0}^{b - 1} 2^i \cdot v_i.

We're going to define the shift indicator function s-indb,o\texttt{s-ind}_{b, o}, beginning as a function on Bb×Bb\mathcal{B}_b \times \mathcal{B}_b. For each pair (x,y)Bb×Bb(x, y) \in \mathcal{B}_b \times \mathcal{B}_b, we are going to declare that s-indb,o(x,y)\texttt{s-ind}_{b, o}(x, y) equals 1 if and only if {y}?{x}+{o}(mod2b)\{y\} \stackrel{?}\equiv \{x\} + \{o\} \pmod{2^b} holds, and equals 00 otherwise. That is, this thing returns 1 on those pairs of cube-points which differ by oo steps (with wraparound) in the lexicographic ordering of the cube Bb\mathcal{B}_b. This was just a function, but as usual, we can implicitly associate it with its MLE, a 22 \cdot \ell-variate multilinear (whose restriction to the cube Bb×Bb\mathcal{B}_b \times \mathcal{B}_b recovers s-indb,o\texttt{s-ind}_{b, o}).

Now the key claim is that s-indb,o\texttt{s-ind}_{b, o} is transparent: the verifier can locally evaluate it on any pair of points rr and rr' in just O(b)O(b) work. This claim is not obvious at all, and in [DP23, § 4.3] we expend a good amount of work proving it.

The Shift Polynomial

Assuming this fact for now, we get a new way of writing shiftb,o(t)\texttt{shift}_{b, o}(t). Indeed, shiftb,o(t)(X0,,X1)\texttt{shift}_{b, o}(t)(X_0, \ldots , X_{\ell - 1}) equals:

vBbt(v0,,vb1,Xb,,X1)s-indb,o(v0,,vb1,X0,,Xb1).\begin{equation*}\sum_{v \in \mathcal{B}_b} t(v_0, \ldots , v_{b - 1}, X_b, \ldots , X_{\ell - 1}) \cdot \texttt{s-ind}_{b, o}(v_0, \ldots , v_{b - 1}, X_0, \ldots , X_{b - 1}).\end{equation*}

What is the intuition of this? First of all, this thing is evidently multilinear, provided that we believe that s-indb,o\texttt{s-ind}_{b, o} is multilinear. Thus we need to argue that its restriction to the cube B\mathcal{B}_\ell equals exactly shiftb,o(t)\texttt{shift}_{b, o}(t). To see this, we pick a cube element wBw \in \mathcal{B}_\ell and study the value of the above expression, with (X0,,X1)(X_0, \ldots , X_{\ell - 1}) specialized to (w0,,w1)(w_0, \ldots , w_{\ell - 1}). As the outer sum index vBbv \in \mathcal{B}_b varies, the multiplier s-indb,o(v,w)\texttt{s-ind}_{b, o}(v, w) will be nonzero precisely when {w}?{v}+{o}(mod2b)\{w\} \stackrel{?}\equiv \{v\} + \{o\} \pmod{2^b} holds (here, we implicitly truncate vv and ww by only considering their lowest bb bits). Thus, the sum above will pick out "exactly one" value of tt. Which? The value of shiftb,o(t)(w)\texttt{shift}_{b, o}(t)(w) will be t(v0,,vb1,wb,,w1)t(v^*_0, \ldots , v^*_{b - 1}, w_b, \ldots , w_{\ell - 1}), where the bitstring (v0,,vb1)(v^*_0, \ldots , v^*_{b - 1}) is chosen to be the oo-step lexicographic predecessor of (w0,,wb1)(w_0, \ldots , w_{b - 1}). This is exactly what we wanted.

Efficient Evaluation

What about the problem we started with—namely, for the verifier to learn shiftb,o(t)(r)\texttt{shift}_{b, o}(t)(r) efficiently? The key is that if we take the above expression—but specialize (X0,,X1)(X_0, \ldots , X_{\ell - 1}) to (r0,,r1)(r_0, \ldots , r_{\ell - 1})—then we wend up with the expression:

shiftb,o(t)(r)=vBbt(v0,,vb1,rb,,r1)s-indb,o(v0,,vb1,r0,,rb1).\begin{equation*}\texttt{shift}_{b, o}(t)(r) = \sum_{v \in \mathcal{B}_b} t(v_0, \ldots , v_{b - 1}, r_b, \ldots , r_{\ell - 1}) \cdot \texttt{s-ind}_{b, o}(v_0, \ldots , v_{b - 1}, r_0, \ldots , r_{b - 1}).\end{equation*}

This is exactly the thing we can sumcheck: indeed, it's enough to sumcheck the bb-variate polynomial shiftb,o(t,r)(Y0,,Yb1)\texttt{shift}_{b, o}(t, r)(Y_0, \ldots , Y_{b - 1}) defined by:

t(Y0,,Yb1,rb,,r1)s-indb,o(Y0,,Yb1,r0,,rb1).\begin{equation*}t(Y_0, \ldots , Y_{b - 1}, r_b, \ldots , r_{\ell - 1}) \cdot \texttt{s-ind}_{b, o}(Y_0, \ldots , Y_{b - 1}, r_0, \ldots , r_{b - 1}).\end{equation*}

This polynomial's sum over the cube will be nothing other than our desired evaluation shiftb,o(t)(r)\texttt{shift}_{b, o}(t)(r). At the very end of the sumcheck, the verifier will be reduced to evaluating two things: t(r0,,rb1,rb,,r1)t(r'_0, \ldots , r'_{b - 1}, r_b, \ldots , r_{\ell - 1}), on the one hand, and s-indb,o(r0,,rb1,r0,,rb1)\texttt{s-ind}_{b, o}(r'_0, \ldots , r'_{b - 1}, r_0, \ldots , r_{b - 1}), on the other (here, the point rTτbr' \in \mathcal{T}_\tau^b will be sampled during the sumcheck). The first thing the verifier can just query. As for the second, we already agreed above that s-indb,o\texttt{s-ind}_{b, o} is transparent! Thus the verifier can just efficiently evaluate it itself.

This completes the description of shiftb,o(t)\texttt{shift}_{b, o}(t) as a virtual polynomial—i.e., as a thing that the verifier can efficiently evaluate at any point rTτr \in \mathcal{T}_\tau^\ell.

Then What?

What do we get out of this construction? In short, shifting lets us link distinct rows of our tables. Occasionally, it happens that we want to "spread" a computation across multiple rows. When we do this, we often want to "link" the end of one row with the beginning of the next. In fact, this sort of looks like how classical AIR works.

Of course, we will not always want to do this, and our use of M3 vastly reduces the frequency that we want to use this kind of thing. On the other hand, it can be useful to have.

Copy Constraints

We note that shifting achieves a goal analogous to that achieved by copy constraints, which appear in PLONKish schemes. In those schemes, copy constraints allow the verifier to require that various arbitrary pairs of elements of the prover's trace table be equal to each other. In particular, these pairs can control cells in completely arbitrary locations (in a completely unstructured way—the linked cells don't need to be near each other, for example). In fact, just this sort of copy constraint is achieved by the protocol [DP23, Prot. 4.22].

Because copy constraints are unstructured, they are very powerful; on the other hand, this power comes at an efficiency cost. Copy-constraint protocols like [DP23, Prot. 4.22] require instance-dependent transparent preprocessing; moreover, at runtime, they reduce to expensive multiset-checks. On the other hand, in many cases, this power is not needed: we only end up needing to link cells in very structured and predictable ways (e.g., linking the end of each row to the beginning of the following row).

Our shift construction, then, achieves the effective outcome of copy constraints, but at a far-lower efficiency cost. Indeed, the cost is just a single \ell-round sumcheck (or even fewer rounds, if the shifting is blockwise!).