TheoremcheckValBindOpt_sound
Statement
theorem checkValBindOpt_sound (C : Ctx) : (vb : Option AValBind) → checkValBindOpt C vb = true →
ElValBindOpt C (AValBind.eraseOpt vb) (AValBind.veOpt vb)
| none, _ => by simp only [AValBind.eraseOpt, AValBind.veOpt]; exact .opt_none
| some vb, h => by
simp only [checkValBindOpt] at h
simp only [AValBind.eraseOpt, AValBind.veOpt]
exact .opt_some (checkValBind_sound C vb h)Proof
Proved by a term, which Lean's kernel checks directly.
Used by
In StandardElmMech/Stat/CheckSound.lean: The checker is sound: a phrase that checks has a derivation by the rules of Chapters 4 and 5 (checkExp_sound, checkModule_sound).
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.