Theoremkey_toList
Statement
theorem key_toList : ∀ a : Assignment, (Assignment.key a).toList = keyChars a
| [] => by simp [Assignment.key, keyChars]
| [n] => by simp [Assignment.key, keyChars]
| n :: m :: rest => by
have ihProof
key_toList (m :: rest)
simp only [Assignment.key, List.map_cons] at ih ⊢
rw [String.intercalate_cons_cons, String.toList_append, String.toList_append, ih]
simp [keyChars]Proved by a term, which Lean's kernel checks directly.
Used by
In StandardElmMech/Stat/Pipeline.lean: SpecOf, DynOf (in Lib.Btest for a view, Mod.Btest [] for a worker: dynBasis), ProgramSem (r:p-program), D11For; copy names, payload types and main (copyName_inj, toPTy_isSome_iff, mainKind_worker_iff, mainKind_view_iff); the pipeline theorems (specOf_of_endToEnd, programSem_of_legal).
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.