Theoremspec_basis_abs
A value of the basis written in Elm (abs, Appendix D) is copied like a program's: its occurrences at Int, unqualified and qualified, refer to abs$Int and Basics.abs$Int, and the exposing item abs of the import stands for abs, abs$Int (sec:dynamic-modules-reduced).
Statement
theorem spec_basis_abs :
onOk absView (endToEnd Btest s_spec_basis_abs) =
some (some [lid "text", qlid "Debug" "toString", lid "abs$Int", qlid "Basics" "negate",
lid "abs$Int", qlid "Basics" "negate", qlid "Basics" "abs$Int"],
some (some (.items [.var "abs", .var "abs$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.
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.