Native binary-polynomial trial components #
divisorPasses_inSpace certifies the exact trial predicate used by isIrreducibleCode and
its counter scan, on binary candidate/divisor codes. The native remainder call retains the two
codes and charges conversion of their coefficient words, the two remainder registers and its
scalar callees. Both live binary lengths are computed from binary encodings, without expanding
a code to unary or allocating a divisor table.
The counted trial run is uniform in its initial divisor and binary iteration count. Its native
workspace includes the retained candidate, moving divisor and Boolean accumulator at every
prefix. This is an original resource analysis of the existing trial predicate. Its complete counter
traversal returns exactly isIrreducibleCode; the private early-exit scan has that same value
by its existing agreement theorem. This does not identify their step traces or certify modulus
selection, Horner or seed composition, which remain open under #6747.
Main results #
Turing.BinaryField.divisorPasses_inSpace: native linear space for one uniform divisor test.Turing.BinaryField.trialRun_inSpace: native binary-counted iteration of the exact predicate.Turing.BinaryField.trialRun_good_iff: exact predicate agreement at every iteration prefix.Turing.BinaryField.isIrreducibleCode_inSpace: native binary-input trial-division test.
Candidate and divisor codes for a binary-polynomial trial.
Binary candidate, framed, followed by binary divisor.
The tuple of the fields of encDivisorInput.
The exact original divisor-pass predicate, in native work space linear in the two binary codes. Live lengths, decoded coefficient words and the complete remainder callee are charged.
State of a counter trial: retained candidate, next divisor and accumulated pass bit.
Binary candidate and divisor, each framed, followed by the accumulator bit.
Test one divisor with the original predicate and increment the binary cursor.
Native step space includes the retained candidate and the entire divisor-test callee.
Three binary naturals in field order, the first two framed.
A counted trial run, implemented by repeated native scalar steps rather than List.range.
Every tested divisor contributes the exact original predicate, including out-of-range and zero codes; there are no monicity or candidate-size preconditions on this iteration contract.
Uniform native counted trial space, linear in the binary candidate/start/count words. The cursor is at most first + count at every prefix; the step certificate includes binary length processing and polynomial-remainder workspace. Running time is left existential.
Starting at code zero and testing exactly candidate-many codes gives the original
irreducibility predicate after its lower-bound test. The list appears only in the specification
of isIrreducibleCode, not in trialRun or its native implementation.
The existing total irreducibility test on a binary code has a native linear-workspace implementation by counted trial division. Both live binary lengths and every remainder call are included; no unary candidate, divisor list or multiplication table is materialized.