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 independently certify the exact Euclidean
division equation and remainder bound. If that check rejects the candidate, the runtime selects 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 proves the exact quotient/remainder decomposition and 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 directly. This theorem is the proof boundary
that lets the mathematical argument continue 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. Those are exactly the two cases selected by the two-limb backends.
An independently rejected Algorithm D candidate selects the restoring repair.
The conclusion holds for any operands whose candidate fails the certificate.
The checked candidate is complete on the normalized two-limb division domain.
The fast candidate is used when its independent certificate succeeds; otherwise the proved restoring loop supplies the quotient and remainder. Thus the selected pair itself is certified, without a second runtime check or an unreachable backend fallback.
The candidate selected by the fast-check-or-repair runtime path satisfies Euclidean division.
This is the consumer-facing form of checkedCandidate_complete: callers receive the exact
equation and strict remainder bound directly, without reopening 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.