Elm Exactly

TheoremlookupExt_oplusE

StandardElmMech/Stat/RefuseScope.lean:1021, Top-level declarations · tactic proof

Statement

theorem lookupExt_oplusE (C : Ctx) {E : Env} (hq : E.QE = []) : LookupExt C (C.oplusE E) E.VE

Proof

by
  intro lid
  obtain ⟨q, x⟩ := lid
  cases q with
  | none =>
    simp only [Ctx.lookupVal, Env.lookupVal, Ctx.oplusE, Env.plus]
    rw [FMap.find?_modify]
  | some m =>
    simp only [Ctx.lookupVal, Env.lookupVal, Ctx.oplusE, Env.plus]
    rw [FMap.find?_modify, hq]
    rfl

Proved with tactics, which Lean expands into a proof term that its kernel checks.

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.