Elm Exactly

Theoremfacts

StandardElmMech/Stat/DupValuesCounterexample.lean:68 · kernel-checked (decide +kernel)

Both are derivations of the program, and generate no type name.

Statement

theorem facts : dA.length = 1 ∧ dA'.length = 1 ∧
    checkProgram Btest dA = true ∧ checkProgram Btest dA' = true ∧
    dA.map AModule.erase = (bareOf dupProg).modules ∧ dA'.map AModule.erase = (bareOf dupProg).modules ∧
    genNames Btest m0 = [] ∧ genNames Btest m0' = []

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/DupValuesCounterexample.lean: Two derivations with the same nodes that differ only in an instance specialisation once read through a scope the checker disagrees with (a module with two top-level x); specialisation now reads instances off the occurrence's type (same).

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.