Elm Exactly

Theoremlookup_gen

StandardElmMech/Stat/CheckSound.lean:137, Expressions · tactic proof

Statement

theorem lookup_gen {C : Ctx} {lv : LongId} {inst : List Ty} {τ : Ty}
    (h : (match C.lookupVal lv with
      | some (σ, _) => genAt σ inst τ
      | none => false) = true) : ∃ σ is, C.lookupVal lv = some (σ, is) ∧ Gen σ τ

Proof

by
  split at h
  · rename_i σ is hl; exact ⟨σ, is, hl, gen_of_genAt h⟩
  · cases 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.