TheoremevProgram_next_ge
Statement
theorem evProgram_next_ge (o : Oracle) (n : Nat) : ∀ B p k, k ≤ (evProgram o n B p k).next
| B, [], k => by simp [evProgram]
| B, [m], k => by
simp only [evProgram]
rcases h1 : evModule o n B m k with ⟨out1, l1, k1⟩
have e1Proof
evModule_next h1
simp only at e1
cases out1 with
| value BV => obtain ⟨B', VE⟩ := BV; dsimp only; split <;> simp <;> omega
| stuck => simp; omega
| outOfFuel => simp; omega
| B, m :: m2 :: p, k => by
simp only [evProgram]
rcases h1 : evModule o n B m k with ⟨out1, l1, k1⟩
have e1 := evModule_next h1
simp only at e1
cases out1 with
| value BV =>
obtain ⟨B', VE⟩ := BV
dsimp only
rcases h2 : evProgram o n (fmPlus B B') (m2 :: p) k1 with ⟨out2, l2, k2⟩
have e2 := evProgram_next_ge o n (fmPlus B B') (m2 :: p) k1
rw [h2] at e2; simp only at e2
cases out2 <;> simp <;> omega
| stuck => simp; omega
| outOfFuel => simp; omegaProved by a term, which Lean's kernel checks directly.
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.