Elm Exactly

TheoremfmLookup_none_iff

StandardElmMech/Mod/Properties.lean:41, Finite maps · tactic proof

Statement

theorem fmLookup_none_iff {β : Type} (g : List (String × β)) (a : String) :
    fmLookup g a = none ↔ (g.any fun q => q.1 == a) = false

Proof

by
  induction g with
  | nil => simp [fmLookup]
  | cons p g ih =>
    obtain ⟨k, x⟩ := p
    simp only [fmLookup, List.any_cons]
    split <;> simp_all

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

Used by

In StandardElmMech/Mod/Properties.lean: The frame lemmas (a module's derivation reads the basis only at the modules it imports) and Btest_agrees.

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.