Elm Exactly

Theorema25_no_meaning

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

A25: a program whose first module is x = let f _ = x in f () has no meaning.

Statement

theorem a25_no_meaning (B : Basis) (p : List Module) : ¬ ∃ v, EvalProgram B (mA25 :: p) v

Proof

by
  rintro ⟨v, d⟩
  cases d with
  | r_p_dyn_module _ _ _ B' VE _ hm _ _ => exact a25_no_value B ⟨B', VE, hm⟩
  | r_p_dyn_main _ _ B' VE _ hm _ => exact a25_no_value B ⟨B', VE, hm⟩

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

Rules of the book it uses

Theorems it uses

About ruling A25 of the book, where the implementations disagreed or were silent and the definition decides.

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.