Theoremfn_of_match
Statement
theorem fn_of_match {τ0 τa : Ty}
(h : (match τ0 with
| .fn τ' _ => decide (τ' = τa)
| _ => false) = true) : ∃ τ, τ0 = .fn τa τProof
by
split at h
· simp only [decide_eq_true_eq] at h; subst h; exact ⟨_, rfl⟩
· cases hProved with tactics, which Lean expands into a proof term that its kernel checks.
Used by
In StandardElmMech/Stat/CheckSound.lean: The checker is sound: a phrase that checks has a derivation by the rules of Chapters 4 and 5 (checkExp_sound, checkModule_sound).
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.