IEEE32Exec and FP32: Nearest-Even Quotient Lemmas #
Signed nearest-even (and power-of-two specialization) #
FP32 uses “round to nearest, ties to even” (IEEE 754's default). The executable kernel implements
the same policy, but at the level of integer arithmetic on mantissas.
In this section we establish basic algebraic properties of nearest-even rounding that we can reuse
later when relating the IEEE32Exec rounding code to fp32Round.
Nearest-even integer rounding commutes with negation.
theorem
TorchLean.Floats.IEEE754.IEEE32Exec.neural_nearest_even_neg_div_eq_roundQuotEven
(num den : ℕ)
(hden : den ≠ 0)
:
theorem
TorchLean.Floats.IEEE754.IEEE32Exec.roundShiftRightEven_eq_roundQuotEven_pow2
(n shift : ℕ)
:
theorem
TorchLean.Floats.IEEE754.IEEE32Exec.neural_nearest_even_div_pow2_eq_roundShiftRightEven
(num shift : ℕ)
: