Elm Exactly

TheoremcheckPatOpt_sound

StandardElmMech/Stat/CheckSound.lean:109, Patterns · term proof

Statement

theorem checkPatOpt_sound (C : Ctx) : (p : Option APat) → checkPatOpt C p = true →
    ElPatOpt C (APat.eraseOpt p) (APat.veOpt p) (APat.tyOpt p)
  | none, _ => by simp only [APat.eraseOpt, APat.veOpt, APat.tyOpt]; exact .opt_none
  | some p, h => by
    simp only [checkPatOpt] at h
    simp only [APat.eraseOpt, APat.veOpt, APat.tyOpt]
    exact .opt_some (checkPat_sound C p 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.