Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.PrimeSelection

Complete native minimum-count prime selection #

One fixed 160-register standard program reads raw (n,D) and three canonical signed matrices, enumerates the square prime window with charged trial division, and calls the actual cyclic-Strassen counter. It returns an attained minimum modular count, hence the existing ExactTriangle.IsSelectedPrime and its finite false-positive bound apply.

Main results #

D ≥ 16 ensures a nonempty window; general execution permits D > n and empty matrices. No prime list, counter run, time, answer or layout certificate is an input. The flat program uses at most 32824 slots including halt and does not read physical width. Global ET parameter/small-input handling is ParameterSelecting.program, which calls this selector; its host interface is ParameterSelecting.callee and the full 3SUM endpoint is ThreeSum.Decision.exists_one9992_runs.

References #

Selectively adapts the minimum-update policy of Anthropic's Programs/Sec3/Theorem17/Hashing/ChoosePrime.lean at revision 16a5ce41304fcdaea4e0be7c132e1c361dc26da5. Square enumeration and trial division replace its prime-list producer. All native execution, word bounds, frames and instruction constants are proved against the existing WordRAM semantics, without importing Light execution or costs.