TheoremevProgram_complete
D1 for programs: every derivation of a program's meaning is found by some choices and fuel.
Statement
theorem evProgram_complete {B : Basis} {p : List Module} {v : Val} (h : EvalProgram B p v) :
∃ (L : List Bool) (n : Nat), (evProgram (Oracle.ofList L) n B p 0).out = .value vProof
by
obtain ⟨l, hl⟩ := EvalProgram.lift h
obtain ⟨L, n, c⟩ := EvalProgramL.complete hl
exact ⟨L, n, by rw [c (Oracle.ofList L) 0 n (Nat.le_refl n) (agrees_ofList L)]⟩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.