Square-root agreement with Lean's floating-point model #
These theorems relate FloatLib square root to the Lean logical model underlying the native floating-point types. Canonicalization forgets NaN payloads and signs and keeps all numeric bits, including the sign of zero. The model equality does not verify the machine instructions used by compiled native operations.
Square root agrees with Lean's model on every input of an IEEE format after NaN canonicalization. The equality keeps signed zeros and covers negative arguments, infinities, and both kinds of NaN.
Exporting a binary32 square root gives the square root of the exported Lean model.
Exporting a binary64 square root gives the square root of the exported Lean model.
Lean binary32 square root agrees with FloatLib square root through the native adapter. Canonicalization discards only NaN signs and payloads.
Lean binary64 square root agrees with FloatLib square root through the native adapter, including signed zeros and exceptional results.