TheorembadHead_apply
Statement
theorem badHead_apply (S : Subst) (τ : Ty) (h : badHeadB τ = true) : badHeadB ((S.apply τ).getD τ) = trueProof
by
cases τ with
| var a => simp [badHeadB] at h
| fn a b =>
simp only [Subst.apply]
split <;> simp [badHeadB]
| record ρ tl =>
cases tl with
| none => simp only [Subst.apply]; split <;> simp [badHeadB]
| some e =>
simp only [Subst.apply]
split
· simp [badHeadB]
· split
· simp [badHeadB]
· split <;> simp [badHeadB]
| con as t =>
simp only [Subst.apply]
split
· rename_i as' h'
simp only [Option.getD_some]
simp only [badHeadB] at h ⊢
rw [applyList_length S as as' h']
exact h
· simpa using hProved 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.