TheoremacceptFn_sound
Statement
theorem acceptFn_sound {o : Oracle} {fuel : Nat} {x : Input} : ∀ {L : List Val} {k : Nat}
{ms : List Val} {ls : Log} {k' : Nat}, acceptFn o fuel x L k = some (ms, ls, k') → AcceptMsgsL L x ms ls
| [], k, ms, ls, k', h => by
simp only [acceptFn, Option.some.injEq, Prod.mk.injEq] at h
obtain ⟨rfl, rfl, -⟩Proof
h
exact .seq_nil_l x
| c :: cs, k, ms, ls, k', h => by
simp only [acceptFn] at h
split at h
· rename_i hn
exact .seq_none_l c cs x ms ls (recvNone_sound hn) (acceptFn_sound h)
· split at h
· rename_i v l k1 hr
cases ha : acceptFn o fuel x cs k1 with
| none => simp [ha] at h
| some t =>
obtain ⟨ms1, ls1, k2⟩ := t
simp only [ha, Option.map_some, Option.some.injEq, Prod.mk.injEq] at h
obtain ⟨rfl, rfl, -⟩ := h
exact .seq_recv_l c cs x v ms1 l ls1 (recvL_sound c hr) (acceptFn_sound ha)
· cases hProved 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.