Complete fixed native program for one Chan–He node #
The source comparator is NodeArray.lean at
anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5.
The layout, native code and proofs are original. The source's Light machine is not imported.
Main definitions #
NodePacking.program: computes the layout and tags, pads every output cell, then performs three actual residue/histogram/extraction/placement calls, including all three count stores.
References #
The three supplied signed input bases.
Instances For
The three supplied input lengths.
Instances For
Fresh allocation base after all input arrays.
Instances For
Common number of four-cell groups.
Instances For
Node input magnitude bound.
Instances For
Positive modulus.
Instances For
Computed residue workspace base.
Instances For
Computed histogram workspace base.
Instances For
Computed packed output base.
Instances For
Twice the gap G=6U+4, ready for sign-and-magnitude tagging.
Instances For
Twice the padding magnitude W=2U+1.
Instances For
Setup scratch.
Instances For
Constant one, retained across the complete calls.
Instances For
Constant four, retained across the complete calls.
Instances For
The mathematical layout determined by the runtime parameters.
Instances For
Padding workspace embedded below all persistent node parameters.
Instances For
Packed output base.
Instances For
Number of four-cell groups.
Instances For
Padding word for column zero.
Instances For
Padding word for column one.
Instances For
Padding word for column two.
Instances For
Padding word for column three.
Instances For
Compute every permanent and scratch block address in twelve native instructions.
Instances For
Compute the exact positive encoded padding pattern, including all signed-negation/tag work.
The third padding word uses subtraction because its integer contribution is -W.
Instances For
Compute the selected heavy-array descriptor address. The choice is one of three fixed pieces of code, never a program whose size depends on an input length.
Instances For
Deliver the exact encoded tag for one fixed column.
Instances For
Deliver the duplicated-Z distance; the other columns perform two coincident stores.
Instances For
Every runtime input and output parameter is explicitly delivered to the complete call.
Instances For
Complete one-set native round with charged setup and a written heavy count.
Instances For
Complete charged address/tag/padding initialization.
Instances For
Complete one-node preprocessing. This code is independent of n,w,M,N,U.
Instances For
The original three input bases/lengths and base, length, magnitude and modulus parameters are preserved by the complete program.
The assembled code length has a fixed bound, independent of every runtime parameter.
The complete program is deterministic and never reads the word width.
No instruction samples randomness or invokes an oracle.