Elm Exactly

Theorema49_int_apply_singleton

StandardElmMech/Theorems.lean:324, The rulings, stated directly (kernel-checked) · tactic proof

A49: APPLY(clamp, 10, 0, 5) = {10} at Int: the set has one member.

Statement

theorem a49_int_apply_singleton : applySet .clamp [.int 10, .int 0, .int 5] = [.int 10]

Proof

by
  simp [applySet, BasVal.isEffect, BasVal.isNew, applySetCore, cmp, cmpInt, isFloat, pickFirst]

Proved with tactics, which Lean expands into a proof term that its kernel checks.

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.