TorchLean API

FloatLib.Floats.Formats.IEEE754.Native.Sqrt

Square-root agreement with Lean's floating-point model #

These bridges compare FloatLib square root with the Lean 4.34 logical model underlying the native floating-point types. Canonicalization forgets NaN payloads and signs while retaining all numeric bits, including the sign of zero. The model equality does not verify the external machine instructions used by compiled native operations.

Square root agrees on every conventional IEEE input after NaN canonicalization. The equality retains 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 4.34 binary32 square root agrees with FloatLib square root through the existing native adapter. Only NaN signs and payloads are discarded by the representation relation.

Lean 4.34 binary64 square root agrees with FloatLib square root through the existing native adapter, including signed zeros and exceptional results.

Configured binary64 square root commutes with export to Lean's native Float, including signed zeros, infinities, and NaNs under Lean's canonical representation.