Elm Exactly

TheoremokB_of_checkExp

StandardElmMech/Stat/Annotated.lean:714, The checker · tactic proof

At every node of a derivation the checker accepts, the types are Ty.okB.

Statement

theorem okB_of_checkExp {C : Ctx} {a : AExp} (h : checkExp C a = true) :
    ∀ n ∈ nodesExp C [] a, ∀ τ ∈ n.tys, Ty.okB τ = true

Proof

by
  simp only [checkExp, Bool.and_eq_true] at h; exact (nodesOkB_iff _).mp (by rw [nodesOkB_nodesExp]; exact h.2)

Proved with tactics, which Lean expands into a proof term that its kernel checks.

Theorems it uses

In StandardElmMech/Stat/Annotated.lean: Annotated phrases (D10: a derivation is a phrase with the objects its rules choose) and the checker (checkExp, checkModule, checkProgram).

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.