Elm Exactly

TheoremtextValue_evalL

StandardElmMech/Eff/TaskTexts.lean:132, Values of texts taken in order · tactic proof

The same derivation in the logged relation, with the empty log (a lambda logs nothing).

Statement

theorem textValue_evalL (E : Env) (x : Var) (p : AtPat) (ps : List AtPat) (e : Exp) :
    EvalDecL E (.val (.var x (lams (p :: ps) e) none)) (textValue E (.fn x (p :: ps) e)) []

Proof

by
  have hv : EvalValBindL E (.var x (lams (p :: ps) e) none) (fmPlus [(x, .closure p (lams ps e) E [])] []) ([] ++ []) :=
    EvalValBindL.r_d_valbind_var_l _ _ _ _ _ _ _ _ (EvalExpL.r_d_exp_lambda_l E p (lams ps e))
      (EvalValBindOptL.opt_none_l _)
  have he : fmPlus [(x, Val.closure p (lams ps e) E [])] ([] : ValEnv) = [(x, .closure p (lams ps e) E [])] := by
    simp [fmPlus]
  rw [he] at hv
  simp only [textValue]
  split
  · rename_i h; exact EvalDecL.r_d_dec_rec_l _ _ _ _ hv h
  · rename_i h; exact EvalDecL.r_d_dec_nonrec_l _ _ _ _ hv (by simpa using h)

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

Rules of the book it uses

Used by

In StandardElmMech/Eff/TaskTexts.lean: The elm/core 1.0.5 texts of Task and of the List functions it reaches, their values taken in order, and their derivations (textValue_eval, taskTexts_eval, listTexts_eval); ME0(Task) and ME0(Process).

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.