Theoremaliases_names
Statement
theorem aliases_names : ∀ ds : List STopDec,
(aliasesOf ds).map (·.1) = ds.flatMap fun d => match d with
| .alias c _ _ => [c]
| _ => []
| [] => rfl
| d :: ds => by
have ihProof
aliases_names ds
unfold aliasesOf at ih ⊢
cases d <;> simp only [List.filterMap_cons, List.flatMap_cons, List.map_cons, List.nil_append,
List.cons_append] <;> first | exact ih | (congr 1)Proved by a term, which Lean's kernel checks directly.
Used by
In StandardElmMech/Src/DerivesTo.lean: The derived forms as the book states them, a relation (DerivesE, DerivesTo), and derive_derivesTo.
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.