Real meaning of Lean accuracy certificates #
Lean's logical floating-point model carries an Accuracy value alongside a truncated natural
mantissa. This module states its intended real-number meaning, proves that right shifts preserve
that meaning, and connects its nearest-even choice to the independent Flocq-style integer rounder.
accuracyRepresents mantissa accuracy value states that mantissa is the integer truncation of
the nonnegative real value and that accuracy locates the discarded part relative to one half.
Instances For
Every represented value lies in the unit interval beginning at its truncated mantissa.
A nonzero truncated mantissa determines the binary magnitude of every real value represented by its accuracy certificate.
One model right shift preserves the accuracy certificate after dividing the represented real by two.
Repeated model right shifts preserve the certificate at the correspondingly divided scale.
A valid accuracy certificate makes Lean's and the real model's nearest-even choices equal.
After any model right shift, rounding the resulting extended mantissa agrees with independent nearest-even rounding of the represented real at the shifted scale.