Exact square roots at the rounding scale #
Integer division by a square commutes with the floor square root. Applying this at a power of two retains the guard bit, while comparison with the reconstructed square recovers the sticky bit. These identities preserve the entire extended mantissa and the unpacked rounding result.
theorem
FloatLib.Floats.Formats.BinaryInterchange.Model.ScaledSqrt.shift_extended_succ
(em : Float.Model.UnpackedFloat.ExtendedMantissa)
(k : ℕ)
:
A positive extended-mantissa shift has one guard bit and the exact discarded-bit sticky flag.
The reduced radicand preserves every field of the original shifted extended mantissa.
theorem
FloatLib.Floats.Formats.BinaryInterchange.Model.ScaledSqrt.round_eq
(spec : Float.Model.Format)
(sign : Float.Model.UnpackedFloat.Sign)
(n : ℕ)
(e : ℤ)
:
Scaling before the root preserves the complete unpacked result, including normalization.