TorchLean API

NN.Floats.IEEEExec.Semantics.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:

$$ \begin{aligned} \operatorname{toEReal}(\min(x,y)) &=\min(\operatorname{toEReal}(x),\operatorname{toEReal}(y)),\\ \operatorname{toEReal}(\max(x,y)) &=\max(\operatorname{toEReal}(x),\operatorname{toEReal}(y)). \end{aligned} $$

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.