Elm Exactly

TheoremcheckTopDecOpt_sound

StandardElmMech/Stat/CheckSound.lean:406, Modules · tactic proof

Statement

theorem checkTopDecOpt_sound (C : Ctx) (a : Option ATopDec) (E : Env) (PE : PortEnv)
    (h : checkTopDecOpt C a = some (E, PE)) : ElTopDecOpt C (a.map ATopDec.erase) E PE

Proof

by
  cases a with
  | none =>
    simp only [checkTopDecOpt, Option.some.injEq, Prod.mk.injEq] at h
    obtain ⟨rfl, rfl⟩ := h
    exact .opt_none
  | some d => exact .opt_some (checkTopDec_sound C d E PE h)

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

Theorems 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.