Theoremve_var
Statement
theorem ve_var (x : Var) (ann : Option (BTy × List BVar)) (τ : Ty) (e : AExp) (rest : Option AValBind) (k : String) :
FMap.find? (AValBind.ve (.var x ann τ e rest)) k =
((rest.map AValBind.ve).getD [] |>.find? k).or
(FMap.find? [(x, (if ann.isSome then annScheme (annU ann) τ else mono τ, IdStatus.v))] k)Proof
by
cases rest <;> simp [AValBind.ve, FMap.find?_modify]Proved with tactics, which Lean expands into a proof term that its kernel checks.
Used by
In StandardElmMech/Stat/RefuseTypes.lean: Refusals by type expressions (aliases, constructor arguments, annotations, ports) and by the type of main (typesFailB, mainFailB), for every choice of generated names and variable sorts.
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.