Theoremrun_sound
A run is an execution: the transitions the scheduler takes, from where it started.
Statement
theorem run_sound (c : Ctx) (K0 : Config) (hs0 : List BVal) : ∀ (n : Nat) (st : SchedState) (acc : PathL),
ExecL c.PE c.r c.host K0 hs0 acc st.hs → lastConfig K0 acc = st.K →
ExecL c.PE c.r c.host K0 hs0 (run c n st acc).path (run c n st acc).hs
| 0, st, acc, hx, _ => by simpa [run] using hx
| n + 1, st, acc, hx, hl => by
unfold run
simp only
split
· simpa using hx
· split
· rename_i t st' hd
have ⟨hst, hh, hK, hhs⟩Proof
doChoice_sound hd
apply run_sound c K0 hs0 n
· simp only
rw [hhs]
refine ExecL.append hx ?_
rw [hl]
exact .cons _ _ _ _ _ _ _ _ hst hh (.nil _ _)
· simp only [lastConfig_append]; exact hK.symm
· apply run_sound c K0 hs0 n
· simpa using hx
· simpa using hl
· simpa using hxProved by a term, which Lean's kernel checks directly.
Theorems it uses
Used by
In StandardElmMech/Prog/Sched.lean: The default scheduler (run): one choice per iteration, overridable per test, each transition proved by doChoice_sound; run_sound: every run is an execution.
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.