Elm Exactly

Theoremspec_copy_bound

StandardElmMech/Stat/SpecExamples.lean:631, The choices of the plan · kernel-checked (decide +kernel)

The bound of dynamic-core ("a declaration with k variables of class number has at most 2^k copies"), reached: three variables used at all eight assignments give eight copies, the default copy first and then the others in the lexicographic order of their assignments, Float before Int (Choices, item 4), whatever the order of the uses.

Statement

theorem spec_copy_bound :
    onOk copyBoundView (endToEnd Btest s_spec_copy_bound) =
    some (some ["t", "t$Float$Float$Int", "t$Float$Int$Float", "t$Float$Int$Int", "t$Int$Float$Float",
                "t$Int$Float$Int", "t$Int$Int$Float", "t$Int$Int$Int", "main"],
          some [.intF 1, .int 1, .int 1], some [.int 1, .intF 1, .intF 1])

Proof

by
  decide +kernel

Proved 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.