Theoremspec_port_payload
A port keeps its direction and payload type as elaboration records them (sec:dynamic-modules-reduced): the alias is expanded and the record's fields are sorted by label.
Statement
theorem spec_port_payload :
onOk portView (endToEnd Btest s_spec_port_payload) =
some [("send", .out, .list (.record (.cons "id" .int (.cons "name" .string .nil))))]Proof
by
decide +kernelProved by decide +kernel: Lean's kernel itself runs the decision procedure, here the evaluator, and checks that the answer is true, so nothing outside the kernel is trusted.
In StandardElmMech/Stat/SpecExamples.lean: The rulings on small programs: A27 (a free number is Float, annotations bind), A87 (the default copy is made), A93 (vacuous variables), polymorphic recursion, copy names, abs$Int, exposing items, payload types, kinds of main, eight copies, renaming invariance, record-pattern copies.
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.