TorchLean API

NN.Floats.IEEEExec.MinMaxERealSoundness

minimum/maximum in EReal semantics (IEEE32Exec) #

NN/Floats/IEEEExec/Exec32.lean defines executable IEEE-754 comparison operators:

For interval endpoint soundness, we interpret float32 values in the extended reals:

This file provides the bridge lemmas used by interval arithmetic proofs:

toEReal (minimum x y) = min (toEReal x) (toEReal y)
toEReal (maximum x y) = max (toEReal x) (toEReal y)

including the overflow cases where one of x/y is an infinity.

References:

Main bridge lemmas #

minimum agrees with min on the toEReal interpretation, assuming no NaNs.

maximum agrees with max on the toEReal interpretation, assuming no NaNs.