Elm Exactly

Theoremroundtrip_nan_fails

StandardElmMech/Eff/RoundTrip.lean:449, The exceptions are needed · native_decide (trusts the compiled evaluator)

NaN encodes as null, which does not decode at Float. [native] (a float's bits)

Statement

theorem roundtrip_nan_fails : enc .float (.sv (.float fNaN)) = some .null ∧ dec .float .null = none

Proof

by
  native_decide

Proved by native_decide: the decision procedure is compiled and run, and its answer is trusted. This is used where values are compared as they print, floats above all, which the kernel cannot compare.

In StandardElmMech/Eff/RoundTrip.lean: The round trip of encoding and decoding (roundtrip), except where A88 says otherwise (NoExc), under the named hypothesis FloatRoundTrip; the exceptions shown to be needed.

A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.