Exact Representations for Rounded Arithmetic #
The error theorems for addition, multiplication, division, and square root need more than a bound: they track the grid on which an intermediate value is exactly representable. The lemmas below are the common representation layer for those developments.
Rounding a mantissa/exponent value can be represented using its original exponent.
If the canonical exponent is no larger than the stored exponent, the input is already generic and
rounding fixes it. Otherwise the rounded canonical mantissa is shifted by an integral radix power.
This is the Lean counterpart of Flocq's round_repr_same_exp.
An FLX sum is representable when it fits in prec radix digits relative to both operand
representations. This is the common-grid lemma used by division and square-root residual proofs.