IEEE32Exec and FP32: Arithmetic Operation Refinement #
Op-level refinement theorems (finite/no-overflow) #
These are the results that the rest of TorchLean typically consumes: statements that each arithmetic
operation in IEEE32Exec refines its FP32 real-rounded counterpart.
If you are coming from PyTorch: this is the “float32 math model” that underlies many informal numerical arguments (“the kernel computes the exact real result, then rounds to float32”), but made explicit and proved for our executable kernel.
Finite refinement for fused multiply-add: fma x y z rounds x*y + z once at the end.
Finite refinement for division.
At the executable level, division is implemented by forming an exact rational quotient num/den
(after aligning dyadic exponents) and then rounding that rational to float32. This theorem states
that the overall real meaning is FP32 rounding of real division.
Finite refinement for square root.
IEEE32Exec.sqrt computes an executable approximation and then rounds it to float32. This bridge
theorem states that, on the finite path, the real meaning agrees with FP32 rounding of
Real.sqrt.