A finite exhaustive native Exact Triangle callee #
This reference implementation enumerates the actual triples, loads all three encoded matrix
weights, and compares the sums of their positive and negative magnitudes. No solver instruction,
host execution premise or precomputed verdict occurs in its code. It is library code because its
certification witnesses that Host.Callee can be satisfied by a concrete finite program.
Main definitions #
program: one fixed 24-register native triple scan.callee: a concrete certified finite block with charged cubic time and logarithmic width.
This exhaustive native implementation and its certification are original.
Raw number of vertices per part.
AB matrix pointer.
BC matrix pointer.
AC matrix pointer.
The free-pointer argument is overwritten by zero after entry.
Raw Boolean return value.
Next flattened triple.
Number of cells per matrix.
Number of triples.
Loop increment.
Sign-and-magnitude radix.
First vertex index.
Second vertex index.
Third vertex index.
Actual matrix-load address.
The three actual loaded edge words.
Sum of positive magnitudes.
Sum of negative magnitudes.
Magnitude of the current encoded edge.
Sign bit of the current encoded edge.
Flattened second and third vertex indices.
Add one encoded edge to its positive or negative magnitude sum.
Compute three indices and load the three corresponding matrix cells.
Retain a found zero-weight triangle and advance to the next triple.
One fully charged triple scan.
Initialize every scratch value used before the first triple.
Exhaust all t³ triples using native division/remainder and actual matrix loads.
Execute the real exhaustive block from arbitrary old registers and memory. Source spans may alias: each only needs to end below the supplied address bound. Every memory cell survives, including dirty scratch. Empty input returns zero through the actual zero-iteration loop.
Actual finite cubic-time solver used to inhabit the complete host's callee contract. It preserves all memory, works on arbitrary signed matrices, and never reads physical width.