Elm Exactly

Theoremdec_iff

StandardElmMech/Eff/EncDec.lean:679, The relations are the functions · term proof

The relation Dec is the function dec (D8).

Statement

theorem dec_iff (τ : PTy) (j : BVal) (v : Val) : Dec τ j v ↔ dec τ j = some v

Proof

⟨Dec.toFn, Dec.ofFn τ j v⟩

Proved by a term, which Lean's kernel checks directly.

Used by

In StandardElmMech/Eff/EncDec.lean: The book's relations Enc and Dec (15 and 14 rules, r_e_enc_*, r_e_dec_*), enc_iff, dec_iff, and that both are partial functions.

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.