TheoremsameTy_oplusE_plus
Statement
theorem sameTy_oplusE_plus (C : Ctx) (E1 E2 : Env) :
SameTy (C.oplusE (E1.plus E2)) ((C.oplusE E1).oplusE E2)Proof
by
rintro ⟨q, c⟩
cases q with
| none =>
rw [lookupTy_oplusE_none, lookupTy_oplusE_none, lookupTy_oplusE_none]
simp [Env.plus, FMap.find?_modify, Option.or_assoc]
| some m =>
rw [lookupTy_oplusE_some, lookupTy_oplusE_some]
simp [Env.plus, Ctx.oplusE, FMap.find?_modify, Option.or_assoc]Proved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
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.