Elm Exactly

TheoremtaskRed_kind

StandardElmMech/Eff/Task.lean:225, The redex of a task · tactic proof

Either every reduction of a task is silent or every one is labelled, by one primitive and one argument list (sec:effects-tasks, the property).

Statement

theorem taskRed_kind {tk : Val} {a1 a2 : Option Action} {t1 t2 : Val}
    (h1 : TaskRed tk a1 t1) (h2 : TaskRed tk a2 t2) :
    (a1 = none ↔ a2 = none) ∧
    ∀ x1 x2, a1 = some x1 → a2 = some x2 → x1.prim = x2.prim ∧ x1.args = x2.args

Proof

by
  obtain ⟨fs, r, r1, r2, hr1, hr2, _, _⟩ := taskRed_same_redex h1 h2
  cases hr1 <;> cases hr2 <;> simp

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

Theorems it uses

In StandardElmMech/Eff/Task.lean: Task reduction (TaskRed, 7 rules, r_e_task_*) and its logged twin, focus and plug, the property of task reduction (taskRed_iff, taskRed_outcome, taskRed_kind, taskRed_silent_same, taskRed_none), and the executable step stepTaskL, sound, complete and unique.

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.