Elm Exactly

Theoremt1_a81_long_sleep_may_end

StandardElmMech/Prog/T1.lean:35 · tactic proof

Finding T1: r:p-wait lets 3e9 ms pass before the 200 ms sleep's action is taken; then the long sleep's action is ready, and the process logs before it is killed.

Statement

theorem t1_a81_long_sleep_may_end :
    ∃ j lg, WorkerExec (Mod.Btest []) w_elm_core_StandardA81SleepBeyond32BitsTest.prog.modules .unit j .none lg ∧
      ∃ e ∈ lg, e.1 = "the long sleep ended"

Proof

by
  have h := t1Check_true
  unfold t1Check at h
  split at h
  · rename_i lg res hr
    have hx := runWorker_sound hr
    have e1 : t1Worker.prog = w_elm_core_StandardA81SleepBeyond32BitsTest.prog := rfl
    have e2 : t1Worker.flagsType = .unit := rfl
    have e3 : t1Worker.host = .none := rfl
    rw [e1, e2, e3] at hx
    refine ⟨t1Worker.flags, lg, hx, ?_⟩
    obtain ⟨e, he, hl⟩ := List.any_eq_true.mp h
    exact ⟨e, he, by simpa using hl⟩
  · cases h

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

Rules of the book it uses

Theorems it uses

In StandardElmMech/Prog/T1.lean: Finding T1: an execution of StandardA81SleepBeyond32BitsTest the book allows that logs the line its CHECK-NOT forbids (t1_a81_long_sleep_may_end).

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.