Elm Exactly

Theoremzip_keys_isSome

StandardElmMech/Mod/Good.lean:134, The domains of the bindings · tactic proof

Statement

theorem zip_keys_isSome {β : Type} : ∀ (xs : List String) (vs : List β) (a : String),
    (fmLookup (xs.zip vs) a).isSome → a ∈ xs

Proof

by
  intro xs vs a h
  have := fmLookup_isSome_mem _ a h
  simp only [fmDom, List.mem_map] at this
  obtain ⟨⟨k, v⟩, hm, rfl⟩ := this
  exact (List.of_mem_zip hm).1

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

Theorems it uses

In StandardElmMech/Mod/Good.lean: The property of interfaces (Interface.Good): ME0 and the harness have it (ME0_good), a top-level declaration with distinct bound names infers an interface with it (EvalTopDec.good), a header's exposing list keeps it (EvalHeader.good), and so does every interface a module puts in the basis (EvalModule.good).

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.