Elm Exactly

Theoremsc_match

StandardElmMech/Stat/RefuseScope.lean:735, The bare checker is sound · term proof

Statement

theorem sc_match : (m : AMatch) → (C : Ctx) → (Γ : Shape) → Abs C Γ → checkMatch C m = true →
    scMatch Γ m.erase = true
  | .mk mr rest, C, Γ, hA, h => by
    simp only [checkMatch, Bool.and_eq_true] at h
    simp only [AMatch.erase, scMatch, Bool.and_eq_true]
    exact ⟨sc_mrule mr C Γ hA h.1, sc_matchOpt rest _ C Γ hA h.2⟩

Proof

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

In StandardElmMech/Stat/RefuseScope.lean: Refusals by scope, constructor arity and imports, for one module and for a module after a helper (scopeFailB).

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.