Theoremspec_main_kinds
The kind of a program and its flags type, from the scheme of main (r:p-stat-main-view, r:p-stat-main-program; mainKind): a view, whose flags type is not read and is () (Choices, item 1; Translator changes, item 3); a worker whose flags type () its init fixes; a worker whose flags type Int its annotation fixes.
Statement
theorem spec_main_kinds :
(onOk kindView (endToEnd Btest s_main_view), onOk kindView (endToEnd Btest s_main_worker_unit),
onOk kindView (endToEnd Btest s_main_worker_int)) =
(some (.view, .unit), some (.worker, .unit), some (.worker, .int))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.
Rules of the book it uses
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.