Elm Exactly

TheoremevProgram_unique_l

StandardElmMech/Mod/Complete.lean:296, Statements about every derivation of a program · tactic proof

A program value found without reading a choice is the only one, and its log the only log.

Statement

theorem evProgram_unique_l {o : Oracle} {n : Nat} {B : Basis} {p : List Module} {k : Nat} {v : Val}
    {l : Log} (h : evProgram o n B p k = ⟨.value v, l, k⟩) :
    ∀ v' l', EvalProgramL B p v' l' → v' = v ∧ l' = l

Proof

by
  intro v' l' d
  rcases EvalProgramL.nostuck d o n k _ h with h1 | h1 | h1
  · simp at h1
  · simp at h1
  · simp only [Res.mk.injEq, Outcome.value.injEq] at h1; exact ⟨h1.1.symm, h1.2.1.symm⟩

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.