TheoremtaskRed_same_redex
Two reductions of a task reduce its one redex.
Statement
theorem taskRed_same_redex {tk : Val} {a1 a2 : Option Action} {t1 t2 : Val}
(h1 : TaskRed tk a1 t1) (h2 : TaskRed tk a2 t2) :
∃ fs r r1 r2, RedexRed r a1 r1 ∧ RedexRed r a2 r2 ∧ t1 = plug fs r1 ∧ t2 = plug fs r2Proof
by
obtain ⟨fs1, r1, r1', hf1, hr1, rfl⟩ := taskRed_iff.mp h1
obtain ⟨fs2, r2, r2', hf2, hr2, rfl⟩ := taskRed_iff.mp h2
rw [hf1] at hf2
simp only [Option.some.injEq, Prod.mk.injEq] at hf2
obtain ⟨rfl, rfl⟩ := hf2
exact ⟨fs1, r1, r1', r2', hr1, hr2, rfl, rfl⟩Proved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
Used by
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.