Elm Exactly

TheoremappVal_wild

StandardElmMech/Mod/A25.lean:35 · tactic proof

Statement

theorem appVal_wild (o : Oracle) (n : Nat) (e : Exp) (E : Env) (VE : ValEnv) (v : Val) (k : Nat) :
    appVal o (n+2) (.closure .wild e E VE) v k =
      match evExp o (n+1) ((E.plusVE (recVE VE)).plusVE []) e k with
      | ⟨.value x, l2, k2⟩ => ⟨.value x, l2, k2⟩
      | ⟨.stuck, l2, k2⟩ => ⟨.stuck, l2, k2⟩
      | ⟨.outOfFuel, l2, k2⟩ => ⟨.outOfFuel, l2, k2⟩

Proof

by
  simp only [appVal, matchAtPat]
  rfl

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

Used by

In StandardElmMech/Mod/A25.lean: A25: the module x = let f _ = x in f () has no meaning (a25_no_value, a25_no_meaning), by the loop of the evaluator forcing x's thunk (a25_loop) and completeness.

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.