RealSemantics #
Finite-only real semantics for IEEE32Exec.
We interpret a float32 bit-pattern as a real number by decoding its exact dyadic payload
(-1)^sign * mant * 2^exp and then mapping to ℝ.
The executable kernel has NaN/Inf payloads; these do not have a real interpretation. We therefore provide:
toReal? : IEEE32Exec → Option ℝ, returningnonefor NaN/Inf,toReal : IEEE32Exec → ℝ, a totalized version mappingnoneto0.
Most theorems should be read under finiteness hypotheses and use toReal? (or lemmas that assume
toDyadic? x = some …).
Real interpretation for finite values (undefined for NaN/Inf).
Instances For
Total real interpretation (maps NaN/Inf to 0; use toReal? for proofs).
Instances For
Unfolding lemma for toReal?.
This lemma is intentionally not [simp]: rewriting toReal? x into a match on toDyadic? x
is usually not the best first step.
If toDyadic? x = some d, then toReal? x = some (dyadicToReal d).
If toDyadic? x = none, then toReal? x = none.
Unfolding lemma for toReal in terms of toDyadic?.
This is the form that is most convenient in algebraic proofs: it avoids an intermediate Option.