TheoremapplySet_complete
Every member of APPLY(b, vs) is in applySet b vs (completeness of the executable set).
Statement
theorem applySet_complete {b : BasVal} {vs : List Val} {v : Val} :
Apply b vs v → v ∈ applySet b vsProof
by
intro h
by_cases he : b.isEffect = true
· simp only [applySet, he, ite_true]; exact applySetEff_complete h he
cases h
all_goals simp only [BasVal.isEffect, not_true_eq_false] at he
all_goals simp only [applySet, BasVal.isEffect, BasVal.isNew, ite_true, ite_false, Bool.false_eq_true]
all_goals first
| (simp_all [applySetCore, applySetNew, boolSetList, BoolSet.mem, isFloat]; done)
| (rename_i b _; cases b <;> simp_all [applySetCore, boolSetList, BoolSet.mem]; done)
| (simp only [applySetCore]; split <;> simp_all [isFloat]; done)
| (simp only [applySetCore]; repeat' split
all_goals simp_all [isFloat]
all_goals omega)Proved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
Used by
In StandardElmMech/Apply.lean: Eq and cmp as functions; IEEE 754-2019 minimum and maximum (fMinimum, fMaximum) and clamp at floats built on them (fClamp); APPLY as the relation Apply (one constructor per line of the book's displays) and as the executable applySet, with applySet_sound and applySet_complete; logEntry, the log entry of an application of Debug.log.
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.