Elm Exactly

Theoremmodify_single_map

StandardElmMech/Stat/RefuseTypes.lean:307, Simulation of the elaboration of type expressions · tactic proof

Statement

theorem modify_single_map (f : TyName → TyName) (l : Lab) (τ : Ty) (ρ : Row) :
    Row.modify [(l, mapTy f τ)] (mapRow f ρ) = mapRow f (Row.modify [(l, τ)] ρ)

Proof

by
  have := modify_map (mapTy f) [(l, τ)] ρ
  simp only [rowMap, List.map_cons, List.map_nil] at this
  rw [mapRow_rowMap, mapRow_rowMap]
  exact this

Proved with tactics, which Lean expands into a proof term that its kernel checks.

Theorems it uses

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.