Elm Exactly

TheoremlistTexts_recursive

StandardElmMech/Eff/TaskTexts.lean:198, The environments and the interfaces · kernel-checked (decide +kernel)

foldl and foldrHelper are recursive, reverse and foldr are not (so their values are Rec of their closures, and the closures themselves).

Statement

theorem listTexts_recursive :
    (listTexts.map fun d => match d with
      | .fn x (p :: ps) e => isRecursive [(x, .closure p (lams ps e) E_List0 [])] (.var x (lams (p :: ps) e) none)
      | _ => false) = [true, false, true, false]

Proof

by decide +kernel

Proved by decide +kernel: Lean's kernel itself runs the decision procedure, here the evaluator, and checks that the answer is true, so nothing outside the kernel is trusted.

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.