Theoremholds_of_run
A run whose log meets every check, and which sends out the values of sent, proves the worker's statement.
Statement
theorem holds_of_run {w : WorkerTest} (h : w.checkB = true) : w.HoldsProof
by
unfold WorkerTest.checkB at h
split at h
· rename_i lg res hr
simp only [Bool.and_eq_true] at h
exact ⟨lg, res.path.outs, runWorker_soundO hr,
fun ck hm => LogCheck.check_sound (List.all_eq_true.mp h.1 ck hm), List.isSublist_iff_sublist.mp h.2⟩
· cases hProved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
In StandardElmMech/Prog/Worker.lean: Worker tests: WorkerTest.Holds (some execution the book allows, under the test's host, has a log meeting every check), runWorker (evaluate the modules, start, run the scheduler), runWorker_sound, holds_of_run.
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.