Theoremdispatch_outq
Dispatch only appends to a queue.
Statement
theorem dispatch_outq {s : Time} {P : Procs} {Q : OutQ} {H : Pending} {L : List Val} {P' : Procs}
{Q' : OutQ} {H' : Pending} (h : Dispatch s P Q H L P' Q' H') (p : String) :
∃ new, Q'.get p = Q.get p ++ newProof
by
induction h with
| r_p_disp_empty => exact ⟨[], by simp⟩
| r_p_disp_task _ _ _ _ _ _ _ _ _ _ _ _ _ ih => exact ih
| r_p_disp_out P Q H c q j js L P' Q' H' _ hq _ ih =>
obtain ⟨new, hn⟩ := ih
by_cases hqp : q = p
· subst hqp
refine ⟨j :: new, ?_⟩
rw [hn, OutQ.get_fmPlus_same]
simp [OutQ.get, hq]
· rw [OutQ.get_fmPlus_other _ _ _ _ hqp] at hn
exact ⟨new, hn⟩
| r_p_disp_plat _ _ _ _ _ _ _ _ _ _ _ _ _ ih => exact ihProved with tactics, which Lean expands into a proof term that its kernel checks.
Rules of the book it uses
Theorems it uses
Used by
In StandardElmMech/Prog/Guarantees.lean: The guarantees of A86: a86_step (messages handled one at a time, in queue order, every other step keeps the model and only appends messages) and a86_out_fifo (each outgoing port delivers its values in the order they were queued).
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.