Verified four-limb rounding #
These theorems connect four-limb shifts, sticky-bit normalization, and nearest-even rounding to
their natural-number meanings. Multiplication and fused-operation backends can reuse this layer
without converting compiled arithmetic to Nat.
The fixed-limb low-bit predicate is the exact natural-number remainder test at every width.
Widths above the four-limb capacity inspect the complete value, matching reduction modulo any
power of two at least 2^256.
Four-limb shifting by less than one word is exact when the quotient fits two limbs.
A one-word shift selects the middle two limbs exactly when the top limb is zero.
A two-word shift selects the upper two limbs exactly.
A four-limb shift is exact whenever its quotient fits in the returned two-limb carrier.
This theorem hides the native word-boundary cases from clients. The fit condition is the only representation-independent precondition needed by normalization and later fixed-limb kernels.
The fixed-limb jam operation refines the representation-independent operation once its quotient and discarded-bit test have been established.
Four-to-two-limb normalization never discards more than 128 bits.
A four-limb value fits below the normalization window selected from its leading bit.
The quotient selected by four-to-two-limb normalization fits in two limbs.
Native four-to-two-limb normalization refines representation-independent shift-with-jam.
The quotient fits in two limbs, and the low bit records the OR of the quotient's low bit and the discarded suffix's sticky bit.
Four-to-two-limb normalization preserves zero exactly.
Four-limb nearest-even rounding agrees with the generic natural-number rounder.