Elm Exactly

Theoremfind?_mapV

StandardElmMech/Stat/RefuseScope.lean:252, Finite maps · tactic proof

Statement

theorem find?_mapV (f : FMap K V) (g : V → W) (k : K) :
    FMap.find? (FMap.mapV f g) k = (FMap.find? f k).map g

Proof

by
  induction f with
  | nil => rfl
  | cons p r ih =>
    obtain ⟨k', v⟩ := p
    simp only [FMap.mapV, List.map_cons, FMap.find?] at ih ⊢
    split <;> simp_all

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

Used by

In StandardElmMech/Stat/RefuseScope.lean: Refusals by scope, constructor arity and imports, for one module and for a module after a helper (scopeFailB).

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.