TheoremelabTyList_sim
Statement
theorem elabTyList_sim : ∀ (ts : List BTy) (τs : List Ty), (∀ lc ∈ bTyListCons ts, LookSim f C A lc) →
elabTyList C ts = some τs → elabTyList A ts = some (mapTys f τs)
| [], τs, _, h => by unfold elabTyList at h ⊢; cases h; rfl
| t :: ts, τs, hl, h => by
unfold elabTyList at h ⊢
simp only [bTyListCons, List.mem_append] at hl
cases h1 : elabTy C t with
| none => rw [h1] at h; simp at h
| some τ =>
cases h2 : elabTyList C ts with
| none => rw [h1, h2] at h; simp at h
| some τs' =>
rw [h1, h2] at h; cases h
rw [elabTy_sim t τ (fun lc h => hl lc (.inl h)) h1,
elabTyList_sim ts τs' (fun lc h => hl lc (.inr h)) h2]
simp [mapTys]Proof
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.