Documentation

CslibFrontier.Algorithms.WordRAM.ThreeSum.ChanHe.NodeProgram

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 #

References #

The three supplied signed input bases.

The three supplied input lengths.

@[reducible, inline]

Fresh allocation base after all input arrays.

@[reducible, inline]

Common number of four-cell groups.

@[reducible, inline]

Node input magnitude bound.

@[reducible, inline]

Positive modulus.

@[reducible, inline]

Computed residue workspace base.

@[reducible, inline]

Computed histogram workspace base.

@[reducible, inline]

Computed packed output base.

@[reducible, inline]

Twice the gap G=6U+4, ready for sign-and-magnitude tagging.

@[reducible, inline]

Twice the padding magnitude W=2U+1.

@[reducible, inline]

Constant one, retained across the complete calls.

@[reducible, inline]

Constant four, retained across the complete calls.

The mathematical layout determined by the runtime parameters.

Padding workspace embedded below all persistent node parameters.

@[reducible, inline]

Packed output base.

@[reducible, inline]

Number of four-cell groups.

@[reducible, inline]

Padding word for column zero.

@[reducible, inline]

Padding word for column one.

@[reducible, inline]

Padding word for column two.

@[reducible, inline]

Padding word for column three.

Compute every permanent and scratch block address in twelve native instructions.

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.

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.

Deliver the exact encoded tag for one fixed column.

Deliver the duplicated-Z distance; the other columns perform two coincident stores.

Every runtime input and output parameter is explicitly delivered to the complete call.

Complete one-set native round with charged setup and a written heavy count.

Complete one-node preprocessing. This code is independent of n,w,M,N,U.

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.