TheoremcheckAnn_sound
Statement
theorem checkAnn_sound (C : Ctx) (ann : Option (BTy × List BVar)) (τ : Ty) (h : checkAnn C ann τ = true) :
AnnOK C (ann.map Prod.fst) (annU ann) τProof
by
match ann, h with
| none, _ => exact .opt_none
| some (ty, U'), h =>
simp only [checkAnn, Bool.and_eq_true, decide_eq_true_eq, List.all_eq_true, Bool.not_eq_true',
decide_eq_false_iff_not] at h
obtain ⟨⟨h1, h2⟩, h3⟩ := h
exact .opt_some (newFor_of_newForB h1) (elabTy_sound _ _ _ h2) h3Proved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
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.