Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.WitnessScan.Program

Native original-weight verification in one vertex interval #

The program reads the original canonical-signed A–B, B–C and A–C arrays, tests each vertex in the supplied interval using two actual signed-addition kernels, and returns a flag and an original vertex witnessing a zero sum. It writes no memory and preserves all arguments. This is the inner verifier used after a nonzero product answer, not a product or ET oracle.

The interval scan follows the pinned Scan.lean procedure in the proof of Theorem 17 at anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. The native code, register layout and charged constants are rebuilt against the existing WordRAM APIs. The stage definitions are internal implementation interfaces.

@[reducible, inline]

Original canonical-signed A–B array pointer.

@[reducible, inline]

Original canonical-signed B–C array pointer.

@[reducible, inline]

Original canonical-signed A–C array pointer.

@[reducible, inline]

Outer matrix dimension.

@[reducible, inline]

Original first query coordinate.

@[reducible, inline]

Original second query coordinate.

@[reducible, inline]

First original vertex of the scanned interval.

@[reducible, inline]

Number of vertices in the interval.

@[reducible, inline]

B–C row pointer at the first interval vertex.

@[reducible, inline]

A–C row pointer at the first interval vertex.

@[reducible, inline]

Cached canonical-signed A–B weight.

@[reducible, inline]

Number of interval vertices already tested.

@[reducible, inline]

Unsigned success flag.

@[reducible, inline]

Original vertex of the most recently verified zero sum.

@[reducible, inline]

Constant one.

@[reducible, inline]

Actual load-address temporary.

@[reducible, inline]

Constant zero, preserved by the signed arithmetic bank.

Ordinary runtime arguments of the original-weight interval verifier. This stores no execution, fit, witness or time certificate.

  • ab : ℕ

    Original canonical-signed A–B array base.

  • bc : ℕ

    Original canonical-signed B–C array base.

  • ac : ℕ

    Original canonical-signed A–C array base.

  • n : ℕ

    Matrix dimension.

  • a : ℕ

    First query coordinate.

  • b : ℕ

    Second query coordinate.

  • first : ℕ

    First interval vertex.

  • length : ℕ

    Number of interval vertices.

The eight scalar arguments occupy their actual native registers.

A concrete numerical envelope for all address/index arithmetic in this verifier.

Load the fixed A–B weight and compute the two row pointers with actual instructions.

First two original signed weights, read from the original memory.

Two charged standard-native signed additions, with no extra machine operation.

Remember a genuine zero-sum vertex, then advance the interval counter.

Fixed native interval verifier; only the actual loop count depends on input.

Fixed instruction graph, independent of dimensions and physical width.