Elm Exactly

TheoremapplyRow_map

StandardElmMech/Stat/RefuseTypes.lean:160, Renaming type names · term proof

Statement

theorem applyRow_map (f : TyName → TyName) (S : Subst) :
    ∀ ρ : Row, (mapSubst f S).applyRow (mapRow f ρ) = (S.applyRow ρ).map (mapRow f)
  | [] => by simp [mapRow, Subst.applyRow]
  | (l, τ) :: rest => by
    simp only [mapRow, Subst.applyRow]
    rw [apply_map f S τ, applyRow_map f S rest]
    cases S.apply τ <;> cases S.applyRow rest <;> simp [mapRow]

Proof

Proved by a term, which Lean's kernel checks directly.

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.