TorchLean API

NN.Floats.IEEEExec.Bridge.FP32Total.Core

Total FP32 Bridge: Finite and Special Values #

“Total” bridge theorems combining:

The key end-user view is toReal?:

In most of TorchLean, the finite path is treated as real arithmetic + float32 rounding while special-value behavior is kept explicit. This file packages that split in one place.

The per-op lemmas are phrased in the style:

toReal? (op …) = if isFinite (op …) then some (fp32Round …) else none.

That makes the trust boundary readable at the call site: the if is exactly where NaN/Inf (or overflow-to-Inf) can occur.

Background references (for float32 rounding/special values):

Basic facts: isFinitetoDyadic?/toReal? #

On finite values, toReal? x is just some (toReal x).

Helpers: NaN/Inf/zero interactions #

If dyadic decoding fails and the value is not NaN, then it must be infinite.