Elm Exactly

Theoremtr_empty_iff_no_start

StandardElmMech/Prog/Exec.lean:130 · tactic proof

A program has no trace exactly when it does not start.

Statement

theorem tr_empty_iff_no_start {B : Mod.Basis} {ms : List Mod.Module} {τ1 : PTy} {j : BVal} :
    (∀ tr, ¬ Tr B ms τ1 j tr) ↔ ¬ ∃ r K0, Mod.EvalProgram B ms (.prog r) ∧ Start (portEnv ms) τ1 j r K0

Proof

by
  constructor
  · intro h hs; exact h [] (tr_nil hs)
  · rintro h tr ⟨r, K0, π, hs, he, hst, _, _⟩; exact h ⟨r, K0, he, hst⟩

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

Theorems it uses

In StandardElmMech/Prog/Exec.lean: Hosts (any, none, the test runner's echo), executions with and without logs, a worker's executions (WorkerExec, its log as D9 defines it), traces and Tr (tr_nil, tr_prefix, tr_empty_iff_no_start).

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.