Elm Exactly

Theorema38_ambiguous_unused

StandardElmMech/Mod/Rulings.lean:52 · kernel-checked (decide +kernel)

A38: both imports expose x, the module never uses it, and the program has a meaning. [harness] [params]

Statement

theorem a38_ambiguous_unused :
    ∃ w, EvalProgram B38 [.withDefaults ⟨false, "Main", .items [.var "main"]⟩
        [⟨"A", "A", some (.items [.var "x"])⟩, ⟨"B", "B", some (.items [.var "x"])⟩,
         ⟨"Html", "Html", some (.items [.var "text"])⟩]
        (.val [("main", .app (v "text") (strA "ok"))])] w ∧ (Expect.con "node#" [.str "ok"]).holds w

Proof

programValue_sound (o := .const false) (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.

Theorems it uses

About ruling A38 of the book, where the implementations disagreed or were silent and the definition decides.

In StandardElmMech/Mod/Rulings.lean: A82, A38 and A28 on programs written by hand.

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.