TheoremevExpItem_sound
Statement
theorem evExpItem_sound {I : Interface} {it : ExpItem} {I' : Interface} :
evExpItem I it = some I' → EvalExpItem I it I'Proof
by
cases it with
| var x =>
simp only [evExpItem, Option.map_eq_some_iff]
rintro ⟨v, hv, rfl⟩; exact .r_dm_expitem_var I x v hv
| op o => simp only [evExpItem, Option.some.injEq]; rintro rfl; exact .r_dm_expitem_op I o
| tycon t =>
simp only [evExpItem]
split
· rename_i hRA
simp only [Option.map_eq_some_iff]
rintro ⟨v, hv, rfl⟩; exact .r_dm_expitem_alias I t v hRA hv
· rename_i hRA
simp only [Option.some.injEq]; rintro rfl
exact .r_dm_expitem_type I t _ hRA rfl
| opened t =>
simp only [evExpItem, Option.map_eq_some_iff]
rintro ⟨VE, hVE, rfl⟩; exact .r_dm_expitem_open I t VE hVEProved with tactics, which Lean expands into a proof term that its kernel checks.
Rules of the book it uses
In StandardElmMech/Mod/Sound.lean: Its soundness.
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.