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. This file contains the representation lemmas shared by 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.
The sum of two mantissa/exponent values has a representation at the smaller exponent.
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.