Elm Exactly

Theoremcanon_map

StandardElmMech/Stat/RefuseTypes.lean:228, Renaming type names · tactic proof

Statement

theorem canon_map (f : TyName → TyName) (θ : TyFcn) :
    mapFcn f (TyFcn.canon θ) = TyFcn.canon (mapFcn f θ)

Proof

by
  unfold TyFcn.canon
  simp only [mapFcn]
  have hfix := renumber_fixed f false 0 (dedupL θ.params)
  revert hfix
  generalize renumber false 0 (dedupL θ.params) = r
  obtain ⟨S, bs⟩ := r
  intro hfix
  simp only at hfix ⊢
  have := apply_map f S θ.body
  rw [hfix] at this
  rw [this]
  cases S.apply θ.body <;> simp

Proved 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.