TheoremnoMeaning_iff
A program has no meaning exactly when no choices and fuel give it one.
Statement
theorem noMeaning_iff {B : Basis} {p : List Module} :
(¬ ∃ v, EvalProgram B p v) ↔ ∀ (L : List Bool) (n : Nat) (v : Val),
(evProgram (Oracle.ofList L) n B p 0).out ≠ .value vProof
by
constructor
· intro h L n v hv; exact h ⟨v, evProgram_sound hv⟩
· rintro h ⟨v, hv⟩
obtain ⟨L, n, hc⟩ := evProgram_complete hv
exact h L n v hcProved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
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.