Deterministic trigonometric special-value rules (sin, cos) #
NN.Floats.IEEEExec.Exec32 defines deterministic, executable IEEE32Exec.sin and IEEE32Exec.cos
(implemented purely inside Lean; no delegation to the host Float runtime).
This file exposes the special-case rewrite rules (NaN/Inf/±0) so downstream proofs do not need to unfold the whole implementation.
theorem
TorchLean.Floats.IEEE754.IEEE32Exec.sin_eq_quietNaN_of_isNaN
(x : IEEE32Exec)
(hx : x.isNaN = true)
:
sin propagates NaNs by returning the quieted payload.
theorem
TorchLean.Floats.IEEE754.IEEE32Exec.cos_eq_quietNaN_of_isNaN
(x : IEEE32Exec)
(hx : x.isNaN = true)
:
cos propagates NaNs by returning the quieted payload.
sin(±Inf) = NaN.
sin(±Inf) = NaN.
cos(±Inf) = NaN.
cos(±Inf) = NaN.