Exact quotient comparisons preserved by jamming #
Jamming a nonzero discarded suffix into the low bit relates the retained prefix to the original Euclidean quotient and remainder. The comparison lemmas show that the exact fraction and its jammed prefix make the same comparisons at the even boundaries used by posit rounding, including scaled tails and stream midpoints.
These lemmas concern the exact quotient and retained prefix, independently of storage width.
Direct.PrefixProof uses them after normalizing significands to prove the executable prefix
correct; Direct.Proof then connects that prefix to the posit encoding and final rounding.
Quotient fractions and jamming #
A Euclidean quotient plus its proper remainder lies in its unit interval.
A nonzero Euclidean remainder places the exact quotient strictly above its prefix.
A Euclidean quotient plus its proper remainder lies below a natural boundary exactly when the quotient does.
A natural boundary lies below a Euclidean quotient plus its proper remainder exactly when it lies below the quotient, or equals the quotient and the remainder is nonzero.
Jamming and the exact quotient fraction lie on the same lower side of every even integer boundary. A stream threshold with at least one zero padding bit has this form.
Jamming and the exact quotient fraction lie on the same upper side of every even integer boundary.
Jamming a normalized significand is the same operation as jamming its complete exponent/fraction tail. The leading bit position is positive for every Posit payload, so the exponent contribution and removed hidden bit are both even.
A zero-padded midpoint is even whenever at least one padding bit remains.
Padding a retained jammed prefix back to the complete stream width never exceeds the unjammed integer prefix.
The only nontrivial case is a nonzero remainder after an even quotient. Jamming then adds one, but the padded retained prefix is even, so it cannot equal that odd successor.
The exact quotient fraction lies strictly below the successor of its retained jammed prefix.
This is the upper half of the general local bracket. It needs only a proper Euclidean remainder and discards at least one stream bit; no Posit width, storage tier, or candidate decoder appears.
An exact quotient fraction and its jammed finite tail lie on the same lower side of every zero-padded stream midpoint.
An exact quotient fraction and its jammed finite tail lie on the same upper side of every zero-padded stream midpoint.
Interpreting finite stream words #
The unjammed quotient is an integer tail word followed by one proper rational remainder. The
closing lemmas quotientFraction_lt_trailingRat_iff and trailingRat_lt_quotientFraction_iff
compare that fractional position with any bounded integer tail boundary. They use only
monotonicity of trailingRat, so quotient rounding does not duplicate Posit regime layout or
decoder proofs.
Advancing one finite tail word advances a normalized significand by one unit in its stored leading position, including a carry into the next exponent within the bounded tail.
A quotient plus proper remainder is below a bounded finite-stream word exactly when its normalized rational value is below the value denoted by that word.
The reverse bounded finite-stream comparison has the corresponding fractional meaning.