So it suffices to construct an efficient circuit for a(I,S).
The Auxiliary Functions
Once again, we define a sequence of auxiliary functions for each k∈{0,…,6}, now defined on Bk×Bk.
ak(i,s):={10 if {i}≥2k−{s} otherwise.
Clearly, a=a6, so it suffices to treat the latter.
Recursive Construction
Once again, we get a recursive substructure:
Base Case.
a0=0.
Inductive Case. For each k∈{1,…,6} and each input triple (i,j,s)∈Bk×Bk×Bk:
ak(i,s)=⎩⎨⎧1ak−1(i,s)0 if ik−1=1 and sk−1=1 if ik=1=sk−1 otherwise.
Here's a proof sketch. We want to know whether {i}+{s}≥2k overflows modulo 2k. If both summands' most-significant bits are 1, then we definitely get an overflow; if neither are, then we definitely don't. If exactly one of the bits ik−1 and sk−1 equals 1, then we get an overflow if and only if the less-significant substrings (excluding the most-significant bits), when added together, produce an overflow.
The Arithmetizations
Using this substructure, we once again get arithmetizations for the multilinear extensions ak(I,S).
Base Case.
a0=0.
Inductive Case. For each k∈{1,…,6} and each (i,s)∈Bk×Bk:
ak(I,S)=Ik−1⋅Sk−1+(Ik−1+Sk−1)⋅ak−1(I,J,S).
This completes the efficient arithmetization of the shift indicator functions.