TheoremelabTyOpt_sim
Statement
theorem elabTyOpt_sim : ∀ (t : Option BTy) (τ : Option Ty), (∀ lc ∈ bTyOptCons t, LookSim f C A lc) →
elabTyOpt C t = some τ → elabTyOpt A t = some (τ.map (mapTy f))
| none, τ, _, h => by unfold elabTyOpt at h ⊢; cases h; rfl
| some t, τ, hl, h => by
unfold elabTyOpt at h ⊢
cases h1 : elabTy C t with
| none => rw [h1] at h; simp at h
| some τ' =>
rw [h1] at h; cases h
rw [elabTy_sim t τ' (by simpa [bTyOptCons] using hl) h1]
rflProof
Proved by a term, which Lean's kernel checks directly.
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.