Verified fixed-word division candidates #
The radix-2^32 runtime loop is a candidate generator. Its quotient and remainder are
accepted when native multiplication and addition confirm the Euclidean division equation and the
remainder bound. If that check rejects the candidate, the runtime falls back to a restoring
accumulator. This module proves that accumulator equal to the logical recurrence and certifies its
result on normalized inputs of precision + 1 bits with 64 < precision ≤ 126.
Both candidate shifts of an in-range precision lie strictly between one and two words.
The executable certificate accepts every representable Euclidean decomposition for the two shifts used by two-limb division.
This is completeness of the independent checker, not of the speculative Algorithm D generator.
A successful native certificate gives the quotient/remainder decomposition and the Euclidean
remainder bound. The proof does not depend on the radix-2^32 candidate generator.
The allocation-light restoring repair agrees with the logical two-limb recurrence.
Runtime code calls the primitive-word accumulator, and proofs continue from this theorem through
quotientSteps128.
The restoring repair produces a certified candidate for normalized precision + 1-bit
significands.
The shift is precision when the numerator is at least the denominator and precision + 1
otherwise, as the two-limb backends choose it.
A rejected Algorithm D candidate selects the restoring repair.
No hypothesis on the operands is needed beyond the failed certificate.
The checked candidate is complete on the normalized two-limb division domain.
Either the fast candidate passes its certificate, or the proved restoring loop supplies the quotient and remainder. Either way the returned pair is certified, with no second runtime check and no unreachable backend fallback.
The candidate selected by the fast-check-or-repair runtime path satisfies Euclidean division.
It combines checkedCandidate_complete with certificate_sound, so callers get the equation
and the strict remainder bound without unfolding the executable certificate.
Native quotient rounding agrees with exact nearest-even rational rounding for a certified Euclidean decomposition.
Native quotient rounding returns the input quotient or its successor when incrementing fits.