Theoremspec_rename_invariant_a93
The same on A93's example, whose group's number variables are fresh ones (the instance at f 3 is renamed), so that the canonical order of the variables and the copies are read through the renaming.
Statement
theorem spec_rename_invariant_a93 :
(inferProgram Btest (bareOf s_a93_mutual)).toOption.map (renameView "f") =
some (true, [[], [.var (.fresh 7 .num), .var (.fresh 5 .num), .var (.fresh 6 .num)]],
[[], [.var (.fresh 1007 .num), .var (.fresh 1005 .num), .var (.fresh 1006 .num)]])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 ruling A93 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.