Elm Exactly

Theoremlog_order_demo

StandardElmMech/Theorems.lean:229, Statements that the oracle evaluator makes possible (D1) · kernel-checked (decide +kernel)

D4: Debug.log "a" 1 + Debug.log "b" 2 logs a then b in the logged relation's order, one of the orders the book allows (A58).

Statement

theorem log_order_demo :
    ExpChecks E0 (bin "+" (debugLog "a" (i 1)) (debugLog "b" (i 2)))
      [.run [.entry "a" (.int 1), .entry "b" (.int 2)]]

Proof

expChecks_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 A58 of the book, where the implementations disagreed or were silent and the definition decides.

In StandardElmMech/Theorems.lean: The command #mod_program_theorems (one theorem per program, in module form, in Lib.Btest; tagged [library] when the program names a core library value), budgetNative, the rulings stated directly, and theorems that D1 makes possible (a43_one_unique, a51_one_choice, log_order_demo).

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.