Native setup of the two Chan–He prime searches #
The first search uses thresholds 3Λ|Sⱼ|². After saving its selected prime, native counting
at that prime provides the second thresholds 3Λ coll Sⱼ p. Both searches use the complete
prime scan and collision queries, including explicit positive signed-modulus encoding.
Main definitions #
Modulus.firstSetup: compute the first search's three thresholds.Modulus.secondSetup: compute the second thresholds from native counts.Modulus.program: compute the existing Chan–He modulus using two native minimum searches.
Main results #
Modulus.exec: exact modulus, input frame and charged cost from explicit local fits.Modulus.not_readsWidth: the program does not inspect the physical word width.
Collision divisor bound Λ.
Instances For
First selected candidate, or one if none qualifies.
Instances For
Three times the collision divisor bound.
Instances For
Unsigned product of the two selections, each defaulting to one.
Instances For
Charge all six square/threshold multiplications and the three scalar setup instructions.
Instances For
Charge all three second-threshold multiplications and their scalar setup.
Instances For
Run both concrete searches and compute their product. The prime table and its count are shared by all nodes and are supplied in the search ABI.
Instances For
The exact data after the first setup; memory is unchanged.
Instances For
First-search thresholds are computed by nine actual native instructions.
The exact data after the second setup; memory is unchanged.
Instances For
Second-search thresholds are computed by six actual native instructions.
One polynomial bound for selector counters, thresholds and memory addresses.
Instances For
One search with its factor bounded by the largest candidate.
Instances For
Both searches, a baseline collision count, scalar setup and the final product.
Instances For
Compute exactly the existing Chan–He modulus with two complete native prime searches.
The prime bitmap/count is a shared input built by PrimeTable.program. A single polynomial
budget bounds selector counters, thresholds and addresses; input values and the maximum modulus
fit the source width. The final halt is excluded.
The interface requires m ≥ 2 for a nonempty candidate-prime window. The intended preprocessing
caller uses mPar n U = (wPar n U + 1) * (2 * log₂(wPar n U + 1) + 4) ≥ 4.
The default-only window m = 1 is outside this interface, although the selector bounds extend
to it; m = 0 fails the default-selector upper bound.
The finite selector program never reads the word width.