Elm Exactly

TheoremevForces_sound_l

StandardElmMech/Mod/Sound.lean:108 · term proof

Statement

theorem evForces_sound_l {o : Oracle} {n : Nat} {E : Env} : ∀ {ys : List Var} {k : Nat} {vs : List Val}
    {l : Log} {k' : Nat}, evForces o n E ys k = ⟨.value vs, l, k'⟩ → EvalForcesL E ys vs l
  | [], k, vs, l, k', h => by
    simp only [evForces, Res.mk.injEq, Outcome.value.injEq] at h
    obtain ⟨rfl, rfl, rfl⟩

Proof

h; exact .seq_nil_l E
  | y :: ys, k, vs, l, k', h => by
    simp only [evForces] at h
    split at h
    · rename_i v l1 k1 h1
      split at h
      · rename_i vs' l2 k2 h2
        simp only [Res.mk.injEq, Outcome.value.injEq] at h
        obtain ⟨rfl, rfl, rfl⟩ := h
        exact .seq_cons_l E y ys v vs' l1 l2 (evExp_sound_l h1) (evForces_sound_l h2)
      all_goals simp at h
    all_goals simp at h

Proved by a term, which Lean's kernel checks directly.

Theorems it uses

Used by

In StandardElmMech/Mod/Sound.lean: Its soundness.

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.