Elm Exactly

Theorema44_round_minus_half

StandardElmMech/Theorems.lean:354, The rulings, stated directly (kernel-checked) · native_decide (trusts the compiled evaluator)

A44: round -2.5 is -2, by the rules from E0. [native]

Statement

theorem a44_round_minus_half :
    ∃ w, EvalExp E0 (ap (v "round") [.atexp (neg (.scon (.float 25 (-1))))]) w ∧ showElm w = "-2"

Proof

checkShowWith_sound (o := .const false) (by native_decide)

Proved by native_decide: the decision procedure is compiled and run, and its answer is trusted. This is used where values are compared as they print, floats above all, which the kernel cannot compare.

Theorems it uses

About ruling A44 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.