Elm Exactly

TheoremrunWorker_soundO

StandardElmMech/Prog/Worker.lean:118 · tactic proof

Statement

theorem runWorker_soundO {w : WorkerTest} {lg : Log} {res : RunResult} (h : runWorker w = some (lg, res)) :
    WorkerExecO (Mod.Btest []) w.prog.modules w.flagsType w.flags w.host lg res.path.outs

Proof

by
  unfold runWorker at h
  simp only at h
  split at h
  · rename_i r lm k1 he
    split at h
    · rename_i K0 ns ls k2 hs
      simp only [Option.some.injEq, Prod.mk.injEq] at h
      obtain ⟨rfl, rfl⟩ := h
      have hx := run_sound ⟨portEnv w.prog.modules, r, w.host, w.sched, workerFuel⟩ K0 [] w.fuel
        ⟨K0, [], ns, [], .const false, k2, 0⟩ [] (.nil _ _) rfl
      exact ⟨r, lm, K0, ls, _, _, Mod.evProgram_sound_l he, startFn_sound hs, hx, rfl, rfl⟩
    · cases h
  · cases h

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

Theorems it uses

Used by

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.