Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.PrimeSelection.Step

Native minimum and candidate-advance steps #

The actual strict-minimum update realizes the prefix-minimum invariant. The actual successor code advances the candidate and recomputes its square in two charged instructions. The counter must separately establish the value supplied to the minimum update; these local rules do not assume a complete modular-counting endpoint.

The prefix-minimum invariant BestBefore and its update rules are private to the proof-only companion PrimeSelection.Minimum; this module reads them through import all.

Advance to the next candidate and compute its actual square. All other registers and all memory cells survive. Numerical admission is for the new square itself.