Elm Exactly

Theoremsc_dec

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

Statement

theorem sc_dec : (d : ADec) → (C : Ctx) → (Γ : Shape) → Abs C Γ → checkDec C d = true →
    scDec Γ d.erase = true
  | .val VE vb, C, Γ, hA, h => by
    simp only [checkDec, Bool.and_eq_true, decide_eq_true_eq] at h
    simp only [ADec.erase, scDec]
    have hk : KeysIn VE (vbVars vb.erase)

Proof

h.2 ▸ keys_valBind vb
    exact sc_valBind vb _ _ (abs_plusVE hA hk) h.1

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

Theorems it uses

Used by

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.