Elm Exactly

TheoremevModule_next

StandardElmMech/Mod/Complete.lean:150, nostuck · tactic proof

Statement

theorem evModule_next {o : Oracle} {n : Nat} {B : Basis} {m : Module} {k : Nat} {r : Res (Basis × ValEnv)}
    (h : evModule o n B m k = r) : k ≤ r.next

Proof

by
  subst h
  simp only [evModule]
  split
  · rcases h1 : evTopDec o n _ m.body k with ⟨out1, l1, k1⟩
    have e1 := evTopDec_next h1
    simp only at e1
    cases out1 with
    | value I => dsimp only; split <;> simp <;> omega
    | stuck => simp; omega
    | outOfFuel => simp; omega
  · simp

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

Theorems it uses

Used by

In StandardElmMech/Mod/Complete.lean: The functional parts' converses, nostuck for modules and programs, noMeaning_of_stuck, evProgram_unique_l, completeness (evProgram_complete, noMeaning_iff).

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.