Packing three convolution arrays into one #
Adapted from Anthropic's PaperStatements.lean and
FromNumbers.lean, at
formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Three-array convolution uses
Definition 2.2 of [CH20]. The four-way packing is an additional elementary step in that
formalization, not part of the Chan–He proof.
Main definitions #
HasConvolutionSolution: three arrays with zero-based indices andi + j < N.oneArray: four-way interleaving with magnitude tags.
Main results #
oneArray_correct: equivalence with the existing one-arrayConvolutionpredicate.abs_oneArray_le: packed magnitudes are at most30W + 10.
References #
Three arrays in one #
Three arrays in one. With G = 3W + 1, where W bounds the entries of the three arrays,
cell 4i + 1 holds X i + G, cell 4i + 2 holds Y i + 3G, cell 4i + 3 holds Z i + 4G, and
cell 4i holds 10G. In an equation y_u + y_v = y_{u+v} the multiples of G have to cancel,
and they do so only when u and v have the remainders 1 and 2 modulo 4.