Theoremspec_two_vars_order
The canonical order of a declaration's number variables is their first occurrence in the bindings' types (Choices, item 2), not the order of their names: numberb occurs before numbera, so the copy at numberb = Int, numbera = Float is r$Int$Float, where x + 1 takes 1 at Int and y + 1 at Float.
Statement
theorem spec_two_vars_order :
onOk twoVarsView (endToEnd Btest s_spec_two_vars_order) =
some (some ["r", "r$Int$Float", "main"], some [.int 1, .intF 1],
some [lid "text", lid "r$Int$Float"])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.