Skip to content

feat(floats): executable ULP and absorption for IEEE32Exec#17

Open
NicolasRouquette wants to merge 1 commit into
lean-dojo:mainfrom
NicolasRouquette:ieee32exec-ulp
Open

feat(floats): executable ULP and absorption for IEEE32Exec#17
NicolasRouquette wants to merge 1 commit into
lean-dojo:mainfrom
NicolasRouquette:ieee32exec-ulp

Conversation

@NicolasRouquette

Copy link
Copy Markdown
Contributor

Add IEEE32Exec.ulpExp, an executable unit-in-the-last-place exponent computed directly from the decoded dyadic payload (via Nat.log2 and the integer exponent selector fexp32), and certify it against the real-valued specification: on the finite fragment, 2^(ulpExp x) = ulp32 (toReal x) (neuralBpow_ulpExp_eq_ulp32). Until now the ULP existed only as the real-valued, noncomputable neuralUlp/ulp32.

Also expose the executable absorption test absorbs a b (the float32 sum of a and b equals a) and prove it sound against round32: when the kernel reports a contribution absorbed, the exact real sum rounds back to a (round32_add_eq_left_of_absorbs). This is the missing executable primitive and soundness fact that a numerical-adequacy analysis needs, complementing the existing op-level toReal_*_eq_fp32Round refinement lemmas.

Add `IEEE32Exec.ulpExp`, an executable unit-in-the-last-place exponent
computed directly from the decoded dyadic payload (via `Nat.log2` and the
integer exponent selector `fexp32`), and certify it against the real-valued
specification: on the finite fragment, `2^(ulpExp x) = ulp32 (toReal x)`
(`neuralBpow_ulpExp_eq_ulp32`). Until now the ULP existed only as the
real-valued, noncomputable `neuralUlp`/`ulp32`.

Also expose the executable absorption test `absorbs a b` (the float32 sum of
`a` and `b` equals `a`) and prove it sound against `round32`: when the kernel
reports a contribution absorbed, the exact real sum rounds back to `a`
(`round32_add_eq_left_of_absorbs`). This is the missing executable primitive
and soundness fact that a numerical-adequacy analysis needs, complementing the
existing op-level `toReal_*_eq_fp32Round` refinement lemmas.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant