Theoremvb_noMain
Statement
theorem vb_noMain : ∀ avb : AValBind, vbNoMain avb.erase = true → FMap.find? avb.ve "main" = none
| .var x ann τ e rest, h => by
simp only [AValBind.erase, vbNoMain_var, Bool.and_eq_true, bne_iff_ne, ne_eq] at h
rw [ve_var]
have hx : FMap.find? [(x, (if ann.isSome then annScheme (annU ann) τ else mono τ, IdStatus.v))] "main" = noneProof
by
simp [FMap.find?, h.1]
rw [hx]
cases rest with
| none => rfl
| some r =>
simp only [AValBind.eraseOpt, Option.map_some, Option.getD_some] at h ⊢
rw [vb_noMain r h.2]; rfl
| .pat _ _, h => by simp [AValBind.erase, vbNoMain] at hProved 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.