TheoremnodesOkB_nodesAtExp
Statement
theorem nodesOkB_nodesAtExp (C : Ctx) (path : List Nat) : ∀ a : AAtExp, nodesOkB (nodesAtExp C path a) = okAtExpB a
| .scon _ _ | .var _ _ _ | .con _ _ _ | .op _ _ _ | .unit | .nil _ => by
simp only [nodesAtExp, okAtExpB]; nodes_ok_simp
| .tuple e1 e2 e3 => by
simp only [nodesAtExp, okAtExpB]; nodes_ok_simp
rw [nodesOkB_nodesExp C _ e1, nodesOkB_nodesExp C _ e2, nodesOkB_nodesExpOpt C _ e3]
| .record row => by
simp only [nodesAtExp, okAtExpB]; nodes_ok_simp
rw [nodesOkB_nodesExpRowOpt C _ row]
| .update _ _ τ row => by
simp only [nodesAtExp, okAtExpB]; nodes_ok_simp
rw [nodesOkB_nodesExpRow C _ row]
| .letE d e => by
simp only [nodesAtExp, okAtExpB]; nodes_ok_simp
rw [nodesOkB_nodesDec C _ d, nodesOkB_nodesExp _ _ e]
| .paren e => by
simp only [nodesAtExp, okAtExpB]; nodes_ok_simp
rw [nodesOkB_nodesExp C _ e]Proof
Proved by a term, which Lean's kernel checks directly.
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.