Elm Exactly

TheoremnoValue_iff

StandardElmMech/Determinism.lean:83 · tactic proof

Statement

theorem noValue_iff {E : Env} {e : Exp} :
    (¬ ∃ v, EvalExp E e v) ↔ ∀ (L : List Bool) (n : Nat) (v : Val),
      (evExp (Oracle.ofList L) n E e 0).out ≠ .value v

Proof

by
  constructor
  · intro h L n v hv; exact h ⟨v, evExp_sound hv⟩
  · rintro h ⟨v, hv⟩
    obtain ⟨L, n, hc⟩ := evExp_complete hv
    exact h L n v hc

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

Theorems it uses

In StandardElmMech/Determinism.lean: noValue_of_stuck, evExp_unique, evExp_unique_l, evExp_complete, noValue_iff, and the same for applications and declarations.

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.