Theorema62_example
A62, a concrete program: its update has no result, so no update step exists.
Statement
theorem a62_example : ¬ ∃ v2 w, AppVal a62Update (.con a62Msg []) v2 ∧ AppVal v2 .unit wProof
by
have h := a62B_true
unfold a62B at h
split at h
· rename_i v2 l k h1
simp only [Bool.and_eq_true, beq_iff_eq] at h
obtain ⟨rfl, h⟩ := h
split at h
· rename_i l' k' h2
simp only [beq_iff_eq] at h
subst h
rintro ⟨v2', w, ha1, ha2⟩
obtain ⟨l1, ha1'⟩ := AppVal.lift ha1
obtain ⟨rfl, -⟩ := appVal_unique_l h1 v2' l1 ha1'
exact appVal_noValue_of_stuck h2 ⟨w, ha2⟩
· cases h
· cases hProved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
About ruling A62 of the book, where the implementations disagreed or were silent and the definition decides.
In StandardElmMech/Prog/Rulings.lean: The rulings A62, A72, A77, A79, A80 and A81 as theorems, and a66_batch_order_open: a program whose batch is delivered in either order.
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.