Theorema87_default_copy_made
A87 (with A27 and A59), dynamic-core's check/x example: main uses x only at Int, yet the default copy x (at Float, where 2 ^ -1 is 0.5 and check reaches Debug.todo) is emitted beside x$Int; each copy of x uses the copy of check at its own assignment, and its constants are at its own type.
Statement
theorem a87_default_copy_made :
onOk a87CopyView (endToEnd Btest s_a87_default_copy_made) =
some (some ["check", "check$Int", "x", "x$Int", "main"],
some [lid "check", qlid "Basics" "negate"], some [.intF 2, .intF 1],
some [lid "check$Int", qlid "Basics" "negate"], some [.int 2, .int 1],
some [lid "text", qlid "Debug" "toString", lid "x$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.
About rulings A87, A27, A59 of the book, where the implementations disagreed or were silent and the definition decides.
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.