Native addition and subtraction #
These bridges are checked against the logical floating-point model shipped with Lean 4.34. Finite inputs include both signed zeros. The result is unrestricted: cancellation, subnormal rounding, and overflow to infinity all preserve the complete packed word through the existing native adapters.
The finite-input hypotheses exclude NaNs and infinities. FloatLib preserves NaN details that Lean canonicalizes; subtraction also negates the right operand's NaN sign. These model equalities do not verify the external machine instructions used by compiled native code.
For finite operands, including signed zeros, dispatched addition produces precisely the word obtained by adding and packing in Lean's unpacked model. The result may overflow to infinity.
For finite operands, including signed zeros, dispatched subtraction agrees with Lean's unpacked subtraction and packing. There is no restriction on the rounded result.
Importing the native sum equals adding the imported binary32 operands with the installed certified software operation. Finite inputs may produce zero, a subnormal, or infinity.