Elm Exactly

TheoremcheckMatchOptAt_sound

StandardElmMech/Stat/CheckSound.lean:247, Expressions · term proof

Statement

theorem checkMatchOptAt_sound (C : Ctx) (τ : Ty) : (m : Option AMatch) → checkMatchOptAt C τ m = true →
    ElMatchOpt C (AMatch.eraseOpt m) τ
  | none, _ => by simp only [AMatch.eraseOpt]; exact .opt_none
  | some m, h => by
    simp only [checkMatchOptAt, Bool.and_eq_true, decide_eq_true_eq] at h
    have hm

Proof

checkMatch_sound C m h.1
    rw [h.2] at hm
    simp only [AMatch.eraseOpt]
    exact .opt_some hm

Proved by a term, which Lean's kernel checks directly.

Theorems it uses

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.