Theoremrenumber_fixed
Statement
theorem renumber_fixed (f : TyName → TyName) (k : Bool) :
∀ (i : Nat) (vs : List BVar), mapSubst f (renumber k i vs).1 = (renumber k i vs).1
| _, [] => by simp [renumber, mapSubst, Subst.id]
| i, .ty a :: vs => by
have ihProof
renumber_fixed f k (i + 1) vs
simp only [renumber]
revert ih
generalize renumber k (i + 1) vs = r
obtain ⟨S, bs⟩ := r
intro ih
simp only [mapSubst] at ih ⊢
obtain ⟨Sty, Srow⟩ := S
simp only [Subst.mk.injEq] at ih
simp [ih.1, ih.2, mapTy]
| i, .row e :: vs => by
have ih := renumber_fixed f k (i + 1) vs
simp only [renumber]
revert ih
generalize renumber k (i + 1) vs = r
obtain ⟨S, bs⟩ := r
intro ih
simp only [mapSubst] at ih ⊢
obtain ⟨Sty, Srow⟩ := S
simp only [Subst.mk.injEq] at ih
simp [ih.1, ih.2, mapRow]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.