Elm Exactly

Theorema49_float_lo_gt_hi

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

A49 through the rules: clamp 10 0 5 at Float evaluates to +0 (hi), by r:d-app-basic-partial and r:d-app-basic-apply with APPLY(clamp). [native]

Statement

theorem a49_float_lo_gt_hi :
    ∃ w, EvalExp E0 (ap (v "clamp") [fI 10, fI 0, fI 5]) w ∧ showElmSigned w = "+0"

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.

Rules of the book it uses

Theorems it uses

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