Theoremenc_binVal
Statement
theorem enc_binVal (os : List Nat) (h : ∀ o ∈ os, o < 256) : enc .bytes (binVal os) = some (.bytes os)Proof
by
simp [binVal, enc, toList?_ofList, mapM_bytes_comp os h]Proved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
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.