Elm Exactly

TheoremcheckMatch_sound

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

Statement

theorem checkMatch_sound (C : Ctx) : (m : AMatch) → checkMatch C m = true → ElMatch C m.erase m.ty
  | .mk mr rest, h => by
    simp only [checkMatch, Bool.and_eq_true] at h
    simp only [AMatch.erase, AMatch.ty]
    exact .r_s_match (checkMRule_sound C mr h.1) (checkMatchOptAt_sound C _ rest h.2)

Proof

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

Rules of the book it uses

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.